Skip to contentSkip to conversation

xen/events: use xen_vcpu_id mapping for EVTCHNOP_status

PATCH Applied Vitaly Kuznetsov 3 participants 5 messages Nov 23, 2016 – Nov 30, 2016 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/events: use xen_vcpu_id mapping for EVTCHNOP_status

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.

---
 drivers/xen/events/events_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/events/events_base.c +1 -1
index 9ecfcdc..137bd0e 100644
@@ -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;
 		}
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Vitaly Kuznetsov

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.

Quoted 9 lines
---
 drivers/xen/events/events_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/events/events_base.c +0 -0
index 9ecfcdc..137bd0e 100644

drivers/xen/events/events_base.c static int find_virq(unsigned int virq, unsigned int cpu) · line 954

Quoted 8 lines
drivers/xen/events/events_base.c +1 -1
@@ -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;
 		}

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

Reviewed-by on v1 1/1
#2 lore raw
In reply to Vitaly Kuznetsov
Quoted 5 lines · Vitaly Kuznetsov

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.

Quoted 17 lines
---
 drivers/xen/events/events_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/xen/events/events_base.c +1 -1
index 9ecfcdc..137bd0e 100644
@@ -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;
 		}
maintainer Applied
#3 lore raw
In reply to Vitaly Kuznetsov
Quoted 5 lines · Vitaly Kuznetsov

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.

Applied to xen/tip.git for-linus-4.10

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel