OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-comment message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-comment] [PATCH v1] virtio-mem: minor clarification regarding read-access to unplugged blocks


On 16.11.20 20:16, David Hildenbrand wrote:
> Let's clarify that we don't expect all DMA to work with unplugged blocks.
> We really only give guarantees when reading from unplugged memory blocks
> via the CPU, e.g., as done by Linux when creating a system dump via
> kdump: the new kernel will copy the content of the old (crashed) kernel
> via the CPU to user space, from where it will find its final destination
> inside the dump file. Note that dumping via makedumpfile under Linux will
> avoid reading unplugged blocks completely.
> 
> This is a preparation for device passthrough to VMs, whereby such
> dedicated devices might not be able to read from unplugged memory blocks.
> 
> Let's document that this scenario is possible, and why this handling is
> in place at all.
> 
> Cc: teawater <teawaterz@linux.alibaba.com>
> Cc: Marek Kedzierski <mkedzier@redhat.com>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Cornelia Huck <cohuck@redhat.com>
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  virtio-mem.tex | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/virtio-mem.tex b/virtio-mem.tex
> index 85cfb61..62a1d02 100644
> --- a/virtio-mem.tex
> +++ b/virtio-mem.tex
> @@ -246,8 +246,13 @@ \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 to read from unplugged memory blocks inside
> -the usable device-managed region.
> +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.
> 

Requesting a vote, thanks!

Fixes: https://github.com/oasis-tcs/virtio-spec/issues/91

-- 
Thanks,

David / dhildenb



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]