diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-05-19 12:39:30 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-05-19 12:39:30 +0100 |
commit | cacf1225882164fd78fa6d8060a7f7468bdf32fa (patch) | |
tree | 4c6eb0f97aee69c4013e794399a9064062ecbf94 | |
parent | 92a3c6a08eebe277c36d5d3ceb14f3a355228976 (diff) | |
download | xen-cacf1225882164fd78fa6d8060a7f7468bdf32fa.tar.gz xen-cacf1225882164fd78fa6d8060a7f7468bdf32fa.tar.bz2 xen-cacf1225882164fd78fa6d8060a7f7468bdf32fa.zip |
x86: Allow PV superpages to work with live migration
PV superpages currently do not work with live migration. They fall
over dead when the shadow page table is enabled for dirty tracking.
The HVM support for superpages in this code has been tested and found
to work just fine for PV superpages. This patch modifies the test
macro to allow the code to work with PV superpages.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen-unstable changeset: 21409:2c0c08b4770f
xen-unstable date: Tue May 18 11:24:04 2010 +0100
-rw-r--r-- | xen/include/asm-x86/guest_pt.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xen/include/asm-x86/guest_pt.h b/xen/include/asm-x86/guest_pt.h index 16a8b759bf..892fe1fa75 100644 --- a/xen/include/asm-x86/guest_pt.h +++ b/xen/include/asm-x86/guest_pt.h @@ -182,10 +182,11 @@ guest_supports_superpages(struct vcpu *v) /* The _PAGE_PSE bit must be honoured in HVM guests, whenever * CR4.PSE is set or the guest is in PAE or long mode. * It's also used in the dummy PT for vcpus with CR4.PG cleared. */ - return (is_hvm_vcpu(v) && - (GUEST_PAGING_LEVELS != 2 - || !hvm_paging_enabled(v) - || (v->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PSE))); + return (!is_hvm_vcpu(v) + ? opt_allow_hugepage + : (GUEST_PAGING_LEVELS != 2 + || !hvm_paging_enabled(v) + || (v->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PSE))); } static inline int |