From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Alistair Francis" <alistair.francis@wdc.com>,
"Bob Eshleman" <bobbyeshleman@gmail.com>,
"Connor Davis" <connojdavis@gmail.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v1 2/6] xen/riscv: introduce things necessary for p2m initialization
Date: Thu, 5 Jun 2025 17:28:37 +0200 [thread overview]
Message-ID: <3b9cc332-5b39-40dc-afc4-40f790abd0ed@gmail.com> (raw)
In-Reply-To: <c06d8833-dafb-430e-a9d5-f9baedecea40@suse.com>
[-- Attachment #1: Type: text/plain, Size: 1201 bytes --]
On 6/5/25 4:19 PM, Jan Beulich wrote:
>>>> Won't be enough to flushing of guest TLB only during context switch?
>>> "only" is interesting here. Context switches are a relatively frequent
>>> operation, which in addition you want to be fast. If a flush is necessary
>>> there for correctness (e.g. when VMIDs aren't in use), you have to do it
>>> there. But if you can flush less frequently without violating correctness,
>>> you'd almost always want to use such an opportunity.
>> Then it is better to introduce VMID now, it seems it's only one place where
>> it should be set, when hgatp is initialized.
>>
>> Does Xen have some framework to work with VMID?
> That's all arch-specific, I think.
Probably, I used incorrect words to express what I want. I wrote about allocation/freeing
of VMIDs. Basically something similar to what Arm has (|p2m_vmid_allocator_init(), ||p2m_alloc_vmid(), ||p2m_free_vmid|):
https://gitlab.com/xen-project/xen/-/blob/staging/xen/arch/arm/p2m.c?ref_type=heads#L271
It seems like it is not very arch-specific, at the moment.
But, likely, RISC-V will need to do an update|p2m_alloc_vmid(), which will do p2m's TLB flush when overflow of VMIDs
happen. ~ Oleksii |
[-- Attachment #2: Type: text/html, Size: 2085 bytes --]
next prev parent reply other threads:[~2025-06-05 15:28 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-09 15:57 [PATCH v1 0/6] xen/riscv: introduce p2m functionality Oleksii Kurochko
2025-05-09 15:57 ` [PATCH v1 1/6] xen/riscv: add inclusion of xen/bitops.h to asm/cmpxchg.h Oleksii Kurochko
2025-05-09 16:00 ` Andrew Cooper
2025-05-09 15:57 ` [PATCH v1 2/6] xen/riscv: introduce things necessary for p2m initialization Oleksii Kurochko
2025-05-09 16:14 ` Andrew Cooper
2025-05-12 9:24 ` Oleksii Kurochko
2025-05-12 9:33 ` Oleksii Kurochko
2025-05-20 13:47 ` Jan Beulich
2025-05-20 13:37 ` Jan Beulich
2025-05-22 15:53 ` Oleksii Kurochko
2025-05-22 16:09 ` Jan Beulich
2025-05-23 9:44 ` Oleksii Kurochko
2025-06-02 11:04 ` Jan Beulich
2025-06-05 14:10 ` Oleksii Kurochko
2025-06-05 14:19 ` Jan Beulich
2025-06-05 15:28 ` Oleksii Kurochko [this message]
2025-05-09 15:57 ` [PATCH v1 3/6] xen/riscv: construct the P2M pages pool for guests Oleksii Kurochko
2025-05-20 14:38 ` Jan Beulich
2025-05-23 10:27 ` Oleksii Kurochko
2025-06-02 11:08 ` Jan Beulich
2025-06-05 14:22 ` Oleksii Kurochko
2025-05-09 15:57 ` [PATCH v1 4/6] xen/riscv: define pt_t and pt_walk_t structures Oleksii Kurochko
2025-05-20 15:04 ` Jan Beulich
2025-05-23 10:48 ` Oleksii Kurochko
2025-05-09 15:57 ` [PATCH v1 5/6] xen/riscv: add new p2m types and helper macros for type classification Oleksii Kurochko
2025-05-20 15:11 ` Jan Beulich
2025-05-23 11:34 ` Oleksii Kurochko
2025-06-02 11:12 ` Jan Beulich
2025-05-09 15:57 ` [PATCH v1 6/6] xen/riscv: implement p2m mapping functionality Oleksii Kurochko
2025-05-20 15:16 ` Jan Beulich
2025-05-23 11:47 ` Oleksii Kurochko
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=3b9cc332-5b39-40dc-afc4-40f790abd0ed@gmail.com \
--to=oleksii.kurochko@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=bobbyeshleman@gmail.com \
--cc=connojdavis@gmail.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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.