[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] pv-grub guest booting fail with recent qemu-xen



> -----Original Message-----
> From: Wei Liu [mailto:wei.liu2@xxxxxxxxxx]
> Sent: Wednesday, March 30, 2016 12:58 AM
> To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
> Cc: Hao, Xudong <xudong.hao@xxxxxxxxx>; wei.liu2@xxxxxxxxxx;
> samuel.thibault@xxxxxxxxxxxx; stefano.stabellini@xxxxxxxxxxxxx; xen-
> devel@xxxxxxxxxxxxx
> 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@xxxxxxxxxxxxx] On Behalf
> > > > Of Konrad Rzeszutek Wilk
> > > > Sent: Saturday, March 26, 2016 2:58 AM
> > > > To: Hao, Xudong <xudong.hao@xxxxxxxxx>
> > > > Cc: stefano.stabellini@xxxxxxxxxxxxx; xen-devel@xxxxxxxxxxxxx
> > > > 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@xxxxxxxxxxxxx>
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@xxxxxxxxxxxxx>
    Reported-by: Ling Liu <liuling-it@xxxxxx>

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@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.