vmstate: port vmmouse device
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: port pckbd device
vmstate: port dma device
vmstate: port fw_cfg device
vmstate: port i8259 device
vmstate: add support for uint8_t equal
vmstate: port fdc device
We can't move fifo back to an embeded array because it needs to be aligned
vmstate: add support for arrays of uint16_t
vmstate: add sensible arguments to vmstate_unregister()
vmsd alone is not enugh, because we can have several structs saved with the same description (vmsd).
vmstate: rename run_after_load() -> post_load()
This naming was used in kvm tree, and is easier to remember
vmstate: Add pre_load() hook
vmstate: Add pre/post_save() hooks
Unexport ticks_per_sec variable. Create get_ticks_per_sec() function
qdev: add parser for chardev properties
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
convert msmouse chardev to QemuOpts.
convert braille chardev to QemuOpts.
VirtIO: Fix QEMU crash during Windows PNP tests
Hello,
In some cases bus driver can deassert "bus master" bit in PCI commandregister. The driver will no longer be able to update related registers inthe device. Eventually it will cause QEMU to exit in "virtqueue_num_heads"...
qdev: Fix i6300 upcast
Use DO_UPCAST() instead of container_of() to go from PCIDevice toI6300State. This ensures that PCIDevice is the first member of structI6300State.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qemu: make virtio-blk PCI compliant by default
commit bf011293faaa7f87e4de83185931e7411b794128 made virtio-blk-pci notPCI-compliant, since it makes region 0 (which is an i/o region)size > 256, and, since PCI 2.1, i/o regions are limited to 256 bytes size....
qemu: init all queues to NO_VECTOR value
initialize vectors for all vqs to VIRTIO_NO_VECTOR rather than 0 whichis a valid vector. This fixes migration which happened before driverwas loaded.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Reported-by: Amit Shah <amit.shah@redhat.com>...
block: add enable_write_cache flag
Add a enable_write_cache flag in the block driver state, and use it todecide if we claim to have a volatile write cache that needs controlledflushing from the guest. The flag is off if cache=writethrough isdefined because O_DSYNC guarantees that every write goes to stable...
ide: use bdrv_aio_flush
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-blk: add volatile writecache feature
Add a new VIRTIO_BLK_F_WCACHE feature to virtio-blk to indicate that we havea volatile write cache that needs controlled flushing. Implement aVIRTIO_BLK_T_FLUSH operation to flush it.
Signed-off-by: Christoph Hellwig <hch@lst.de>...
Revert "don't call cpu_sychronize_state from reset handlers"
This reverts commit 733318ea9c6d846a6a047b87619e7d9d6e9707d1.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
virtio-blk: Use bdrv_aio_multiwrite
It is quite common for virtio-blk to submit more than one write request in arow to the qemu block layer. Use bdrv_aio_multiwrite to allow block drivers tooptimize its handling of the requests.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>...
Fix formatting
Fix formatting, get rid of conf and fix description
Fix formatting and and description field
qdev/isa: convert ne2000
Also split the isa bits into a separate source file, so we don't drag ina dependency for isa-bus.o for machines which want ne2k_pci only.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
qdev/isa: finish pckbd conversion
drop old init path and switch remaining users toisa_create_simple().
qdev/isa: convert real time clock
qdev/isa: convert soundblaster
qdev/isa: convert cs4231a sound card
qdev/isa: convert gravis ultrasound
qdev: simplify isa irq assignments
isa-bus owns the isa irqs now, so it can hand them out directly.There is no need for the separate isa_connect_irqs step, drop it.
Also hard-code isa interrupts which can't be configured anyway.
qdev: tag isabus-bridge as no-user
isabus-bridge isn't supposed to be added via -device ...
qdev: add isa_create() function
Like isa_create_simple, but doesn't call qdev_init, so one can setproperties after creating and before initializing the device.
isapc: pick a more sane default cpu for such old hardware.
qdev: add property type for 32bit signed integers.
qdev: drop iobase properties from isa bus
Lot of ISA devices work at fixed addresses, so having iobaseas bus property doesn't make much sense. Devices which canhave different iobases will get a device property.
Also simply hard-code stuff which can't be configured anyway....
isapc: Fix irq routing
Only send irqs to ioapic in case we have one.Fixes qemu segfault.
Fix VMSTATE_PCI_DEVICE version
PCI device entries have to have a default version, not 2, because they areused in the midle of other structures that can have any version number.
We can't use proper versioning here until we have SubSections support.Why we didn't noticed before? Because in a PC, the only device ported with...
RTC polling mode broken
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"...
don't call cpu_sychronize_state from reset handlers
Doing this will make the vcpu ioctl be issued from the I/O thread, insteadof cpu thread. The correct behaviour is to call it from within the cpu thread,as soon as we are ready to go.
Signed-off-by: Glauber Costa <glommer@redhat.com>...
eepro100: Clean code which sets the PCI device id
Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix for commit 3f9cb1c14dc368f41447db5f78d6248c4f100ad4
Here's a patch to fix the issue introduced by me, as Reimar Döffinger pointed out,
Reimar Döffinger wrote:
On Thu, Aug 13, 2009 at 03:01:20PM +0300, Naphtali Sprei wrote: Bug fix for segfault when run as i82551 HW:...
On Thu, Aug 13, 2009 at 03:01:20PM +0300, Naphtali Sprei wrote:
Bug fix for segfault when run as i82551 HW:...
qdev: integrate reset
qdev: convert rtl8139 to reset
qdev: integrate vmstate
qdev: convert tcx to reset + vmsd
qdev/scsi: add scsi bus support to qdev, convert drivers.
Adding scsi disks via -device works now, i.e. you can do:
-drive id=sda,if=none,......
qdev/scsi+usb: convert usb-storage to qdev.
Full coverage with properties and everything. You can add virtual usbsticks this way now:
-drive if=none,id=pendrive,path=/some/where -device usb-storage,drive=pendrive
-usbdevice disk:/path/to/image continues to work....
qdev/usb: add some convinience aliases.
qdev/usb: convert uhci.
Hookup pci device into qdev.
qdev/usb: convert ohci.
Drop num_ports argument for usb_ohci_init_pci(), everybodycalls it with num_ports == 3, so it is pointless.
Convert ohci pci device into qdev.TODO: convert non-pci ohci adapters.
You can add a OHCI USB Controller to your virtual pc now using...
qdev: add error message to qdev_device_add().
qdev/usb: add usb bus support to qdev, convert drivers.
TODO: * make the rest of qemu aware of usb busses and kill the FIXMEs added by this patch....
qdev/usb: make qemu aware of usb busses.
Move usb code from vl.c to usb-bus.c and make it use the new datastructures added by qdev conversion. qemu usb core should be ableto handle multiple USB busses just fine now (untested though).
Kill some usb_*_init() legacy functions, use usb_create_simple()...
cirrus_vga: rename cirrus_hook_read_cr() cirrus_vga_read_cr()
Simplify the logic to do everything inside the function. Return 0xff if index is out of range independetly of DEBUG_CIRRUS
cirrus_vga: rename cirrus_hook_write_cr() cirrus_vga_write_cr()
Simplify the logic to do everything inside the function.
cirrus_vga: CIRRUS_HOOK_* is not used anymore
cirrus_vga: rename cirrus_hook_write_sr() cirrus_vga_write_sr()
cirrus_vga: rename cirrus_hook_read_palette() cirrus_vga_read_palette()
Simplify the logic to do everything inside the function
cirrus_vga: rename cirrus_hook_write_palette() cirrus_vga_write_palette()
cirrus_vga: rename cirrus_hook_read_gr() cirrus_vga_read_gr()
cirrus_vga: rename cirrus_hook_write_gr() cirrus_vga_write_gr()
vga: change tabs to spaces
cirrus_vga: make cirrus_read_hidden_dac() return its result
vga and cirrus_vga: substitute switch for equivalent assigntment
vga: Rename last VGAState occurrences to VGACommonState
cirrus_vga: rename cirrus_hook_read_sr() cirrus_vga_read_sr()
And make it a real function
vga and cirrus_vga: create vga_ioport_invalid() and use it everywhere
cirrus_vga: Add a VGACommonState local var to cirrus_vga_ioport_{read, write}
vga: split vga_{load, save} into pci and common parts
Once there adjust VGAState <-> VGACommonStateExport vga_common_save/vga_common_load (nreeded by wmvare_vgaRemove vga.pci_dev field, it is not needed anymore
Signed-off-by: Juan Quintela <quintela@redhat.com>...
vga: split pci bits into vga-pci.c
Adjust all the VGAState in VGACommonStateCompile vga-pci.o only for targets that use it.
vga: split isa bits inco vga-isa.c
Adjust all the VGAState in VGACommonStateCompile vga-isa.o in the targets that use it
vga: export vga_mem_{read,write}
vga: split vga-isa-mm.o
It is only used in mips softmmu, compile only there.it_shift field was only used for vga_isa_mm, move it from VGACommonStateto ISAVGAMMstate.
vga: remove useless cast from void *
cirrus_vga: prefix vga_ioport_{read, write} with cirrus
vga: export vga_ioport_{read,write}
Sparc64: use ISA bus for i8042
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Sparc64: remove unused variables
Fix indentation
esp: handle "select without attention"
Up to now "select without attention" was handled the same way as"select with attention". According to
http://www.ibiblio.org/pub/historic-linux/early-ports/Sparc/NCR/NCR53C9X.txt
select without ATN sends the CDB (Command Descriptor Block) directly,...
mips malta: Fix fdc regression and use qdev for i8042 setup
8baf73adf664e79eae201c3f618078a220a661d9 (qdev/isa: convert fdc)breaks MIPS Malta:
Tried to create isa device isa-fdc with no isa bus present
Fix this by creating an isa bus for piix4.This change also requires some more qdev related changes...
monitor: Port handler_1 to use QDict
This commit ports command handlers that receive one argument to usethe new monitor's dictionary.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
monitor: Port handler_2 to use QDict
This commit ports command handlers that receive two arguments to usethe new monitor's dictionary.
monitor: Port handler_3 to use QDict
This commit ports command handlers that receive three arguments to usethe new monitor's dictionary.
Add wrappers to functions used by the Monitor
Some functions exported to be used by the Monitor as commandhandlers are also called in other places as regular functions.
When those functions got ported to use the Monitor dictionaryto pass argments, the callers will have to setup a dictionary...
ide: pass down DriveInfo instead of BlockDriverState
ide: move cmd+irq from IDEState to IDEBus.
These variables are per bus, not per drive. Lets move them andcleanup things a bit. And fix the cmd migration bug for real.
piix3: use new vmstate infrastructure
Remove typedef for bool from eepro100.c
eepro100.c shouldn't have the need to do this in its local header file.
And I recently started getting this:
$ make -j3... CC x86_64-softmmu/eepro100.o/home/amit/src/qemu/hw/eepro100.c:112: error: two or more data types...
pci_irq_levels[] belong to PIIX3State
With previous cleanups, now it is possible to put it where it belongs
Update SaveVM versions
Now that we have all fields belonging to a PCIDevice, save each fieldon the device that it belongs. This means moving pci_irq_levelsfrom PCII440FXState to PIIX3State.Old formats are loaded, but we only save on the new saner format....
i440fx: use new vmstate infrastructure
Fold piix3_init() intto i440fx_init
i440fx_init will now work properly if we don't setup piix3
We can add piix3_dev now to PIIX3IrqState
Save irq_state into PCII440FXState