xen/arm: warn the user that we cannot route SPIs to Dom0 on ACPI
PATCH v2 1/1 xen/arm: warn the user that we cannot route SPIs to Dom0 on ACPI
as a consequence of 9d77b3c01d1261ce17c10097a1b393f2893ca657 being reverted.
---
Changes in v2:
- fix typo
- add log_once
--- xen/arch/arm/vgic.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
xen/arch/arm/vgic.c +15 -0
@@ -25,6 +25,8 @@#include <xen/irq.h> #include <xen/sched.h> #include <xen/perfc.h> +#include <xen/iocap.h> +#include <xen/acpi.h> #include <asm/current.h>
@@ -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);
Signature · 7 lines
1.9.1 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 4 lines · Stefano Stabellini
as a consequence of
9d77b3c01d1261ce17c10097a1b393f2893ca657being reverted.Signed-off-by Stefano Stabellini <[email protected]>
Quoted 45 lines
---
Changes in v2:
- fix typo
- addlog_once--- xen/arch/arm/vgic.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)xen/arch/arm/vgic.c +15
-0@@ -25,6 +25,8 @@#include <xen/irq.h> #include <xen/sched.h> #include <xen/perfc.h> +#include <xen/iocap.h> +#include <xen/acpi.h> #include <asm/current.h> @@ -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);
Signature · 6 lines
Julien Grall _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 9 lines · Julien Grall
Quoted 4 lines · Stefano Stabellini
as a consequence of
9d77b3c01d1261ce17c10097a1b393f2893ca657being reverted.Signed-off-by Stefano Stabellini <[email protected]>Reviewed-by Julien Grall <[email protected]>
Quoted 38 lines
Quoted 38 lines
---
Changes in v2:
- fix typo
- addlog_once--- xen/arch/arm/vgic.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)xen/arch/arm/vgic.c +11
-0@@ -25,6 +25,8 @@#include <xen/irq.h> #include <xen/sched.h> #include <xen/perfc.h> +#include <xen/iocap.h> +#include <xen/acpi.h> #include <asm/current.h> @@ -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" );
Quoted 11 lines
Quoted 8 lines
xen/arch/arm/vgic.c +4
-0+ 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);Signature · 1 line
Julien Grall
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 4 lines · Stefano Stabellini
as a consequence of
9d77b3c01d1261ce17c10097a1b393f2893ca657being reverted.Signed-off-by Stefano Stabellini <[email protected]>
Some style corrections.
xen/arch/arm/vgic.c void vgic_enable_irqs(struct vcpu *v, uint32_t r, int n) · line 352
Quoted 10 lines
xen/arch/arm/vgic.c +3
-0@@ -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) &&
Space after if.
xen/arch/arm/vgic.c void vgic_enable_irqs(struct vcpu *v, uint32_t r, int n) · line 353
Quoted 1 line
xen/arch/arm/vgic.c +1
-0+ ( irq >= 32 ) && ( !acpi_disabled ) )
Extraneous spaces, and pointless brackets for the acpi_disabled.
xen/arch/arm/vgic.c void vgic_enable_irqs(struct vcpu *v, uint32_t r, int n) · line 355
Quoted 2 lines
xen/arch/arm/vgic.c +2
-0+ { +static int log_once =0 ;
bool_t. Also, missing a newline between the variable declaration and code.
~Andrew
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel