aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-09-22Update version and changelog for 0.11.0 releasev0.11.0Anthony Liguori
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-22RTC polling mode brokenBernhard Kauer
The RTC emulation does not set the IRQ flags independent of the IRQ enable bits. The original MC146818A datasheet from 1984 notes: "flag bits in Register C [...] are set independent of the state of the corresponding enable bits in Register B" Similar sections can be found in newer documentation e.g. in rtc82885. Qemu and Bochs set the IRQ flags only if they are enabled, which breaks drivers polling on them. The following patch corrects this for the update-ended-flag in Qemu only. It does not fix the handling of the other flags. Signed-off-by: Bernhard Kauer <kauer@tudos.org> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-22qcow2: Order concurrent AIO requests on the same unallocated clusterKevin Wolf
When two AIO requests write to the same cluster, and this cluster is unallocated, currently both requests allocate a new cluster and the second one merges the first one when it is completed. This means an cluster allocation, a read and a cluster deallocation which cause some overhead. If we simply let the second request wait until the first one is done, we improve overall performance with AIO requests (specifially, qcow2/virtio combinations). This patch maintains a list of in-flight requests that have allocated new clusters. A second request touching the same cluster is limited so that it either doesn't touch the allocation of the first request (so it can have a non-overlapping allocation) or it waits for the first request to complete. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-22qemu-io: Improve portability (win32 now supported).Stefan Weil
* Add missing include for struct timeval. * Replace non-portable strsep by local qemu_strsep. * Use POSIX basename by including libgen.h. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-18target-alpha: fix extlh instructionVince Weaver
The extlh instruction on Alpha currently doesn't work properly. It's a combination of a cut/paste bug (16 where it should be 32) as well as a "shift by 64" bug. Signed-off-by: Vince Weaver <vince@csl.cornell.edu> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-09-16tcg: fix size of local variables in tcg_gen_bswap64_i64Stefan Weil
t0, t1 must be 64 bit values, not 32 bit. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-09-16net: Fix send queue orderingJan Kiszka
Ensure that packets enqueued for delayed delivery are dequeued in FIFO order. At least one simplistic guest TCP/IP stack became unhappy due to sporadically reordered packet streams. At this chance, switch the send queue implementation to TAILQ. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-16escc: fix IRQ routing, broken by 6c319c82223a1766c5d64a20051e5c6ab7b53951Aurelien Jarno
The logic of Zilog makes channel B the first device and channel A the second one. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-09-15Fix Linux task preemption on Versatile boardAurelien Jarno
Backport from master: Recent versions of the Linux kernel will not preempt CPU-intensive tasks unless the clock used by sched_clock() works. On -M versatilepb that's the 24MHz timer in the system controller. It's a very simple timer, so implement it. Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-09-15curses: save 250MB of memoryAurelien Jarno
Don't call curses_resize() at the end of curses_display_init() as height and width are not yet defined. It will be called later by code from vl.c. This save 250MB of memory when using -curses. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-08-28Update version and changelog for 0.11.0-rc2 releasev0.11.0-rc2Anthony Liguori
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Add missing linefeed in error messageStefan Weil
The error message for an unknown network device given to monitor command set_link looks better with a terminating linefeed. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Clean up VGA type selection; far too many variables being used to track one ↵Zachary Amsden
state leads to confusion if new variables are added. Signed-off-by: Zachary Amsden <zamsden@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27When using stdio monitor and VNC display, one can set or clear a VNC ↵Zachary Amsden
password; this should set or turn off VNC authentication as well. Signed-off-by: Zachary Amsden <zamsden@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Don't segfault when changing VNC password on an SDL display.Zachary Amsden
Signed-off-by: Zachary Amsden <zamsden@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Fix detached migration with exec.Chris Lalancette
When trying to do detached migration with exec, I found that the monitor wouldn't always return in a timely manner. I tracked this down to exec_start_outgoing_migration. It appeared we were setting the fd to NONBLOCK'ing, but in point of fact we weren't. This bugfix should also go onto the stable 0.10 branch Signed-off-by: Chris Lalancette <clalance@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Do not disable autostart for live migrationAvi Kivity
If the user does not want autostart, they can specify -S. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27make vga screen_dump use DisplayState properlyStefano Stabellini
Hi all, currently the vga screen_dump code doesn't use the DisplayState interface properly and tries to replace it temporarily while taking the screenshot. A better approach is to register a DisplayChangeListener, call vga_hw_update, and finally write the ppm in the next call from dpy_update. Testing is appreciated. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Fix device name completion for 'eject'Blue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27sdl.c: support 32 bpp cursorsReimar Döffinger
Hello, currently when a 32 bpp cursor gets defined the result is all-black in the areas that are not transparent (you'll get a 32 bpp cursor if you use my previous patch to allow vmware_vga to use a 32 bpp framebuffer). This is because the switch in sdl.c lacks a 32 bpp case. The thing I am unsure about though is which byte is the unused one and should be skipped, the first or the last - for the black-and-white cursors I tested it doesn't make a difference... Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Andrzej Zaborowski <balrogg@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Use corect depth from DisplaySurface in vmware_vga.cReimar Döffinger
Hello, for what I can tell, there is no way for vmware_vga to work correctly right now. It assumes that the framebuffer bits-per-pixel and the one from the DisplaySurface are identical (it uses directly the VRAM from vga.c), but it always assumes 3 bytes per pixel, which is never possible with the current version of DisplaySurface. Attached patch fixes that by using ds_get_bits_per_pixel. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Fix migration for ide devicesAnthony Liguori
commit 93c8cfd9e67a62711b86f4c93747566885eb7928 Author: Gleb Natapov <gleb@redhat.com> Date: Sun Aug 2 11:36:47 2009 +0300 make windows notice media change Broke save/restore by loading a new field but not saving it. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27check for PR_SET_NAME being definedNathan Froyd
Depending on what glibc/kernel headers you are compiling against, PR_SET_NAME may or may not be defined. Do the right thing if PR_SET_NAME isn't defined and skip setting the process name. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
2009-08-27make windows notice media changeGleb Natapov
Windows seems to be very stupid about cdrom media change. It polls cdrom status and if status goes ready->media not present->ready it assumes that media was changed. If "media not present" step doesn't happen even if "medium may have changed" was seen it assumes media haven't changed. Fake "media not present" step. Filip Navara did a great job debugging this issue in Windows and this is what he found out: BINGO! ... The media present notifications were broken ever since Windows 2000 it seems. The media change is detected properly and it's passed to ClassSetMediaChangeState function which in turn calls ClasspInternalSetMediaChangeState. This function is responsible for changing some internal state of the device object and sending the PnP events which later result in application notifications. It has this tiny bit of code (not copied byte for byte): if (oldMediaState == NewState) { // Media is in the same state it was before. return; } so the end result is that for the case of UNIT NEEDS ATTENTION / MEDIUM MAY HAVE CHANGED without NOT READY in-between is really broken. It results in the internal media change counter incremented, so the media contents are re-read when necessary, instead of relying on the cache, but the notifications to applications are never sent. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
2009-08-27Fix do_commit() behaviorLuiz Capitulino
Commit 751c6a17042b5d011013d6963c0505d671cf708e changed the monitor's 'commit' command to this behavior: 1. Any string you type as argument will cause do_commit() to call bdrv_commit() to all devices 2. If you enter a device name, it will be the only one ignored by do_commit() :) The fix is to call bdrv_commit() to the specified device only and ignore the others (when 'all' is not specified). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27net: Fix do_set_link() return typeLuiz Capitulino
do_set_link() returns int, but Monitor handler functions should always return void. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
2009-08-27Add/Fix command-line checks for smbios options v2Beth Kon
- One type 4 table is required per cpu. Add a check for this. - Fix check for smbios file. Changes from v1: - static designation of smbios_validate_table, and remove whitespace Signed-off-by: Beth Kon <eak@us.ibm.com> -- Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
2009-08-27vga: do not resize the screen on hw_invalidateStefano Stabellini
Hi all, currently vga always resizes the screen when vga_hw_invalidate is called while this is not required and all the other graphic emulators don't. This patch fixes it, making vga invalidate behaviour consistent with the other emulated devices. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
2009-08-27fix sdl window resizeStefano Stabellini
Hi all, this patch fixes the sdl window resize event handler so that it doesn't require the emulated graphic card (or console.c) to call qemu_console_resize. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
2009-08-27Fix checksum writing in signboot.shAlexander Graf
The printf command takes an octal value after \, so we have to convert our decimal representation to octal first and then write it. This unbreaks extboot signing. Multiboot wasn't affected yet because the checksum was < 8. Spotted and first patch by Glauber Costa <glommer@redhat.com>. Printf idea by Paolo Bonzini <bonzini@gnu.org>. Signed-off-by: Alexander Graf <agraf@suse.de> CC: Glauber Costa <glommer@redhat.com> CC: Paolo Bonzini <bonzini@gnu.org> CC: Jan Ondrej <ondrejj@salstar.sk> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
2009-08-27Win32: Fix default prefixStefan Weil
The old code resulted in wrong escape sequences: #define CONFIG_QEMU_SHAREDIR "c:\Program Files\Qemu" gcc warnings: vl.c:5708:20: warning: unknown escape sequence '\P' vl.c:5708:20: warning: unknown escape sequence '\Q' Windows can handle slash (/) path separators, and QEMU already adds directories using slash, so there is no need to fight with the correct number of backslashes. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
2009-08-27Fix symfind.Laurent Desnogues
this patch fixes an issue in symfind. Assume you have the following symbols: Address Size 0045bca0 00000080 T s0 0045bd20 00000112 T s1 You'll notice that s1 is s0 + size. So the current symfind will find that address 0045bd20 belongs to s0 instead of s1. Laurent Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Message-Id:
2009-08-27Fix Sparse warning about missing prototypeBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Fix Sparse warning about "expression using sizeof on a function"Blue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Add missing "static"Blue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27More NULL pointer fixesBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Fix Sparse warnings: "Using plain integer as NULL pointer"Blue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Option rom makefile fixesPaul Brook
Fix toplevel option rom makefile rules. Signed-off-by: Paul Brook <paul@codesourcery.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27esp: fix interrupt register readBlue Swirl
Read of interrupt register should clear it and also sequence step and status. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27sparc64 flush pending conditional evaluations before exposing cpu stateIgor Kovalenko
If translation block is interrupted by e.g. mmu exception we need to compute conditional flags for inclusion into saved cpu state. Otherwise after return from trap conditional instructions would use stale psr/xcc data. Signed-off-by: igor.v.kovalenko@gmail.com -- Kind regards, Igor V. Kovalenko Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Fix SDL zooming with pl110 (cf. d3ffcafe25b5966b351ea6100160c2156688f22f)Blue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27e1000.c doesn't properly emulate EERD and ICS registersBill Paul
Once again, the emulation of the EERD and ICS registers in e1000.c is incorrect. Nobody has noticed this before because none of the Intel-written e1000 drivers use these registers, and all of the independently written open source drivers copy Intel's example, so they don't use them either. Regardless, these registers are documented in the programmer's manuals, and their emulated behavior doesn't match the verified behavior of real hardware, so any software that does use them doesn't function correctly. -Bill Signed-off-by: Bill Paul <wpaul@windriver.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Fix VM state change handlers running out of orderMarkus Armbruster
When a VM state change handler changes VM state, other VM state change handlers can see the state transitions out of order. bmdma_map(), scsi_disk_init() and virtio_blk_init() install VM state change handlers to restart DMA. These handlers can vm_stop() by running into a write error on a drive with werror=stop. This throws the VM state change handler callback into disarray. Here's an example case I observed: 0. The virtual IDE drive goes south. All future writes return errors. 1. Something encounters a write error, and duly stops the VM with vm_stop(). 2. vm_stop() calls vm_state_notify(0). 3. vm_state_notify() runs the callbacks in list vm_change_state_head. It contains ide_dma_restart_cb() installed by bmdma_map(). It also contains audio_vm_change_state_handler() installed by audio_init(). 4. audio_vm_change_state_handler() stops audio stuff. 5. User continues VM with monitor command "c". This runs vm_start(). 6. vm_start() calls vm_state_notify(1). 7. vm_state_notify() runs the callbacks in vm_change_state_head. 8. ide_dma_restart_cb() happens to come first. It does its work, runs into a write error, and duly stops the VM with vm_stop(). 9. vm_stop() runs vm_state_notify(0). 10. vm_state_notify() runs the callbacks in vm_change_state_head. 11. audio_vm_change_state_handler() stops audio stuff. Which isn't running. 12. vm_stop() finishes, ide_dma_restart_cb() finishes, step 7's vm_state_notify() resumes running handlers. 13. audio_vm_change_state_handler() starts audio stuff. Oopsie. Fix this by moving the actual write from each VM state change handler into a new bottom half (suggested by Gleb Natapov). Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27vnc: fix copyrect screen corruptionGerd Hoffmann
When sending a copyrect command to the vnc client, we must also update the local server surface. Otherwise the server's and the client's idea of the screen content run out of sync and screen updates don't work correctly. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Remove the virtio-{blk, console}-pci-0-10 device typesMark McLoughlin
These are now unused. However, perhaps the idea is that when we add -device, they will be useful? In that case, we should add virtio-net-pci-0-10 too. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27Remove the pc-0-10 machine typeMark McLoughlin
We have the pc-0.10 machine type now which does exactly the same thing. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27fix migration to obey -SPaolo Bonzini
Since migration returns right away, starting the VM right after calling qemu_start_incoming_migration is wrong even if -S is not passed. We have to do this after migration has completed. Cc: Glauber Costa <glommer@redhat.com> Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-25target-mips: fix conditional moves off fp condition codesNathan Froyd
Conditional moves off fp condition codes were using the result of get_fp_bit to isolate and test the relevant condition code. However, get_fp_bit returns the bit number of the condition code, not a bitmask. (Compare the use of get_fp_bit in gen_compute_branch1, for instance.) Fixed by shifting a bitmask into place using the result of get_fp_bit in the relevant functions (gen_mov{ci,cf_s,cf_d,cf_ps}). Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-07-29Update Changelog and VERSION for 0.11.0-rc1 releasev0.11.0-rc1Anthony Liguori
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-29Move CLOCKLIBS and PTHREADLIBS out of CONFIG_LINUX_USER_ONLYAnthony Liguori
Otherwise, -lrt doesn't get added to the softmmu build. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>