All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel]  virtio: Question on VRING_DESC_F_WRITE flag
@ 2015-05-13 19:16 Subhashini Venkataraman
  2015-05-18 13:44 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Subhashini Venkataraman @ 2015-05-13 19:16 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 516 bytes --]

Hi,

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.

Is there any issue or concern because of which it was not considered?

If this is not the right mailing list to raise this question,  any pointers would help.

Thanks,
Subha


[-- Attachment #2: Type: text/html, Size: 2546 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] virtio: Question on VRING_DESC_F_WRITE flag
  2015-05-13 19:16 [Qemu-devel] virtio: Question on VRING_DESC_F_WRITE flag Subhashini Venkataraman
@ 2015-05-18 13:44 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2015-05-18 13:44 UTC (permalink / raw)
  To: Subhashini Venkataraman; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 892 bytes --]

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)]

or

 [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.

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-18 13:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-13 19:16 [Qemu-devel] virtio: Question on VRING_DESC_F_WRITE flag Subhashini Venkataraman
2015-05-18 13:44 ` Stefan Hajnoczi

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.