* [PATCH v2] xen/arm: warn the user that we cannot route SPIs to Dom0 on ACPI
@ 2016-06-01 14:38 Stefano Stabellini
2016-06-01 14:45 ` Julien Grall
2016-06-01 14:49 ` Andrew Cooper
0 siblings, 2 replies; 4+ messages in thread
From: Stefano Stabellini @ 2016-06-01 14:38 UTC (permalink / raw)
To: julien.grall; +Cc: xen-devel, wei.liu2, sstabellini
as a consequence of 9d77b3c01d1261ce17c10097a1b393f2893ca657 being
reverted.
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
---
Changes in v2:
- fix typo
- add log_once
---
xen/arch/arm/vgic.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
index ee35683..413ff16 100644
--- a/xen/arch/arm/vgic.c
+++ b/xen/arch/arm/vgic.c
@@ -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);
--
1.9.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] xen/arm: warn the user that we cannot route SPIs to Dom0 on ACPI
2016-06-01 14:38 [PATCH v2] xen/arm: warn the user that we cannot route SPIs to Dom0 on ACPI Stefano Stabellini
@ 2016-06-01 14:45 ` Julien Grall
2016-06-01 14:46 ` Wei Liu
2016-06-01 14:49 ` Andrew Cooper
1 sibling, 1 reply; 4+ messages in thread
From: Julien Grall @ 2016-06-01 14:45 UTC (permalink / raw)
To: Stefano Stabellini; +Cc: xen-devel, wei.liu2
On 01/06/16 15:38, Stefano Stabellini wrote:
> as a consequence of 9d77b3c01d1261ce17c10097a1b393f2893ca657 being
> reverted.
>
> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Julien Grall <julien.grall@arm.com>
> ---
> Changes in v2:
> - fix typo
> - add log_once
> ---
> xen/arch/arm/vgic.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
> index ee35683..413ff16 100644
> --- a/xen/arch/arm/vgic.c
> +++ b/xen/arch/arm/vgic.c
> @@ -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);
>
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] xen/arm: warn the user that we cannot route SPIs to Dom0 on ACPI
2016-06-01 14:45 ` Julien Grall
@ 2016-06-01 14:46 ` Wei Liu
0 siblings, 0 replies; 4+ messages in thread
From: Wei Liu @ 2016-06-01 14:46 UTC (permalink / raw)
To: Julien Grall; +Cc: Stefano Stabellini, wei.liu2, xen-devel
On Wed, Jun 01, 2016 at 03:45:28PM +0100, Julien Grall wrote:
>
>
> On 01/06/16 15:38, Stefano Stabellini wrote:
> >as a consequence of 9d77b3c01d1261ce17c10097a1b393f2893ca657 being
> >reverted.
> >
> >Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
>
> Reviewed-by: Julien Grall <julien.grall@arm.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
>
> >---
> >Changes in v2:
> >- fix typo
> >- add log_once
> >---
> > xen/arch/arm/vgic.c | 15 +++++++++++++++
> > 1 file changed, 15 insertions(+)
> >
> >diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
> >index ee35683..413ff16 100644
> >--- a/xen/arch/arm/vgic.c
> >+++ b/xen/arch/arm/vgic.c
> >@@ -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);
> >
>
> --
> Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] xen/arm: warn the user that we cannot route SPIs to Dom0 on ACPI
2016-06-01 14:38 [PATCH v2] xen/arm: warn the user that we cannot route SPIs to Dom0 on ACPI Stefano Stabellini
2016-06-01 14:45 ` Julien Grall
@ 2016-06-01 14:49 ` Andrew Cooper
1 sibling, 0 replies; 4+ messages in thread
From: Andrew Cooper @ 2016-06-01 14:49 UTC (permalink / raw)
To: Stefano Stabellini, julien.grall; +Cc: xen-devel, wei.liu2
On 01/06/16 15:38, Stefano Stabellini wrote:
> as a consequence of 9d77b3c01d1261ce17c10097a1b393f2893ca657 being
> reverted.
>
> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Some style corrections.
> @@ -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.
> + ( irq >= 32 ) && ( !acpi_disabled ) )
Extraneous spaces, and pointless brackets for the acpi_disabled.
> + {
> + static int log_once = 0;
bool_t. Also, missing a newline between the variable declaration and code.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-01 14:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-01 14:38 [PATCH v2] xen/arm: warn the user that we cannot route SPIs to Dom0 on ACPI Stefano Stabellini
2016-06-01 14:45 ` Julien Grall
2016-06-01 14:46 ` Wei Liu
2016-06-01 14:49 ` Andrew Cooper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.