All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: virtio-comment@lists.oasis-open.org
Cc: David Hildenbrand <david@redhat.com>,
	Hui Zhu <teawater@gmail.com>,
	Marek Kedzierski <mkedzier@redhat.com>,
	Sebastien Boeuf <sebastien.boeuf@intel.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Pankaj Gupta <pankaj.gupta.linux@gmail.com>,
	Wei Yang <richard.weiyang@linux.alibaba.com>
Subject: [PATCH RESEND v2 1/5] virtio-mem: simplify statements that express unexpected behavior on memory access
Date: Mon, 20 Sep 2021 15:46:49 +0200	[thread overview]
Message-ID: <20210920134653.16412-2-david@redhat.com> (raw)
In-Reply-To: <20210920134653.16412-1-david@redhat.com>

Some statements express that the device MAY allow access to memory inside
unplugged memory blocks, although it's really just unexpected behavior and
conforming drivers MUST NOT perform such access.

Clarify that, and move the special CPU vs. DMA handling for some
unplugged memory blocks to the driver section instead.

While at it, start rephrasing our statements to clarify and prepare for
further changes.

Signed-off-by: David Hildenbrand <david@redhat.com>
---
 virtio-mem.tex | 23 +++++++++--------------
 1 file changed, 9 insertions(+), 14 deletions(-)

diff --git a/virtio-mem.tex b/virtio-mem.tex
index 62a1d02..f0c5970 100644
--- a/virtio-mem.tex
+++ b/virtio-mem.tex
@@ -220,8 +220,11 @@ \subsection{Device Operation}\label{sec:Device Types / Memory Device / Device Op
 The driver MUST NOT read from unplugged memory blocks outside
 \field{usable_region_size}.
 
-The driver SHOULD NOT read from unplugged memory blocks inside
-\field{usable_region_size}.
+The driver MUST NOT read memory of unplugged memory blocks inside
+\field{usable_region_size} via DMA.
+
+The driver SHOULD NOT read memory of unplugged memory blocks inside
+\field{usable_region_size} via the CPU.
 
 The driver MUST NOT request to unplug memory blocks while the memory is
 still in use.
@@ -246,18 +249,10 @@ \subsection{Device Operation}\label{sec:Device Types / Memory Device / Device Op
 
 The device MUST NOT change the content of plugged memory blocks.
 
-The device MUST allow the CPU to read from unplugged memory blocks inside
-the usable device-managed region. \footnote{To allow for simplified dumping of
-memory. The CPU is expected to copy such memory to another location before
-starting DMA.}
-
-The device MAY allow to read from unplugged memory blocks inside the
-usable device-managed region via DMA.
-
-The device MAY allow to read from unplugged memory blocks outside
-the usable device-managed region.
-
-The device MAY allow to write to unplugged memory blocks.
+The device MUST allow the driver to read memory of unplugged memory blocks
+inside \field{usable_region_size} via the CPU. \footnote{To allow for simplified
+dumping of memory. The CPU is expected to copy such memory to another location
+before starting DMA.}
 
 The device MAY change the state of memory blocks during system resets.
 
-- 
2.31.1


  reply	other threads:[~2021-09-20 13:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20 13:46 [PATCH RESEND v2 0/5] virtio-mem: VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE and interaction with memory properties David Hildenbrand
2021-09-20 13:46 ` David Hildenbrand [this message]
2021-09-23 11:55   ` [virtio-comment] Re: [PATCH RESEND v2 1/5] virtio-mem: simplify statements that express unexpected behavior on memory access Cornelia Huck
2021-09-20 13:46 ` [PATCH RESEND v2 2/5] virtio-mem: rephrase remaining memory access statements David Hildenbrand
2021-09-23 11:56   ` [virtio-comment] " Cornelia Huck
2021-09-20 13:46 ` [virtio-comment] [PATCH RESEND v2 3/5] virtio-mem: document basic memory access to plugged memory blocks David Hildenbrand
2021-09-23 12:02   ` Cornelia Huck
2021-09-20 13:46 ` [PATCH RESEND v2 4/5] virtio-mem: introduce VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE David Hildenbrand
2021-09-23 12:10   ` [virtio-comment] " Cornelia Huck
2021-09-20 13:46 ` [PATCH RESEND v2 5/5] virtio-mem: describe interaction with memory properties David Hildenbrand
2021-09-23 15:29   ` [virtio-comment] " Cornelia Huck
2021-09-23 15:31 ` [virtio-comment] Re: [PATCH RESEND v2 0/5] virtio-mem: VIRTIO_MEM_F_UNPLUGGED_INACCESSIBLE and " Cornelia Huck
2021-09-24 10:01   ` David Hildenbrand
2021-10-06 10:59     ` [virtio-comment] " Cornelia Huck
2021-10-06 11:00       ` David Hildenbrand
2021-10-06 11:09         ` [virtio-comment] " Cornelia Huck
2021-10-06 12:48 ` David Hildenbrand

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=20210920134653.16412-2-david@redhat.com \
    --to=david@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=mkedzier@redhat.com \
    --cc=mst@redhat.com \
    --cc=pankaj.gupta.linux@gmail.com \
    --cc=pasic@linux.ibm.com \
    --cc=richard.weiyang@linux.alibaba.com \
    --cc=sebastien.boeuf@intel.com \
    --cc=teawater@gmail.com \
    --cc=virtio-comment@lists.oasis-open.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.