[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] spapr/xive: EQ page should be naturally ali
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] spapr/xive: EQ page should be naturally aligned |
Date: |
Thu, 9 May 2019 15:37:00 +1000 |
User-agent: |
Mutt/1.11.4 (2019-03-13) |
On Wed, May 08, 2019 at 07:19:44PM +0200, Cédric Le Goater wrote:
> 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>
Applied, thanks.
> ---
> 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 097f88d4608d..666e24e9b447 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, 1ul << 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);
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature