xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xenfb: Fix overzealous ring test
@ 2016-04-18 12:41 Samuel Thibault
  2016-04-18 14:40 ` Wei Liu
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Thibault @ 2016-04-18 12:41 UTC (permalink / raw)
  To: qemu-devel
  Cc: Anthony Perard, Samuel Thibault, Stefano Stabellini, Wei Liu,
	xen-devel

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

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

* Re: [PATCH] xenfb: Fix overzealous ring test
  2016-04-18 12:41 [PATCH] xenfb: Fix overzealous ring test Samuel Thibault
@ 2016-04-18 14:40 ` Wei Liu
  2016-04-18 14:54   ` Samuel Thibault
  0 siblings, 1 reply; 3+ messages in thread
From: Wei Liu @ 2016-04-18 14:40 UTC (permalink / raw)
  To: Samuel Thibault
  Cc: Anthony Perard, xen-devel, Stefano Stabellini, Wei Liu,
	qemu-devel

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
> 

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

* Re: [PATCH] xenfb: Fix overzealous ring test
  2016-04-18 14:40 ` Wei Liu
@ 2016-04-18 14:54   ` Samuel Thibault
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Thibault @ 2016-04-18 14:54 UTC (permalink / raw)
  To: Wei Liu; +Cc: Anthony Perard, xen-devel, Stefano Stabellini, qemu-devel

Wei Liu, on Mon 18 Apr 2016 15:40:15 +0100, wrote:
> This patch is already queued by Stefano.

Ah, sorry, I missed it.

Samuel

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

end of thread, other threads:[~2016-04-18 14:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-18 12:41 [PATCH] xenfb: Fix overzealous ring test Samuel Thibault
2016-04-18 14:40 ` Wei Liu
2016-04-18 14:54   ` Samuel Thibault

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