[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [RFC PATCH v0 2/2] spapr: Abort when HTAB of requested si
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [RFC PATCH v0 2/2] spapr: Abort when HTAB of requested size isn't allocated |
Date: |
Wed, 23 Sep 2015 13:29:51 +1000 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Tue, Sep 22, 2015 at 09:09:49AM +0530, Bharata B Rao wrote:
> Terminate the guest when HTAB of requested size isn't allocated by
> the host.
>
> When memory hotplug is attempted on a guest that has booted with
> less than requested HTAB size, the guest kernel will not be able
> to gracefully fail the hotplug request. This patch will ensure that
> we never end up in a situation where memory hotplug fails due to
> less than requested HTAB size.
>
> Signed-off-by: Bharata B Rao <address@hidden>
Reviewed-by: David Gibson <address@hidden>
> ---
> hw/ppc/spapr.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 4692122..66446af 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -992,6 +992,10 @@ static void spapr_alloc_htab(sPAPRMachineState *spapr)
>
> if (shift > 0) {
> /* Kernel handles htab, we don't need to allocate one */
> + if (shift != spapr->htab_shift) {
> + error_setg(&error_abort, "Failed to allocated requested HTAB
> size");
> + }
> +
> spapr->htab_shift = shift;
> kvmppc_kern_htab = true;
>
--
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
pgpM37gEUTiOW.pgp
Description: PGP signature