diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2013-01-08 10:43:35 +0100 |
---|---|---|
committer | Dongxiao Xu <dongxiao.xu@intel.com> | 2013-01-08 10:43:35 +0100 |
commit | cc4707100aad115c0f384f576c020c6255e77ffb (patch) | |
tree | 7e6357e42b646b99f62a4a171daea979a8807b3c | |
parent | 34eda39b276aaa96acd6a939da9856b18729af10 (diff) | |
download | xen-cc4707100aad115c0f384f576c020c6255e77ffb.tar.gz xen-cc4707100aad115c0f384f576c020c6255e77ffb.tar.bz2 xen-cc4707100aad115c0f384f576c020c6255e77ffb.zip |
nested vmx: synchronize page fault error code match and mask
Page fault is specially handled not only with exception bitmaps,
but also with consideration of page fault error code mask/match
values. Therefore in nested virtualization case, the two values
need to be synchronized from virtual VMCS to shadow VMCS.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
-rw-r--r-- | xen/arch/x86/hvm/vmx/vvmx.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c index 16fb3fd1ae..0f13884b2a 100644 --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -603,6 +603,17 @@ static void nvmx_update_tpr_threshold(struct vcpu *v) __vmwrite(TPR_THRESHOLD, 0); } +static void nvmx_update_pfec(struct vcpu *v) +{ + struct nestedvcpu *nvcpu = &vcpu_nestedhvm(v); + void *vvmcs = nvcpu->nv_vvmcx; + + __vmwrite(PAGE_FAULT_ERROR_CODE_MASK, + __get_vvmcs(vvmcs, PAGE_FAULT_ERROR_CODE_MASK)); + __vmwrite(PAGE_FAULT_ERROR_CODE_MATCH, + __get_vvmcs(vvmcs, PAGE_FAULT_ERROR_CODE_MATCH)); +} + static void __clear_current_vvmcs(struct vcpu *v) { struct nestedvcpu *nvcpu = &vcpu_nestedhvm(v); @@ -813,6 +824,7 @@ static void load_shadow_control(struct vcpu *v) nvmx_update_apic_access_address(v); nvmx_update_virtual_apic_address(v); nvmx_update_tpr_threshold(v); + nvmx_update_pfec(v); } static void load_shadow_guest_state(struct vcpu *v) |