[Top][All Lists]

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

Re: [Qemu-devel] virtio: Question on VRING_DESC_F_WRITE flag

From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] virtio: Question on VRING_DESC_F_WRITE flag
Date: Mon, 18 May 2015 14:44:52 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Wed, May 13, 2015 at 07:16:13PM +0000, Subhashini Venkataraman wrote:
> I have a question on VRING_DESC_F_WRITE flag.  As per the specifications, if 
> this flag is set, then the corresponding buffer pointed by the descriptor is 
> Write only, otherwise Read Only.  I am trying to understand why there is no 
> READ_AND_WRITE option, i.e. a buffer could be Read by device emulation and 
> written back into.

All virtio devices are designed so that descriptors are read-only or
write-only.  A typical request looks like this:

 [header (RO)][data (RO)][status (WO)]


 [header (RO)][data (WO)][status (WO)]

Not sure what the original requirement for this design was, but the
read-only/write-only approach means that buffers could be sent over a
transport (like a pipe or TCP socket).  If a buffer was read-write then
it would be involve sending back a modified copy, which is unnecessary.


Attachment: pgpvSr8IXHv_Q.pgp
Description: PGP signature

reply via email to

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