Re: [PATCH v3 8/9] KVM: x86: Disable Intel Processor Trace when VMXON in L1 guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux