p***@xen.org
2018-11-14 18:56:26 UTC
commit 8885ac7f1833ff54c1d4119d0242e89fb282e294
Author: Sergey Dyasli <***@citrix.com>
AuthorDate: Wed Nov 14 10:23:22 2018 +0000
Commit: Andrew Cooper <***@citrix.com>
CommitDate: Wed Nov 14 18:42:48 2018 +0000
x86/vvmx: correctly report vvmcs size
The size of Xen's virtual vmcs region is 4096 bytes (see comment about
Virtual VMCS layout in include/asm-x86/hvm/vmx/vvmx.h). Correctly report
it to the guest in case when VMCS shadowing is not available instead of
providing H/W value (which is usually smaller).
Signed-off-by: Sergey Dyasli <***@citrix.com>
Acked-by: Kevin Tian <***@intel.com>
---
xen/arch/x86/hvm/vmx/vvmx.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index 1cb4af5113..610236e3f2 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -2091,6 +2091,14 @@ int nvmx_msr_read_intercept(unsigned int msr, u64 *msr_content)
data = (host_data & (~0ul << 32)) |
(vmcs->vmcs_revision_id & 0x7fffffff);
unmap_domain_page(vmcs);
+
+ if ( !cpu_has_vmx_vmcs_shadowing )
+ {
+ /* Report vmcs_region_size as 4096 */
+ data &= ~VMX_BASIC_VMCS_SIZE_MASK;
+ data |= 1ULL << 44;
+ }
+
break;
}
case MSR_IA32_VMX_PINBASED_CTLS:
--
generated by git-patchbot for /home/xen/git/xen.git#staging
Author: Sergey Dyasli <***@citrix.com>
AuthorDate: Wed Nov 14 10:23:22 2018 +0000
Commit: Andrew Cooper <***@citrix.com>
CommitDate: Wed Nov 14 18:42:48 2018 +0000
x86/vvmx: correctly report vvmcs size
The size of Xen's virtual vmcs region is 4096 bytes (see comment about
Virtual VMCS layout in include/asm-x86/hvm/vmx/vvmx.h). Correctly report
it to the guest in case when VMCS shadowing is not available instead of
providing H/W value (which is usually smaller).
Signed-off-by: Sergey Dyasli <***@citrix.com>
Acked-by: Kevin Tian <***@intel.com>
---
xen/arch/x86/hvm/vmx/vvmx.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c
index 1cb4af5113..610236e3f2 100644
--- a/xen/arch/x86/hvm/vmx/vvmx.c
+++ b/xen/arch/x86/hvm/vmx/vvmx.c
@@ -2091,6 +2091,14 @@ int nvmx_msr_read_intercept(unsigned int msr, u64 *msr_content)
data = (host_data & (~0ul << 32)) |
(vmcs->vmcs_revision_id & 0x7fffffff);
unmap_domain_page(vmcs);
+
+ if ( !cpu_has_vmx_vmcs_shadowing )
+ {
+ /* Report vmcs_region_size as 4096 */
+ data &= ~VMX_BASIC_VMCS_SIZE_MASK;
+ data |= 1ULL << 44;
+ }
+
break;
}
case MSR_IA32_VMX_PINBASED_CTLS:
--
generated by git-patchbot for /home/xen/git/xen.git#staging