summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-10-18more stdvga cleanups.patchromGerd Hoffmann10-46/+15
video.x is gone now. It was the only user of the vga bios_offset + bios_size logic. Zap it.
2010-10-18switch vmware_vga to pci vgabiosGerd Hoffmann1-6/+1
2010-10-18switch stdvga to pci vgabiosGerd Hoffmann1-4/+3
Make stdvga provide the new vgabios binary (with pcibios support) using the PCI option rom bar. Seabios will happily load it from there. The new vga bios will also lookup the framebuffer address in pci config space, so the magic bochs lfb @ 0xe0000000 is not needed any more -> zap it. Without the patch: # dmesg | grep framebuffer vesafb: framebuffer at 0xe0000000, mapped to 0xf7e80000, using 1875k, total 8192k # lspci -vs2 00:02.0 VGA compatible controller: Technical Corp. Device 1111 (prog-if 00 [VGA controller]) Subsystem: Qumranet, Inc. Device 1100 Physical Slot: 2 Flags: fast devsel Memory at f0000000 (32-bit, prefetchable) [size=8M] Expansion ROM at <unassigned> [disabled] With patch applied: # dmesg | grep framebuffer vesafb: framebuffer at 0xf0000000, mapped to 0xf7e80000, using 1875k, total 8192k # lspci -vs2 00:02.0 VGA compatible controller: Technical Corp. Device 1111 (prog-if 00 [VGA controller]) Subsystem: Qumranet, Inc. Device 1100 Physical Slot: 2 Flags: fast devsel Memory at f0000000 (32-bit, prefetchable) [size=8M] Expansion ROM at f0800000 [disabled] [size=64K] cheers, Gerd
2010-10-18Add new vgabios binaries to blobs list.Gerd Hoffmann1-2/+2
2010-10-13trace: print a warning if user tries to enable an unknown trace eventBlue Swirl3-3/+9
There was no warning if a bad trace event name was given to 'trace-event' command, thus the user could think that the command was successful even if this was not the case. Print a warning if the user tries to enable a trace event which is not known. Acked-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13mips: avoid write only variablesBlue Swirl1-0/+29
Compiling with GCC 4.6.0 20100925 produced a lot of warnings like: /src/qemu/target-mips/translate.c: In function 'gen_ld': /src/qemu/target-mips/translate.c:1039:17: error: variable 'opn' set but not used [-Werror=unused-but-set-variable] Fix by adding a dummy cast so that the variable is not unused. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13ppc: avoid write only variablesBlue Swirl1-3/+3
Compiling with GCC 4.6.0 20100925 produced warnings: /src/qemu/target-ppc/op_helper.c: In function 'helper_icbi': /src/qemu/target-ppc/op_helper.c:351:14: error: variable 'tmp' set but not used [-Werror=unused-but-set-variable] /src/qemu/target-ppc/op_helper.c: In function 'do_6xx_tlb': /src/qemu/target-ppc/op_helper.c:3805:28: error: variable 'EPN' set but not used [-Werror=unused-but-set-variable] /src/qemu/target-ppc/op_helper.c: In function 'do_74xx_tlb': /src/qemu/target-ppc/op_helper.c:3838:28: error: variable 'EPN' set but not used [-Werror=unused-but-set-variable] Fix by adding a dummy cast so that the variable is not unused. Delete tmp. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13i386: avoid a write only variableBlue Swirl1-0/+4
Compiling with GCC 4.6.0 20100925 produced warnings: /src/qemu/target-i386/op_helper.c: In function 'switch_tss': /src/qemu/target-i386/op_helper.c:283:53: error: variable 'new_trap' set but not used [-Werror=unused-but-set-variable] Fix by adding a dummy cast so that the variable is not unused. Add also pointer to docs. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13vnc: avoid write only variablesBlue Swirl1-0/+8
Compiling with GCC 4.6.0 20100925 produced warnings: /src/qemu/ui/vnc.c: In function 'vnc_client_cache_auth': /src/qemu/ui/vnc.c:217:12: error: variable 'qdict' set but not used [-Werror=unused-but-set-variable] /src/qemu/ui/vnc.c: In function 'vnc_display_open': /src/qemu/ui/vnc.c:2526:9: error: variable 'acl' set but not used [-Werror=unused-but-set-variable] Fix by making the variable declarations and their uses also conditional to debug definition. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13cris: avoid a write only variableBlue Swirl1-3/+2
Compiling with GCC 4.6.0 20100925 produced a warning: In file included from /src/qemu/target-cris/translate.c:3154:0: /src/qemu/target-cris/translate_v10.c: In function 'dec10_prep_move_m': /src/qemu/target-cris/translate_v10.c:111:22: error: variable 'rd' set but not used [-Werror=unused-but-set-variable] Fix by deleting rd, adjust the only user. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13Delete write only variablesBlue Swirl14-75/+24
Compiling with GCC 4.6.0 20100925 produced warnings like: /src/qemu/net/tap-win32.c: In function 'tap_win32_open': /src/qemu/net/tap-win32.c:582:12: error: variable 'hThread' set but not used [-Werror=unused-but-set-variable] Fix by removing the unused variables. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13ppc: remove video.xBlue Swirl9-166/+9
Only Mac-on-Linux stuff used video.x, OpenBIOS does not need it. Remove video.x MoL hacks. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13lsi53c895a: avoid a write only variableBlue Swirl1-0/+1
Compiling with GCC 4.6.0 20100925 produced a warning: /src/qemu/hw/lsi53c895a.c: In function 'lsi_do_msgout': /src/qemu/hw/lsi53c895a.c:848:9: error: variable 'len' set but not used [-Werror=unused-but-set-variable] Fix by adding a dummy cast so that the variable is not unused for non-debug case. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13eepro100: initialize a variable in all casesBlue Swirl1-3/+3
Compiling with GCC 4.6.0 20100925 produced warnings: /src/qemu/hw/eepro100.c: In function 'eepro100_read4': /src/qemu/hw/eepro100.c:1351:14: error: 'val' may be used uninitialized in this function [-Werror=uninitialized] /src/qemu/hw/eepro100.c: In function 'eepro100_read2': /src/qemu/hw/eepro100.c:1328:14: error: 'val' may be used uninitialized in this function [-Werror=uninitialized] /src/qemu/hw/eepro100.c: In function 'eepro100_read1': /src/qemu/hw/eepro100.c:1285:13: error: 'val' may be used uninitialized in this function [-Werror=uninitialized] Fix by initializing 'val' at start. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13cirrus: avoid write only variablesBlue Swirl3-29/+51
Compiling with GCC 4.6.0 20100925 produced a lot of warnings like: In file included from /src/qemu/hw/cirrus_vga_rop.h:174:0, from /src/qemu/hw/cirrus_vga.c:284: /src/qemu/hw/cirrus_vga_rop2.h: In function 'cirrus_patternfill_0_8': /src/qemu/hw/cirrus_vga_rop2.h:48:18: error: variable 'col' set but not used [-Werror=unused-but-set-variable] /src/qemu/hw/cirrus_vga_rop2.h: In function 'cirrus_colorexpand_transp_0_8': /src/qemu/hw/cirrus_vga_rop2.h:104:18: error: variable 'col' set but not used [-Werror=unused-but-set-variable] Fix the warnings by introducing an inline function, which avoids exposing write-only variables. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-13block: avoid a write only variableBlue Swirl1-0/+1
Compiling with GCC 4.6.0 20100925 produced a warning: /src/qemu/block/qcow2-refcount.c: In function 'update_refcount': /src/qemu/block/qcow2-refcount.c:552:13: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable] Fix by adding a dummy cast so that the result is not unused. Acked-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-11Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori8-88/+168
2010-10-09trace: remove timestamp files when cleaning upBlue Swirl1-1/+1
'make clean' did not remove trace.[ch]-timestamp files, only trace.[ch]. But 'make' did not know how to make trace.[ch] files if the timestamp files were present. Fix by removing the timestamp files along with trace.[ch]. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09configure: Send error message from spice check to /dev/nullStefan Weil1-1/+1
pkg-config is not always available (e.g. on win32 hosts), but we don't want to see the 'command not found' error message. Redirect stdout and stderr to /dev/null. v2: * Removed changes which should not have been here. Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09win32: Set unbuffered stdoutStefan Weil2-2/+7
Win32 does not support line-buffering, but it allows unbuffered output. Unbuffered output is a good approximation. For typical output statements which usually end with '\n', it's even identical. Buffered output is unusable for program traces because of its large delay. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09.gitignore: Ignore *-timestampStefan Hajnoczi1-0/+1
Timestamp files were recently added to reduce make churn on source files that use tracing. The timestamp files should never be committed and should not be visible in git status. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09acpi: Fix an infinite loop in acpi_table_addVincent Minet1-1/+1
Commit d729bb9a7700e364b1c5f9893d61f07a9e002bce has a typo, causing an infinite loop in acpi_table_add. Signed-off-by: Vincent Minet <vincent@vincent-minet.net> Acked-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09configure: Remove unneeded defines from checksStefan Weil1-4/+0
_GNU_SOURCE is already defined in QEMU_CFLAGS which is passed to gcc in shell function compile_prog. Removing the definition from several checks avoids compiler warnings (which are now written to config.log). Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09configure: include stddef.h for NULLScott Wood1-0/+5
This fixes an observed failure to detect madvise() on Linux. To avoid similar issues, all other tests that use NULL but don't already have stddef.h (or another header that is defined to provide NULL, such as stdio.h, unistd.h, or time.h) are also fixed. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09trace: Trace bdrv_aio_{readv,writev}Stefan Hajnoczi2-0/+6
Observing block layer aio readv/writev operations is useful for debugging image formats or understanding guest disk I/O patterns. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09trace: Use TP_PROTO() and TP_ARGS() for LTTng USTStefan Hajnoczi1-1/+1
The LTTng UserSpace Tracer formerly used TPPROTO() and TPARGS() instead of TP_PROTO() and TP_ARGS() like the kernel uses. This has been changed so QEMU needs to follow. I am not aware of a graceful way of making the transition but since no one complained that the UST build is broken, it should be fine to just switch over without compatibility for old UST headers. The newer UST headers are shipping in distro packages so it is realistic to make this change now. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09trace: Don't strip lines containing '#' arbitrarilyStefan Hajnoczi1-2/+1
Although comment lines must be skipped, the '#' character can occur in valid format strings. Be more careful when checking for comments. Leave comments at the end of the line where they will not interfere with other processing. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09trace: Use portable format stringsStefan Hajnoczi2-2/+6
It is not portable to use "%ld" for int64_t because int64_t may have type long on 64-bit platforms and long long on 32-bit platforms. Use the standard library PRId64 macros to keep format strings portable. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-07cris: Consider the TLB valid bit on writes to the TLBEdgar E. Iglesias1-1/+3
When updating the guest TLB we only need to flush previous mappings from the entry written if the entry was valid. Also fixes a compiler warning reported by Blue Swirl. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-10-07vhost: error codeMichael S. Tsirkin1-0/+2
fix up errors returned to include errno, not just -1 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-07virtio: change set guest notifier to per-deviceMichael S. Tsirkin3-26/+57
When using irqfd with vhost-net to inject interrupts, a single evenfd might inject multiple interrupts. Implementing this is much easier with a single per-device callback to set guest notifiers. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-07eepro100: Add support for multiple individual addresses (multiple IA)Stefan Weil1-9/+21
I reviewed the latest sources of Linux, FreeBSD and NetBSD. They all reset the multiple IA bit (multi_ia in BSD) to zero, but I did not find code which sets this bit to one (like it is done by some routers). Running Windows guests also did not set this bit. Intel's Open Source Software Developer Manual does not give much information on the semantics related to this bit, so I had to guess how it works. The guess was good enough to make the router emulation work. Related changes in this patch: * Update naming and documentation of the internal hash register. It is not limited to multicast, but also used for multiple IA. * Dump complete configuration register when debug traces are enabled. * Debug output when multiple IA bit is set during CmdConfigure. * Debug output when frames are received because multiple IA bit is set, or when they are ignored although it is set. Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-07virtio-net: unify vhost-net start/stopMichael S. Tsirkin1-46/+43
Move all of vhost-net start/stop logic to a single routine, and call it from everywhere. Additionally, start/stop vhost-net on link up/down: we should not transmit anything if user asked us to put the link down. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Alex Williamson <alex.williamson@redhat.com>
2010-10-07virtio: invoke set_status callback on resetMichael S. Tsirkin1-0/+2
As status is set to 0 on reset, invoke the relevant callback. This makes for a cleaner code in devices as they don't need to duplicate the code in their reset routine, as well as excercises this path a little more. In particular this makes it possible to unify vhost-net handling code with the following patch. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-10-06net: delay freeing peer host deviceMichael S. Tsirkin2-7/+43
With -netdev, virtio devices present offload features to guest, depending on the backend used. Thus, removing host netdev peer while guest is active leads to guest-visible inconsistency and/or crashes. As a solution, while guest (NIC) peer device exists, we prevent the host peer from being deleted. This patch does this by adding peer_deleted flag in nic state: if host device is going away while guest device is around, set this flag and keep a shell of the host device around for as long as guest device exists. The link is put down so all packets will get discarded. At the moment, management can detect that device deletion is delayed by doing info net. As a next step, we shall add commands that control hotplug/unplug without removing the device, and an event to report that guest has responded to the hotplug event. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Alex Williamson <alex.williamson@redhat.com>
2010-10-05Merge remote branch 'spice/submit.6' into stagingAnthony Liguori15-19/+1287
Conflicts: configure Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-10-05Merge remote branch 'qmp/for-anthony' into stagingAnthony Liguori12-1192/+1527
2010-10-05linux-user: Fix typo m86k -> m68kStefan Weil1-3/+3
Replace m86k_sim_stat by m68k_sim_stat. Cc: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
2010-10-05Fix spelling in commentsStefan Weil3-3/+3
multifuction -> multifunction successfull -> successful. Signed-off-by: Stefan Weil <weil@mail.berlios.de>
2010-10-05docs: Improve documentationStefan Weil1-28/+28
Fix some inconsistencies (tabs and punctuation) and try to improve grammar and spelling. Cc: Juan Quintela <quintela@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
2010-10-05Add new user mode option -ignore-environmentStefan Weil3-0/+26
An empty environment is sometimes useful in user mode. The new option provides it for linux-user and bsd-user (darwin-user still has no environment related options). The patch also adds the documentation for other environment related options. Signed-off-by: Stefan Weil <weil@mail.berlios.de>
2010-10-05ppc: Minor 40x MMU fixesJohn Clark2-27/+49
* Fix swapped reading of tlblo/hi. * Fix tlb exec permissions Signed-off-by: John Clark <clarkjc@runbox.com> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-10-03console: Avoid dereferencing NULL active_consoleStefan Hajnoczi1-2/+4
The console_select() function does not check that active_console is non-NULL before dereferencing it. When invoked with qemu -nodefaults it is possible to hit this case. This patch checks that active_console is non-NULL before stashing away the old console dimensions in console_select(). Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-03exec: Fix compilation error for debug codeStefan Weil1-2/+3
is_softmmu was removed with commit d4c430a80f000d722bb70287af4d4c184a8d7006, so remove it now from debug code, too. Fix also the format specifier for paddr in the same line of code. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-03rc4030: Fix compilation error in debug codeStefan Weil1-1/+4
min was unknown here, so avoid it. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-03mipsnet: Fix compiler warning in debug codeStefan Weil1-1/+1
size_t needs a different format specifier, so fix this. Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-03block/vvfat: Fix compiler warning in debug codeStefan Weil1-1/+0
Fix this compiler warning: ./block/vvfat.c:2285: error: comparison of unsigned expression >= 0 is always true Cc: Blue Swirl <blauwirbel@gmail.com> Cc: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-03virtio-9p: Use GCC_FMT_ATTR and fix a format warningStefan Weil1-4/+6
With the new gcc format warnings, gcc detected this: /qemu/hw/virtio-9p.c:1040: error: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘__nlink_t’ Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-03blockdev: Use GCC_FMT_ATTR (format checking)Stefan Weil1-8/+7
Additional changes: * Removed 'extern' from drive_add (avoids too long line). * Removed 'extern' from other functions (makes declarations consistent with others in same header file). Cc: Blue Swirl <blauwirbel@gmail.com> Cc: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-03Use GCC_FMT_ATTR (format checking)Stefan Weil14-16/+25
Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>