[05/11] KVM: SVM: remove unused field from struct vcpu_svm

Message ID 20221109145156.84714-6-pbonzini@redhat.com
State New
Headers
Series KVM: SVM: fixes for vmentry code |

Commit Message

Paolo Bonzini Nov. 9, 2022, 2:51 p.m. UTC
  The pointer to svm_cpu_data in struct vcpu_svm looks interesting from
the point of view of accessing it after vmexit, when the GSBASE is still
containing the guest value.  However, despite existing since the very
first commit of drivers/kvm/svm.c (commit 6aa8b732ca01, "[PATCH] kvm:
userspace interface", 2006-12-10), it was never set to anything.

Ignore the opportunity to fix a 16 year old "bug" and delete it; doing
things the "harder" way makes it possible to remove more old cruft.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 arch/x86/kvm/svm/svm.h | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Sean Christopherson Nov. 9, 2022, 3:25 p.m. UTC | #1
On Wed, Nov 09, 2022, Paolo Bonzini wrote:
> The pointer to svm_cpu_data in struct vcpu_svm looks interesting from
> the point of view of accessing it after vmexit, when the GSBASE is still
> containing the guest value.  However, despite existing since the very
> first commit of drivers/kvm/svm.c (commit 6aa8b732ca01, "[PATCH] kvm:
> userspace interface", 2006-12-10), it was never set to anything.
> 
> Ignore the opportunity to fix a 16 year old "bug" and delete it; doing
> things the "harder" way makes it possible to remove more old cruft.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---

Reviewed-by: Sean Christopherson <seanjc@google.com>
  

Patch

diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
index 7ff1879e73c5..626240707ba9 100644
--- a/arch/x86/kvm/svm/svm.h
+++ b/arch/x86/kvm/svm/svm.h
@@ -209,7 +209,6 @@  struct vcpu_svm {
 	struct vmcb *vmcb;
 	struct kvm_vmcb_info vmcb01;
 	struct kvm_vmcb_info *current_vmcb;
-	struct svm_cpu_data *svm_data;
 	u32 asid;
 	u32 sysenter_esp_hi;
 	u32 sysenter_eip_hi;