All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Paul Durrant <Paul.Durrant@citrix.com>
Cc: Jan Beulich <JBeulich@suse.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Anthony Perard <anthony.perard@citrix.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [Qemu-devel] [PATCH 3/3] xen: ignore direction in bufioreq handling
Date: Wed, 23 Nov 2016 10:16:01 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1611231015530.21858@sstabellini-ThinkPad-X260> (raw)
In-Reply-To: <7e0b7322c16149beb979155be9a175d8@AMSPEX02CL03.citrite.net>

On Wed, 23 Nov 2016, Paul Durrant wrote:
> > -----Original Message-----
> > From: Jan Beulich [mailto:JBeulich@suse.com]
> > Sent: 23 November 2016 09:25
> > To: qemu-devel@nongnu.org
> > Cc: Anthony Perard <anthony.perard@citrix.com>; Paul Durrant
> > <Paul.Durrant@citrix.com>; Stefano Stabellini <sstabellini@kernel.org>; xen-
> > devel <xen-devel@lists.xenproject.org>
> > Subject: [PATCH 3/3] xen: ignore direction in bufioreq handling
> > 
> > There's no way to communicate back read data, so only writes can ever
> > be usefully specified. Ignore the field, paving the road for eventually
> > re-using the bit for something else in a few (many?) years time.
> > 
> > Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> Reviewed-by: Paul Durrant <paul.durrant@citrix.com>

Acked-by: Stefano Stabellini <sstabellini@kernel.org>


> > 
> > --- a/xen-hvm.c
> > +++ b/xen-hvm.c
> > @@ -997,6 +997,7 @@ static int handle_buffered_iopage(XenIOS
> >      memset(&req, 0x00, sizeof(req));
> >      req.state = STATE_IOREQ_READY;
> >      req.count = 1;
> > +    req.dir = IOREQ_WRITE;
> > 
> >      for (;;) {
> >          uint32_t rdptr = buf_page->read_pointer, wrptr;
> > @@ -1014,7 +1015,6 @@ static int handle_buffered_iopage(XenIOS
> >          req.size = 1U << buf_req->size;
> >          req.addr = buf_req->addr;
> >          req.data = buf_req->data;
> > -        req.dir = buf_req->dir;
> >          req.type = buf_req->type;
> >          xen_rmb();
> >          qw = (req.size == 8);
> > @@ -1031,10 +1031,12 @@ static int handle_buffered_iopage(XenIOS
> >          handle_ioreq(state, &req);
> > 
> >          /* Only req.data may get updated by handle_ioreq(), albeit even that
> > -         * should not happen as such data would never make it to the guest.
> > +         * should not happen as such data would never make it to the guest (we
> > +         * can only usefully see writes here after all).
> >           */
> >          assert(req.state == STATE_IOREQ_READY);
> >          assert(req.count == 1);
> > +        assert(req.dir == IOREQ_WRITE);
> >          assert(!req.data_is_ptr);
> > 
> >          atomic_add(&buf_page->read_pointer, qw + 1);
> > 
> > 
> 

      parent reply	other threads:[~2016-11-23 18:16 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23  9:20 [Qemu-devel] [PATCH 0/3] xen: XSA-197 follow-ups Jan Beulich
2016-11-23  9:24 ` [PATCH 1/3] xen: fix quad word bufioreq handling Jan Beulich
2016-11-23  9:24 ` [Qemu-devel] " Jan Beulich
2016-11-23  9:48   ` Paul Durrant
2016-11-23 10:36     ` Jan Beulich
2016-11-23 10:36     ` [Qemu-devel] " Jan Beulich
2016-11-23 10:45       ` Paul Durrant
2016-11-23 11:28         ` Jan Beulich
2016-11-23 11:28         ` [Qemu-devel] " Jan Beulich
2016-11-23 18:01           ` Stefano Stabellini
2016-11-23 18:01             ` Stefano Stabellini
2016-11-23 10:45       ` Paul Durrant
2016-11-23  9:48   ` Paul Durrant
2016-11-23  9:24 ` [Qemu-devel] [PATCH 2/3] xen: slightly simplify " Jan Beulich
2016-11-23  9:24   ` Jan Beulich
2016-11-23  9:51   ` [Qemu-devel] " Paul Durrant
2016-11-23  9:51     ` Paul Durrant
2016-11-23 18:13   ` Stefano Stabellini
2016-11-23 18:13   ` [Qemu-devel] " Stefano Stabellini
2016-11-24 10:31     ` Jan Beulich
2016-11-24 10:31     ` Jan Beulich
2016-11-23  9:25 ` [Qemu-devel] [PATCH 3/3] xen: ignore direction in " Jan Beulich
2016-11-23  9:25   ` Jan Beulich
2016-11-23  9:55   ` [Qemu-devel] " Paul Durrant
2016-11-23  9:55     ` Paul Durrant
2016-11-23 18:16     ` Stefano Stabellini
2016-11-23 18:16     ` Stefano Stabellini [this message]

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=alpine.DEB.2.10.1611231015530.21858@sstabellini-ThinkPad-X260 \
    --to=sstabellini@kernel.org \
    --cc=JBeulich@suse.com \
    --cc=Paul.Durrant@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=xen-devel@lists.xenproject.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.