From: Christoffer Dall <christoffer.dall@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Alistair Francis <alistair.francis@xilinx.com>,
"Edgar E. Iglesias" <edgar.iglesias@xilinx.com>,
qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Alex Bennee <alex.bennee@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] target/arm/kvm: gic: Prevent creating userspace GICv3 with KVM
Date: Tue, 6 Feb 2018 10:06:59 +0100 [thread overview]
Message-ID: <20180206090659.GX21802@cbox> (raw)
In-Reply-To: <431ec46d-33dd-71d8-9ea1-f331ba01bd62@amsat.org>
[-- Attachment #1: Type: text/plain, Size: 1997 bytes --]
Hi Philippe,
On Mon, Feb 05, 2018 at 09:10:48PM -0300, Philippe Mathieu-Daudé wrote:
>
> On 02/01/2018 05:53 PM, Christoffer Dall wrote:
> > KVM doesn't support emulating a GICv3 in userspace, only GICv2. We
> > currently attempt this anyway, and as a result a KVM guest doesn't
> > receive interrupts and the user is left wondering why. Report an error
> > to the user if this particular combination is requested.
> >
> > Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
> > ---
> > target/arm/kvm_arm.h | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h
> > index ff53e9fafb..cfb7e5af72 100644
> > --- a/target/arm/kvm_arm.h
> > +++ b/target/arm/kvm_arm.h
> > @@ -234,6 +234,10 @@ static inline const char *gicv3_class_name(void)
>
> Any reason why these functions are inlined in this include?
Not really sure what you mean? What do you think would be a better
approach?
>
> Also - not related to your patch - while gicv3_class_name() is
> self-explicit, gic_class_name() isn't (to me at least).
I think I tend to see 'gic' as GICv2 and 'gicv3' as GICv3 in QEMU, but I
don't remember the details of how you make the GIC be a proper GICv2 vs.
the 11mpcore version thingy.
>
> There are many check for gic_version 1/2/3 in virt.c, which we could
> clean using more generic functions such gic_class_name(int gic_version)
> and Co.
Possibly. Do note, that checking "which version of the GIC does this
board contain" is a separate thing from "which particular mechanism do I
use to emulate the GIC".
>
> > exit(1);
> > #endif
> > } else {
> > + if (kvm_enabled()) {
> > + error_report("Userspace GICv3 is not supported with KVM");
> > + exit(1);
>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> > + }
> > return "arm-gicv3";
> > }
> > }
> >
>
Thanks!
-Christoffer
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2018-02-06 9:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-01 20:53 [Qemu-devel] [PATCH] target/arm/kvm: gic: Prevent creating userspace GICv3 with KVM Christoffer Dall
2018-02-06 0:10 ` Philippe Mathieu-Daudé
2018-02-06 0:19 ` Alistair Francis
2018-02-06 9:06 ` Christoffer Dall [this message]
2018-02-08 15:23 ` Peter Maydell
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=20180206090659.GX21802@cbox \
--to=christoffer.dall@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=alistair.francis@xilinx.com \
--cc=edgar.iglesias@xilinx.com \
--cc=f4bug@amsat.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.