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]
Message-ID: <ZFtcwACy/1rn2Py1@chao-email>
Date:   Wed, 10 May 2023 16:58:40 +0800
From:   Chao Gao <chao.gao@...el.com>
To:     Binbin Wu <binbin.wu@...ux.intel.com>
CC:     <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <seanjc@...gle.com>, <pbonzini@...hat.com>, <kai.huang@...el.com>,
        <robert.hu@...ux.intel.com>
Subject: Re: [PATCH v8 3/6] KVM: x86: Virtualize CR3.LAM_{U48,U57}

>@@ -7743,6 +7744,9 @@ static void vmx_vcpu_after_set_cpuid(struct kvm_vcpu *vcpu)
> 		vmx->msr_ia32_feature_control_valid_bits &=
> 			~FEAT_CTL_SGX_LC_ENABLED;
> 
>+	if (guest_cpuid_has(vcpu, X86_FEATURE_LAM))
>+		vcpu->arch.cr3_ctrl_bits |= X86_CR3_LAM_U48 | X86_CR3_LAM_U57;

This function can be called multiple times. We need to clear LAM bits if LAM
isn't exposed to the guest, i.e.,

	else
		vcpu->arch.cr3_ctrl_bits &= ~(X86_CR3_LAM_U48 | X86_CR3_LAM_U57);

With this fixed,

Reviewed-by: Chao Gao <chao.gao@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ