All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <sstabellini@kernel.org>
To: Jan Beulich <JBeulich@suse.com>
Cc: anthony.perard@citrix.com,
	xen-devel <xen-devel@lists.xenproject.org>,
	Paul Durrant <paul.durrant@citrix.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	qemu-devel@nongnu.org
Subject: Re: [PATCH v2 1/3] xen: fix quad word bufioreq handling
Date: Mon, 28 Nov 2016 11:21:49 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.10.1611281121400.21858__12121.5439787649$1480360983$gmane$org@sstabellini-ThinkPad-X260> (raw)
In-Reply-To: <58381B15020000780012226B@prv-mh.provo.novell.com>

On Fri, 25 Nov 2016, Jan Beulich wrote:
> We should not consume the second slot if it didn't get written yet.
> Normal writers - i.e. Xen - would not update write_pointer between the
> two writes, but the page may get fiddled with by the guest itself, and
> we're better off avoiding to enter an infinite loop in that case.
> 
> Reported-by: yanghongke <yanghongke@huawei.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

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


> v2: Bail (using hw_error()) instead of just breaking the loop.
> 
> --- a/xen-hvm.c
> +++ b/xen-hvm.c
> @@ -1021,6 +1021,9 @@ static int handle_buffered_iopage(XenIOS
>          xen_rmb();
>          qw = (req.size == 8);
>          if (qw) {
> +            if (rdptr + 1 == wrptr) {
> +                hw_error("Incomplete quad word buffered ioreq");
> +            }
>              buf_req = &buf_page->buf_ioreq[(rdptr + 1) %
>                                             IOREQ_BUFFER_SLOT_NUM];
>              req.data |= ((uint64_t)buf_req->data) << 32;
> 
> 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2016-11-28 19:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25 10:01 [Qemu-devel] [PATCH v2 0/3] xen: XSA-197 follow-ups Jan Beulich
2016-11-25 10:05 ` [Qemu-devel] [PATCH v2 1/3] xen: fix quad word bufioreq handling Jan Beulich
2016-11-25 10:08   ` Paul Durrant
2016-11-25 10:08     ` Paul Durrant
2016-11-28 19:21   ` Stefano Stabellini [this message]
2016-11-28 19:21   ` [Qemu-devel] " Stefano Stabellini
2016-11-25 10:05 ` Jan Beulich
2016-11-25 10:06 ` [Qemu-devel] [PATCH v2 2/3] xen: slightly simplify " Jan Beulich
2016-11-25 10:06   ` Jan Beulich
2016-11-28 19:24   ` Stefano Stabellini
2016-11-28 19:24   ` [Qemu-devel] " Stefano Stabellini
2016-11-25 10:06 ` [Qemu-devel] [PATCH v2 3/3] xen: ignore direction in " Jan Beulich
2016-11-25 10:06   ` Jan Beulich
2016-11-25 11:06 ` [PATCH v2 0/3] xen: XSA-197 follow-ups Jan Beulich

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.1611281121400.21858__12121.5439787649$1480360983$gmane$org@sstabellini-ThinkPad-X260' \
    --to=sstabellini@kernel.org \
    --cc=JBeulich@suse.com \
    --cc=anthony.perard@citrix.com \
    --cc=paul.durrant@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.