]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
xen/evtchn: use xen_vcpu_id mapping
authorVitaly Kuznetsov <vkuznets@redhat.com>
Thu, 30 Jun 2016 15:56:42 +0000 (17:56 +0200)
committerBob Liu <bob.liu@oracle.com>
Thu, 20 Oct 2016 08:03:19 +0000 (04:03 -0400)
Use the newly introduced xen_vcpu_id mapping to get Xen's idea of vCPU
id for CPU0.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
(cherry picked from commit cbbb4682394c45986a34d8c77a02e7a066e30235)
Signed-off-by: Bob Liu <bob.liu@oracle.com>
Orabug: 24820937

drivers/xen/evtchn.c

index 7efd1cb9bb40198f2037b36a10a5b5edaa61c034..e8c7f09d01be8a483df94db111faec580beb032a 100644 (file)
@@ -55,6 +55,7 @@
 #include <xen/xen.h>
 #include <xen/events.h>
 #include <xen/evtchn.h>
+#include <xen/xen-ops.h>
 #include <asm/xen/hypervisor.h>
 
 struct per_user_data {
@@ -456,7 +457,7 @@ static long evtchn_ioctl(struct file *file,
                        break;
 
                bind_virq.virq = bind.virq;
-               bind_virq.vcpu = 0;
+               bind_virq.vcpu = xen_vcpu_nr(0);
                rc = HYPERVISOR_event_channel_op(EVTCHNOP_bind_virq,
                                                 &bind_virq);
                if (rc != 0)