Skip to content

Commit

Permalink
xen: use the pirq number to check the pirq_eoi_map
Browse files Browse the repository at this point in the history
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.

The reason is that 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.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Tested-by: Tobias Geiger <tobias.geiger@vido.info>
[v1: Added some extra wording to git commit]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
Stefano Stabellini authored and Konrad Rzeszutek Wilk committed Apr 26, 2012
1 parent df88b2d commit 521394e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 521394e

Please sign in to comment.