From 3459a625215449b67b9c67d9151ff72892d0a42a Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Thu, 30 May 2013 12:57:26 +0300 Subject: pci: store PCI hole ranges in guestinfo structure Will be used to pass hole ranges to guests. Signed-off-by: Michael S. Tsirkin --- hw/pci-host/q35.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'hw/pci-host/q35.c') 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, -- cgit 1.4.1