aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/physdev.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2011-07-25 16:43:26 +0100
committerJan Beulich <jbeulich@novell.com>2011-07-25 16:43:26 +0100
commit857ee6b19189a926d108b8c3382fcc51e3d8f59e (patch)
treecec3df98d4d4d453d77102c7faaf2bc33b9b7c2b /xen/arch/x86/physdev.c
parent4297249197a5adf2c7517f6d55ed4273ce5e8a05 (diff)
downloadxen-857ee6b19189a926d108b8c3382fcc51e3d8f59e.tar.gz
xen-857ee6b19189a926d108b8c3382fcc51e3d8f59e.tar.bz2
xen-857ee6b19189a926d108b8c3382fcc51e3d8f59e.zip
x86-64/MMCFG: pass down firmware (ACPI) reservation status of used memory space
Reserving the MMCFG address range(s) in E820 is specified to only be optional for the firmware to do. The requirement is to have them reserved in ACPI resources. Those, however, aren't directly visible to Xen as they require the ACPI interpreter to be active. Thus, if a range isn't reserved in E820, we should not completely disable use of MMCFG on the respective bus range, but rather keep it disabled until Dom0 can pass down information on the ACPI reservation status (though a new physdevop hypercall). Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/arch/x86/physdev.c')
-rw-r--r--xen/arch/x86/physdev.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index 4b0f4031e6..35fbbeb348 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -21,6 +21,10 @@ int physdev_map_pirq(domid_t, int type, int *index, int *pirq_p,
struct msi_info *);
int physdev_unmap_pirq(domid_t, int pirq);
+#ifdef CONFIG_X86_64
+#include "x86_64/mmconfig.h"
+#endif
+
#ifndef COMPAT
typedef long ret_t;
@@ -522,6 +526,24 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg)
break;
}
+#ifdef __x86_64__
+ case PHYSDEVOP_pci_mmcfg_reserved: {
+ struct physdev_pci_mmcfg_reserved info;
+
+ ret = -EPERM;
+ if ( !IS_PRIV(current->domain) )
+ break;
+
+ ret = -EFAULT;
+ if ( copy_from_guest(&info, arg, 1) )
+ break;
+
+ ret = pci_mmcfg_reserved(info.address, info.segment,
+ info.start_bus, info.end_bus, info.flags);
+ break;
+ }
+#endif
+
case PHYSDEVOP_restore_msi: {
struct physdev_restore_msi restore_msi;
struct pci_dev *pdev;