* [PATCH] KVM: VMX: Rename vmx_get_max_tdp_level to vmx_get_max_ept_level
@ 2023-08-10 11:38 Shiyuan Gao
2023-08-14 18:14 ` Sean Christopherson
2023-08-18 0:13 ` Sean Christopherson
0 siblings, 2 replies; 4+ messages in thread
From: Shiyuan Gao @ 2023-08-10 11:38 UTC (permalink / raw)
To: linux-kernel, kvm, x86
Cc: seanjc, pbonzini, tglx, mingo, bp, dave.hansen, hpa, Shiyuan Gao
In vmx, ept_level looks better than tdp level and is consistent with
svm get_npt_level().
Signed-off-by: Shiyuan Gao <gaoshiyuan@baidu.com>
---
arch/x86/kvm/vmx/vmx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index df461f387e20..f0cfd1f10a06 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -3350,7 +3350,7 @@ void vmx_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
vmx->emulation_required = vmx_emulation_required(vcpu);
}
-static int vmx_get_max_tdp_level(void)
+static int vmx_get_max_ept_level(void)
{
if (cpu_has_vmx_ept_5levels())
return 5;
@@ -8526,7 +8526,7 @@ static __init int hardware_setup(void)
*/
vmx_setup_me_spte_mask();
- kvm_configure_mmu(enable_ept, 0, vmx_get_max_tdp_level(),
+ kvm_configure_mmu(enable_ept, 0, vmx_get_max_ept_level(),
ept_caps_to_lpage_level(vmx_capability.ept));
/*
--
2.36.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: VMX: Rename vmx_get_max_tdp_level to vmx_get_max_ept_level
2023-08-10 11:38 [PATCH] KVM: VMX: Rename vmx_get_max_tdp_level to vmx_get_max_ept_level Shiyuan Gao
@ 2023-08-14 18:14 ` Sean Christopherson
2023-08-15 7:56 ` Gao,Shiyuan
2023-08-18 0:13 ` Sean Christopherson
1 sibling, 1 reply; 4+ messages in thread
From: Sean Christopherson @ 2023-08-14 18:14 UTC (permalink / raw)
To: Shiyuan Gao
Cc: linux-kernel, kvm, x86, pbonzini, tglx, mingo, bp, dave.hansen,
hpa
On Thu, Aug 10, 2023, Shiyuan Gao wrote:
> In vmx, ept_level looks better than tdp level and is consistent with
> svm get_npt_level().
>
> Signed-off-by: Shiyuan Gao <gaoshiyuan@baidu.com>
> ---
> arch/x86/kvm/vmx/vmx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> index df461f387e20..f0cfd1f10a06 100644
> --- a/arch/x86/kvm/vmx/vmx.c
> +++ b/arch/x86/kvm/vmx/vmx.c
> @@ -3350,7 +3350,7 @@ void vmx_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
> vmx->emulation_required = vmx_emulation_required(vcpu);
> }
>
> -static int vmx_get_max_tdp_level(void)
> +static int vmx_get_max_ept_level(void)
> {
> if (cpu_has_vmx_ept_5levels())
> return 5;
> @@ -8526,7 +8526,7 @@ static __init int hardware_setup(void)
> */
> vmx_setup_me_spte_mask();
>
> - kvm_configure_mmu(enable_ept, 0, vmx_get_max_tdp_level(),
> + kvm_configure_mmu(enable_ept, 0, vmx_get_max_ept_level(),
> ept_caps_to_lpage_level(vmx_capability.ept));
Anyone else have an opinion on this? I'm leaning toward applying it, but a small
part of me also kinda likes the "tdp" name (though every time I look at this patch
that part of me gets even smaller...).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: VMX: Rename vmx_get_max_tdp_level to vmx_get_max_ept_level
2023-08-14 18:14 ` Sean Christopherson
@ 2023-08-15 7:56 ` Gao,Shiyuan
0 siblings, 0 replies; 4+ messages in thread
From: Gao,Shiyuan @ 2023-08-15 7:56 UTC (permalink / raw)
To: Sean Christopherson
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, x86@kernel.org,
pbonzini@redhat.com, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com
> On Thu, Aug 10, 2023, Shiyuan Gao wrote:
> > In vmx, ept_level looks better than tdp level and is consistent with
> > svm get_npt_level().
> >
> > Signed-off-by: Shiyuan Gao <gaoshiyuan@baidu.com <mailto:gaoshiyuan@baidu.com>>
> > ---
> > arch/x86/kvm/vmx/vmx.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
> > index df461f387e20..f0cfd1f10a06 100644
> > --- a/arch/x86/kvm/vmx/vmx.c
> > +++ b/arch/x86/kvm/vmx/vmx.c
> > @@ -3350,7 +3350,7 @@ void vmx_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
> > vmx->emulation_required = vmx_emulation_required(vcpu);
> > }
> >
> > -static int vmx_get_max_tdp_level(void)
> > +static int vmx_get_max_ept_level(void)
> > {
> > if (cpu_has_vmx_ept_5levels())
> > return 5;
> > @@ -8526,7 +8526,7 @@ static __init int hardware_setup(void)
> > */
> > vmx_setup_me_spte_mask();
> >
> > - kvm_configure_mmu(enable_ept, 0, vmx_get_max_tdp_level(),
> > + kvm_configure_mmu(enable_ept, 0, vmx_get_max_ept_level(),
> > ept_caps_to_lpage_level(vmx_capability.ept));
>
>
> Anyone else have an opinion on this? I'm leaning toward applying it, but a small
> part of me also kinda likes the "tdp" name (though every time I look at this patch
> that part of me gets even smaller...).
>
Remind, please look at this patch again :)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: VMX: Rename vmx_get_max_tdp_level to vmx_get_max_ept_level
2023-08-10 11:38 [PATCH] KVM: VMX: Rename vmx_get_max_tdp_level to vmx_get_max_ept_level Shiyuan Gao
2023-08-14 18:14 ` Sean Christopherson
@ 2023-08-18 0:13 ` Sean Christopherson
1 sibling, 0 replies; 4+ messages in thread
From: Sean Christopherson @ 2023-08-18 0:13 UTC (permalink / raw)
To: Sean Christopherson, linux-kernel, kvm, x86, Shiyuan Gao
Cc: pbonzini, tglx, mingo, bp, dave.hansen, hpa
On Thu, 10 Aug 2023 19:38:53 +0800, Shiyuan Gao wrote:
> In vmx, ept_level looks better than tdp level and is consistent with
> svm get_npt_level().
>
>
Applied to kvm-x86 vmx, thanks!
[1/1] KVM: VMX: Rename vmx_get_max_tdp_level to vmx_get_max_ept_level
https://github.com/kvm-x86/linux/commit/7d18eef13622
--
https://github.com/kvm-x86/linux/tree/next
https://github.com/kvm-x86/linux/tree/fixes
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-18 0:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10 11:38 [PATCH] KVM: VMX: Rename vmx_get_max_tdp_level to vmx_get_max_ept_level Shiyuan Gao
2023-08-14 18:14 ` Sean Christopherson
2023-08-15 7:56 ` Gao,Shiyuan
2023-08-18 0:13 ` Sean Christopherson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox