summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2009-09-15ide/pci: convert to qdev.Gerd Hoffmann1-69/+117
With this patch applied ide drives (when attached to a pci adapter) can be created via -device, like this: -drive if=none,id=mydisk,file=/path/to/disk.img -device ide-drive,drive=mydisk,bus=ide.0,unit=0 Note that creating a master on ide1 doesn't work that way. That is a side effect of qemu creating a cdrom automagically even if you don't ask for it. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-15ide/pci: fix indentionGerd Hoffmann1-6/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-15ide/qdev: add ide bus.Gerd Hoffmann2-1/+147
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-15split away drive init from ide_init2()Gerd Hoffmann2-32/+40
This allows the ide bus being initialized without drives attached and the drives being attached and initialization later on as separate step. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-15qdev/pci: add pci_create_noinit()Gerd Hoffmann2-3/+9
Like pci_create_simple() but doesn't call qdev_init(), so one can set properties before initializing the device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-15mips malta: ensure that the serial ports are associated with a deviceAurelien Jarno1-0/+9
The serial ports should be present even if associated with a null device as some firmware wants to initialize them. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-09-15hw/serial: don't create a char device if none is specifiedAurelien Jarno1-1/+6
When creating null devices, there is no way to ensure the unicity of the labels. Bail out with an error message instead. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2009-09-14unbreak ppc/prepGerd Hoffmann1-1/+4
Changes: * added isa bus, hooked up to the system bus. Not sure this is correct, but 'info pci' lists lists no pci-isa bridge in the machine ...). * switches the default cpu to one which actually works. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-14Add an ISA bus version of m48t59Blue Swirl3-17/+80
Many thanks to Gerd Hoffmann for finding and fixing a bug in the initial version. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-14Fix Linux task preemption on Versatile boardDaniel Jacobowitz1-2/+3
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-14pflash_cfi01: Correct debug build, no functional changes.Edgar E. Iglesias1-11/+12
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-14ne2000-isa: Do not free memory owned by qdevmalc1-2/+0
Signed-off-by: malc <av1474@comtv.ru>
2009-09-13Sparc64: make system bus parent of PCI busBlue Swirl1-1/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-13x86: move a declaration to headerBlue Swirl1-2/+0
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-13x86: add 'const'Blue Swirl1-6/+7
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12Make string arrays used to convert numbers to strings when DEBUG_EEPRO100 is ↵Reimar Döffinger1-3/+3
enabled const. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12Fix xen build after sys-queue renamingJan Kiszka1-1/+1
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12Fix sys-queue.h conflict for goodBlue Swirl15-92/+92
Problem: Our file sys-queue.h is a copy of the BSD file, but there are some additions and it's not entirely compatible. Because of that, there have been conflicts with system headers on BSD systems. Some hacks have been introduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896, f40d753718c72693c5f520f0d9899f6e50395e94, 96555a96d724016e13190b28cffa3bc929ac60dc and 3990d09adf4463eca200ad964cc55643c33feb50 but the fixes were fragile. Solution: Avoid the conflict entirely by renaming the functions and the file. Revert the previous hacks. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-09-12audio: remove lsbindex/popcount in favour of host-utils's ctz32malc1-2/+3
Signed-off-by: malc <av1474@comtv.ru>
2009-09-12gus: Do not manually free the state, qdev does it for usmalc1-1/+0
Signed-off-by: malc <av1474@comtv.ru>
2009-09-11vmstate: port cirrus_vga deviceJuan Quintela2-98/+63
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: port serial deviceJuan Quintela1-36/+37
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: port hpet deviceJuan Quintela1-35/+38
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11hpet: it is imposible that qemu_timer field is NULL at this pointJuan Quintela1-6/+2
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: port ioapic deviceJuan Quintela1-27/+12
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: add uint64 array supportJuan Quintela1-0/+6
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: port pckbd deviceJuan Quintela1-24/+15
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: port vmmouse deviceJuan Quintela1-28/+20
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: port dma deviceJuan Quintela1-51/+34
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: add support for arrays of uint16_tJuan Quintela1-0/+6
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: port fdc deviceJuan Quintela1-92/+62
We can't move fifo back to an embeded array because it needs to be aligned Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: add support for uint8_t equalJuan Quintela1-0/+4
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: port i8259 deviceJuan Quintela1-48/+26
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: port fw_cfg deviceJuan Quintela1-21/+12
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: Add pre/post_save() hooksJuan Quintela1-0/+2
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: Add pre_load() hookJuan Quintela1-0/+1
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: rename run_after_load() -> post_load()Juan Quintela5-9/+9
This naming was used in kvm tree, and is easier to remember Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11vmstate: add sensible arguments to vmstate_unregister()Juan Quintela1-1/+1
vmsd alone is not enugh, because we can have several structs saved with the same description (vmsd). Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11Unexport ticks_per_sec variable. Create get_ticks_per_sec() functionJuan Quintela36-98/+110
Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11qdev: add parser for chardev propertiesGerd Hoffmann1-0/+11
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11convert braille chardev to QemuOpts.Gerd Hoffmann2-2/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11convert msmouse chardev to QemuOpts.Gerd Hoffmann2-2/+2
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11qdev: Fix i6300 upcastMarkus Armbruster1-4/+4
Use DO_UPCAST() instead of container_of() to go from PCIDevice to I6300State. This ensures that PCIDevice is the first member of struct I6300State. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11VirtIO: Fix QEMU crash during Windows PNP testsYan Vugenfirer1-2/+12
Hello, In some cases bus driver can deassert "bus master" bit in PCI command register. The driver will no longer be able to update related registers in the device. Eventually it will cause QEMU to exit in "virtqueue_num_heads" function. Attached path that fixes the described issue. Best regards, Yan Vugenfirer. >From 3fdafbdfad676ec8479dc073cff70bf356868bfe Mon Sep 17 00:00:00 2001 From: Yan Vugenfirer <yvugenfi@redhat.com> Date: Tue, 8 Sep 2009 10:08:14 -0400 Subject: [PATCH] VirtIO: Fix QEMU crash during Windows PNP tests Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11virtio-blk: add volatile writecache featureChristoph Hellwig2-1/+27
Add a new VIRTIO_BLK_F_WCACHE feature to virtio-blk to indicate that we have a volatile write cache that needs controlled flushing. Implement a VIRTIO_BLK_T_FLUSH operation to flush it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11ide: use bdrv_aio_flushChristoph Hellwig1-3/+13
Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11block: add enable_write_cache flagChristoph Hellwig2-3/+8
Add a enable_write_cache flag in the block driver state, and use it to decide if we claim to have a volatile write cache that needs controlled flushing from the guest. The flag is off if cache=writethrough is defined because O_DSYNC guarantees that every write goes to stable storage, and it is on for cache=none and cache=writeback. Both scsi-disk and ide now use the new flage, changing from their defaults of always off (ide) or always on (scsi-disk). Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11qemu: init all queues to NO_VECTOR valueMichael S. Tsirkin1-0/+3
initialize vectors for all vqs to VIRTIO_NO_VECTOR rather than 0 which is a valid vector. This fixes migration which happened before driver was loaded. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reported-by: Amit Shah <amit.shah@redhat.com> Tested-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11qemu: make virtio-blk PCI compliant by defaultMichael S. Tsirkin1-4/+8
commit bf011293faaa7f87e4de83185931e7411b794128 made virtio-blk-pci not PCI-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. When the ATA serial number feature is off, which is the default, make the device spec compliant again, by making region 0 smaller. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reported-by: Vadim Rozenfeld <vrozenfe@redhat.com> Tested-by: Vadim Rozenfeld <vrozenfe@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-09-11virtio-blk: Use bdrv_aio_multiwriteKevin Wolf1-8/+42
It is quite common for virtio-blk to submit more than one write request in a row to the qemu block layer. Use bdrv_aio_multiwrite to allow block drivers to optimize its handling of the requests. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>