[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.10] xen/pvshim: skip Dom0-only domain builder parts
commit 0ba5d8c27509ba2011591cfab2715e8ca6b7b402 Author: Roger Pau Monne <roger.pau@xxxxxxxxxx> AuthorDate: Thu Jan 11 11:41:18 2018 +0000 Commit: Roger Pau Monne <roger.pau@xxxxxxxxxx> CommitDate: Fri Jan 12 15:47:32 2018 +0000 xen/pvshim: skip Dom0-only domain builder parts Do not allow access to any iomem or ioport by the shim, and also remove the check for Dom0 kernel support. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/dom0_build.c | 4 ++++ xen/arch/x86/pv/dom0_build.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/dom0_build.c b/xen/arch/x86/dom0_build.c index bf992fef6d..e2bf81b4e7 100644 --- a/xen/arch/x86/dom0_build.c +++ b/xen/arch/x86/dom0_build.c @@ -13,6 +13,7 @@ #include <xen/softirq.h> #include <asm/dom0_build.h> +#include <asm/guest.h> #include <asm/hpet.h> #include <asm/io_apic.h> #include <asm/p2m.h> @@ -385,6 +386,9 @@ int __init dom0_setup_permissions(struct domain *d) unsigned int i; int rc; + if ( pv_shim ) + return 0; + /* The hardware domain is initially permitted full I/O capabilities. */ rc = ioports_permit_access(d, 0, 0xFFFF); rc |= iomem_permit_access(d, 0UL, (1UL << (paddr_bits - PAGE_SHIFT)) - 1); diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c index a3be335b0b..852d00a8be 100644 --- a/xen/arch/x86/pv/dom0_build.c +++ b/xen/arch/x86/pv/dom0_build.c @@ -17,6 +17,7 @@ #include <asm/bzimage.h> #include <asm/dom0_build.h> +#include <asm/guest.h> #include <asm/page.h> #include <asm/pv/mm.h> #include <asm/setup.h> @@ -373,7 +374,7 @@ int __init dom0_construct_pv(struct domain *d, if ( parms.elf_notes[XEN_ELFNOTE_SUPPORTED_FEATURES].type != XEN_ENT_NONE ) { - if ( !test_bit(XENFEAT_dom0, parms.f_supported) ) + if ( !pv_shim && !test_bit(XENFEAT_dom0, parms.f_supported) ) { printk("Kernel does not support Dom0 operation\n"); rc = -EINVAL; -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.10 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |