From: Jean Guyader Date: Fri, 30 Jan 2009 19:07:28 +0000 (+0000) Subject: Fix the MFN we map for the opregion. X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=5aaf55abe32bb286e7436590df87cddbe4b24987;p=xenclient%2Fioemu.git Fix the MFN we map for the opregion. --- diff --git a/hw/pass-through.c b/hw/pass-through.c index ec658676..0b5f1506 100644 --- a/hw/pass-through.c +++ b/hw/pass-through.c @@ -3062,7 +3062,7 @@ struct pt_dev * register_real_device(PCIBus *e_bus, DPCI_ADD_MAPPING); if ( vendor_id == 0x8086 ) { - opregion = pt_pci_host_read_long(0, 2, 0, 0xfc); + opregion = pt_pci_host_read_long(0, 2, 0, 0xfc) >> XC_PAGE_SHIFT; PT_LOG("map opregion 0x%x\n", opregion); rc |= xc_domain_memory_mapping(xc_handle, domid, 0x7d5ae, opregion, 2, DPCI_ADD_MAPPING); @@ -3146,7 +3146,7 @@ int unregister_real_device(int php_slot) DPCI_REMOVE_MAPPING); if ( vendor_id == 0x8086 ) { - opregion = pt_pci_host_read_long(0, 2, 0, 0xfc); + opregion = pt_pci_host_read_long(0, 2, 0, 0xfc) >> XC_PAGE_SHIFT; rc |= xc_domain_memory_mapping(xc_handle, domid, 0x7d5ae, opregion, 2, DPCI_REMOVE_MAPPING); }