2020-06-17 03:43:54

by Sean Christopherson

[permalink] [raw]
Subject: [PATCH] KVM: VMX: Remove vcpu_vmx's defunct copy of host_pkru

Remove vcpu_vmx.host_pkru, which got left behind when PKRU support was
moved to common x86 code.

No functional change intended.

Fixes: 37486135d3a7b ("KVM: x86: Fix pkru save/restore when guest CR4.PKE=0, move it to x86.c")
Signed-off-by: Sean Christopherson <[email protected]>
---
arch/x86/kvm/vmx/vmx.h | 2 --
1 file changed, 2 deletions(-)

diff --git a/arch/x86/kvm/vmx/vmx.h b/arch/x86/kvm/vmx/vmx.h
index 8a83b5edc820..639798e4a6ca 100644
--- a/arch/x86/kvm/vmx/vmx.h
+++ b/arch/x86/kvm/vmx/vmx.h
@@ -288,8 +288,6 @@ struct vcpu_vmx {

u64 current_tsc_ratio;

- u32 host_pkru;
-
unsigned long host_debugctlmsr;

/*
--
2.26.0


2020-06-17 09:22:03

by Vitaly Kuznetsov

[permalink] [raw]
Subject: Re: [PATCH] KVM: VMX: Remove vcpu_vmx's defunct copy of host_pkru

Sean Christopherson <[email protected]> writes:

> Remove vcpu_vmx.host_pkru, which got left behind when PKRU support was
> moved to common x86 code.
>
> No functional change intended.
>
> Fixes: 37486135d3a7b ("KVM: x86: Fix pkru save/restore when guest CR4.PKE=0, move it to x86.c")
> Signed-off-by: Sean Christopherson <[email protected]>
> ---
> arch/x86/kvm/vmx/vmx.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/vmx.h b/arch/x86/kvm/vmx/vmx.h
> index 8a83b5edc820..639798e4a6ca 100644
> --- a/arch/x86/kvm/vmx/vmx.h
> +++ b/arch/x86/kvm/vmx/vmx.h
> @@ -288,8 +288,6 @@ struct vcpu_vmx {
>
> u64 current_tsc_ratio;
>
> - u32 host_pkru;
> -
> unsigned long host_debugctlmsr;
>
> /*

(Is there a better [automated] way to figure out whether the particular
field is being used or not than just dropping it and trying to compile
the whole thing? Leaving #define-s, configs,... aside ...)

Reviewed-by: Vitaly Kuznetsov <[email protected]>

--
Vitaly

2020-06-17 16:53:36

by Jim Mattson

[permalink] [raw]
Subject: Re: [PATCH] KVM: VMX: Remove vcpu_vmx's defunct copy of host_pkru

On Wed, Jun 17, 2020 at 2:19 AM Vitaly Kuznetsov <[email protected]> wrote:
>
> Sean Christopherson <[email protected]> writes:
>
> > Remove vcpu_vmx.host_pkru, which got left behind when PKRU support was
> > moved to common x86 code.
> >
> > No functional change intended.
> >
> > Fixes: 37486135d3a7b ("KVM: x86: Fix pkru save/restore when guest CR4.PKE=0, move it to x86.c")
> > Signed-off-by: Sean Christopherson <[email protected]>
> > ---
> > arch/x86/kvm/vmx/vmx.h | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/arch/x86/kvm/vmx/vmx.h b/arch/x86/kvm/vmx/vmx.h
> > index 8a83b5edc820..639798e4a6ca 100644
> > --- a/arch/x86/kvm/vmx/vmx.h
> > +++ b/arch/x86/kvm/vmx/vmx.h
> > @@ -288,8 +288,6 @@ struct vcpu_vmx {
> >
> > u64 current_tsc_ratio;
> >
> > - u32 host_pkru;
> > -
> > unsigned long host_debugctlmsr;
> >
> > /*
>
> (Is there a better [automated] way to figure out whether the particular
> field is being used or not than just dropping it and trying to compile
> the whole thing? Leaving #define-s, configs,... aside ...)
>
> Reviewed-by: Vitaly Kuznetsov <[email protected]>
Reviewed-by: Jim Mattson <[email protected]>

2020-06-23 10:03:52

by Paolo Bonzini

[permalink] [raw]
Subject: Re: [PATCH] KVM: VMX: Remove vcpu_vmx's defunct copy of host_pkru

On 17/06/20 05:41, Sean Christopherson wrote:
> Remove vcpu_vmx.host_pkru, which got left behind when PKRU support was
> moved to common x86 code.
>
> No functional change intended.
>
> Fixes: 37486135d3a7b ("KVM: x86: Fix pkru save/restore when guest CR4.PKE=0, move it to x86.c")
> Signed-off-by: Sean Christopherson <[email protected]>
> ---
> arch/x86/kvm/vmx/vmx.h | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx/vmx.h b/arch/x86/kvm/vmx/vmx.h
> index 8a83b5edc820..639798e4a6ca 100644
> --- a/arch/x86/kvm/vmx/vmx.h
> +++ b/arch/x86/kvm/vmx/vmx.h
> @@ -288,8 +288,6 @@ struct vcpu_vmx {
>
> u64 current_tsc_ratio;
>
> - u32 host_pkru;
> -
> unsigned long host_debugctlmsr;
>
> /*
>

Queued, thanks.

Paolo