[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH RESEND v1 7/7] x86: Disable Intel Processor Trace when VMXON in L1 guest
Disable intel Processor Trace VMX operation(IA32_VMX_MISC[bit 14] is 0) in L1 guest. As mentioned in SDM, on these type of processors, execution of the VMXON instruction will clears IA32_RTIT_CTL.TraceEn and any attempt to write IA32_RTIT_CTL causes a general-protection xception (#GP). Signed-off-by: Luwei Kang <luwei.kang@xxxxxxxxx> --- xen/arch/x86/hvm/vmx/vvmx.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c index 885eab3..86ccfda 100644 --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -1516,6 +1516,9 @@ int nvmx_handle_vmxon(struct cpu_user_regs *regs) v->arch.hvm_vmx.launched = 0; vmsucceed(regs); + if ( v->arch.hvm_vmx.pt_desc.intel_pt_enabled ) + pt_set_rtit_ctl(&v->arch.hvm_vmx.pt_desc, 0); + return X86EMUL_OKAY; } @@ -2140,8 +2143,8 @@ int nvmx_msr_read_intercept(unsigned int msr, u64 *msr_content) data = hvm_cr4_guest_valid_bits(v, 0); break; case MSR_IA32_VMX_MISC: - /* Do not support CR3-target feature now */ - data = host_data & ~VMX_MISC_CR3_TARGET; + /* Do not support CR3-target and PT VMX feature now */ + data = host_data & ~(VMX_MISC_CR3_TARGET | VMX_MISC_PT_ENABLE); break; case MSR_IA32_VMX_EPT_VPID_CAP: data = nept_get_ept_vpid_cap(); -- 1.8.3.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |