From: "Michael S. Tsirkin" <mst@redhat.com>
To: Avi Kivity <avi@redhat.com>
Cc: Sasha Levin <levinsasha928@gmail.com>,
kvm@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
Marcelo Tosatti <mtosatti@redhat.com>,
Pekka Enberg <penberg@kernel.org>
Subject: Re: [PATCH] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_PIPE
Date: Mon, 4 Jul 2011 13:49:05 +0300 [thread overview]
Message-ID: <20110704104905.GC11386@redhat.com> (raw)
In-Reply-To: <4E1195A1.10103@redhat.com>
On Mon, Jul 04, 2011 at 01:27:45PM +0300, Avi Kivity wrote:
> I'd like to be able to forward an entire PCI BAR
> over a pipe. That means sending the address/data/length tuple, and
> both read and write support.
>
> >> Is the write guaranteed atomic? We probably need serialization here.
> >
> >afaik vfs_write is just a wrapper to the write() function of the
> >underlying fs so it should be atomic, no?
>
> write() isn't atomic in general. It is for pipes under certain
> circumstances, but there is no guarantee that the circumstances
> apply, or that the fd is in fact a pipe.
So the above makes it tricky to pass structured data
which is > 1 byte in size over a pipe. We could build an in-kernel API
(not sure how useful it would be for userspace) to do
an atomic write or fail (instead of a partial write),
but we'll still need to handle failures.
--
MST
next prev parent reply other threads:[~2011-07-04 10:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-03 17:04 [PATCH] ioeventfd: Introduce KVM_IOEVENTFD_FLAG_PIPE Sasha Levin
2011-07-03 17:16 ` Avi Kivity
2011-07-03 17:44 ` Sasha Levin
2011-07-03 17:57 ` Pekka Enberg
2011-07-04 10:27 ` Avi Kivity
2011-07-04 10:49 ` Michael S. Tsirkin [this message]
2011-07-04 10:57 ` Avi Kivity
2011-07-04 14:38 ` Sasha Levin
2011-07-04 14:45 ` Avi Kivity
2011-07-04 14:52 ` Sasha Levin
2011-07-04 14:59 ` Avi Kivity
2011-07-06 4:37 ` Sasha Levin
2011-07-06 11:30 ` Avi Kivity
2011-07-04 10:32 ` Michael S. Tsirkin
2011-07-04 10:45 ` Avi Kivity
2011-07-04 11:07 ` Michael S. Tsirkin
2011-07-04 11:19 ` Avi Kivity
2011-07-04 11:45 ` Michael S. Tsirkin
2011-07-04 11:49 ` Avi Kivity
2011-07-04 12:12 ` Michael S. Tsirkin
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=20110704104905.GC11386@redhat.com \
--to=mst@redhat.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=levinsasha928@gmail.com \
--cc=mingo@elte.hu \
--cc=mtosatti@redhat.com \
--cc=penberg@kernel.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.