From: shashi.mallela@linaro.org
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Leif Lindholm <leif@nuviainc.com>,
QEMU Developers <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>,
Radoslaw Biernacki <rad@semihalf.com>
Subject: Re: [PATCH v2 8/8] hw/arm/virt: add ITS support in virt GIC
Date: Thu, 29 Apr 2021 19:40:29 -0400 [thread overview]
Message-ID: <c4fe0865f890d84070419ecd7d0ea6ba4ea746d5.camel@linaro.org> (raw)
In-Reply-To: <CAFEAcA_0xrjGn3WSL4Aoe+nneh4Yk3tg+d5N95GGN779M6qQYw@mail.gmail.com>
On Mon, 2021-04-19 at 13:46 +0100, Peter Maydell wrote:
> On Thu, 1 Apr 2021 at 03:42, Shashi Mallela <
> shashi.mallela@linaro.org> wrote:
> > Included creation of ITS as part of virt platform GIC
> > initialization.This Emulated ITS model now co-exists with kvm
> > ITS and is enabled in absence of kvm irq kernel support in a
> > platform.
> >
> > Signed-off-by: Shashi Mallela <shashi.mallela@linaro.org>
> > ---
> > hw/arm/virt.c | 10 ++++++++--
> > target/arm/kvm_arm.h | 4 ++--
> > 2 files changed, 10 insertions(+), 4 deletions(-)
> >
> > diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> > index aa2bbd14e0..77cf2db90f 100644
> > --- a/hw/arm/virt.c
> > +++ b/hw/arm/virt.c
> > @@ -622,7 +622,7 @@ static void create_v2m(VirtMachineState *vms)
> > vms->msi_controller = VIRT_MSI_CTRL_GICV2M;
> > }
> >
> > -static void create_gic(VirtMachineState *vms)
> > +static void create_gic(VirtMachineState *vms, MemoryRegion *mem)
> > {
> > MachineState *ms = MACHINE(vms);
> > /* We create a standalone GIC */
> > @@ -656,6 +656,12 @@ static void create_gic(VirtMachineState *vms)
> > nb_redist_regions);
> > qdev_prop_set_uint32(vms->gic, "redist-region-count[0]",
> > redist0_count);
> >
> > + if (!kvm_irqchip_in_kernel()) {
> > + object_property_set_link(OBJECT(vms->gic), "sysmem",
> > OBJECT(mem),
> > + &error_fatal);
> > + qdev_prop_set_bit(vms->gic, "has-lpi", true);
> > + }
> > +
> > if (nb_redist_regions == 2) {
> > uint32_t redist1_capacity =
> > vms->memmap[VIRT_HIGH_GIC_REDIST2].size /
> > GICV3_REDIST_SIZE;
> > @@ -2039,7 +2045,7 @@ static void machvirt_init(MachineState
> > *machine)
> >
> > virt_flash_fdt(vms, sysmem, secure_sysmem ?: sysmem);
> >
> > - create_gic(vms);
> > + create_gic(vms, sysmem);
> >
> > virt_cpu_post_init(vms, sysmem);
> >
> > diff --git a/target/arm/kvm_arm.h b/target/arm/kvm_arm.h
> > index 34f8daa377..0613454975 100644
> > --- a/target/arm/kvm_arm.h
> > +++ b/target/arm/kvm_arm.h
> > @@ -525,8 +525,8 @@ static inline const char *its_class_name(void)
> > /* KVM implementation requires this capability */
> > return kvm_direct_msi_enabled() ? "arm-its-kvm" : NULL;
> > } else {
> > - /* Software emulation is not implemented yet */
> > - return NULL;
> > + /* Software emulation based model */
> > + return "arm-gicv3-its";
> > }
> > }
>
> This is OK as far as it goes, but I think we need to add the
> versioned-machine support so that only "virt-6.1" and later get the
> new ITS, and "virt-6.0" behave the same way (ie no ITS) as they did
> in older QEMU versions.
>
> Have added versioned machine support to enable new ITS only for
> versions 6.1 and above
> thanks
> -- PMM
prev parent reply other threads:[~2021-04-29 23:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-01 2:41 [PATCH v2 0/8] GICv3 LPI and ITS feature implementation Shashi Mallela
2021-04-01 2:41 ` [PATCH v2 1/8] hw/intc: GICv3 ITS initial framework Shashi Mallela
2021-04-16 17:21 ` Peter Maydell
2021-04-29 23:36 ` shashi.mallela
2021-04-30 10:09 ` Peter Maydell
2021-04-30 15:56 ` Shashi Mallela
2021-04-01 2:41 ` [PATCH v2 2/8] hw/intc: GICv3 ITS register definitions added Shashi Mallela
2021-04-16 18:54 ` Peter Maydell
[not found] ` <937a2923445e3ff629c9799a8579c470d2636375.camel@linaro.org>
2021-04-29 23:37 ` shashi.mallela
2021-04-01 2:41 ` [PATCH v2 3/8] hw/intc: GICv3 ITS command queue framework Shashi Mallela
2021-04-19 10:30 ` Peter Maydell
2021-04-29 23:38 ` shashi.mallela
2021-04-01 2:41 ` [PATCH v2 4/8] hw/intc: GICv3 ITS Command processing Shashi Mallela
2021-04-19 10:39 ` Peter Maydell
2021-04-01 2:41 ` [PATCH v2 5/8] hw/intc: GICv3 ITS Feature enablement Shashi Mallela
2021-04-19 10:51 ` Peter Maydell
2021-04-29 23:39 ` shashi.mallela
2021-04-01 2:41 ` [PATCH v2 6/8] hw/intc: GICv3 redistributor ITS processing Shashi Mallela
2021-04-19 12:44 ` Peter Maydell
[not found] ` <89852279ad379f2e50563dd47eb67376262355c0.camel@linaro.org>
2021-04-29 23:40 ` shashi.mallela
2021-04-01 2:41 ` [PATCH v2 7/8] hw/arm/sbsa-ref: add ITS support in SBSA GIC Shashi Mallela
2021-04-19 12:44 ` Peter Maydell
2021-04-01 2:41 ` [PATCH v2 8/8] hw/arm/virt: add ITS support in virt GIC Shashi Mallela
2021-04-19 12:46 ` Peter Maydell
2021-04-29 23:40 ` shashi.mallela [this message]
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=c4fe0865f890d84070419ecd7d0ea6ba4ea746d5.camel@linaro.org \
--to=shashi.mallela@linaro.org \
--cc=leif@nuviainc.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rad@semihalf.com \
/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).