summaryrefslogtreecommitdiff
path: root/hw/pci-host
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2013-05-30 12:57:26 +0300
committerMichael S. Tsirkin <mst@redhat.com>2013-07-04 10:40:56 +0300
commit3459a625215449b67b9c67d9151ff72892d0a42a (patch)
tree2f22e21c03a15b418a94b4d91db8fdaa711ce76a /hw/pci-host
parent620ac82eb0fc4218fb6a4937bcef3fdab3126703 (diff)
downloadqemu-3459a625215449b67b9c67d9151ff72892d0a42a.tar.gz
pci: store PCI hole ranges in guestinfo structure
Will be used to pass hole ranges to guests. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/pci-host')
-rw-r--r--hw/pci-host/q35.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 24df6b55cb..3a5cff989e 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -244,6 +244,14 @@ static int mch_init(PCIDevice *d)
hwaddr pci_hole64_size;
MCHPCIState *mch = MCH_PCI_DEVICE(d);
+ /* 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.
+ */
+ mch->guest_info->pci_info.w32.begin = MCH_HOST_BRIDGE_PCIEXBAR_DEFAULT +
+ MCH_HOST_BRIDGE_PCIEXBAR_MAX;
+
/* setup pci memory regions */
memory_region_init_alias(&mch->pci_hole, "pci-hole",
mch->pci_address_space,