diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-08-02 17:17:55 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-08-02 17:17:55 +0100 |
commit | ffc1e7f1549a5715018579ef3c02b0c1a8da363f (patch) | |
tree | 09b181de55d4278e0ff2af758bf9cbbe7ddffd5d | |
parent | cef33294d4bf6912138687780c7949fedc97140e (diff) | |
download | xen-ffc1e7f1549a5715018579ef3c02b0c1a8da363f.tar.gz xen-ffc1e7f1549a5715018579ef3c02b0c1a8da363f.tar.bz2 xen-ffc1e7f1549a5715018579ef3c02b0c1a8da363f.zip |
xenpaging: Add a check to Xen for EPT.
There isn't seem to be a way to directly check for EPT, so instead
check for HAP and an Intel processor. If EPT isn't enabled, then
return an error to the tool.
Signed-off-by: Patrick Colp <pjcolp@cs.ubc.ca>
xen-unstable changeset: 21882:af52102e4dcf
xen-unstable date: Wed Jul 28 07:54:40 2010 +0100
-rw-r--r-- | xen/arch/x86/mm/mem_event.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xen/arch/x86/mm/mem_event.c b/xen/arch/x86/mm/mem_event.c index 5584328dd6..68ba06c5b7 100644 --- a/xen/arch/x86/mm/mem_event.c +++ b/xen/arch/x86/mm/mem_event.c @@ -21,6 +21,7 @@ */ +#include <asm/domain.h> #include <xen/event.h> #include <asm/p2m.h> #include <asm/mem_event.h> @@ -225,6 +226,12 @@ int mem_event_domctl(struct domain *d, xen_domctl_mem_event_op_t *mec, mfn_t ring_mfn; mfn_t shared_mfn; + /* Currently only EPT is supported */ + rc = -ENODEV; + if ( !(is_hvm_domain(d) && d->arch.hvm_domain.hap_enabled && + (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)) ) + break; + /* Get MFN of ring page */ guest_get_eff_l1e(v, ring_addr, &l1e); gfn = l1e_get_pfn(l1e); |