diff options
author | Aaron Lewis <aaronlewis@google.com> | 2019-10-21 16:30:22 -0700 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-10-22 15:44:26 +0200 |
commit | 78958563d8023db0c6d03a2fe2a64d79b47b4349 (patch) | |
tree | 58cdf9f89052f914d16d0517d7a4f3d7e9361604 /include | |
parent | c034f2aa8622e1e436563eb34c0f78ba8aa32329 (diff) | |
download | linux-78958563d8023db0c6d03a2fe2a64d79b47b4349.tar.bz2 |
KVM: x86: Remove unneeded kvm_vcpu variable, guest_xcr0_loaded
The kvm_vcpu variable, guest_xcr0_loaded, is a waste of an 'int'
and a conditional branch. VMX and SVM are the only users, and both
unconditionally pair kvm_load_guest_xcr0() with kvm_put_guest_xcr0()
making this check unnecessary. Without this variable, the predicates in
kvm_load_guest_xcr0 and kvm_put_guest_xcr0 should match.
Suggested-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Aaron Lewis <aaronlewis@google.com>
Change-Id: I7b1eb9b62969d7bbb2850f27e42f863421641b23
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kvm_host.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 719fc3e15ea4..d2017302996c 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -278,7 +278,6 @@ struct kvm_vcpu { struct mutex mutex; struct kvm_run *run; - int guest_xcr0_loaded; struct swait_queue_head wq; struct pid __rcu *pid; int sigset_active; |