qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] docs/devel: memory: Document MemoryRegionOps requirement


From: David Hildenbrand
Subject: Re: [PATCH] docs/devel: memory: Document MemoryRegionOps requirement
Date: Mon, 6 Sep 2021 14:25:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 06.09.21 14:20, Bin Meng wrote:
It's been a requirement that at least one function pointer for read
and one for write are provided ever since the MemoryRegion APIs were
introduced in 2012.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---

  docs/devel/memory.rst | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/docs/devel/memory.rst b/docs/devel/memory.rst
index 5dc8a12682..7b589b21d2 100644
--- a/docs/devel/memory.rst
+++ b/docs/devel/memory.rst
@@ -344,6 +344,11 @@ based on the attributes used for the memory transaction, 
or need
  to be able to respond that the access should provoke a bus error
  rather than completing successfully; those devices can use the
  ->read_with_attrs() and ->write_with_attrs() callbacks instead.
+The requirement for a device's MemoryRegionOps is that at least
+one callback for read and one for write are provided. If both
+->read() and ->read_with_attrs() are provided, the plain ->read()
+version takes precedence over the with_attrs() version. So does
+the write callback.

Reviewed-by: David Hildenbrand <david@redhat.com>

--
Thanks,

David / dhildenb




reply via email to

[Prev in Thread] Current Thread [Next in Thread]