From: Peter Maydell <peter.maydell@linaro.org>
To: Eric Auger <eric.auger@redhat.com>
Cc: eric.auger.pro@gmail.com, qemu-arm <qemu-arm@nongnu.org>,
QEMU Developers <qemu-devel@nongnu.org>,
Pavel Fedin <p.fedin@samsung.com>,
Shlomo Pongratz <shlomopongratz@gmail.com>,
Diana Craciun <diana.craciun@freescale.com>,
Tomasz Nowicki <tn@semihalf.com>,
Shannon Zhao <shannon.zhao@linaro.org>,
Christoffer Dall <christoffer.dall@linaro.org>,
Andrew Jones <drjones@redhat.com>
Subject: Re: [Qemu-devel] [RFC v5 4/7] target-arm/kvm: Pass requester ID to MSI routing functions
Date: Fri, 12 Aug 2016 15:19:37 +0100 [thread overview]
Message-ID: <CAFEAcA8OFkdVF55KL1U0OO=GDgLumRuVy4N1HD=fHicKkrmiyA@mail.gmail.com> (raw)
In-Reply-To: <1470161247-10251-5-git-send-email-eric.auger@redhat.com>
On 2 August 2016 at 19:07, Eric Auger <eric.auger@redhat.com> wrote:
> From: Pavel Fedin <p.fedin@samsung.com>
>
> Introduce global kvm_arm_msi_use_devid flag and pass device IDs in
> kvm_arch_fixup_msi_route(). Device IDs are required by the ITS.
>
> Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>
> ---
>
> v3 -> v4:
> - OR route->flags with KVM_MSI_VALID_DEVID
> ---
> target-arm/kvm.c | 6 ++++++
> target-arm/kvm_arm.h | 3 +++
> 2 files changed, 9 insertions(+)
>
> diff --git a/target-arm/kvm.c b/target-arm/kvm.c
> index dbe393c..4675aa3 100644
> --- a/target-arm/kvm.c
> +++ b/target-arm/kvm.c
> @@ -22,6 +22,7 @@
> #include "cpu.h"
> #include "internals.h"
> #include "hw/arm/arm.h"
> +#include "hw/pci/pci.h"
> #include "exec/memattrs.h"
> #include "hw/boards.h"
> #include "qemu/log.h"
> @@ -31,6 +32,7 @@ const KVMCapabilityInfo kvm_arch_required_capabilities[] = {
> };
>
> static bool cap_has_mp_state;
> +bool kvm_arm_msi_use_devid;
>
> int kvm_arm_vcpu_init(CPUState *cs)
> {
> @@ -619,6 +621,10 @@ int kvm_arm_vgic_probe(void)
> int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
> uint64_t address, uint32_t data, PCIDevice *dev)
> {
> + if (kvm_arm_msi_use_devid) {
> + route->flags |= KVM_MSI_VALID_DEVID;
> + route->u.msi.devid = pci_requester_id(dev);
> + }
> return 0;
> }
>
> diff --git a/target-arm/kvm_arm.h b/target-arm/kvm_arm.h
> index 633d088..befcfd1 100644
> --- a/target-arm/kvm_arm.h
> +++ b/target-arm/kvm_arm.h
> @@ -121,6 +121,9 @@ bool write_kvmstate_to_list(ARMCPU *cpu);
> void kvm_arm_reset_vcpu(ARMCPU *cpu);
>
> #ifdef CONFIG_KVM
> +
> +extern bool kvm_arm_msi_use_devid;
> +
The kernel documentation and most of the code for this flag
isn't ARM specific, which suggests to me that we should put
the QEMU support into the non-architecture-specific files too.
That is, a flag and wrapper function like all the existing
ones in include/sysemu/kvm.h, and then put the
if (kvm_msi_use_devid()) {
...
}
in the functions in kvm-all.c that need it.
thanks
-- PMM
next prev parent reply other threads:[~2016-08-12 14:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-02 18:07 [Qemu-devel] [RFC v5 0/7] vITS support Eric Auger
2016-08-02 18:07 ` [Qemu-devel] [RFC v5 1/7] hw/intc/arm_gicv3_its: Implement ITS base class Eric Auger
2016-08-12 14:12 ` Peter Maydell
2016-08-17 16:03 ` Auger Eric
2016-08-02 18:07 ` [Qemu-devel] [RFC v5 2/7] target-arm: move gicv3_class_name from machine to kvm_arm.h Eric Auger
2016-08-12 14:01 ` Peter Maydell
2016-08-02 18:07 ` [Qemu-devel] [RFC v5 3/7] linux-headers: update to 4.7-rc6 + ITS emulation and GSI routing Eric Auger
2016-08-02 18:07 ` [Qemu-devel] [RFC v5 4/7] target-arm/kvm: Pass requester ID to MSI routing functions Eric Auger
2016-08-12 14:19 ` Peter Maydell [this message]
2016-08-17 16:05 ` Auger Eric
2016-08-02 18:07 ` [Qemu-devel] [RFC v5 5/7] hw/intc/arm_gicv3_its: Implement support for in-kernel ITS emulation Eric Auger
2016-08-12 14:03 ` Peter Maydell
2016-08-17 15:59 ` Auger Eric
2016-08-02 18:07 ` [Qemu-devel] [RFC v5 6/7] arm/virt: Add ITS to the virt board Eric Auger
2016-08-02 18:07 ` [Qemu-devel] [RFC v5 7/7] hw/arm/virt-acpi-build: Add ITS description in ACPI MADT table Eric Auger
2016-08-03 0:56 ` Shannon Zhao
2016-08-03 7:22 ` Auger Eric
2016-08-03 8:50 ` Shannon Zhao
2016-08-03 9:02 ` Auger Eric
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='CAFEAcA8OFkdVF55KL1U0OO=GDgLumRuVy4N1HD=fHicKkrmiyA@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=diana.craciun@freescale.com \
--cc=drjones@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=eric.auger@redhat.com \
--cc=p.fedin@samsung.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=shannon.zhao@linaro.org \
--cc=shlomopongratz@gmail.com \
--cc=tn@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).