Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1716861

[PATCH RFC v3 2/9] KVM: arm/arm64: fix vcpu self-detection in vgic_v3_dispatch_sgi()

From Radim Krčmář <rkrcmar@redhat.com>
Newsgroups linux.kernel
Subject [PATCH RFC v3 2/9] KVM: arm/arm64: fix vcpu self-detection in vgic_v3_dispatch_sgi()
Date 2017-08-21 22:40 +0200
Message-ID <uh1Em-Dw-27@gated-at.bofh.it> (permalink)
References <uh1El-Dw-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The index in kvm->vcpus array and vcpu->vcpu_id are very different
things.  Comparing struct kvm_vcpu pointers is a sure way to know.

Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
---
 virt/kvm/arm/vgic/vgic-mmio-v3.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/virt/kvm/arm/vgic/vgic-mmio-v3.c b/virt/kvm/arm/vgic/vgic-mmio-v3.c
index 408ef06638fc..9d4b69b766ec 100644
--- a/virt/kvm/arm/vgic/vgic-mmio-v3.c
+++ b/virt/kvm/arm/vgic/vgic-mmio-v3.c
@@ -797,7 +797,6 @@ void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg)
 	u16 target_cpus;
 	u64 mpidr;
 	int sgi, c;
-	int vcpu_id = vcpu->vcpu_id;
 	bool broadcast;
 
 	sgi = (reg & ICC_SGI1R_SGI_ID_MASK) >> ICC_SGI1R_SGI_ID_SHIFT;
@@ -821,7 +820,7 @@ void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg)
 			break;
 
 		/* Don't signal the calling VCPU */
-		if (broadcast && c == vcpu_id)
+		if (broadcast && c_vcpu == vcpu)
 			continue;
 
 		if (!broadcast) {
-- 
2.13.3

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH RFC v3 0/9] KVM: allow dynamic kvm->vcpus array Radim Krčmář <rkrcmar@redhat.com> - 2017-08-21 22:40 +0200
  [PATCH RFC v3 6/9] KVM: rework kvm_vcpu_on_spin loop Radim Krčmář <rkrcmar@redhat.com> - 2017-08-21 22:40 +0200
    Re: [PATCH RFC v3 6/9] KVM: rework kvm_vcpu_on_spin loop David Hildenbrand <david@redhat.com> - 2017-08-22 16:10 +0200
  [PATCH RFC v3 5/9] KVM: remove unused __KVM_HAVE_ARCH_VM_ALLOC Radim Krčmář <rkrcmar@redhat.com> - 2017-08-21 22:40 +0200
  [PATCH RFC v3 1/9] KVM: s390: optimize detection of started vcpus Radim Krčmář <rkrcmar@redhat.com> - 2017-08-21 22:40 +0200
    Re: [PATCH RFC v3 1/9] KVM: s390: optimize detection of started vcpus Christian Borntraeger <borntraeger@de.ibm.com> - 2017-08-22 09:30 +0200
    Re: [PATCH RFC v3 1/9] KVM: s390: optimize detection of started vcpus David Hildenbrand <david@redhat.com> - 2017-08-22 13:40 +0200
  [PATCH RFC v3 2/9] KVM: arm/arm64: fix vcpu self-detection in vgic_v3_dispatch_sgi() Radim Krčmář <rkrcmar@redhat.com> - 2017-08-21 22:40 +0200
    Re: [PATCH RFC v3 2/9] KVM: arm/arm64: fix vcpu self-detection in  vgic_v3_dispatch_sgi() David Hildenbrand <david@redhat.com> - 2017-08-22 13:50 +0200
  [PATCH RFC v3 7/9] KVM: add kvm_free_vcpus and kvm_arch_free_vcpus Radim Krčmář <rkrcmar@redhat.com> - 2017-08-21 22:40 +0200
    Re: [PATCH RFC v3 7/9] KVM: add kvm_free_vcpus and  kvm_arch_free_vcpus David Hildenbrand <david@redhat.com> - 2017-08-22 16:20 +0200
  [PATCH RFC v3 4/9] KVM: arm/arm64: use locking helpers in kvm_vgic_create() Radim Krčmář <rkrcmar@redhat.com> - 2017-08-21 22:40 +0200
    Re: [PATCH RFC v3 4/9] KVM: arm/arm64: use locking helpers in  kvm_vgic_create() David Hildenbrand <david@redhat.com> - 2017-08-22 14:00 +0200
  [PATCH RFC v3 3/9] KVM: remember position in kvm->vcpus array Radim Krčmář <rkrcmar@redhat.com> - 2017-08-21 22:50 +0200
    Re: [PATCH RFC v3 3/9] KVM: remember position in kvm->vcpus array David Hildenbrand <david@redhat.com> - 2017-08-22 13:50 +0200

csiph-web