xen/events: use xen_vcpu_id mapping for EVTCHNOP_status
authorVitaly Kuznetsov <vkuznets@redhat.com>
Wed, 23 Nov 2016 12:38:45 +0000 (13:38 +0100)
committerJuergen Gross <jgross@suse.com>
Wed, 30 Nov 2016 06:39:09 +0000 (07:39 +0100)
EVTCHNOP_status hypercall returns Xen's idea of vcpu id so we need to
compare it against xen_vcpu_id mapping, not the Linux cpu id.

Suggested-by: Radim Krcmar <rkrcmar@redhat.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/events/events_base.c

index 9ecfcdcdd6d60afadb4adae79d7cbeace70f40d1..137bd0e799e78c93d01206a1a490c6d68a64a9d6 100644 (file)
@@ -948,7 +948,7 @@ static int find_virq(unsigned int virq, unsigned int cpu)
                        continue;
                if (status.status != EVTCHNSTAT_virq)
                        continue;
-               if (status.u.virq == virq && status.vcpu == cpu) {
+               if (status.u.virq == virq && status.vcpu == xen_vcpu_nr(cpu)) {
                        rc = port;
                        break;
                }