All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen: use the pirq number to check the pirq_eoi_map
@ 2012-04-25 15:11 Stefano Stabellini
  2012-04-26 10:14   ` David Vrabel
  0 siblings, 1 reply; 6+ messages in thread
From: Stefano Stabellini @ 2012-04-25 15:11 UTC (permalink / raw)
  To: xen-devel
  Cc: konrad.wilk, Stefano.Stabellini, tobias.geiger, linux-kernel,
	Stefano Stabellini

In pirq_check_eoi_map use the pirq number rather than the Linux irq
number to check whether an eoi is needed in the pirq_eoi_map.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Tested-by: Tobias Geiger <tobias.geiger@vido.info>
---
 drivers/xen/events.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 4b33acd..0a8a17c 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -274,7 +274,7 @@ static unsigned int cpu_from_evtchn(unsigned int evtchn)
 
 static bool pirq_check_eoi_map(unsigned irq)
 {
-	return test_bit(irq, pirq_eoi_map);
+	return test_bit(pirq_from_irq(irq), pirq_eoi_map);
 }
 
 static bool pirq_needs_eoi_flag(unsigned irq)
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Xen-devel] [PATCH] xen: use the pirq number to check the pirq_eoi_map
  2012-04-25 15:11 [PATCH] xen: use the pirq number to check the pirq_eoi_map Stefano Stabellini
@ 2012-04-26 10:14   ` David Vrabel
  0 siblings, 0 replies; 6+ messages in thread
From: David Vrabel @ 2012-04-26 10:14 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: xen-devel, tobias.geiger, linux-kernel, konrad.wilk

On 25/04/12 16:11, Stefano Stabellini wrote:
> In pirq_check_eoi_map use the pirq number rather than the Linux irq
> number to check whether an eoi is needed in the pirq_eoi_map.

What buggy behaviour does this patch fix?  It would be nice if this was
included in the patch description.

David

> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> Tested-by: Tobias Geiger <tobias.geiger@vido.info>
> ---
>  drivers/xen/events.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/xen/events.c b/drivers/xen/events.c
> index 4b33acd..0a8a17c 100644
> --- a/drivers/xen/events.c
> +++ b/drivers/xen/events.c
> @@ -274,7 +274,7 @@ static unsigned int cpu_from_evtchn(unsigned int evtchn)
>  
>  static bool pirq_check_eoi_map(unsigned irq)
>  {
> -	return test_bit(irq, pirq_eoi_map);
> +	return test_bit(pirq_from_irq(irq), pirq_eoi_map);
>  }
>  
>  static bool pirq_needs_eoi_flag(unsigned irq)


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen: use the pirq number to check the pirq_eoi_map
@ 2012-04-26 10:14   ` David Vrabel
  0 siblings, 0 replies; 6+ messages in thread
From: David Vrabel @ 2012-04-26 10:14 UTC (permalink / raw)
  To: Stefano Stabellini; +Cc: tobias.geiger, konrad.wilk, linux-kernel, xen-devel

On 25/04/12 16:11, Stefano Stabellini wrote:
> In pirq_check_eoi_map use the pirq number rather than the Linux irq
> number to check whether an eoi is needed in the pirq_eoi_map.

What buggy behaviour does this patch fix?  It would be nice if this was
included in the patch description.

David

> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> Tested-by: Tobias Geiger <tobias.geiger@vido.info>
> ---
>  drivers/xen/events.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/xen/events.c b/drivers/xen/events.c
> index 4b33acd..0a8a17c 100644
> --- a/drivers/xen/events.c
> +++ b/drivers/xen/events.c
> @@ -274,7 +274,7 @@ static unsigned int cpu_from_evtchn(unsigned int evtchn)
>  
>  static bool pirq_check_eoi_map(unsigned irq)
>  {
> -	return test_bit(irq, pirq_eoi_map);
> +	return test_bit(pirq_from_irq(irq), pirq_eoi_map);
>  }
>  
>  static bool pirq_needs_eoi_flag(unsigned irq)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xen-devel] [PATCH] xen: use the pirq number to check the pirq_eoi_map
  2012-04-26 10:14   ` David Vrabel
  (?)
  (?)
@ 2012-04-26 11:17   ` Stefano Stabellini
  -1 siblings, 0 replies; 6+ messages in thread
From: Stefano Stabellini @ 2012-04-26 11:17 UTC (permalink / raw)
  To: David Vrabel
  Cc: Stefano Stabellini, xen-devel, tobias.geiger, linux-kernel, konrad.wilk

On Thu, 26 Apr 2012, David Vrabel wrote:
> On 25/04/12 16:11, Stefano Stabellini wrote:
> > In pirq_check_eoi_map use the pirq number rather than the Linux irq
> > number to check whether an eoi is needed in the pirq_eoi_map.
> 
> What buggy behaviour does this patch fix?  It would be nice if this was
> included in the patch description.

The irq number is not always identical to the pirq number so if we
wrongly use the irq number to check the pirq_eoi_map we are going to
check for the wrong pirq to EOI. As a consequence some interrupts might
not be EOI'ed by the guest correctly.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] xen: use the pirq number to check the pirq_eoi_map
  2012-04-26 10:14   ` David Vrabel
  (?)
@ 2012-04-26 11:17   ` Stefano Stabellini
  -1 siblings, 0 replies; 6+ messages in thread
From: Stefano Stabellini @ 2012-04-26 11:17 UTC (permalink / raw)
  To: David Vrabel
  Cc: tobias.geiger, xen-devel, linux-kernel, konrad.wilk, Stefano Stabellini

On Thu, 26 Apr 2012, David Vrabel wrote:
> On 25/04/12 16:11, Stefano Stabellini wrote:
> > In pirq_check_eoi_map use the pirq number rather than the Linux irq
> > number to check whether an eoi is needed in the pirq_eoi_map.
> 
> What buggy behaviour does this patch fix?  It would be nice if this was
> included in the patch description.

The irq number is not always identical to the pirq number so if we
wrongly use the irq number to check the pirq_eoi_map we are going to
check for the wrong pirq to EOI. As a consequence some interrupts might
not be EOI'ed by the guest correctly.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] xen: use the pirq number to check the pirq_eoi_map
@ 2012-04-25 15:11 Stefano Stabellini
  0 siblings, 0 replies; 6+ messages in thread
From: Stefano Stabellini @ 2012-04-25 15:11 UTC (permalink / raw)
  To: xen-devel; +Cc: tobias.geiger, Stefano Stabellini, linux-kernel, konrad.wilk

In pirq_check_eoi_map use the pirq number rather than the Linux irq
number to check whether an eoi is needed in the pirq_eoi_map.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Tested-by: Tobias Geiger <tobias.geiger@vido.info>
---
 drivers/xen/events.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/xen/events.c b/drivers/xen/events.c
index 4b33acd..0a8a17c 100644
--- a/drivers/xen/events.c
+++ b/drivers/xen/events.c
@@ -274,7 +274,7 @@ static unsigned int cpu_from_evtchn(unsigned int evtchn)
 
 static bool pirq_check_eoi_map(unsigned irq)
 {
-	return test_bit(irq, pirq_eoi_map);
+	return test_bit(pirq_from_irq(irq), pirq_eoi_map);
 }
 
 static bool pirq_needs_eoi_flag(unsigned irq)
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-04-26 11:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-25 15:11 [PATCH] xen: use the pirq number to check the pirq_eoi_map Stefano Stabellini
2012-04-26 10:14 ` [Xen-devel] " David Vrabel
2012-04-26 10:14   ` David Vrabel
2012-04-26 11:17   ` Stefano Stabellini
2012-04-26 11:17   ` [Xen-devel] " Stefano Stabellini
  -- strict thread matches above, loose matches on Subject: below --
2012-04-25 15:11 Stefano Stabellini

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.