[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 13/38] spapr/xive: EQ page should be naturally aligne
From: |
David Gibson |
Subject: |
[Qemu-devel] [PULL 13/38] spapr/xive: EQ page should be naturally aligned |
Date: |
Wed, 22 May 2019 14:45:35 +1000 |
From: Cédric Le Goater <address@hidden>
When the OS configures the EQ page in which to receive event
notifications from the XIVE interrupt controller, the page should be
naturally aligned. Add this check.
Signed-off-by: Cédric Le Goater <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
[dwg: Minor change for printf warning on some platforms]
Signed-off-by: David Gibson <address@hidden>
---
hw/intc/spapr_xive.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c
index 097f88d460..33da1a52c6 100644
--- a/hw/intc/spapr_xive.c
+++ b/hw/intc/spapr_xive.c
@@ -993,6 +993,12 @@ static target_ulong h_int_set_queue_config(PowerPCCPU *cpu,
case 16:
case 21:
case 24:
+ if (!QEMU_IS_ALIGNED(qpage, 1ul << qsize)) {
+ qemu_log_mask(LOG_GUEST_ERROR, "XIVE: EQ @0x%" HWADDR_PRIx
+ " is not naturally aligned with %" HWADDR_PRIx "\n",
+ qpage, (hwaddr)1 << qsize);
+ return H_P4;
+ }
end.w2 = cpu_to_be32((qpage >> 32) & 0x0fffffff);
end.w3 = cpu_to_be32(qpage & 0xffffffff);
end.w0 |= cpu_to_be32(END_W0_ENQUEUE);
--
2.21.0
- [Qemu-devel] [PULL 17/38] target/ppc: Optimise VSX_LOAD_SCALAR_DS and VSX_VECTOR_LOAD_STORE, (continued)
- [Qemu-devel] [PULL 17/38] target/ppc: Optimise VSX_LOAD_SCALAR_DS and VSX_VECTOR_LOAD_STORE, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 15/38] spapr/xive: print out the EQ page address in the monitor, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 21/38] spapr: Add forgotten capability to migration stream, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 06/38] hw/ppc/40p: use 1900 as a base year, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 16/38] Fix typo on "info pic" monitor cmd output for xive, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 08/38] target/ppc: Fix xvxsigdp, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 10/38] target/ppc: Fix vslv and vsrv, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 24/38] spapr: Print out extra hints when CAS negotiation of interrupt mode fails, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 33/38] spapr: check for the activation of the KVM IRQ device, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 28/38] spapr/xive: introduce a VM state change handler, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 13/38] spapr/xive: EQ page should be naturally aligned,
David Gibson <=
- [Qemu-devel] [PULL 22/38] target/ppc: Use vector variable shifts for VSL, VSR, VSRA, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 18/38] target/ppc: Fix xvabs[sd]p, xvnabs[sd]p, xvneg[sd]p, xvcpsgn[sd]p, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 12/38] target/ppc: Fix xxspltib, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 20/38] target/ppc: Set PSSCR_EC on cpu halt to prevent spurious wakeup, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 19/38] spapr/xive: Sanity checks of OV5 during CAS, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 32/38] spapr: introduce routines to delete the KVM IRQ device, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 31/38] sysbus: add a sysbus_mmio_unmap() helper, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 23/38] spapr: Fix phb_placement backwards compatibility, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 30/38] spapr/xive: activate KVM support, David Gibson, 2019/05/22
- [Qemu-devel] [PULL 26/38] spapr/xive: add hcall support when under KVM, David Gibson, 2019/05/22