From: "Alex Bennée" <alex.bennee@linaro.org>
To: Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com>
Cc: "Jim Shu" <jim.shu@sifive.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Richard Henderson" <richard.henderson@linaro.org>,
qemu-devel@nongnu.org, qemu-riscv@nongnu.org,
"Michael S. Tsirkin" <mst@redhat.com>,
"Peter Xu" <peterx@redhat.com>,
"David Hildenbrand" <david@kernel.org>,
"Clément Mathieu--Drif" <clement.mathieu--drif@eviden.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Clément Chigot" <chigot@adacore.com>,
"Frederic Konrad" <konrad.frederic@yahoo.fr>,
philmd@mailo.com
Subject: Re: [PATCH] exec: Add RISC-V WorldGuard WID field to MemTxAttrs
Date: Wed, 02 Dec 2026 11:48:01 +0000 [thread overview]
Message-ID: <87jylr3nv2.fsf@draig.linaro.org> (raw)
In-Reply-To: <de3aa31c-ae07-4e6b-adad-630e7e6fd74c@oss.qualcomm.com> (Daniel Henrique Barboza's message of "Wed, 2 Dec 2026 07:17:52 -0300")
Daniel Henrique Barboza <daniel.barboza@oss.qualcomm.com> writes:
> Hi everyone,
>
>
> Sorry for arriving 5 months late. From what I read from these discussions this
> patch has no blockers and all we need is probably a rebase and a resend as soon
> as the next merge window opens. Is this a fair understanding?
I think the general idea is ok, did you get a chance to look at my
previous approach that I mentioned up-thread?
>
> Thanks,
> Daniel
>
>
> On 7/21/2026 3:36 AM, Jim Shu wrote:
>> On Fri, Jul 17, 2026 at 4:59 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>>>
>>> On Thu, 16 Jul 2026 at 04:12, Jim Shu <jim.shu@sifive.com> wrote:
>>>>
>>
>>>>
>>>> Thanks for mentioning it! I think re-use requester_id is better.
>>>> Then, I think we only need a boolean flag `src_is_cpu` and we can
>>>> rename it to `requester_is_cpu` to match the naming of `requester_id`.
>>>
>>> But, what do you now want it for? If we put the world ID in the
>>> MemTxAttrs, do you still need a CPU ID? (There are some situations
>>> where it might be useful, but if we don't need it right now we
>>> shouldn't put doing that rework in the path of implementing
>>> the worldguard work you want to do.)
>> Yes, Adding the world ID to MemTxAttrs is totally enough for me and
>> the worldguard patch series.
>> I just explain the idea if someone still wants to use CPU ID.
>> Sorry for the confusion.
>> I will try to add a field that combines ARM secure/space and RISC-V
>> World ID bits in the next series.
>>
>>>>>>> The whole plan is to add the following 2 fields
>>>>>>> ::
>>>>>>> unsigned int src_is_cpu:1;
>>>>>>> uint16_t src_cpu_id;
>>>>>>>
>>>>>>> src_cpu_id is the CPU ID from 'CPUState->cpu_index'. src_is_cpu is a boolean flag to check if the transaction is from CPU.
>>>>>>>
>>>>>>> Moreover, I think this idea is extensible. DMA device
>>>>>>> transactions can also have security attributes like world_id.
>>>>>>> We can also add src_device field to 'MemTxAttr' to store the
>>>>>>> 'DeviceState *', so we can get the DeviceState from MemTxAttr
>>>>>>> to get security attributes. If 'DeviceState *' is too large to
>>>>>>> add to 'MemTxAttr', re-use requester_id as DMA device ID is
>>>>>>> another possible method to support this.
>>>>>>
>>>>>> I don't think that having the thing that receives the memory
>>>>>> transaction get or get hold of a pointer to the source of the
>>>>>> transaction that it then uses to get the world ID is a good idea.
>>>>>> (Especially not putting a DeviceState* into MemTxAttrs: the
>>>>>> size of the type needs to be kept small so we can conveniently
>>>>>> pass it around by value: we currently assert that it is 8 bytes.)
>>>>
>>>> OK, I think store the DMA device ID in the `requester_id` is another
>>>> way to keep the small size.
>>>> However, IIUC, the current SysbusDevice doesn't have the concept of a
>>>> device ID. We need to add an additional device ID to the device to
>>>> support this idea.
>>>
>>> What exactly is it that you need a device ID for? Earlier you
>>> suggest that you would want it to get the world ID -- but we
>>> should just put the world ID directly in the MemTxAttrs.
>> Same as previous responce. Adding the world ID is enough for me.
>> Sorry for the confusion.
>> Thanks,
>> Jim
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2026-12-02 11:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-09 11:58 [PATCH] exec: Add RISC-V WorldGuard WID field to MemTxAttrs Jim Shu
2026-02-10 0:25 ` Richard Henderson
2026-03-18 4:40 ` Jim Shu
2026-03-18 6:42 ` Philippe Mathieu-Daudé
2026-07-15 6:52 ` Jim Shu
2026-07-15 9:57 ` Peter Maydell
2026-07-16 2:47 ` Jim Shu
2026-07-16 3:12 ` Jim Shu
2026-07-17 8:59 ` Peter Maydell
2026-07-21 6:36 ` Jim Shu
2026-12-02 10:17 ` Daniel Henrique Barboza
2026-12-02 11:48 ` Alex Bennée [this message]
2026-07-17 10:08 ` Alex Bennée
2026-07-17 11:14 ` Peter Maydell
2026-07-17 14:09 ` Alex Bennée
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=87jylr3nv2.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=chigot@adacore.com \
--cc=clement.mathieu--drif@eviden.com \
--cc=daniel.barboza@oss.qualcomm.com \
--cc=david@kernel.org \
--cc=edgar.iglesias@gmail.com \
--cc=jim.shu@sifive.com \
--cc=konrad.frederic@yahoo.fr \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=philmd@mailo.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=zhao1.liu@intel.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 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.