mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
acpi,pci,pc,fedora,virtio fixes and enhancements
This includes some Preparatory patches for cpu hotplug for q25 and memory hotplug by Igor, tests and memory mapping change by Laszlo and pci reset cleanup by Paolo. There are also some fixes for fedora and virtio: included here since they are test blockers for me. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQEcBAABAgAGBQJSuF+2AAoJECgfDbjSjVRpTz0IAJhNCC8L2GVt+pm1RAt6lbqZ u9bCrqfThDORN2mUTEuLu4ZpZC0DYc7d0Jjr5NPesC5G/Afzi5/to6+l7nNZneU3 OdBPglXCCfU/cRaLu7JG2akpha0GVU0tsSCoWIYa6mwlWA4/DXVMgeKg/bh/EgfM B1w4fE2RgRM9bEqWmX4+tZw8dgk7uVJhu95HCDnb5eikaKlFzwuOlvexrDV3KbPc bkJe35zbGrKOws93tiSeoqcDx2dcYSzecPoJ0jiCY0KXJ17PBWAvuLTtYqkwwe9J 2FEnTslQJ3Rc8jTFiOPWx2pGaejG4y7Tnk6uuzW6fbbSLOQDPJy3KgmutJFMt1A= =ShCj -----END PGP SIGNATURE----- Merge remote-tracking branch 'mst/tags/for_anthony' into staging acpi,pci,pc,fedora,virtio fixes and enhancements This includes some Preparatory patches for cpu hotplug for q25 and memory hotplug by Igor, tests and memory mapping change by Laszlo and pci reset cleanup by Paolo. There are also some fixes for fedora and virtio: included here since they are test blockers for me. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 23 Dec 2013 08:07:18 AM PST using RSA key ID D28D5469 # gpg: Can't check signature: public key not found * mst/tags/for_anthony: target-arm: fix build with gcc 4.8.2 virtio: add back call to virtio_bus_device_unplugged piix: fix 32bit pci hole qdev: switch reset to post-order qdev: allow both pre- and post-order vists in qdev walking functions pci: clean up resetting of IRQs pci: do not export pci_bus_reset ACPI/DSDT-CPU: cleanup bogus comment ACPI: Q35 DSDT: fix CPU hotplug GPE0.2 handler acpi: ich9: allow guest to clear SCI rised by GPE acpi: factor out common pm_update_sci() into acpi core acpi: piix4: remove not needed GPE0 mask i440fx-test: verify firmware under 4G and 1M, both -bios and -pflash i440fx-test: generate temporary firmware blob i440fx-test: give each GTest case its own qtest i440fx-test: qtest_start() should be paired with qtest_end() hw/i386/pc_sysfw: support two flash drives pc_piix: document gigabyte_align piix: gigabyte alignment for ram Message-id: 1387815007-1272-1-git-send-email-mst@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
This commit is contained in:
commit
d1819762fc
18 changed files with 363 additions and 144 deletions
50
hw/pci/pci.c
50
hw/pci/pci.c
|
@ -46,7 +46,7 @@
|
|||
static void pcibus_dev_print(Monitor *mon, DeviceState *dev, int indent);
|
||||
static char *pcibus_get_dev_path(DeviceState *dev);
|
||||
static char *pcibus_get_fw_dev_path(DeviceState *dev);
|
||||
static int pcibus_reset(BusState *qbus);
|
||||
static void pcibus_reset(BusState *qbus);
|
||||
static void pci_bus_finalize(Object *obj);
|
||||
|
||||
static Property pci_props[] = {
|
||||
|
@ -167,16 +167,10 @@ void pci_device_deassert_intx(PCIDevice *dev)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is called on #RST and FLR.
|
||||
* FLR if PCI_EXP_DEVCTL_BCR_FLR is set
|
||||
*/
|
||||
void pci_device_reset(PCIDevice *dev)
|
||||
static void pci_do_device_reset(PCIDevice *dev)
|
||||
{
|
||||
int r;
|
||||
|
||||
qdev_reset_all(&dev->qdev);
|
||||
|
||||
dev->irq_state = 0;
|
||||
pci_update_irq_status(dev);
|
||||
pci_device_deassert_intx(dev);
|
||||
|
@ -209,30 +203,34 @@ void pci_device_reset(PCIDevice *dev)
|
|||
}
|
||||
|
||||
/*
|
||||
* Trigger pci bus reset under a given bus.
|
||||
* To be called on RST# assert.
|
||||
* This function is called on #RST and FLR.
|
||||
* FLR if PCI_EXP_DEVCTL_BCR_FLR is set
|
||||
*/
|
||||
void pci_bus_reset(PCIBus *bus)
|
||||
void pci_device_reset(PCIDevice *dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < bus->nirq; i++) {
|
||||
bus->irq_count[i] = 0;
|
||||
}
|
||||
for (i = 0; i < ARRAY_SIZE(bus->devices); ++i) {
|
||||
if (bus->devices[i]) {
|
||||
pci_device_reset(bus->devices[i]);
|
||||
}
|
||||
}
|
||||
qdev_reset_all(&dev->qdev);
|
||||
pci_do_device_reset(dev);
|
||||
}
|
||||
|
||||
static int pcibus_reset(BusState *qbus)
|
||||
/*
|
||||
* Trigger pci bus reset under a given bus.
|
||||
* Called via qbus_reset_all on RST# assert, after the devices
|
||||
* have been reset qdev_reset_all-ed already.
|
||||
*/
|
||||
static void pcibus_reset(BusState *qbus)
|
||||
{
|
||||
pci_bus_reset(DO_UPCAST(PCIBus, qbus, qbus));
|
||||
PCIBus *bus = DO_UPCAST(PCIBus, qbus, qbus);
|
||||
int i;
|
||||
|
||||
/* topology traverse is done by pci_bus_reset().
|
||||
Tell qbus/qdev walker not to traverse the tree */
|
||||
return 1;
|
||||
for (i = 0; i < ARRAY_SIZE(bus->devices); ++i) {
|
||||
if (bus->devices[i]) {
|
||||
pci_do_device_reset(bus->devices[i]);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < bus->nirq; i++) {
|
||||
assert(bus->irq_count[i] == 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void pci_host_bus_register(PCIBus *bus, DeviceState *parent)
|
||||
|
|
|
@ -268,7 +268,7 @@ void pci_bridge_write_config(PCIDevice *d,
|
|||
newctl = pci_get_word(d->config + PCI_BRIDGE_CONTROL);
|
||||
if (~oldctl & newctl & PCI_BRIDGE_CTL_BUS_RESET) {
|
||||
/* Trigger hot reset on 0->1 transition. */
|
||||
pci_bus_reset(&s->sec_bus);
|
||||
qbus_reset_all(&s->sec_bus.qbus);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue