xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Hao, Xudong" <xudong.hao@intel.com>
To: Wei Liu <wei.liu2@citrix.com>,
	Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: "samuel.thibault@ens-lyon.org" <samuel.thibault@ens-lyon.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	"stefano.stabellini@eu.citrix.com"
	<stefano.stabellini@eu.citrix.com>
Subject: Re: pv-grub guest booting fail with recent qemu-xen
Date: Wed, 30 Mar 2016 02:05:28 +0000	[thread overview]
Message-ID: <B8376D2DEA074F45BA033984477C453E03440296@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20160329165803.GB1024@citrix.com>

> -----Original Message-----
> From: Wei Liu [mailto:wei.liu2@citrix.com]
> Sent: Wednesday, March 30, 2016 12:58 AM
> To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Hao, Xudong <xudong.hao@intel.com>; wei.liu2@citrix.com;
> samuel.thibault@ens-lyon.org; stefano.stabellini@eu.citrix.com; xen-
> devel@lists.xen.org
> Subject: Re: [Xen-devel] pv-grub guest booting fail with recent qemu-xen
> 
> On Mon, Mar 28, 2016 at 09:21:14AM -0400, Konrad Rzeszutek Wilk wrote:
> > On Mon, Mar 28, 2016 at 02:03:35AM +0000, Hao, Xudong wrote:
> > > > -----Original Message-----
> > > > From: Xen-devel [mailto:xen-devel-bounces@lists.xen.org] On Behalf
> > > > Of Konrad Rzeszutek Wilk
> > > > Sent: Saturday, March 26, 2016 2:58 AM
> > > > To: Hao, Xudong <xudong.hao@intel.com>
> > > > Cc: stefano.stabellini@eu.citrix.com; xen-devel@lists.xen.org
> > > > Subject: Re: [Xen-devel] pv-grub guest booting fail with recent
> > > > qemu-xen
> > > >
> > > > On Wed, Mar 02, 2016 at 07:16:40AM +0000, Hao, Xudong wrote:
> > > > > Hi,
> > > > > For Xen upstream master branch with commit 1949868d, After
> > > > > updating qemu-
> > > > xen version from fcf6ac57 to 2ce1d30e, booting a pv-grub guest will fail.
> >
> 
> pv-grub should be using qemu-traditional, not qemu-xen
> 

Never hear this limitation.

> The log message you posted in your original post doesn't seem to reveal much.
> Can you have a look at relevant QEMU logs under /var/log/xen?

There is not valuable qemu log, only one line: "qemu: terminating on signal 1 from pid 36642".

Bisect and the bad commit of qemu-xen is:

commit 2ce1d30ef2858dfed72a281872579e5a26b090dd
Author: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Date:   Wed Jan 6 16:32:22 2016 +0000

    xenfb.c: avoid expensive loops when prod <= out_cons

    If the frontend sets out_cons to a value higher than out_prod, it will
    cause xenfb_handle_events to loop about 2^32 times. Avoid that by using
    better checks at the beginning of the function.

    upstream-commit-id: ac0487e1d2ae811cd4d035741a109a4ecfb013f1

    Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
    Reported-by: Ling Liu <liuling-it@360.cn>

diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
index 4e2a27a..8eb3046 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -789,8 +789,9 @@ static void xenfb_handle_events(struct XenFB *xenfb)

     prod = page->out_prod;
     out_cons = page->out_cons;
-    if (prod == out_cons)
-       return;
+    if (prod - out_cons >= XENFB_OUT_RING_LEN) {
+        return;
+    }
     xen_rmb();         /* ensure we see ring contents up to prod */
     for (cons = out_cons; cons != prod; cons++) {
        union xenfb_out_event *event = &XENFB_OUT_RING_REF(page, cons);


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

  reply	other threads:[~2016-03-30  2:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-02  7:16 pv-grub guest booting fail with recent qemu-xen Hao, Xudong
2016-03-25 18:57 ` Konrad Rzeszutek Wilk
2016-03-28  2:03   ` Hao, Xudong
2016-03-28 13:21     ` Konrad Rzeszutek Wilk
2016-03-29  1:44       ` Hao, Xudong
2016-03-29 16:58       ` Wei Liu
2016-03-30  2:05         ` Hao, Xudong [this message]
2016-04-01 15:54           ` Konrad Rzeszutek Wilk
2016-04-05  1:26             ` Hao, Xudong
2016-04-05 15:41               ` Wei Liu
2016-04-10 20:14                 ` Samuel Thibault
2016-04-11 10:54                   ` Wei Liu
2016-04-11 11:52                     ` Wei Liu
2016-04-12  1:56                     ` Hao, Xudong
2016-04-12  8:28                       ` Wei Liu

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=B8376D2DEA074F45BA033984477C453E03440296@shsmsx102.ccr.corp.intel.com \
    --to=xudong.hao@intel.com \
    --cc=konrad.wilk@oracle.com \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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 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).