Skip to contentSkip to conversation

KVM: VMX: Remove vcpu_vmx's defunct copy of host_pkru

PATCH Applied Sean Christopherson 4 participants 4 messages Jun 17, 2020 – Jun 23, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 arch/x86/kvm/vmx/vmx.h | 2 --
 1 file changed, 2 deletions(-)
arch/x86/kvm/vmx/vmx.h +0 -2
index 8a83b5edc820..639798e4a6ca 100644
@@ -288,8 +288,6 @@ struct vcpu_vmx {
 
 	u64 current_tsc_ratio;
 
-	u32 host_pkru;
-
 	unsigned long host_debugctlmsr;
 
 	/*
Signature · 1 line
2.26.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Sean Christopherson

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")
---
 arch/x86/kvm/vmx/vmx.h | 2 --
 1 file changed, 2 deletions(-)
arch/x86/kvm/vmx/vmx.h +0 -0
index 8a83b5edc820..639798e4a6ca 100644

arch/x86/kvm/vmx/vmx.h struct vcpu_vmx { · line 293

Quoted 8 lines
arch/x86/kvm/vmx/vmx.h +0 -2
@@ -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 ...)

Signature · 1 line
Vitaly
Reviewed-by
#2 lore raw
Quoted 26 lines · Vitaly Kuznetsov
Quoted 23 lines · Sean Christopherson

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")
---
 arch/x86/kvm/vmx/vmx.h | 2 --
 1 file changed, 2 deletions(-)
arch/x86/kvm/vmx/vmx.h +0 -2
index 8a83b5edc820..639798e4a6ca 100644
@@ -288,8 +288,6 @@ struct vcpu_vmx {
 
      u64 current_tsc_ratio;
 
-     u32 host_pkru;
-
      unsigned long host_debugctlmsr;
 
Quoted 7 lines

arch/x86/kvm/vmx/vmx.h struct vcpu_vmx { · line 293

Quoted 1 line
arch/x86/kvm/vmx/vmx.h +0 -0
      /*

(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 ...)

maintainer Applied
#3 lore raw
In reply to Sean Christopherson
Quoted 17 lines · Sean Christopherson

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")
---
 arch/x86/kvm/vmx/vmx.h | 2 --
 1 file changed, 2 deletions(-)
arch/x86/kvm/vmx/vmx.h +0 -0
index 8a83b5edc820..639798e4a6ca 100644

arch/x86/kvm/vmx/vmx.h struct vcpu_vmx { · line 293

Quoted 8 lines
arch/x86/kvm/vmx/vmx.h +0 -2
@@ -288,8 +288,6 @@ struct vcpu_vmx {
 
 	u64 current_tsc_ratio;
 
-	u32 host_pkru;
-
 	unsigned long host_debugctlmsr;
 
 	/*

Queued, thanks.

Paolo