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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 10 Jun 2021 18:09:56 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org, Junaid Shahid <junaids@...gle.com>,
        Maxim Levitsky <mlevitsk@...hat.com>,
        Lai Jiangshan <laijs@...ux.alibaba.com>
Subject: Re: [PATCH 15/15] KVM: nVMX: Drop redundant checks on vmcs12 in EPTP
 switching emulation

On 10/06/21 01:42, Sean Christopherson wrote:
> Drop the explicit checks on EPTP switching and EPT itself being enabled.
> The EPTP switching check is handled in the generic VMFUNC function check,
> the underlying VMFUNC enablement check is done by hardware and redone
> by generic VMFUNC emulation, and the vmcs12 EPT check is handled by KVM
> at VM-Enter in the form of a consistency check.
> 
> Signed-off-by: Sean Christopherson <seanjc@...gle.com>
> ---
>   arch/x86/kvm/vmx/nested.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> index 0075d3f0f8fa..479ec9378609 100644
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -5448,10 +5448,6 @@ static int nested_vmx_eptp_switching(struct kvm_vcpu *vcpu,
>   	u32 index = kvm_rcx_read(vcpu);
>   	u64 new_eptp;
>   
> -	if (!nested_cpu_has_eptp_switching(vmcs12) ||
> -	    !nested_cpu_has_ept(vmcs12))
> -		return 1;
> -

Perhaps the EPT enabled check is worth keeping with a WARN_ON_ONCE?

Paolo

>   	if (index >= VMFUNC_EPTP_ENTRIES)
>   		return 1;
>   
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ