We need PCINE2000State for save/load functions
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add pci_ne2000_{save/load} functions, then remove pci_dev NE2000State field
cirrus_vga: remove pointless cast from void *
cirrus_vga: Change casts to DO_UPCAST() for PCICirrusVGAState
Add pci_cirrus_vga_{save/load} functions, then remove vga.pci_dev use
pcnet: Change casts to DO_UPCAST() for PCIPCNetState
pcnet: remove useless casts This are casts to the very type of the function
pcnet: Add pci_pcnet_{save/load} functions, then remove PCNetState pci_dev field
lsi53c895a: remove pointless cast from void *
lsi53c895a: use DO_UPCAST to cast from PCIDevice
lsi53c895a: rename PCIDevice field from pci_dev to dev (consistence)
lsi53c895a: LSIState is a DeviceHost
Go figure.
Introduce vga_common_reset() to be able to typcheck vga_reset()
vga: Rename vga_state -> vga
Everything outside of vga.c should use VGACommonState
usb-ohci: Change casts to DO_UPCAST() for OHCIPCIState
ne2000: remove casts from void *
ne2000: pci_dev has this very value with the right type
ne2000: Change casts to DO_UPCAST() for PCINE2000State
switch balloon initialization to -device.
With that patch applied "-balloon virtio,args" becomes a shortcut for"-device virtio-balloon-pci,args".
Side effects: - ballon device gains support for id=<tag>. - ballon device is off by default now. - initialization order changes, which may in different pci slot...
eepro100: convert casts to DO_UPCAST()
eepro100: cast a void * makes no sense
eepro100: Remove unused indirection of PCIDevice
Once there, there is no way that we don't have a PCI Device at save/load time. Remove the check
rtl8139: Remove unneeded double indirection of PCIRTL8139State
rtl8139: remove pointless cast from void *
ide: move code to hw/ide/
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: add save/restore support for isa
ide: add save/restore support for mmio
virtio-pci error logging
Use the new qemu_error() function for virtio-blk-pci.
qdev error logging
Use the new qemu_error() function in qdev.c
ide: add IDEBus struct, cleanups
The current IDE code uses an array of two IDEState structs to maintainthe IDE bus. This patch adds a IDEBus to be used instead and does abunch of cleanups:
ide: split away ide-internal.h
move lots of IDE defines to the new file.also make a bunch of functions non-staticand add declaration for them. Needed bythe following patches of this series.
ide: split away ide-isa.c
create ide-isa.c and place isa bus support there.only build ide-isa support for platforms using it.also create ide.h header file.
ide: split away ide-pci.c
create ide-pci.c and place pci bus support there.only build ide-pci support for platforms using it.
Fix build (merge with isa mmio split)
ide: split away ide-macio.c
create ide-macio.c and place macio support there.only build ide-macio support for platforms using it.
ide: split away ide-mmio.c
create ide-mmio.c and place mmio support there.only build ide-mmio support for platforms using it.
ide: split away ide-microdrive.c
create ide-microdrive.c and place microdrive support there.only build ide-microdrive support for platforms using it.
qdev: add return value to init() callbacks.
Sorry folks, but it has to be. One more of these invasive qdev patches.
We have a serious design bug in the qdev interface: device initcallbacks can't signal failure because the init() callback has noreturn value. This patch fixes it....
kvm: Simplify cpu_synchronize_state()
cpu_synchronize_state() is a little unreadable since the 'modified'argument isn't self-explanatory. Simplify it by making it alwayssynchronize the kernel state into qemu, and automatically flush theregisters back to the kernel if they've been synchronized on this...
Check block driver read error in pflash_cfi0x
If a flash file of size smaller than the flash size is specified inthe -pflash option, the block driver returns error. But thepflash_cfi0x ignores the error. This results in a flash content of allzeroes. And the simulation aborts while executing code....
fix stack buffer overflows in eepro100.c tx
Hello,the real world issue is that the hardware allows sends up to 2600 bytes,and for some reason FreeBSD sometimes sends frames larger than theethernet frame size (102+1460 is the maximum I have seen so far),...
qdev: convert watchdogs
-watchdog NAME is now equivalent to -device NAME, except it treatsoption argument '?' specially, and supports only one watchdog.
A side effect is that a device created with -watchdog may now receivea different PCI address.
i6300esb is now available on any machine with a PCI bus, not just PCs....
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>
Clean up upcast from PCIDevice to I6300State
Add VMState support for variable sized arrays
This patch add supports for variable sized arrays whose size isanother field of the state.
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().
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