[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH] spapr: Forbid setting ic-mode for old machine typ
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH] spapr: Forbid setting ic-mode for old machine types |
Date: |
Mon, 21 Jan 2019 09:29:30 +1300 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Thu, Jan 17, 2019 at 12:58:46PM +0100, Cédric Le Goater wrote:
> On 1/17/19 12:06 PM, Greg Kurz wrote:
> > Machine types 3.0 and older only know about the legacy XICS backend.
> > Make it clear by erroring out if the user tries to set ic-mode on
> > such machines.
> >
> > Signed-off-by: Greg Kurz <address@hidden>
>
>
>
> Tested-by: Cédric Le Goater <address@hidden>
> Reviewed-by: Cédric Le Goater <address@hidden>
Applied, thanks.
>
> Thanks,
>
> C.
>
> > ---
> >
> > Motivation for this comes from a failing backward migration test, caused
> > by ic-mode=xics I forgot to drop from the command line :)
> > ---
> > hw/ppc/spapr.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> > index 0942f35bf87e..6b8dbf5c5a3c 100644
> > --- a/hw/ppc/spapr.c
> > +++ b/hw/ppc/spapr.c
> > @@ -3126,6 +3126,11 @@ static void spapr_set_ic_mode(Object *obj, const
> > char *value, Error **errp)
> > {
> > sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
> >
> > + if (SPAPR_MACHINE_GET_CLASS(spapr)->legacy_irq_allocation) {
> > + error_setg(errp, "This machine only uses the legacy XICS backend,
> > don't pass ic-mode");
> > + return;
> > + }
> > +
> > /* The legacy IRQ backend can not be set */
> > if (strcmp(value, "xics") == 0) {
> > spapr->irq = &spapr_irq_xics;
> >
>
--
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