From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>, qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org, Peter Maydell <peter.maydell@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
"open list:Overall KVM CPUs" <kvm@vger.kernel.org>
Subject: Re: [PATCH v3 04/15] target/arm: ensure KVM traps set appropriate MemTxAttrs
Date: Wed, 19 Oct 2022 12:44:15 +0200 [thread overview]
Message-ID: <dbcf971a-54c9-7778-06af-16837e8cb1fc@linaro.org> (raw)
In-Reply-To: <20220927141504.3886314-5-alex.bennee@linaro.org>
On 27/9/22 16:14, Alex Bennée wrote:
> Although most KVM users will use the in-kernel GIC emulation it is
> perfectly possible not to. In this case we need to ensure the
> MemTxAttrs are correctly populated so the GIC can divine the source
> CPU of the operation.
>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>
> ---
> v3
> - new for v3
> ---
> target/arm/kvm.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
> void kvm_arm_vm_state_change(void *opaque, bool running, RunState state)
> @@ -1003,6 +1004,10 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
> hwaddr xlat, len, doorbell_gpa;
> MemoryRegionSection mrs;
> MemoryRegion *mr;
> + MemTxAttrs attrs = {
> + .requester_type = MTRT_PCI,
> + .requester_id = pci_requester_id(dev)
> + };
Can we add a MEMTXATTRS_PCI() macro similar to MEMTXATTRS_CPU()?
#define MEMTXATTRS_PCI(pci_dev) ((MemTxAttrs) \
{.requester_type = MTRT_PCI, \
.requester_id = pci_requester_id(pci_dev)})
So here we can use:
MemTxAttrs attrs = MEMTXATTRS_PCI(dev);
> @@ -1012,8 +1017,7 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
>
> RCU_READ_LOCK_GUARD();
>
> - mr = address_space_translate(as, address, &xlat, &len, true,
> - MEMTXATTRS_UNSPECIFIED);
> + mr = address_space_translate(as, address, &xlat, &len, true, attrs);
>
> if (!mr) {
> return 1;
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2022-10-19 10:48 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 14:14 [PATCH v3 00/15] gdbstub/next (MemTxAttrs, re-factoring) Alex Bennée
2022-09-27 14:14 ` [PATCH v3 01/15] hw: encode accessing CPU index in MemTxAttrs Alex Bennée
2022-09-28 16:42 ` Richard Henderson
2022-09-28 18:56 ` Peter Maydell
2022-10-04 13:32 ` Alex Bennée
2022-10-04 14:54 ` Peter Maydell
2022-10-31 12:08 ` Philippe Mathieu-Daudé
2022-10-31 13:03 ` Peter Maydell
2022-11-11 13:23 ` Philippe Mathieu-Daudé
2022-11-11 13:58 ` Alex Bennée
2022-11-14 10:06 ` Peter Maydell
2022-09-27 14:14 ` [PATCH v3 02/15] target/arm: ensure TCG IO accesses set appropriate MemTxAttrs Alex Bennée
2022-09-28 16:45 ` Richard Henderson
2022-09-27 14:14 ` [PATCH v3 03/15] target/arm: ensure HVF traps " Alex Bennée
2022-09-28 16:47 ` Richard Henderson
2022-10-04 10:25 ` Mads Ynddal
2022-09-27 14:14 ` [PATCH v3 04/15] target/arm: ensure KVM " Alex Bennée
2022-09-28 16:49 ` Richard Henderson
2022-10-19 10:44 ` Philippe Mathieu-Daudé [this message]
2022-09-27 14:14 ` [PATCH v3 05/15] target/arm: ensure ptw accesses " Alex Bennée
2022-09-28 16:52 ` Richard Henderson
2022-09-27 14:14 ` [PATCH v3 06/15] target/arm: ensure m-profile helpers " Alex Bennée
2022-09-28 16:57 ` Richard Henderson
2022-09-27 14:14 ` [PATCH v3 07/15] qtest: make read/write operation appear to be from CPU Alex Bennée
2022-09-28 16:58 ` Richard Henderson
2022-09-27 14:14 ` [PATCH v3 08/15] hw/intc/gic: use MxTxAttrs to divine accessing CPU Alex Bennée
2022-09-28 17:03 ` Richard Henderson
2022-09-27 14:14 ` [PATCH v3 09/15] hw/timer: convert mptimer access to attrs to derive cpu index Alex Bennée
2022-09-28 17:04 ` Richard Henderson
2022-10-19 10:46 ` Philippe Mathieu-Daudé
2022-09-27 14:14 ` [PATCH v3 10/15] configure: move detected gdb to TCG's config-host.mak Alex Bennée
2022-09-27 14:15 ` [PATCH v3 11/15] gdbstub: move into its own sub directory Alex Bennée
2022-10-19 10:47 ` Philippe Mathieu-Daudé
2022-09-27 14:15 ` [PATCH v3 12/15] gdbstub: move sstep flags probing into AccelClass Alex Bennée
2022-10-04 10:25 ` Mads Ynddal
2022-09-27 14:15 ` [PATCH v3 13/15] gdbstub: move breakpoint logic to accel ops Alex Bennée
2022-10-04 10:25 ` Mads Ynddal
2022-09-27 14:15 ` [PATCH v3 14/15] gdbstub: move guest debug support check to ops Alex Bennée
2022-10-04 10:25 ` Mads Ynddal
2022-09-27 14:15 ` [PATCH v3 15/15] accel/kvm: move kvm_update_guest_debug to inline stub Alex Bennée
2022-10-19 10:53 ` Philippe Mathieu-Daudé
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=dbcf971a-54c9-7778-06af-16837e8cb1fc@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.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 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).