lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a39a2318-18e8-ccd3-0cd5-9f907599dfd5@redhat.com>
Date:   Thu, 30 Nov 2017 13:22:38 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Luwei Kang <luwei.kang@...el.com>, kvm@...r.kernel.org
Cc:     tglx@...utronix.de, mingo@...hat.com, hpa@...or.com,
        x86@...nel.org, rkrcmar@...hat.com, linux-kernel@...r.kernel.org,
        joro@...tes.org
Subject: Re: [PATCH v3 8/9] KVM: x86: Disable Intel Processor Trace when VMXON
 in L1 guest

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ