summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-07-16cleanup: drop unused struct elements from VirtIOPCIProxy.Gerd Hoffmann1-6/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16qdev: rework device properties.Gerd Hoffmann47-392/+922
This patch is a major overhaul of the device properties. The properties are saved directly in the device state struct now, the linked list of property values is gone. Advantages: * We don't have to maintain the list with the property values. * The value in the property list and the value actually used by the device can't go out of sync any more (used to happen for the pci.devfn == -1 case) because there is only one place where the value is stored. * A record describing the property is required now, you can't set random properties any more. There are bus-specific and device-specific properties. The former should be used for properties common to all bus drivers. Typical use case is bus addressing, i.e. pci.devfn and i2c.address. Properties have a PropertyInfo struct attached with name, size and function pointers to parse and print properties. A few common property types have PropertyInfos defined in qdev-properties.c. Drivers are free to implement their own very special property parsers if needed. Properties can have default values. If unset they are zero-filled. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16monitor: Add port write commandJan Kiszka2-0/+24
Useful for testing hardware emulations or manipulating its state to stress guest drivers. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Initialize PS2 keyboard / mouse state on resetDinesh Subhraveti1-6/+32
Currently only common PS2 state is initialized, leaving keyboard and mouse specific state to contain stale values. Signed-off-by: Dinesh Subhraveti <dineshs@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16fix segfault in setting migration speedGlauber Costa1-1/+3
Hi, Whoever wrote this migrate_set_speed function is totally stupid. Any failed or completed migration keeps its state to allow probing of migration data, but has no associated file anymore. It is, thus, possible to crash qemu by calling migrate_set_speed after a migration is finished (or failed, or cancelled), but before another one starts. This patch fixes it. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Remove dead i386 assembly code from softmmu_header.hStuart Brady1-146/+0
This patch removes dead i386 assembly code from softmmu_header.h. The code is conditional on ASM_SOFTMMU, which is never defined. Optimisation for the fast path is already handled by tcg_out_qemu_ld() and tcg_out_qemu_st(), so there seems to be little need for this code. Signed-off-by: Stuart Brady <stuart.brady@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16qemu-io: use BDRV_O_FILE to implement the growable open optionChristoph Hellwig1-8/+5
Instead of doing our own check for protocols which fails because raw isn't formally a protocol but special cased in find_protocol specify the BDRV_O_FILE option to use the same code as bdrv_file_open does. While we're at it also add the missing documentation for -g to the main qemu-io help string. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16tlb flush cleanupIgor Kovalenko1-6/+9
Use static empty variable s_cputlb_empty_entry to clear entries, also reset addend member when clearing entries. This helps running with valgrind/memcheck Signed-off-by: igor.v.kovalenko@gmail.com -- Kind regards, Igor V. Kovalenko Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Reset HPET config register on hpet_resetBeth Kon1-0/+1
Without this, after system reset, hpet does not detect transition from non-legacy to legacy mode. Signed-off-by: Beth Kon <eak@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16qemu-io: Implement bdrv_load_vmstate/bdrv_save_vmstateKevin Wolf1-6/+44
The load_vmstate and save_vmstate functions are implemented as a variation of the normal read/write operation, enabled by the -b option. This is the same mechanism as is used to switch from read/write to pread/pwrite. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Handle vga= in -appendPascal Terjan1-0/+19
Here is a patch I had sent twice to the list 2 years ago. Hopefuly this time someone will be interested It adds support for passing vga mode to linux kernel through vga= option in -append Signed-off-by: Pascal Terjan <pterjan@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16ioport: use uint{32, 16, 8}_t for ioport value and pio_addr_t for ioport ↵Isaku Yamahata3-40/+45
address. Using int for cpu_{in, out}[bwl] is inconsistent with other part because for address or value, uintN_t is used by other qemu part. At least, softmmu, CPU{Read, Write}MemoryFunc, pci, target_phys_addr_t and the callers of cpu_{in, out}[bwl](). This patch removes the inconsistency. IO port has its own address space so define pio_addr_t as uint32_t because PCI io space width is 32bit. And use uint{32, 16, 8}_t for ioport value. Changing signedness of value might cause subtle issue. However only a suspicious caller is kvm_handle_io() which is ok. And other callers pass unsigned value in the first place. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Cc: Stuart Brady <sdbrady@ntlworld.com> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: Samuel Thibault <samuel.thibault@gnu.org> Cc: Tristan Gingold <gingold@adacore.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16ioport: remove some #ifdef DEBUG_UNUSED_IOPORT.Isaku Yamahata1-12/+12
remove some #ifdef DEBUG_UNUSED_IOPORT in ioport.c and use PRIx32 where appropriate Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16raw-posix: Handle errors in raw_createStefan Weil1-5/+12
In qemu-iotests, some large images are created using qemu-img. Without checks for errors, qemu-img will just create an empty image, and later read / write tests will fail. With the patch, failures during image creation are detected and reported. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16omit 3DNOW! CPUID bits from qemu64 CPU modelAndre Przywara1-2/+1
Since we recently do not disable 3DNOW! support anymore, we should avoid setting the bits in the default qemu64 CPU model to ease migration. TCG does not support it anyway and even AMD deprecates it's usage nowadays. If you want to use it in KVM, use the phenom, athlon or host CPU model. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16honor -S on incoming migrationPaolo Bonzini3-8/+1
-S is not honored by qemu on incoming migration. If a domain is migrated while paused, thus, it will start running on the remote machine; this is wrong. Given the trivial patch to fix this, it looks more like a thinko than anything else, probably dating back to the qemu-kvm merge. The interesting part is that the -S mechanism was in fact *used* when migrating (setting autostart = 0) and the incoming migration code was starting the VM at the end of the migration. Since I was removing the vm_start from there, I also corrected a related imprecision. The code was doing a vm_stop "just in case", but we can be sure that the VM is not running---the vm_start call in vl.c has not been reached yet. So the vm_stop is removed together with the vm_start. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Update to a hopefully more future proof FSF addressBlue Swirl188-454/+215
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-16Sparc32: convert slavio interrupt controller to qdevBlue Swirl4-63/+115
Also increase QDEV_MAX_IRQ. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-16Sparc32: refactor CPU initBlue Swirl1-45/+30
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-16Sparc32: convert memory to qdevBlue Swirl1-36/+56
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-16Sparc32: convert boot prom to qdevBlue Swirl1-87/+67
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-16Sparc32: convert iommu to qdevBlue Swirl1-11/+45
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-16Sparc32: convert cs4231 to qdevBlue Swirl3-14/+31
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-16Sparc32: fix SDL zooming with TCXBlue Swirl1-20/+34
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-16Don't copy multiboot.bin into pc-bios after builtAnthony Liguori1-1/+0
That dirties the working directory of the tree. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Fix multiboot.bin build on mingw32Anthony Liguori2-3/+11
This combination of ld/object was suggested by Bartlomiej Celary Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Fix non-ACPI Timer Interrupt Routing - v3Anthony Liguori2-8/+30
v1 -> v2 adds comment suggested by Ryan. v2 -> v3 clarifies comment and corrects entry count Signed-off-by: Beth Kon <eak@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16pci.c: remove unnecessary #ifdef DEBUG_PCI.Isaku Yamahata1-14/+15
remove unnecessary #ifdef DEBUG_PCI. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16replace bdrv_{get, put}_buffer with bdrv_{load, save}_vmstateChristoph Hellwig5-60/+37
The VM state offset is a concept internal to the image format. Replace the old bdrv_{get,put}_buffer method that require an index into the image file that is constructed from the VM state offset and an offset into the vmstate with the bdrv_{load,save}_vmstate that just take an offset into the VM state. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16bios: Fix multiple calls into smbios_load_exAnthony Liguori3-0/+36
We're marking the used entry bitmap in smbios_load_external() for each type we check, regardless of whether we loaded anything. This makes subsequent calls behave as if we've already loaded the tables from qemu and can result in missing tables (ex. multiple type4 entries on an SMP guest). Only mark the bitmap if we actually load something. Signed-off-by: Alex Williamson <alex.williamson@hp.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16gdbstub: x86: Support for setting segment registersJan Kiszka3-17/+65
This allows to set segment registers via gdb also in system emulation mode. Basic sanity checks are applied and nothing is changed if they fail. But screwing up the target via this interface will never be complicated, so I avoided being too paranoid here. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16gdbstub: x86: Refactor register accessJan Kiszka1-73/+83
Clarify gdb's register set layout by using constants for cpu_gdb_read/write_register. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16gdbstub: Add vCont supportJan Kiszka1-0/+58
This patch adds support for the vCont remote gdb command. It is used by gdb 6.8 or better to switch the debugging focus for single-stepping multi-threaded targets, ie. multi-threaded application in user mode emulation or VCPUs in system emulation. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16slirp: Fix default netmask to 255.255.255.0Anthony Liguori1-2/+2
This got broken between a13a4126c8 and c92ef6a22d: old slirp code used 255.255.255.0. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Regenerate BIOS and add patches for -boot optionAnthony Liguori4-0/+129
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Update boot option documentationJan Kiszka1-4/+23
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Add boot menu control via command line switchJan Kiszka4-1/+18
Disable the lengthy BIOS prompt for selecting a boot device by default, but let the user reenable it via '-boot menu=on'. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Add boot-once supportJan Kiszka1-1/+22
This allows to specify an exceptional boot order only for the first startup of the guest. After reboot, qemu will switch back to the default order (or what was specified via 'order='). Makes installing from CD images and then booting the freshly set up harddisk more handy. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Add qemu_unregister_resetJan Kiszka2-2/+16
Will be used by '-boot once=...', and should also help in other use cases. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Rework reset handler managementJan Kiszka1-10/+6
Convert the reset handler maintenance code to TAILQ services. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Move boot_set callback backendJan Kiszka3-20/+25
Move registration function for the boot_set callback handler and provide qemu_boot_set so that it can also be used outside the monitor code. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Rework -boot optionJan Kiszka1-31/+50
This patch changes the boot command line option to the canonical format -boot [order=drives][,...] where 'drives' is using the same format as the old -boot. The format switch allows to add the 'menu' and 'once' options in later patches. The old format is still understood and will be processed at least for a transition time. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Add a pc-0-10 machine type for compatibility with 0.10.xMark McLoughlin1-6/+53
Add a pc-0-10 machine type to allow a pc machine to be created with virtio block and console devices compatibility with qemu-0.10.x. Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Change default PCI class of virtio-console to PCI_CLASS_SERIAL_OTHERMark McLoughlin2-3/+20
We're using PCI_CLASS_DISPLAY_OTHER now, but qemu-kvm.git is using PCI_CLASS_OTHERS because: "As a PCI_CLASS_DISPLAY_OTHER, it reduces primary display somehow on Windows XP (possibly Windows disables acceleration since it fails to find a driver)." While this is valid, many versions of X will get confused by it. Class major number of 0 gets treated as a possibly prehistoric VGA device, and then the autoconfig logic gets confused trying to figure out whether the virtio console or the pv vga device are the real VGA. We should really set a proper class ID. 0x0780 (serial / other) seems most appropriate. This shouldn't require any kernel changes, the modalias for virtio looks like: alias: pci:v00001AF4d*sv*sd*bc*sc*i* so won't care what the base class or subclass are. It shows up in the guest as: 00:05.0 Communication controller: Qumranet, Inc. Virtio console A new qdev type is introduced to allow devices using the old class to be created for compatibility with qemu-0.10.x. Reported-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Change default PCI class of virtio-blk to PCI_CLASS_STORAGE_SCSIMark McLoughlin1-3/+18
Windows virtio driver cannot pass DTM (certification) tests while the storage class is PCI_CLASS_STORAGE_UNKNOWN. A new qdev type is introduced to allow devices using the old class to be created for compatibility with qemu-0.10.x. Reported-by: Dor Laor <dlaor@redhat.com> Signed-off-by: Mark McLoughlin <markmc@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-15Sparc32: convert sparc32_dma to qdevBlue Swirl3-21/+56
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-15Avoid SIGSEGV when dumping cpu state without enabled loggingmalc1-1/+2
Signed-off-by: malc <av1474@comtv.ru>
2009-07-15Convert fdc to qdevBlue Swirl1-23/+70
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-15Sparc32: convert slavio timers to qdevBlue Swirl1-24/+64
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-15Sparc32/PPC: convert escc to qdevBlue Swirl1-57/+97
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>