From: "Kasai Takanori" Subject: [PATCH][IOEMU] Fix to Allow blktap to be able to be booted as system volume for PV-on-HVM. Date: Tue, 16 Oct 2007 16:43:13 +0900 Message-ID: <031a01c80fc8$43cfb220$e16f210a@VF03007L> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0314_01C81013.A509E010" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. ------=_NextPart_000_0314_01C81013.A509E010 Content-Type: text/plain; format=flowed; charset="iso-2022-jp"; reply-type=original Content-Transfer-Encoding: 7bit Hi All, I sent the patch to allow blktap to be able to booted as system bolume for PV-on-HVM. However, there was a problem that hdN and xvdN were not able to be specified at the same time. I made the patch to correct it as follows. - Whether hdN is defined first is checked. - If hdN is defined, xvdN is not replaced with hdN. Signed-off-by: Takanori Kasai Best Regards, -- Takanori Kasai ----- Original Message ----- From: "Kasai Takanori" To: "You, Yongkang" ; "xen-devel" Sent: Tuesday, October 16, 2007 1:38 PM Subject: Re: [Xen-devel] [PATCH] [IOEMU] Allow blktap to be able to be booted as system volume for PV-on-HVM(TAKE 3) > Hi Yongkang, > > Thank you for reply. > > There is a problem when hdN and xvdN are specified at the same time. > Because the patch has already been applied, the hot fix is sent by the > addition. > > It corrects as follows. > - Whether hdN is defined first is checked. > - If hdN is defined, xvdN is not replaced with hdN. > > I will make the hot fix of the addition and contribute to the community. > > Best Regards, > > -- > Takanori Kasai > > > ----- Original Message ----- > From: "You, Yongkang" > To: "Kasai Takanori" ; "xen-devel" > > Sent: Tuesday, October 16, 2007 12:05 PM > Subject: RE: [Xen-devel] [PATCH] [IOEMU] Allow blktap to be able to be booted > assystemvolume for PV-on-HVM(TAKE 3) > > >> Hi Kasai, >> >> It seems there is a bug caused by this patch. >> If providing both hda and xvda, there would be two hda devices given to Qemu. >> And the image of xvda would be recover the real hda. If xvda doesn't include >> booting system, HVM booting failed. So how about have a little modify? If >> there is a hdx device, don't translate xvdx to related hdx. >> >> Best Regards, >> Yongkang You >> >> >>>-----Original Message----- >>>From: xen-devel-bounces@lists.xensource.com >>>[mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of >>>Kasai Takanori >>>Sent: Monday, October 15, 2007 6:43 PM >>>To: xen-devel >>>Subject: [Xen-devel] [PATCH] [IOEMU] Allow blktap to be able >>>to be booted assystemvolume for PV-on-HVM(TAKE 3) >>> >>>Hi All, >>> >>>I sent the patch to make blktap work with PV-on-HVM. >>>I corrected the part that had been pointed out in the Xen community. >>> >>>・All xvdN disk is looked like hdN. >>>・All tap disks are checked.(tap:aio, tap:sync, tap:vmdk, etc.) >>> >>>We cannot use blktap for the volume of the system with PV-on-HVM >>>and are embarrassed. >>>Could you apply this patch? Or, please give the comment to me. >>> >>>Signed-off-by: Takanori Kasai >>> >>>Best Regards, >>> >>>-- >>>Takanori Kasai ------=_NextPart_000_0314_01C81013.A509E010 Content-Type: application/octet-stream; name="fix-allow-blktap-system-volume.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="fix-allow-blktap-system-volume.patch" # HG changeset patch=0A= # User kasai.takanori@jp.fujitsu.com=0A= # Date 1192519539 -32400=0A= # Node ID 3c958d2223181164b4ab6da4216ca5f610aa0fe9=0A= # Parent 2372f89c0447e055506489688f53c9c69b6080d9=0A= Fix to allow blktap to be able to be booted as system volume for = PV-on-HVM.=0A= - Whether hdN is defined first is checked.=0A= - If hdN is defined, xvdN is not replaced with hdN.=0A= =0A= Signed-off-by: Takanori Kasai =0A= =0A= diff -r 2372f89c0447 -r 3c958d222318 tools/ioemu/xenstore.c=0A= --- a/tools/ioemu/xenstore.c Mon Oct 15 12:24:35 2007 +0100=0A= +++ b/tools/ioemu/xenstore.c Tue Oct 16 16:25:39 2007 +0900=0A= @@ -83,7 +83,7 @@ void xenstore_parse_domain_config(int do=0A= char *buf =3D NULL, *path;=0A= char *fpath =3D NULL, *bpath =3D NULL,=0A= *dev =3D NULL, *params =3D NULL, *type =3D NULL, *drv =3D NULL;=0A= - int i, is_scsi;=0A= + int i, is_scsi, is_hdN =3D 0;=0A= unsigned int len, num, hd_index;=0A= =0A= for(i =3D 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++)=0A= @@ -123,8 +123,29 @@ void xenstore_parse_domain_config(int do=0A= dev =3D xs_read(xsh, XBT_NULL, buf, &len);=0A= if (dev =3D=3D NULL)=0A= continue;=0A= + if (!strncmp(dev, "hd", 2 )) {=0A= + is_hdN =3D 1;=0A= + break;=0A= + }=0A= + }=0A= + =0A= + for (i =3D 0; i < num; i++) {=0A= + /* read the backend path */=0A= + if (pasprintf(&buf, "%s/device/vbd/%s/backend", path, e[i]) = =3D=3D -1)=0A= + continue;=0A= + free(bpath);=0A= + bpath =3D xs_read(xsh, XBT_NULL, buf, &len);=0A= + if (bpath =3D=3D NULL)=0A= + continue;=0A= + /* read the name of the device */=0A= + if (pasprintf(&buf, "%s/dev", bpath) =3D=3D -1)=0A= + continue;=0A= + free(dev);=0A= + dev =3D xs_read(xsh, XBT_NULL, buf, &len);=0A= + if (dev =3D=3D NULL)=0A= + continue;=0A= /* Change xvdN to look like hdN */=0A= - if (!strncmp(dev, "xvd", 3 )) {=0A= + if ( !is_hdN && !strncmp(dev, "xvd", 3 )) {=0A= fprintf(logfile, "Change xvd%c to look like hd%c\n",=0A= dev[3], dev[3]);=0A= memmove(dev, dev+1, strlen(dev));=0A= ------=_NextPart_000_0314_01C81013.A509E010 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.xensource.com http://lists.xensource.com/xen-devel ------=_NextPart_000_0314_01C81013.A509E010--