lkml.org 
[lkml]   [2017]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 8/9] KVM: x86: Disable Intel Processor Trace when VMXON in L1 guest
From
Date
On 27/11/2017 21:24, Luwei Kang wrote:
>
> + if (pt_mode == PT_MODE_HOST_GUEST) {
> + vmx->pt_desc.guest.ctl &= ~RTIT_CTL_TRACEEN;
> + pt_disable_intercept_for_msr(FALSE);
> + vmcs_write64(GUEST_IA32_RTIT_CTL, vmx->pt_desc.guest.ctl);
> + }
> +

Using vmx_set_msr would be nicer. Alternatively, extract this:

+ pt_disable_intercept_for_msr(data & RTIT_CTL_TRACEEN);
+ vmcs_write64(GUEST_IA32_RTIT_CTL, data);
+ vmx->pt_desc.guest.ctl = data;

into a new function vmx_set_rtit_ctl(vcpu, data), and call it here.

Thanks,

Paolo

\
 
 \ /
  Last update: 2017-11-30 13:22    [W:0.096 / U:0.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site