[PATCH 1/3] shared-mem: introduce page alignment restrictions

Sergio Lopez
2025-02-17T11:52:35Z

Add a subsection for page alignment restrictions and introduce the
VIRTIO_F_SHM_PAGE_SIZE feature bit.

Signed-off-by: Sergio Lopez <slp@redhat.com>
---
content.tex | 3 +++
shared-mem.tex | 7 +++++++
2 files changed, 10 insertions(+)

diff --git a/content.tex b/content.tex
index c17ffa6..575065d 100644
--- a/content.tex
+++ b/content.tex
@@ -872,6 +872,9 @@ \chapter{Reserved Feature Bits}\label{sec:Reserved Feature Bits}
\ref{devicenormative:Basic Facilities of a Virtio Device / Feature Bits} for
handling features reserved for future use.

+ \item[VIRTIO_F_SHM_PAGE_SIZE(42)] This feature indicates that the device
+ transport provides information about the supported page size.
+
\end{description}

\drivernormative{\section}{Reserved Feature Bits}{Reserved Feature Bits}
diff --git a/shared-mem.tex b/shared-mem.tex
index 6e6f6c4..dd90cb7 100644
--- a/shared-mem.tex
+++ b/shared-mem.tex
@@ -34,6 +34,13 @@ \subsection{Addressing within regions}\label{sec:Basic Facilities of a Virtio De
The \field{shmid} may be explicit or may be inferred from the
context of the reference.

+\subsection{Page alignment restrictions}\label{sec:Basic Facilities of a Virtio Device / Shared Memory Regions / Page alignment restrictions}
+
+If VIRTIO_F_SHM_PAGE_SIZE has been negotiated, when requesting
+the device to map memory into a shared memory region, the driver
+MUST obtain the page size information from the transport and honor
+the page alignment constrains derived from that page size.
+
\devicenormative{\subsection}{Shared Memory Regions}{Basic Facilities of a Virtio
Device / Shared Memory Regions}
Shared memory regions MUST NOT expose shared memory regions which
--
2.48.1