aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2019-01-02 06:57:41 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2019-01-09 09:28:14 +1100
commit72c1e5a66affc2ae69342a4081361f69e1f686b6 (patch)
tree3a856b0bf360d1bef7acfe00f1e3866450e21d31
parent872ff3dea3be974405709c4a96fccea65884835a (diff)
downloadqemu-72c1e5a66affc2ae69342a4081361f69e1f686b6.zip
qemu-72c1e5a66affc2ae69342a4081361f69e1f686b6.tar.gz
qemu-72c1e5a66affc2ae69342a4081361f69e1f686b6.tar.bz2
ppc/xics: allow ICSState to have an offset 0
commit 15ed653fa49a ("ppc/xics: An ICS with offset 0 is assumed to be uninitialized") introduced an extra check on the ICS offset which is not strictly necessary. Revert the change to be able to map the XICS IRQ number space on the XIVE IRQ number space. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--include/hw/ppc/xics.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h
index 7668c38..07508cb 100644
--- a/include/hw/ppc/xics.h
+++ b/include/hw/ppc/xics.h
@@ -139,8 +139,7 @@ struct ICSState {
static inline bool ics_valid_irq(ICSState *ics, uint32_t nr)
{
- return (ics->offset != 0) && (nr >= ics->offset)
- && (nr < (ics->offset + ics->nr_irqs));
+ return (nr >= ics->offset) && (nr < (ics->offset + ics->nr_irqs));
}
struct ICSIRQState {