From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sanjeev Pandita Subject: Re: ARM64: XEN Domu not booting with the qemu qcow AARCH64 Ubuntu 15.04 disk Date: Wed, 3 Jun 2015 16:42:44 +0530 Message-ID: References: <8c250ccc118dd9a879d0509ef58030a6@mail.gmail.com> <556D67C0.7040809@canonical.com> <8ff64a3d1e94a099bbefe0efd4cdc5e5@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9114994592064583549==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: Pranavkumar Sawargaonkar , Ian Campbell , Stefan Bader , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org --===============9114994592064583549== Content-Type: multipart/alternative; boundary=089e011767f969d63c05179b23e9 --089e011767f969d63c05179b23e9 Content-Type: text/plain; charset=US-ASCII Hi Stefano, On Wed, Jun 3, 2015 at 3:45 PM, Stefano Stabellini < stefano.stabellini@eu.citrix.com> wrote: > On Wed, 3 Jun 2015, Sanjeev Pandita wrote: > > On Tue, Jun 2, 2015 at 7:55 PM, Stefano Stabellini < > stefano.stabellini@eu.citrix.com> wrote: > > On Tue, 2 Jun 2015, Sanjeev Pandita wrote: > > > From: Stefan Bader [mailto:stefan.bader@canonical.com] > > > Sent: Tuesday, June 02, 2015 1:52 PM > > > To: Sanjeev Pandita; xen-devel@lists.xen.org > > > Cc: Ian.Campbell@citrix.com; Pranavkumar Sawargaonkar; > > > stefano.stabellini@eu.citrix.com > > > Subject: Re: [Xen-devel] ARM64: XEN Domu not booting with the > qemu qcow > > > AARCH64 Ubuntu 15.04 disk > > > > > > On 02.06.2015 09:40, Sanjeev Pandita wrote: > > > > All, > > > > > > > > I am pretty new to xen . I am trying to boot DOMU with qemu > qcow > > > > AARCH64 Ubuntu 15.04 disk on Xen but I am getting the errors > which > > > > link to "/usr/local/lib/xen/bin/qemu-system-i386". > > > > Since I am working on aarch64 system the > > > > /usr/local/lib/xen/bin/qemu-system-i386 bin might not be > present or > > > > might not work as expected. > > > > > > Because I am lacking hardware and feedback, the arm64 packaging > is a > > > rather theoretical exercise. At least for armhf I thought > qemu-system-x86 > > > was a dependency. That binary should provide x86 emulation on > arm64, the > > > same as one could install qemu for other arches on x86. > > > Have you tried to install qemu-system-x86 manually? > > > > > > -Stefan > > > > > > > > > > > Please let me know how to make the Qemu qcow image work on Xen. > > > > Attached are the DomU boot log and config file. > > > > > > > > Thanks, > > > > San > > > > > > Thanks for your inputs, I have installed the qemu-system-i386 > but my DomU > > > booting is still crashing with following short logs. Am I > missing anything > > > ? > > > > > > Kernel Crash logs: > > > > > > xenbus_probe_frontend: Waiting for devices to initialise: > > > 25s...20s...15s...10s...5s...0s... > > > > 235s...230s...225s...220s...215s...210s...205s...200s...195s...190s...185s > > > > ...180s...175s...170s...165s...160s...155s...150s...145s...140s...135s...1 > > > > 30s...125s...120s...115s...110s...105s...100s...95s...90s...85s...80s...75 > > > > s...70s...65s...60s...55s...50s...45s...40s...35s...30s...25s...20s...15s. > > > ..10s...5s...0s... > > > > > > xenbus_probe_frontend: Timeout connecting to device: > device/vbd/51712 > > > (local state 3, remote state 2) > > > console [netcon0] enabled > > > netconsole: network logging started > > > drivers/rtc/hctosys.c: unable to open rtc device (rtc0) > > > VFS: Cannot open root device "xvda" or unknown-block(0,0): error > -6 > > > Please append a correct "root=" boot option; here are the > available > > > partitions: > > > Kernel panic - not syncing: VFS: Unable to mount root fs on > > > unknown-block(0,0) > > > CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.19.8 #5 > > > Hardware name: XENVM-4.6 (DT) > > > Call trace: > > > [] dump_backtrace+0x0/0x124 > > > [] show_stack+0x10/0x1c > > > [] dump_stack+0x80/0xc4 > > > [] panic+0xe0/0x220 > > > [] mount_block_root+0x1a4/0x24c > > > [] mount_root+0x110/0x130 > > > [] prepare_namespace+0x16c/0x1b8 > > > [] kernel_init_freeable+0x1c4/0x1ec > > > [] kernel_init+0xc/0xd8 > > > ---[ end Kernel panic - not syncing: VFS: Unable to mount root > fs on > > > unknown-block(0,0) > > > > It looks like the backend (QEMU) hasn't been initialized properly. > > Could you please post the output of xenstore-ls? Also could you run ps > > aux|grep qemu to check whether QEMU was spawned correctly? > > > > > > Attaching output of xenstore-ls and grep qemu. > > Looks like qemu process is getting spawned and running fine. > > > > I have also modified the config file to remove tap from disk like: > > disk = [ 'qcow:/mnt/xen/vivid-server-cloudimg-arm64-disk1.img,xvda,w' ] > > But still my DOMU booting is stuck and getting crashed due to lack of > rootfs/disk. > > > > I am running this on mustang board. > > QEMU has been spawn correctly, and I can see that it changed the > backend state to "2" (/local/domain/0/backend/qdisk/1/51712 in xenstore). > > Similarly the frontend initialization has started as the frontend state > has been changed to "3". > > However they should be both "4". So unless you manage to capture a > transient state, the communication between frontend and backend got > stuck. I don't know why. > > Is there anything interesting in the QEMU logs (under /var/log/xen) ? > > I checked /var/log/xen. Here is the error message. linux:/var/log/xen # cat qemu-dm-vm4.log xen be: qdisk-51712: error: 'xvda' uses a qcow feature which is not supported by this qemu version: QCOW version 2 xen be: qdisk-51712: initialise() failed Thanks, San > If not, I think you might have to build your own QEMU and add some > tracing, something like this: > > > diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c > index 21842a0..e62c14d 100644 > --- a/hw/block/xen_disk.c > +++ b/hw/block/xen_disk.c > @@ -755,6 +755,9 @@ static void blk_alloc(struct XenDevice *xendev) > { > struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, > xendev); > > + > + printf("DEBUG %s %d\n",__func__,__LINE__); > + > QLIST_INIT(&blkdev->inflight); > QLIST_INIT(&blkdev->finished); > QLIST_INIT(&blkdev->freelist); > @@ -767,6 +770,9 @@ static void blk_alloc(struct XenDevice *xendev) > xen_be_printf(xendev, 0, "xc_gnttab_set_max_grants failed: %s\n", > strerror(errno)); > } > + > + printf("DEBUG %s %d\n",__func__,__LINE__); > + > } > > static void blk_parse_discard(struct XenBlkDev *blkdev) > @@ -790,6 +796,7 @@ static int blk_init(struct XenDevice *xendev) > int info = 0; > char *directiosafe = NULL; > > + printf("DEBUG %s %d\n",__func__,__LINE__); > /* read xenstore entries */ > if (blkdev->params == NULL) { > char *h = NULL; > @@ -853,6 +860,8 @@ static int blk_init(struct XenDevice *xendev) > > blk_parse_discard(blkdev); > > + printf("DEBUG %s %d\n",__func__,__LINE__); > + > g_free(directiosafe); > return 0; > > @@ -878,6 +887,8 @@ static int blk_connect(struct XenDevice *xendev) > int pers, index, qflags; > bool readonly = true; > > + printf("DEBUG %s %d\n",__func__,__LINE__); > + > /* read-only ? */ > if (blkdev->directiosafe) { > qflags = BDRV_O_NOCACHE | BDRV_O_NATIVE_AIO; > @@ -1026,6 +1037,9 @@ static int blk_connect(struct XenDevice *xendev) > "remote port %d, local port %d\n", > blkdev->xendev.protocol, blkdev->ring_ref, > blkdev->xendev.remote_port, blkdev->xendev.local_port); > + > + printf("DEBUG %s %d\n",__func__,__LINE__); > + > return 0; > } > > @@ -1033,6 +1047,9 @@ static void blk_disconnect(struct XenDevice *xendev) > { > struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, > xendev); > > + > + printf("DEBUG %s %d\n",__func__,__LINE__); > + > if (blkdev->blk) { > blk_detach_dev(blkdev->blk, blkdev); > blk_unref(blkdev->blk); > @@ -1083,6 +1100,9 @@ static int blk_free(struct XenDevice *xendev) > g_free(ioreq); > } > > + > + printf("DEBUG %s %d\n",__func__,__LINE__); > + > g_free(blkdev->params); > g_free(blkdev->mode); > g_free(blkdev->type); > -- CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and contains information that is confidential and proprietary to Applied Micro Circuits Corporation or its subsidiaries. It is to be used solely for the purpose of furthering the parties' business relationship. All unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. --089e011767f969d63c05179b23e9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Stefano,

On Wed, Jun 3, 2015 at 3:45 PM, Stefano Stabellini <stefano.stabellini@eu.citrix.com> wrote:
On Wed, 3 Jun 2015, Sanjeev Pandita wrot= e:
> On Tue, Jun 2, 2015 at 7:55 PM, Stefano Stabellini <stefano.stabellini@eu.citrix.com&g= t; wrote:
>=A0 =A0 =A0 =A0On Tue, 2 Jun 2015, Sanjeev Pandita wrote:
>=A0 =A0 =A0 =A0> From: Stefan Bader [mailto:stefan.bader@canonical.com]
>=A0 =A0 =A0 =A0> Sent: Tuesday, June 02, 2015 1:52 PM
>=A0 =A0 =A0 =A0> To: Sanjeev Pandita; xen-devel@lists.xen.org
>=A0 =A0 =A0 =A0> Cc: Ian.= Campbell@citrix.com; Pranavkumar Sawargaonkar;
>=A0 =A0 =A0 =A0> stefano.stabellini@eu.citrix.com
>=A0 =A0 =A0 =A0> Subject: Re: [Xen-devel] ARM64: XEN Domu not bootin= g with the qemu qcow
>=A0 =A0 =A0 =A0> AARCH64 Ubuntu 15.04 disk
>=A0 =A0 =A0 =A0>
>=A0 =A0 =A0 =A0> On 02.06.2015 09:40, Sanjeev Pandita wrote:
>=A0 =A0 =A0 =A0> > All,
>=A0 =A0 =A0 =A0> >
>=A0 =A0 =A0 =A0> > I am pretty new to xen . I am trying to boot D= OMU with qemu qcow
>=A0 =A0 =A0 =A0> > AARCH64 Ubuntu 15.04 disk on Xen but I am gett= ing the errors which
>=A0 =A0 =A0 =A0> > link to "/usr/local/lib/xen/bin/qemu-syst= em-i386".
>=A0 =A0 =A0 =A0> > Since I am working on aarch64 system the
>=A0 =A0 =A0 =A0> > /usr/local/lib/xen/bin/qemu-system-i386 bin mi= ght not be present or
>=A0 =A0 =A0 =A0> > might not work as expected.
>=A0 =A0 =A0 =A0>
>=A0 =A0 =A0 =A0> Because I am lacking hardware and feedback, the arm= 64 packaging is a
>=A0 =A0 =A0 =A0> rather theoretical exercise. At least for armhf I t= hought qemu-system-x86
>=A0 =A0 =A0 =A0> was a dependency. That binary should provide x86 em= ulation on arm64, the
>=A0 =A0 =A0 =A0> same as one could install qemu for other arches on = x86.
>=A0 =A0 =A0 =A0> Have you tried to install qemu-system-x86 manually?=
>=A0 =A0 =A0 =A0>
>=A0 =A0 =A0 =A0> -Stefan
>=A0 =A0 =A0 =A0>
>=A0 =A0 =A0 =A0> >
>=A0 =A0 =A0 =A0> > Please let me know how to make the Qemu qcow i= mage work on Xen.
>=A0 =A0 =A0 =A0> > Attached are the DomU boot log and config file= .
>=A0 =A0 =A0 =A0> >
>=A0 =A0 =A0 =A0> > Thanks,
>=A0 =A0 =A0 =A0> > San
>=A0 =A0 =A0 =A0>
>=A0 =A0 =A0 =A0> Thanks for your inputs, I have installed the qemu-s= ystem-i386 but my DomU
>=A0 =A0 =A0 =A0> booting is still crashing with following short logs= . Am I missing anything
>=A0 =A0 =A0 =A0> ?
>=A0 =A0 =A0 =A0>
>=A0 =A0 =A0 =A0> Kernel Crash logs:
>=A0 =A0 =A0 =A0>
>=A0 =A0 =A0 =A0> xenbus_probe_frontend: Waiting for devices to initi= alise:
>=A0 =A0 =A0 =A0> 25s...20s...15s...10s...5s...0s...
>=A0 =A0 =A0 =A0> 235s...230s...225s...220s...215s...210s...205s...20= 0s...195s...190s...185s
>=A0 =A0 =A0 =A0> ...180s...175s...170s...165s...160s...155s...150s..= .145s...140s...135s...1
>=A0 =A0 =A0 =A0> 30s...125s...120s...115s...110s...105s...100s...95s= ...90s...85s...80s...75
>=A0 =A0 =A0 =A0> s...70s...65s...60s...55s...50s...45s...40s...35s..= .30s...25s...20s...15s.
>=A0 =A0 =A0 =A0> ..10s...5s...0s...
>=A0 =A0 =A0 =A0>
>=A0 =A0 =A0 =A0> xenbus_probe_frontend: Timeout connecting to device= : device/vbd/51712
>=A0 =A0 =A0 =A0> (local state 3, remote state 2)
>=A0 =A0 =A0 =A0> console [netcon0] enabled
>=A0 =A0 =A0 =A0> netconsole: network logging started
>=A0 =A0 =A0 =A0> drivers/rtc/hctosys.c: unable to open rtc device (r= tc0)
>=A0 =A0 =A0 =A0> VFS: Cannot open root device "xvda" or un= known-block(0,0): error -6
>=A0 =A0 =A0 =A0> Please append a correct "root=3D" boot op= tion; here are the available
>=A0 =A0 =A0 =A0> partitions:
>=A0 =A0 =A0 =A0> Kernel panic - not syncing: VFS: Unable to mount ro= ot fs on
>=A0 =A0 =A0 =A0> unknown-block(0,0)
>=A0 =A0 =A0 =A0> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.19.8 #5=
>=A0 =A0 =A0 =A0> Hardware name: XENVM-4.6 (DT)
>=A0 =A0 =A0 =A0> Call trace:
>=A0 =A0 =A0 =A0> [<ffffffc00008a0dc>] dump_backtrace+0x0/0x124=
>=A0 =A0 =A0 =A0> [<ffffffc00008a210>] show_stack+0x10/0x1c
>=A0 =A0 =A0 =A0> [<ffffffc000657d88>] dump_stack+0x80/0xc4
>=A0 =A0 =A0 =A0> [<ffffffc000656f04>] panic+0xe0/0x220
>=A0 =A0 =A0 =A0> [<ffffffc00087eea8>] mount_block_root+0x1a4/0= x24c
>=A0 =A0 =A0 =A0> [<ffffffc00087f19c>] mount_root+0x110/0x130 >=A0 =A0 =A0 =A0> [<ffffffc00087f328>] prepare_namespace+0x16c/= 0x1b8
>=A0 =A0 =A0 =A0> [<ffffffc00087eb44>] kernel_init_freeable+0x1= c4/0x1ec
>=A0 =A0 =A0 =A0> [<ffffffc00065481c>] kernel_init+0xc/0xd8
>=A0 =A0 =A0 =A0> ---[ end Kernel panic - not syncing: VFS: Unable to= mount root fs on
>=A0 =A0 =A0 =A0> unknown-block(0,0)
>
> It looks like the backend (QEMU) hasn't been initialized properly.=
> Could you please post the output of xenstore-ls? Also could you run ps=
> aux|grep qemu to check whether QEMU was spawned correctly?
>
>
> Attaching output of xenstore-ls and grep qemu.
> Looks like qemu process is getting spawned and running fine.
>
> I have also modified the config file to remove tap from disk like:
> disk =3D [ 'qcow:/mnt/xen/vivid-server-cloudimg-arm64-disk1.img,xv= da,w' ]
> But still my DOMU booting is stuck and getting crashed due to lack of = rootfs/disk.
>
> I am running this on mustang board.

QEMU has been spawn correctly, and I can see that it changed th= e
backend state to "2" (/local/domain/0/backend/qdisk/1/51712 in xe= nstore).

Similarly the frontend initialization has started as the frontend state
has been changed to "3".

However they should be both "4". So unless you manage to capture = a
transient state, the communication between frontend and backend got
stuck. I don't know why.

Is there anything interesting in the QEMU logs (under /var/log/xen) ?



I checked /var/log/xen.= Here is the error message.

linux:/var/log/xen # c= at qemu-dm-vm4.log
xen be: qdisk-51712: error: 'xvda' uses a qco= w feature which is not supported by this qemu version: QCOW version 2
xe= n be: qdisk-51712: initialise() failed

Thanks,
San
=A0
If not, I think you might have to build your own QEMU and add some
tracing, something like this:


diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index 21842a0..e62c14d 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -755,6 +755,9 @@ static void blk_alloc(struct XenDevice *xendev)
=A0{
=A0 =A0 =A0struct XenBlkDev *blkdev =3D container_of(xendev, struct XenBlkD= ev, xendev);

+
+=A0 =A0 printf("DEBUG %s %d\n",__func__,__LINE__);
+
=A0 =A0 =A0QLIST_INIT(&blkdev->inflight);
=A0 =A0 =A0QLIST_INIT(&blkdev->finished);
=A0 =A0 =A0QLIST_INIT(&blkdev->freelist);
@@ -767,6 +770,9 @@ static void blk_alloc(struct XenDevice *xendev)
=A0 =A0 =A0 =A0 =A0xen_be_printf(xendev, 0, "xc_gnttab_set_max_grants = failed: %s\n",
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0strerror(errno));
=A0 =A0 =A0}
+
+=A0 =A0 printf("DEBUG %s %d\n",__func__,__LINE__);
+
=A0}

=A0static void blk_parse_discard(struct XenBlkDev *blkdev)
@@ -790,6 +796,7 @@ static int blk_init(struct XenDevice *xendev)
=A0 =A0 =A0int info =3D 0;
=A0 =A0 =A0char *directiosafe =3D NULL;

+=A0 =A0 printf("DEBUG %s %d\n",__func__,__LINE__);
=A0 =A0 =A0/* read xenstore entries */
=A0 =A0 =A0if (blkdev->params =3D=3D NULL) {
=A0 =A0 =A0 =A0 =A0char *h =3D NULL;
@@ -853,6 +860,8 @@ static int blk_init(struct XenDevice *xendev)

=A0 =A0 =A0blk_parse_discard(blkdev);

+=A0 =A0 printf("DEBUG %s %d\n",__func__,__LINE__);
+
=A0 =A0 =A0g_free(directiosafe);
=A0 =A0 =A0return 0;

@@ -878,6 +887,8 @@ static int blk_connect(struct XenDevice *xendev)
=A0 =A0 =A0int pers, index, qflags;
=A0 =A0 =A0bool readonly =3D true;

+=A0 =A0 printf("DEBUG %s %d\n",__func__,__LINE__);
+
=A0 =A0 =A0/* read-only ? */
=A0 =A0 =A0if (blkdev->directiosafe) {
=A0 =A0 =A0 =A0 =A0qflags =3D BDRV_O_NOCACHE | BDRV_O_NATIVE_AIO;
@@ -1026,6 +1037,9 @@ static int blk_connect(struct XenDevice *xendev)
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"remote port %d, local port %d\= n",
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0blkdev->xendev.protocol, blkdev-&= gt;ring_ref,
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0blkdev->xendev.remote_port, blkde= v->xendev.local_port);
+
+=A0 =A0 printf("DEBUG %s %d\n",__func__,__LINE__);
+
=A0 =A0 =A0return 0;
=A0}

@@ -1033,6 +1047,9 @@ static void blk_disconnect(struct XenDevice *xendev)<= br> =A0{
=A0 =A0 =A0struct XenBlkDev *blkdev =3D container_of(xendev, struct XenBlkD= ev, xendev);

+
+=A0 =A0 printf("DEBUG %s %d\n",__func__,__LINE__);
+
=A0 =A0 =A0if (blkdev->blk) {
=A0 =A0 =A0 =A0 =A0blk_detach_dev(blkdev->blk, blkdev);
=A0 =A0 =A0 =A0 =A0blk_unref(blkdev->blk);
@@ -1083,6 +1100,9 @@ static int blk_free(struct XenDevice *xendev)
=A0 =A0 =A0 =A0 =A0g_free(ioreq);
=A0 =A0 =A0}

+
+=A0 =A0 printf("DEBUG %s %d\n",__func__,__LINE__);
+
=A0 =A0 =A0g_free(blkdev->params);
=A0 =A0 =A0g_free(blkdev->mode);
=A0 =A0 =A0g_free(blkdev->type);


CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and contains information<= br>that is confidential and proprietary to Applied Micro Circuits Corporati= on or its subsidiaries.
It is to be used solely for the purpose of furt= hering the parties' business relationship.
All unauthorized review,= use, disclosure or distribution is prohibited.
If you are not the inte= nded recipient, please contact the sender by reply e-mail
and destroy a= ll copies of the original message.
--089e011767f969d63c05179b23e9-- --===============9114994592064583549== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============9114994592064583549==--