|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH V2 5/8] xen/arm: vGIC: Consider AFF1 when injecting SGI.
From: Chen Baozi <baozich@xxxxxxxxx>
Use the AFF1 value of ICC_SGI1R_EL1 when injecting SGI in vGIC,
which expands the number of supported vCPU more than 16 that
target list bitmap can hold independently.
Signed-off-by: Chen Baozi <baozich@xxxxxxxxx>
---
xen/arch/arm/vgic.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
index 7b387b7..27bd137 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -367,13 +367,19 @@ int vgic_to_sgi(struct vcpu *v, register_t sgir, enum
gic_sgi_mode irqmode, int
for_each_set_bit( vcpuid, &vcpu_mask, d->max_vcpus )
{
- if ( d->vcpu[vcpuid] != NULL && !is_vcpu_online(d->vcpu[vcpuid]) )
+ /*
+ * XXX: We assumes that only AFF1 and target list are used in
+ * ICC_SGI1R_EL1.
+ */
+ int real_id = vcpuid + ((sgir >> 16) & 0xff) * 16;
+
+ if ( d->vcpu[real_id] != NULL && !is_vcpu_online(d->vcpu[real_id]) )
{
gprintk(XENLOG_WARNING, "VGIC: write r=%"PRIregister" \
vcpu_mask=%lx, wrong CPUTargetList\n", sgir, vcpu_mask);
continue;
}
- vgic_vcpu_inject_irq(d->vcpu[vcpuid], virq);
+ vgic_vcpu_inject_irq(d->vcpu[real_id], virq);
}
return 1;
}
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |