summaryrefslogtreecommitdiffstats
path: root/hw/pci-host/q35.c
diff options
context:
space:
mode:
authorPeter Maydell2019-06-17 12:55:14 +0200
committerPeter Maydell2019-06-17 12:55:14 +0200
commit5d0e5694470d2952b4f257bc985cac8c89b4fd92 (patch)
treea045f8e047841645d1422ba1e2649199980414ab /hw/pci-host/q35.c
parentMerge remote-tracking branch 'remotes/lersek/tags/edk2-pull-2019-06-14' into ... (diff)
parenttests/rebuild-expected-aml.sh: blow out difflist (diff)
downloadqemu-5d0e5694470d2952b4f257bc985cac8c89b4fd92.tar.gz
qemu-5d0e5694470d2952b4f257bc985cac8c89b4fd92.tar.xz
qemu-5d0e5694470d2952b4f257bc985cac8c89b4fd92.zip
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
virtio, acpi: fixes, cleanups A bunch of minor fixes all over the place. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Sun 16 Jun 2019 21:46:31 BST # gpg: using RSA key 281F0DB8D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: tests/rebuild-expected-aml.sh: blow out difflist q35: update DSDT q35: fix mmconfig and PCI0._CRS hw/acpi: extract acpi_add_rom_blob() vhost: fix vhost_log size overflow during migration docs/vhost-user.json: some firmware.json copy leftovers vhost-user-gpu: initialize msghdr & iov at declaration vhost-user-input: check ioctl(EVIOCGNAME) return value vhost-user: improve error report vhost-user: check unix_listen() return value vhost-user-gpu: do not send scanout update if no GPU socket Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/pci-host/q35.c')
-rw-r--r--hw/pci-host/q35.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 172b0bc435..0a010be4cf 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -260,15 +260,6 @@ static void q35_host_initfn(Object *obj)
object_property_add_link(obj, MCH_HOST_PROP_IO_MEM, TYPE_MEMORY_REGION,
(Object **) &s->mch.address_space_io,
qdev_prop_allow_set_link_before_realize, 0, NULL);
-
- /* Leave enough space for the biggest MCFG BAR */
- /* TODO: this matches current bios behaviour, but
- * it's not a power of two, which means an MTRR
- * can't cover it exactly.
- */
- range_set_bounds(&s->mch.pci_hole,
- MCH_HOST_BRIDGE_PCIEXBAR_DEFAULT + MCH_HOST_BRIDGE_PCIEXBAR_MAX,
- IO_APIC_DEFAULT_ADDRESS - 1);
}
static const TypeInfo q35_host_info = {
@@ -340,20 +331,6 @@ static void mch_update_pciexbar(MCHPCIState *mch)
}
addr = pciexbar & addr_mask;
pcie_host_mmcfg_update(pehb, enable, addr, length);
- /* Leave enough space for the MCFG BAR */
- /*
- * TODO: this matches current bios behaviour, but it's not a power of two,
- * which means an MTRR can't cover it exactly.
- */
- if (enable) {
- range_set_bounds(&mch->pci_hole,
- addr + length,
- IO_APIC_DEFAULT_ADDRESS - 1);
- } else {
- range_set_bounds(&mch->pci_hole,
- MCH_HOST_BRIDGE_PCIEXBAR_DEFAULT,
- IO_APIC_DEFAULT_ADDRESS - 1);
- }
}
/* PAM */
@@ -486,6 +463,14 @@ static void mch_update(MCHPCIState *mch)
mch_update_pam(mch);
mch_update_smram(mch);
mch_update_ext_tseg_mbytes(mch);
+
+ /*
+ * pci hole goes from end-of-low-ram to io-apic.
+ * mmconfig will be excluded by the dsdt builder.
+ */
+ range_set_bounds(&mch->pci_hole,
+ mch->below_4g_mem_size,
+ IO_APIC_DEFAULT_ADDRESS - 1);
}
static int mch_post_load(void *opaque, int version_id)