virtio-blk: handle NULL returns from bdrv_aio_{read, write}
The bdrv_aio_{read,write} routines can return a NULL pointer when theI/O submission fails. Currently we ignore this and will wait foreverfor an I/O completion and leading to a hang of the guest....
Move watchdog, watchdog_action, give them internal linkage
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add VMState support for variable sized arrays
This patch add supports for variable sized arrays whose size isanother field of the state.
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Port PCI Bus to VMState design
This uses VARRAY and INT32_EQUAL values
Add VMState support for static sized buffers (uint_8)
This patch adds support for static sized buffer and typecheks that the buffer is right.
Port PS2 devices to VMState design
This uses STRUCT and BUFFER
Add VMState support for int32_t check value
We read the saved value and check that it is less or equal than the onestored in the structure.
Add version_id to PCIDevice.
It is needed for VMState
Port PCIDevice state to VMState
This uses a variant of buffer, with extra checks. Also uses the newsupport for cheking that a read value is less or equal than a field.
Add VMState support to run a function after load
Port ACPI to VMState
This uses a run_after_load() function, and VMSTATE_PCI_DEVICE()It could be made smaller changing the type of pm_io_space_update()to return an int.
pci ids: remove redundant defines
Remove some redundant definitions for PCI classes:PCI_CLASS_SERIAL_OTHER already exists as PCI_CLASS_COMMUNICATION_OTHERand PCI_CLASS_PROCESSOR_CO is redefined.
PCI_CLASS_SERIAL_OTHER is not used anywhere.
Signed-off-by: Amit Shah <amit.shah@redhat.com>...
virtio-console: rename dvq to ovq
It isn't obvious what 'dvq' stands for. Since it's the output queue andthe corresponding input queue is called 'ivq', call this 'ovq'
Signed-off-by: Amit Shah <amit.shah@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
New VMstate save/load infrastructure
This patch introduces VMState infrastructure, to convert the save/loadfunctions of devices to a table approach. This new approach has thefollowing advantages:- it is type-safe- you can't have load/save functions out of sync...
Add VMState support for pointers
This patch adds support for saving pointers to values
Add VMState support for arrays
This patch adds support for saving arrays inside the struct
Port apic to new VMState design
Add VMState support for structs
This patch adds support for saving one VMStateDescription from otherVMStateDescription.
Add VMState support for arrays of structs
This patch add supports for arrays of structs
Port i8254 to new VMState design
We read the saved value and check that it is the same that the oneis stored in the structure.
Add isa_reserve_irq().
Introduce isa_reserve_irq() which marks an irq reserved and returnsthe appropriate qemu_irq entry from the i8259 table.
isa_reserve_irq() is a temporary interface to be used to allocate ISAIRQs for devices which have not yet been converted to qdev, and for...
Move isa_connect_irq calls into isa_create_simple
Now with isa-bus maintaining the isa irqs we can move theisa_connect_irq() calls into isa_create_simple().
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
move useful type definitons to osdep.h
isa bus irq changes and fixes.
Changes:
(1) make isa-bus maintain isa irqs, complain when allocating already taken irqs. (2) note that (1) works only for isa devices converted to qdev already (floppy and ps2/kbd/mouse right now), so more work...
hw/eepro100.c: Use extended TBD only where applicable
Bug fix for segfault when run as i82551 HW:Use Extended TBD only when HW supports it (i82558 and up).
Added assertions to guard from such buffer overflowIntroduce the MAX_TCB_BYTE_COUNT macroAllocate buf big enough as HW needs (MAX_ETH_FRAME_SIZE -> MAX_TCB_BYTE_COUNT)...
add file descriptor migration
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Cc: Chris Lalancette <clalance@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci-hotplug: initialize dinfo to NULL in pci_device_hot_add
Suppress the following compiler warning emitted by at least gcc version 4.2.1 (SUSE Linux)and gcc version 3.4.5 (mingw32 special):
hw/pci-hotplug.c: In function 'pci_device_hot_add':hw/pci-hotplug.c:102: warning: 'dinfo' may be used uninitialized in this function...
Sparc32: improve interrupt handling
Level 15 interrupts are broadcast to all CPUs, each CPU can clear theinterrupt using the local Clear Pending register.
Update intbit_to_level table.
Don't try to raise level 0 interrupts.
Calculate pending interrupts based on the separate inputs from master...
Make CPURead/WriteFunc structure 'const'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
qdev/prop: convert isa-bus to helper macros.
virtio-blk: add msi support.
Make the e1000 the default network adapter for the pc target.
The ne2k is an ancient card that performs pretty terribly under QEMU. In manymodern OSes, there is no longer drivers available for the ne2k.
Switch the default network adapter to e1000. This card is more widely...
Unbreak large mem support by removing kqemu
kqemu introduces a number of restrictions on the i386 target. The worst is thatit prevents large memory from working in the default build.
Furthermore, kqemu is fundamentally flawed in a number of ways. It relies on...
unify popen/fopen qemu wrappers
While reading Chris's code for fd migration I noticed the duplicationbetween QEMUFilePopen and QEMUFileStdio. This fixes it, and makesqemu_fopen more similar qemu_popen.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
Route IOAPIC interrupts via ISA bus
Instead of calling the IOAPIC from the PIC, raise IOAPIC irqs via the ISA bus.As a side effect, IOAPIC lines 16-23 are enabled.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
SMART ATA Functionality
For the lulz I implemented basic SMART functionality in ide.c. smartctlon linux recognizes it just fine and starting self tests with itcomplete successfully.
Signed-off-by: Brian Wheeler <bdwheele@indiana.edu>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
QEMU set irq0override in fw_cfg
Hi,
After discussing the issue with Avi, Gleb and a couple others on irq,we came to the conclusion that it is preferred to have QEMU requestfeatures from the BIOS, rather than notifying the BIOS that it isrunning on QEMU or KVM. This way memory ranges can change etc. and...
Route PC irqs to ISA bus instead of i8259 directly
A PC has its motherboard IRQ lines connected to both the PIC and IOAPIC.Currently, qemu routes IRQs to the PIC which then calls the IOAPIC, anincestuous arrangement. In order to clean this up, create a new ISA IRQ...
make vga screen_dump use DisplayState properly
Hi all,currently the vga screen_dump code doesn't use the DisplayStateinterface properly and tries to replace it temporarily while taking thescreenshot.A better approach is to register a DisplayChangeListener, call...
Restore consistent formatting
Signed-off-by: malc <av1474@comtv.ru>
es1370: Remove unused indirection of PCIES1370State and ES1370State
Signed-off-by: Juan Quintela <quintela@redhat.com>
Revert my commit c00a9de060124a988bd9847c095e5836488c6f01
was incorrect.
Fix segfault of qemu-system-arm with PXA target
qemu-system-arm (0.10.5) segfaults when invoked with a PXA machine target,e.g. -M tosa. The reason is fairly obvious:
Signed-off-by: Torsten Duwe <duwe@lst.de>Signed-off-by: Christoph Hellwig <hch@lst.de>...
Use corect depth from DisplaySurface in vmware_vga.c
Hello,for what I can tell, there is no way for vmware_vga to work correctlyright now. It assumes that the framebuffer bits-per-pixel and the onefrom the DisplaySurface are identical (it uses directly the VRAM from...
Remove the unnecessary and only global in musicpal.c
Merge with balrog@git.sv.gnu.org:/srv/git/qemu.git
Make musicpal.c use the I2C device and the Marvell 88w8618 audio device
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>Signed-off-by: Andrzej Zaborowski <balrogg@gmail.com>
Extract the Marvell 88w8618 audio device from musicpal.c
Extract musicpal.c I2C bitbanging code and make it gpio aware
Musicpal qdev conversion: gpio (except I2C part), keyboard and lcd
Sparc32: fix monitor commands 'info pic' and 'info irq'
Rearrange to suppress gcc 3.3.5 warning about unused variable
ESP: implement Transfer Pad
ESP: Implement select without ATN, fix comments
Remove unneded ac97 indirection accessing its state
Searching for "inspiration" to convert another device to qdev, I gotac97. Once I understood a bit of qdev, found that ac97 used a not neededindirection. To protect the unaware, just fixed it.
Later, Juan....
Replace REGX with PRIx64
Replace local ADDRX/PADDRX macros with TARGET_FMT_lx/plx
Replace always_inline with inline
We define inline as always_inline.
PPC: clean up ppc405
Rely on the subpage system instead of the local version.Make most functions "static".Fix wrong parameter passed to ppc4xx_pob_reset.
Fix migration for ide devices
commit 93c8cfd9e67a62711b86f4c93747566885eb7928Author: Gleb Natapov <gleb@redhat.com>Date: Sun Aug 2 11:36:47 2009 +0300
make windows notice media change
Broke save/restore by loading a new field but not saving it....
Unbreak Sparc64
EBus is a sort of ISA bus.
Unbreak Sparc32 and PPC
Convert qdev ptr type to chr, allow a NULL pointer.
Fix virtio-blk
Reported-by: Christoph HellwigSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev/prop: convert xilinx_ethlite.c to helper macros.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-Id:
qdev/prop: convert xilinx_intc.c to helper macros.
qdev/prop: convert xilinx_timer.c to helper macros.
fix qdev_print_devinfo()
snprintf returns number of bytes needed for the output, not the numberof bytes actually written. Thus the math is wrong ...
Spotted by Markus Armbruster.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
rename "info qdrv" to "info qdm"
As requested by avi: driver != device model.
qdev/prop: convert syborg_interrupt.c to helper macros.
qdev/prop: convert syborg_keyboard.c to helper macros.
qdev/prop: convert syborg_pointer.c to helper macros.
qdev/prop: convert syborg_serial.c to helper macros.
qdev/prop: convert syborg_timer.c to helper macros.
qdev/prop: convert tcx.c to helper macros.
qdev/prop: convert vga.c to helper macros.
qdev/prop: convert virtio-pci.c to helper macros.
qdev/prop: convert slavio_timer.c to helper macros.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>Message-Id:Message-Id:
qdev/prop: convert smbus_eeprom.c to helper macros.
qdev/prop: convert sparc32_dma.c to helper macros.
qdev/prop: convert sun4m.c to helper macros.
qdev/prop: convert sun4u.c to helper macros.
qdev/prop: convert syborg_fb.c to helper macros.
qdev/prop: convert slavio_intctl.c to helper macros.
qdev/prop: convert pcnet.c to helper macros.
qdev/prop: convert etraxfs_pic.c to helper macros.
qdev/prop: convert i2c.c to helper macros.
qdev/prop: convert integratorcp.c to helper macros.
qdev/prop: convert iommu.c to helper macros.
qdev/prop: convert m48t59.c to helper macros.
qdev/prop: convert pci.c to helper macros.
qdev/prop: convert arm_sysctl.c to helper macros.
qdev/prop: convert armv7m.c to helper macros.
qdev/prop: convert eccmemctl.c to helper macros.
qdev/prop: convert escc.c to helper macros.
qdev/prop: add CharDriverState property.
Add/Fix command-line checks for smbios options v2
- One type 4 table is required per cpu. Add a check for this.- Fix check for smbios file.
Changes from v1:- static designation of smbios_validate_table, and remove whitespace
Signed-off-by: Beth Kon <eak@us.ibm.com>...
Windows seems to be very stupid about cdrom media change. It pollscdrom status and if status goes ready->media not present->readyit assumes that media was changed. If "media not present" step doesn'thappen even if "medium may have changed" was seen it assumes media...
qdev/prop: macros for creating typechecked properties.
There are DEFINE_PROP_$TYPE macros foreach property type. These macros link the qdev_prop_$name struct to thetype used by that property. typeof(struct->field) is verifyed to be the...
vga: do not resize the screen on hw_invalidate
Hi all,currently vga always resizes the screen when vga_hw_invalidate is calledwhile this is not required and all the other graphic emulators don't.This patch fixes it, making vga invalidate behaviour consistent with the...