[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e96d7310-69c0-1e76-fad5-fde818a2c41a@gmail.com>
Date: Thu, 22 Dec 2022 19:06:54 +0800
From: Like Xu <like.xu.linux@...il.com>
To: Yang Weijiang <weijiang.yang@...el.com>
Cc: kan.liang@...ux.intel.com, wei.w.wang@...el.com, seanjc@...gle.com,
pbonzini@...hat.com, jmattson@...gle.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 10/15] KVM: x86/vmx: Check Arch LBR config when return
perf capabilities
On 25/11/2022 12:05 pm, Yang Weijiang wrote:
> diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> index b28be793de29..59bdd9873fb5 100644
> --- a/arch/x86/kvm/vmx/nested.c
> +++ b/arch/x86/kvm/vmx/nested.c
> @@ -2360,6 +2360,10 @@ static void prepare_vmcs02_early(struct vcpu_vmx *vmx, struct loaded_vmcs *vmcs0
> if (guest_efer != host_efer)
> exec_control |= VM_ENTRY_LOAD_IA32_EFER;
> }
> +
> + if (cpu_has_vmx_arch_lbr())
> + exec_control &= ~VM_ENTRY_LOAD_IA32_LBR_CTL;
Please verify that (arch) lbr is not available in the nested test case.
Thus when we support nested lbr, the developer will be aware of the need for
test case updates
> +
> vm_entry_controls_set(vmx, exec_control);
>
> /*
Powered by blists - more mailing lists