History | View | Annotate | Download (16.6 kB)
pci: call object_unparent() before free_qdev()
Start VM with 8 multiple-function block devs, hot-removingthose block devs by 'device_del ...' would cause qemu abort.
| (qemu) device_del virti0-0-0 | (qemu) ** |ERROR:qom/object.c:389:object_delete: assertion failed: (obj->ref == 0)...
acpi_piix4: Fix PCI hotplug race
As Michael Tsirkin demonstrated, current PCI hotplug is vulnerableto a few races. The first is a race with other hotplug operationsbecause we clear the up & down registers at each event. If a newevent comes before the last is processed, up/down is cleared and...
acpi_piix4: Remove PCI_RMV_BASE write code
Clarify this register as read-only and remove write code. Nochange in existing behavior.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
acpi_piix4: Re-define PCI hotplug eject register read
The PCI hotplug eject register has always returned 0, so let's redefineit as a hotplug feature register. The existing model of using separateup & down read-only registers and an eject via write to this register...
acpi: explicitly account for >1 device per slot
Slot present bit is cleared apparently for each device. Hotplug and nonhotplug devices should not mix normally, and we only set the bit when weadd a device so it should all work out, but it's more robust to...
acpi_piix4: Disallow write to up/down PCI hotplug registers
The write side of these registers is never used and actually can't beused as defined because any read/modify/write sequence from the guestpotentially races with qemu. Drop the write support and define these...
suspend: switch acpi s3 to new infrastructure.
This patch switches pc s3 suspend over to the new infrastructure.The cmos_s3 qemu_irq is killed, the new notifier is used instead.The xen hack goes away with that too, the hypercall can simply bedone in a notifier function now....
acpi: add ACPIREGS
All those acpi structs are not independent from each other.Various acpi functions expecting multiple acpi structs passedin are a clean indicator for that ;)
So this patch bundles all acpi structs in the new ACPIREGSstruct, then use it everythere pass around acpi state....
acpi: don't pass overflow_time to acpi_pm1_evt_get_sts
Pretty pointless, can easily be reached via ACPIREGS now.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
acpi: add acpi_pm1_evt_write_en
Do APCIREGS->pm1.evt.en updates using the new acpi_pm1_evt_write_enfunction, so the acpi code will see those updates.
qom: Unify type registration
Replace device_init() with generalized type_init().
While at it, unify naming convention: type_init([$prefix_]register_types)Also, type_init() is a function, so add preceding blank line wherenecessary and don't put a semicolon after the closing brace....
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and thenrebased it into a single step which avoids repeatedly touching every file inthe tree.
The first step was a sed-based addition of the parent type to the subclass...
pci: convert to QEMU Object Model
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: move qdev->info to class
Right now, DeviceInfo acts as the class for qdev. In order to switch to aproper ObjectClass derivative, we need to ween all of the callers off ofinteracting directly with the info pointer.
prepare for future GPLv2+ relicensing
All files under GPLv2 will get GPLv2+ changes starting tomorrow.event_notifier.c and exec-obsolete.h were only ever touched by Red Hatemployees and can be relicensed now.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
qdev: switch children device list to QTAILQ
SCSI buses will need to read the children list first-to-last. Thisrequires using a QTAILQ, because hell breaks loose if you just tryinserting at the tail (thus reversing the order of all existingvisits from last-to-first to first-to-tail)....
notifier: Pass data argument to callback
This allows to pass additional information to the notifier callbackwhich is useful if sender and receiver do not share any other distinctdata structure.
Will be used first for the clock reset notifier.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
report serial devices created with -device in the PIIX4 config space
Serial and parallel devices created with -device are not reported inthe PIIX4 configuration space, and are hence not picked up by the DSDT.This upsets Windows, which hides them altogether from the guest....
Merge remote-tracking branch 'origin/master' into pci
Conflicts: hw/virtio-pci.c
hw/acpi_piix4.c: convert to PCIDeviceInfo to initialize ids
use PCIDeviceInfo to initialize ids.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Ignore pci unplug requests for unpluggable devices (CVE-2011-1751)
This patch makes qemu ignore unplug requests from the guest for pcidevices which are tagged as non-hotpluggable. Trouble spot is thepiix4 chipset with the ISA bridge. Requests to unplug that one will...
acpi, acpi_piix: factor out GPE logic
factor out ACPI GPE logic. Later it will be used by ICH9 ACPI.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
acpi, acpi_piix, vt82c686: factor out PM1_CNT logic
factor out ACPI PM1_CNT logic. This will be used by ich9 acpi.
Cc: Blue Swirl <blauwirbel@gmail.com>Cc: Huacai Chen <zltjiangshi@gmail.com>Cc: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
acpi, acpi_piix, vt82c686: factor out PM_TMR logic
factor out PM_TMR logic. Later This will be used by ich9 acpi.Also fixes the same bug in vt82c686.c that was fixed by the followingcommits.
commit 055479feab63607b8042bb8ebb2e0523f17cbc4eAuthor: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>...
acpi, acpi_piix, vt82c686: factor out PM1a EVT logic
factor out ACPI PM1a EVT logic.Later this will be used by ich9 acpi.
fix build errors when we enable acpi_piix4 debug
change all other clock references to use nanosecond resolution accessors
This was done with:
sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \ $(git grep -l 'qemu_get_clock\>' ) sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \ $(git grep -l 'qemu_new_timer\>' )...
acpi_piix4: expose no_hotplug attribute via i/o port
Expose no_hotplug attribute via I/O port, so ACPI BIOS can indicateremovability status to guest OS.
An updated seabios is required to make use of this feature (seabios.gitcommit ID 3c241edf3d7ef29c21)....
piix: tag as not hotpluggable.
This patch tags all pci devices which belong to the piix3/4 chipsets asnot hotpluggable (Host bridge, ISA bridge, IDE controller, ACPI bridge).
Acked-by: Aurelien Jarno <aurelien@aurel32.net>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>...
piix4 acpi: convert io BAR to type-safe ioport callbacks
Acked-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: allow hotplug removal of cold-plugged devices
This patch fixes hot unplug of cold plugged devices(those present at system start), which got broken by5beb8ad503c88a76f2b8106c3b74b4ce485a60e1 .
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
Merge branch 'pci' into for_anthony
Use defines instead of numbers for pci hotplug sts bit
Signed-off-by: Gleb Natapov <gleb@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Fix pci hotplug to generate level triggered interrupt.
SCI is level triggered. pci hotplug should behave appropriately.
Introduce range.h
Extract range functions from pci.h. These will be used by later patchesby non-PCI devices. Adjust current users.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pci: call hotplug callback even when not hotplug case for later use.
call hotplug callback even when not hotplug case for later use.And move hotplug check into hotplug callback.PCIE slot needs this for card presence detection.
pci: don't overwrite multi functio bit in pci header type.
Don't overwrite pci header type.Otherwise, multi function bit which pci_init_header_type() setsappropriately is lost.Anyway PCI_HEADER_TYPE_NORMAL is zero, so it is unnecessary to zerowhich is already zero cleared....
acpi_piix4: save gpe and pci hotplug slot status
PCI hotplug currently doesn't work after a migration becausewe don't migrate the enable bits of the GPE state. Pull hotplugstructs into vmstate.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>...
blockdev: Collect block device code in new blockdev.c
Anything that moves hundreds of lines out of vl.c can't be all bad.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Trim unnecessary includes
acpi_piix4: remove #ifdef DEBUG.
removed #ifdef DEBUG by using macro.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pci hotadd, acpi_piix4: remove global variables
remove global variables, gpe and pci0_status by moving theminto PIIX4PMState.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Gerd Hoffmann <kraxel@redhat.com>...
pci hotplug: add argument to pci hot plug callback.
Add argument, DeviceState*, to pci hot plug callback.The argument will be used later to remove global variable.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Gerd Hoffmann <kraxel@redhat.com>...
acpi_piix4: qdevfy.
qdevfy acpi_piix4.
acpi: split acpi.c into the common part and the piix4 part.
Split acpi.c into the common part and the piix4 specific part.The common part will be used later.