[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 08/17] xen/riscv: add new p2m types and helper macros for type classification
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
- Date: Mon, 30 Jun 2025 16:33:16 +0200
- Cc: Alistair Francis <alistair.francis@xxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
- Delivery-date: Mon, 30 Jun 2025 14:33:26 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 6/26/25 4:59 PM, Jan Beulich wrote:
On 10.06.2025 15:05, Oleksii Kurochko wrote:
--- a/xen/arch/riscv/include/asm/p2m.h
+++ b/xen/arch/riscv/include/asm/p2m.h
@@ -61,8 +61,28 @@ struct p2m_domain {
typedef enum {
p2m_invalid = 0, /* Nothing mapped here */
p2m_ram_rw, /* Normal read/write domain RAM */
+ p2m_ram_ro, /* Read-only; writes are silently dropped */
As indicated before - this type should be added when the special handling that
it requires is also introduced.
Perhaps, I missed that. I will drop this type for now.
+ p2m_mmio_direct_dev,/* Read/write mapping of genuine Device MMIO area */
What's the _dev suffix indicating here?
It indicates that it is device memory, probably, it isn't so necessary in case of RISC-V as
spec doesn't use such terminology. In RISC-V there is only available IO, NC. And we are
using PTE_PBMT_IO for p2m_mmio_direct_dev.
Maybe it would be better just to rename s/p2m_mmio_direct_dev/p2m_mmio_direct_io.
~ Oleksii
|