summaryrefslogtreecommitdiffstats
path: root/arch/x86/xen/enlighten.c
diff options
context:
space:
mode:
authorAlex Nixon <alex.nixon@citrix.com>2010-02-19 13:31:06 -0500
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2010-06-07 14:33:13 -0400
commit7347b4082e55ac4a673f06a0a0ce25c37273c9ec (patch)
treeb39ef6d8aaf3081b97a12fa06ca86ffb668d1b68 /arch/x86/xen/enlighten.c
parentc0011dbfce69467b23b08fb4a64c39a409a935fb (diff)
downloadlinux-7347b4082e55ac4a673f06a0a0ce25c37273c9ec.tar.gz
linux-7347b4082e55ac4a673f06a0a0ce25c37273c9ec.tar.bz2
linux-7347b4082e55ac4a673f06a0a0ce25c37273c9ec.zip
xen: Allow unprivileged Xen domains to create iomap pages
PV DomU domains are allowed to map hardware MFNs for PCI passthrough, but are not generally allowed to map raw machine pages. In particular, various pieces of code try to map DMI and ACPI tables in the ISA ROM range. We disallow _PAGE_IOMAP for those mappings, so that they are redirected to a set of local zeroed pages we reserve for that purpose. [ Impact: prevent passthrough of ISA space, as we only allow PCI ] Signed-off-by: Alex Nixon <alex.nixon@citrix.com> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r--arch/x86/xen/enlighten.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index 65d8d79b46a8..3254e8bc4cd7 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1145,6 +1145,10 @@ asmlinkage void __init xen_start_kernel(void)
pgd = (pgd_t *)xen_start_info->pt_base;
+ if (!xen_initial_domain())
+ __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD);
+
+ __supported_pte_mask |= _PAGE_IOMAP;
/* Don't do the full vcpu_info placement stuff until we have a
possible map and a non-dummy shared_info. */
per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0];