aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-06-22Fix do_pci_register_device() to reject devfn already in useMarkus Armbruster
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22vmware_vga: clean upIsaku Yamahata
use NULL instead of 0 for pci_register_device() argument for consistency. Any other caller uses NULL. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22dot gitignore: add qemu-monitor.texiIsaku Yamahata
add qemu-monitor.texi to .gitignore. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22virtio-net: enable mergeable receive buffersMark McLoughlin
When virtio-net was merged in from qemu-kvm.git, the VNET_HDR related features were dropped from the code. However, VIRTIO_NET_F_MRG_RXBUF appears to have accidentally been dropped too. Re-instate that now. Reported-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22acpi.c: make qemu_system_device_hot_add piix independent.Isaku Yamahata
introruce piix4_device_hot_add() for piix4 specific code and make qemu_system_device_hot_add() generic. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22Instead of writing a zero page, madvise it awayAnthony Liguori
Otherwise, after migration, we end up with a much larger RSS size then we ought to have. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22Handle init/sipi in a main cpu exec loop. (v2)Gleb Natapov
This should fix compilation problem in case of CONFIG_USER_ONLY. Currently INIT/SIPI is handled in the context of CPU that sends IPI. This patch changes this to handle them like all other events in a main cpu exec loop. When KVM will gain thread per vcpu capability it will be much more clear to handle those event by cpu thread itself and not modify one cpu's state from the context of the other. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22Add pci_bus_reset() function.Gleb Natapov
To reset internal irq handling data structures. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Yaniv Kamay <ykamay@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22virtio: add support for indirect ring entriesMark McLoughlin
Support a new feature flag for indirect ring entries. These are ring entries which point to a table of buffer descriptors. The idea here is to increase the ring capacity by allowing a larger effective ring size whereby the ring size dictates the number of requests that may be outstanding, rather than the size of those requests. This should be most effective in the case of block I/O where we can potentially benefit by concurrently dispatching a large number of large requests. Even in the simple case of single segment block requests, this results in a threefold increase in ring capacity. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22virtio: make vring_desc_*() take phys addrsMark McLoughlin
Change the vring descriptor helpers to take the physical address of the descriptor table rather than a virtqueue. This is needed in order to allow these helpers to be used with an indirect descriptor table. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22Add O_BINARY to open call in net_dump_init.Filip Navara
Fix the pcap dumps on Win32 and other systems where O_BINARY is required. Signed-off-by: Filip Navara <filip.navara@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22Make nic option rom loading less painful.Glauber Costa
The code how it is today, is totally painful to read and keep. To begin with, the code is duplicated with the option rom loading code that linux_boot and vga are already using. This patch introduces a "bootable" state in NICInfo structure, that we can use to keep track of whether or not a given nic should be bootable, avoiding the introduction of yet another global state. With that in hands, we move the code in vl.c to hw/pc.c, and use the already existing infra structure to load those option roms. Error checking code suggested by Mark McLoughlin Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-22Disable _FORTIFY_SOURCE to fix Ubuntu build with -WerrorAnthony Liguori
This eliminates the results unused warnings. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-20Apply TCGV_UNUSED on variables that GCC mistakenly thinks can be usedmalc
uninitialized
2009-06-20Restore consistent formatting of audio devicesmalc
2009-06-19linux-user: strace now handles guest stringscorrectly [v2]Riku Voipio
On Tue, Jun 16, 2009 at 08:19:23PM -0500, Anthony Liguori wrote: > malc wrote: >> >> On my system the above line causes gcc to emit: >> >> In file included from /home/malc/x/rcs/git/qemu/linux-user/strace.c:12: >> /usr/include/linux/futex.h:48: error: field `__user' has incomplete type >> /usr/include/linux/futex.h:48: error: syntax error before '*' token >> /usr/include/linux/futex.h:63: error: field `list' has incomplete type >> /usr/include/linux/futex.h:83: error: field `__user' has incomplete type >> /usr/include/linux/futex.h:83: error: syntax error before '*' token >> make[1]: *** [strace.o] Error 1 > We had the same problem with usb-linux.c. It's broken system headers, > the __user stuff is supposed to get removed as part of the headers > installation. > It builds fine on my system (Fedora 10). Howabout something like this: commit eb8387cb0eda32a18880664eb5f0ca5c8bf05b45 Author: Riku Voipio <riku.voipio@iki.fi> Date: Thu Jun 18 22:44:31 2009 +0300 Subject: linux-user: include futex defines directly Since some common distributions have broken linux/futex.h, stop including it. Instead add the defines directly. Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2009-06-19fix qemu_alloc/qemu_free for audio subsystemJean-Christophe Dubois
Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
2009-06-18alsa: fix warningGerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2009-06-18xilinx-eth: Remove debug print.Edgar E. Iglesias
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-06-17Don't set IRQs on device reset and loadvm/savevmBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-17Call piix4_reset() on system reset.Blue Swirl
Also zero pci_irq_levels on reset to avoid stuck irq after reset. Based on 15a1956af94e36105494f782a752698103addf63 by Gleb Natapov. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-17Don't set IRQs on device reset and loadvm/savevmBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-17Call piix3_reset() on system reset.Gleb Natapov
Also zero pci_irq_levels on reset to avoid stuck irq after reset. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Yaniv Kamay <ykamay@redhat.com>
2009-06-17Register usb-uhci reset function.Gleb Natapov
The device is not reset on system reset currently. Without this patch RHEL4.8 hangs after reboot if -usbdevice table is in use. Signed-off-by: Gleb Natapov <gleb@redhat.com>
2009-06-17Revert "Update irqs on reset and device load"Blue Swirl
This reverts commit 3dcd219f09d6c1817bf9a132899e6b925f7a0914. It is incorrect to call qemu_irq functions (or any other functions that access other device state) during savevm/loadvm. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-17Allow user to specify CPU modelBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-17Fix opening of read only raw imagesBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-17Replace ELF section hack with normal tableBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-17Concentrate rest of table entries to topBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-17Concentrate most table entries to topBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-17Clean up GEN_HANDLER2Blue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-17Clean up GEN_HANDLERBlue Swirl
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-16exec.c: remove unnecessary #if NB_MMU_MODESIsaku Yamahata
remove unnecessary #if NB_MMU_MODES by using loop. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16Fix vga_screen_dump_blank() PPM generationEduardo Habkost
vga_screen_dump_blank() was not generating a valid PPM file: the width of the image made no sense (why it was multiplied by sizeof(uint32_t)?), and there was only one sample per pixel, instead of three. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16Prevent CD-ROM media eject while device is lockedMark McLoughlin
Section 10.8.25 ("START/STOP UNIT Command") of SFF-8020i states that if the device is locked we should refuse to eject if the device is locked. ASC_MEDIA_REMOVAL_PREVENTED is the appropriate return in this case. In order to stop itself from ejecting the media it is running from, Fedora's installer (anaconda) requires the CDROMEJECT ioctl() to fail if the drive has been previously locked. See also https://bugzilla.redhat.com/501412 Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16set migration max downtimeGlauber Costa
provide a monitor command to allow one to set the maximum downtime he is willing to suffer during migration, in seconds. "ms", "us", "ns" and "s" are accepted as modifiers. This parameter will be used by ram_save_live() code to determine a safe moment to enter stage 3 Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16add non-arbitrary migration stop conditionGlauber Costa
Currently, we're entering migration's stage 3 when a treshold of 10 pages remain to be transferred in the system. This has hurt some users. However, any proposed threshold is arbitrary by nature, and would only shift the annoyance. The proposal of this patch is to define a max_downtime variable, which represents the maximum downtime a migration user is willing to suffer. Then, based on the bandwidth of last iteration, we calculate how much data we can transfer in such a window of time. Whenever we reach that value (or lower), we know is safe to enter stage3. This has largely improved the situation for me. On localhost migrations, where one would expect things to go as quickly as me running away from the duty of writting software for windows, a kernel compile was enough to get the migration stuck. It takes 20 ~ 30 iterations now. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16kvm: Fix IRQ injection into full queueJan Kiszka
User space may only inject interrupts during kvm_arch_pre_run if ready_for_interrupt_injection is set in kvm_run. But that field is updated on exit from KVM_RUN, so we must ensure that we enter the kernel after potentially queuing an interrupt, otherwise we risk to loose one - like it happens with the current code against latest kernel modules (since kvm-86) that started to queue only a single interrupt. Fix the problem by reordering kvm_cpu_exec. Credits go to Gleb Natapov for analyzing the issue in details. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16Call qemu_bh_delete at bdrv_aio_bh_cb.Dor Laor
Also replave qemu_bh_cancel with qemu_bh_delete in bdrv_aio_cancel_em. Otherwise the bh will live forever in the bh list. Signed-off-by: Dor Laor <dor@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16Remove dead codeAmit Shah
vl.c contains some dead code that initialises a 'label' string with the name of the char device being initialised. This is unused. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16QEMU KVM: i386: Fix the cpu reset stateNitin A Kamble
As per the IA32 processor manual, the accessed bit is set to 1 in the processor state after reset. qemu pc cpu_reset code was missing this accessed bit setting. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16allow CPUID vendor overrideAndre Przywara
KVM-enabled QEMU will always report the vendor ID of the physical CPU it is running on. Allow to override this if explicitly requested on the command line. It will not suffice to name a CPU type (like -cpu phenom), but you have to explicitly set the vendor: -cpu phenom,vendor=AuthenticAMD Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16Fix help message for new configure option --enable-debug.Stefan Weil
The new option is --enable-debug, not --disable-debug. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16provide cpu_index to env mappingGlauber Costa
There are some people interested in, given a cpu number, pick its CPUState. KVM is an example, although not yet in tree. This patch provides a way of doing that. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16pci: add define for communication class devicesAmit Shah
Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16vnc: improve numpad support for qemu console.Gerd Hoffmann
Reorganize qemu console emulation code. Make it look at the numlock state and interpret numpad keys as arrow+friends (numlock off) or digits (numlock on). While being at it also wind up the other numpad keys. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16virtio blk: fix warning.Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16lsi53c895a: Implement write access to DMA Byte CounterSebastian Herbszt
Adds CASE_SET_REG24 and fixes the following errors: lsi_scsi: error: Unhandled writeb 0x24 = 0x0 lsi_scsi: error: Unhandled writeb 0x25 = 0x0 Signed-off-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16lsi53c895a: Implement read and write access to DMA Next AddressSebastian Herbszt
Fixes the following errors: lsi_scsi: error: Unhandled writeb 0x28 = 0x0 lsi_scsi: error: Unhandled writeb 0x29 = 0x0 lsi_scsi: error: Unhandled writeb 0x2a = 0x0 lsi_scsi: error: Unhandled writeb 0x2b = 0x0 Signed-off-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16lsi53c895a: Implement Scratch Byte RegisterSebastian Herbszt
Fixes the following errors: lsi_scsi: error: Unhandled writeb 0x3a = 0x0 lsi_scsi: error: readb 0x3a Signed-off-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>