From: David Gibson <david@gibson.dropbear.id.au>
To: "Cédric Le Goater" <clg@kaod.org>
Cc: Greg Kurz <groug@kaod.org>, qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] spapr: Forbid setting ic-mode for old machine types
Date: Mon, 21 Jan 2019 09:29:30 +1300 [thread overview]
Message-ID: <20190120202930.GB2423@umbus> (raw)
In-Reply-To: <9e554917-e78d-0cd6-8ed0-6fd2808c4a84@kaod.org>
[-- Attachment #1: Type: text/plain, Size: 1611 bytes --]
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 <groug@kaod.org>
>
>
>
> Tested-by: Cédric Le Goater <clg@kaod.org>
> Reviewed-by: Cédric Le Goater <clg@kaod.org>
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-01-21 0:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-17 11:06 [Qemu-devel] [PATCH] spapr: Forbid setting ic-mode for old machine types Greg Kurz
2019-01-17 11:58 ` Cédric Le Goater
2019-01-20 20:29 ` David Gibson [this message]
2019-01-31 17:47 ` no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190120202930.GB2423@umbus \
--to=david@gibson.dropbear.id.au \
--cc=clg@kaod.org \
--cc=groug@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).