public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: hyper-v: Fix erroneous 'current_vcpu' usage in kvm_hv_flush_tlb()
@ 2021-02-09  9:04 Vitaly Kuznetsov
  2021-02-09  9:17 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Vitaly Kuznetsov @ 2021-02-09  9:04 UTC (permalink / raw)
  To: kvm, Paolo Bonzini
  Cc: Sean Christopherson, Wanpeng Li, Jim Mattson, Maxim Levitsky

Previously, we used to use 'current_vcpu' instead of 'vcpu' in
kvm_hv_flush_tlb() but this is no longer the case, it should clearly
be 'vcpu' here, a mistake was made during rebase.

Reported-by: Maxim Levitsky <mlevitsk@redhat.com>
Fixes: d210b1e5b685 ("KVM: x86: hyper-v: Always use to_hv_vcpu() accessor to get to 'struct kvm_vcpu_hv'"
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
The broken patch is only in kvm/queue atm, we may as well want
to squash the change.
---
 arch/x86/kvm/hyperv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c
index 880ba3c678db..7d2dae92d638 100644
--- a/arch/x86/kvm/hyperv.c
+++ b/arch/x86/kvm/hyperv.c
@@ -1555,7 +1555,7 @@ static __always_inline unsigned long *sparse_set_to_vcpu_mask(
 static u64 kvm_hv_flush_tlb(struct kvm_vcpu *vcpu, u64 ingpa, u16 rep_cnt, bool ex)
 {
 	struct kvm *kvm = vcpu->kvm;
-	struct kvm_vcpu_hv *hv_vcpu = to_hv_vcpu(current_vcpu);
+	struct kvm_vcpu_hv *hv_vcpu = to_hv_vcpu(vcpu);
 	struct hv_tlb_flush_ex flush_ex;
 	struct hv_tlb_flush flush;
 	u64 vp_bitmap[KVM_HV_MAX_SPARSE_VCPU_SET_BITS];
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-09  9:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-09  9:04 [PATCH] KVM: x86: hyper-v: Fix erroneous 'current_vcpu' usage in kvm_hv_flush_tlb() Vitaly Kuznetsov
2021-02-09  9:17 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox