qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: qemu-devel@nongnu.org, Wei Liu <wei.liu2@citrix.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Anthony Perard <anthony.perard@citrix.com>,
	xen-devel@lists.xensource.com
Subject: Re: [Qemu-devel] [PATCH] xenfb: Fix overzealous ring test
Date: Mon, 18 Apr 2016 15:40:15 +0100	[thread overview]
Message-ID: <20160418144015.GA26228@citrix.com> (raw)
In-Reply-To: <1460983308-28000-1-git-send-email-samuel.thibault@ens-lyon.org>

On Mon, Apr 18, 2016 at 02:41:48PM +0200, Samuel Thibault wrote:
> From: Wei Liu <wei.liu2@citrix.com>
> 
> pv-grub booting got broken with recent qemu-xen, due to
> ac0487e1d2ae811cd4d035741a109a4ecfb013f1 ('xenfb.c: avoid expensive loops
> when prod <= out_cons')
> 
> prod - out_cons can actually be XENFB_OUT_RING_LEN when the ring is exactly
> full, this is a normal condition and should not be excluded.
> 
> From: Wei Liu <wei.liu2@citrix.com>
> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> Tested-by: Hao Xudong <xudong.hao@intel.com>

Hi Samuel,

This patch is already queued by Stefano. After it has been applied
upstream we will backport it to our own tree.

Wei.

> ---
>  hw/display/xenfb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
> index 40b096a..9866dfd 100644
> --- a/hw/display/xenfb.c
> +++ b/hw/display/xenfb.c
> @@ -775,7 +775,7 @@ static void xenfb_handle_events(struct XenFB *xenfb)
>  
>      prod = page->out_prod;
>      out_cons = page->out_cons;
> -    if (prod - out_cons >= XENFB_OUT_RING_LEN) {
> +    if (prod - out_cons > XENFB_OUT_RING_LEN) {
>          return;
>      }
>      xen_rmb();		/* ensure we see ring contents up to prod */
> -- 
> 2.8.0.rc3
> 

  reply	other threads:[~2016-04-18 14:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-18 12:41 [Qemu-devel] [PATCH] xenfb: Fix overzealous ring test Samuel Thibault
2016-04-18 14:40 ` Wei Liu [this message]
2016-04-18 14:54   ` Samuel Thibault

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=20160418144015.GA26228@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xensource.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).