From: Stefano Stabellini Date: Wed, 1 Jun 2016 14:38:51 +0000 (+0100) Subject: xen/arm: warn the user that we cannot route SPIs to Dom0 on ACPI X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1071 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f91c84edebe67296e4051af055dbf0adafb13a37;p=xen.git xen/arm: warn the user that we cannot route SPIs to Dom0 on ACPI as a consequence of 9d77b3c01d1261ce17c10097a1b393f2893ca657 being reverted. Signed-off-by: Stefano Stabellini Reviewed-by: Julien Grall --- diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index ee356837f1..413ff160ff 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -25,6 +25,8 @@ #include #include #include +#include +#include #include @@ -342,9 +344,22 @@ void vgic_enable_irqs(struct vcpu *v, uint32_t r, int n) unsigned long flags; int i = 0; struct vcpu *v_target; + struct domain *d = v->domain; while ( (i = find_next_bit(&mask, 32, i)) < 32 ) { irq = i + (32 * n); + /* Set the irq type and route it to guest only for SPI and Dom0 */ + if( irq_access_permitted(d, irq) && is_hardware_domain(d) && + ( irq >= 32 ) && ( !acpi_disabled ) ) + { + static int log_once = 0; + if ( !log_once ) + { + gprintk(XENLOG_WARNING, "Routing SPIs to Dom0 on ACPI systems is unimplemented.\n"); + log_once++; + } + } + v_target = __vgic_get_target_vcpu(v, irq); p = irq_to_pending(v_target, irq); set_bit(GIC_IRQ_GUEST_ENABLED, &p->status);