audio: use muldiv64 where it makes sense
Signed-off-by: malc <av1474@comtv.ru>
qemu serial: lost tx irqs (affecting FreeBSD's new uart(4) driver)
Well one problem seems to be the rx condition, ... if ((s->ier & UART_IER_RDI) && (s->lsr & UART_LSR_DR))is not enough to trigger an irq, yet still causes the followingconditions not to be checked anymore at all....
escc: fix IRQ routing, broken by 6c319c82223a1766c5d64a20051e5c6ab7b53951
The logic of Zilog makes channel B the first device and channel A thesecond one.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
ide/isa: convert to qdev.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
ide/pci: convert to qdev.
With this patch applied ide drives (when attached to a pci adapter) canbe 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...
ide/pci: fix indention
ide/qdev: add ide bus.
split away drive init from ide_init2()
This allows the ide bus being initialized without drives attachedand the drives being attached and initialization later on asseparate step.
qdev/pci: add pci_create_noinit()
Like pci_create_simple() but doesn't call qdev_init(), so one canset properties before initializing the device.
mips malta: ensure that the serial ports are associated with a device
The serial ports should be present even if associated with a null deviceas some firmware wants to initialize them.
hw/serial: don't create a char device if none is specified
When creating null devices, there is no way to ensure the unicity ofthe labels. Bail out with an error message instead.
unbreak ppc/prep
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>...
Add an ISA bus version of m48t59
Many thanks to Gerd Hoffmann for finding and fixing a bug in the initialversion.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix Linux task preemption on Versatile board
Recent versions of the Linux kernel will not preempt CPU-intensivetasks unless the clock used by sched_clock() works. On -M versatilepbthat's the 24MHz timer in the system controller. It's a very simpletimer, so implement it....
pflash_cfi01: Correct debug build, no functional changes.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
ne2000-isa: Do not free memory owned by qdev
Sparc64: make system bus parent of PCI bus
x86: move a declaration to header
x86: add 'const'
Make string arrays used to convert numbers to strings when DEBUG_EEPRO100 is enabled const.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix xen build after sys-queue renaming
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix sys-queue.h conflict for good
Problem: Our file sys-queue.h is a copy of the BSD file, but there aresome additions and it's not entirely compatible. Because of that, there havebeen conflicts with system headers on BSD systems. Some hacks have beenintroduced in the commits 15cc9235840a22c289edbe064a9b3c19c5f49896,...
gus: Do not manually free the state, qdev does it for us
audio: remove lsbindex/popcount in favour of host-utils's ctz32
vmstate: port hpet device
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vmstate: port serial device
vmstate: port cirrus_vga device
vmstate: port vmmouse device
vmstate: port pckbd device
vmstate: add uint64 array support
vmstate: port ioapic device
hpet: it is imposible that qemu_timer field is NULL at this point
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()
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