From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= Subject: Re: Re:Re:Re: some errors of pvonhvm : xen-blkfront Date: Tue, 26 Apr 2011 11:45:41 +0300 Message-ID: <20110426084541.GX32595@reaktio.net> References: <20110414125630.GA5548@dumpdata.com> <66684b04.29ba.12f4cc06df5.Coremail.topperxin@126.com> <5e61aa4c.ee8b.12f67dcbfc7.Coremail.topperxin@126.com> <302b6f7.5cc1.12f6c5e34cb.Coremail.topperxin@126.com> <4b1a365a.3eb1.12f8aa7d3f5.Coremail.topperxin@126.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <4b1a365a.3eb1.12f8aa7d3f5.Coremail.topperxin@126.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: topperxin Cc: "xen-devel@lists.xensource.com" , Ian Jackson , Konrad Rzeszutek Wilk , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Mon, Apr 25, 2011 at 11:15:45AM +0800, topperxin wrote: > Thank you, Stefano > I have known that the first linux kernel version which include= the > PVONHVM feature is 2.6.36. But now, the question I have to face is o= ur > clients always required us to support other linux version, which not > 2.6.36, perhaps 2.6.35, > 2.6.34, 2.6.32... so I have to porting the PV drivers to these kerne= l > version. > At first, if the target kernel version is > 2.6.2X, I ported the pv-drivers based on 2.6.18, > these work not very hard, and I successfully. such ubuntu 8.04(2.6.2= 4), > debian5.05(2.6.26) > But, if the target kernel version is 2.6.3X, these work seems very > difficult, I couldn't complete it, the biggest trouble is can't debu= g the > xen-blkfront. Novell SLES/OpenSuse has a forward-port of the 2.6.18 based PVHVM drivers to 2.6.2x and 2.6.3x.=20 But I think it's better to use the new upstream-included PVHVM drivers th= ese days. -- Pasi > Since I known that the pv-drivers will be included in linux ke= rnel > 2.6.36, I studied the changes of it, and I try to port them to > ubuntu10.10(2.6.35), based on 2.6.36, the result is system can boot > successfully with xen-blkfront > disk, but when I execute some commands such as: > ls, mkdir... > the system will be blocked, the phenomena just like before I have st= ated > in this mail. > What should I do next? Is this method ok? > Could you please tell me, when you write the xen-blkfront disk drive= rs for > linux kernel 2.6.36, how do you debug it when you meet errors? > Thank you very much. >=20 >=20 > At 2011-04-21 01:24:25=C2=A3=C2=AC"Stefano Stabellini" wrote: >=20 > >On Tue, 19 Apr 2011, topperxin wrote: > >> hi Stefano > >> thanks for your time > >> As your method, I modified my /boo/grub/grub.cfg of ubuntu10.10 = like this: > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > >> menuentry 'Ubuntu, with Linux 2.6.35.4.pvonhvm' --class ubuntu -= -class gnu-linux --class gnu --class os { > >> recordfail > >> insmod part_msdos > >> insmod ext2 > >> set root=3D'(hd0,msdos1)' > >> search --no-floppy --fs-uuid --set 3336889c-576e-4088-a6ff-= 89e869289766 > >> linux /boot/vmlinuz-2.6.35.4 root=3DUUID=3D3336889c-576e-= 4088-a6ff-89e869289766 ro xen_emul_unplug=3Daux-ide-disks > >> initrd /boot/initrd.img-2.6.35.4.pvonhvm.0415 > >> } > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > >> > >> then I reboot the Guest OS , I found the boot disk is still the xen= -blkfront, not the qemu emulate. > > > >aux-ide-disks means "do not unplug secondary emulated disks". > > > > > >> I reviewed the source of ./arch/x86/xen/platform-pci-unplug.c. ther= e are several parameters, such as: > >> > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >> if (!strncmp(p, "all", l)) > >> xen_emul_unplug |=3D XEN_UNPLUG_ALL; > >> else if (!strncmp(p, "ide-disks", l)) > >> xen_emul_unplug |=3D XEN_UNPLUG_ALL_IDE_DIS= KS; > >> else if (!strncmp(p, "aux-ide-disks", l)) > >> xen_emul_unplug |=3D XEN_UNPLUG_AUX_IDE_DIS= KS; > >> else if (!strncmp(p, "nics", l)) > >> xen_emul_unplug |=3D XEN_UNPLUG_ALL_NICS; > >> else if (!strncmp(p, "unnecessary", l)) > >> xen_emul_unplug |=3D XEN_UNPLUG_UNNECESSARY= ; > >> else if (!strncmp(p, "never", l)) = xen_emul_unplug |=3D XEN_UNPLUG_NEVER; > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D > >> In my opinion , If I want to use the emulated disk , I should set > >> > >> xen_emul_unplug =3D XEN_UNPLUG_UNNECESSARY or > >> > >> xen_emul_unplug =3D XEN_NEVER > >> > >> right? I try these two ways, but I still failed. > > > >If you specify xen_emul_unplug=3DXEN_UNPLUG_UNNECESSARY you prevent > >blkfront from hooking PV disks corresponding to emulated disks. > >Of course you have to make sure your root device is not /dev/xvda > >because that wouldn't work anymore, try root=3D/dev/sda if you want t= o > >make sure that you are using the emulated path. > >Also you need to specify hd* devices in your disk line in the VM conf= ig > >file, like this: > > > >disk =3D [ 'file:/root/images/debian_lenny_i386_small.raw,hda,w'] > > > > > >> > >> Could you please tell me where can I get the source of > >> > >> kernel 2.6.35 with pvonhvm??? > > > >The first Linux kernel to have PV on HVM support was Linux 2.6.36, so= I > >don't have any 2.6.35 Linux tree with PV on HVM support. However a > >vanilla 2.6.36 (or 2.6.37 or 2.6.38) kernel should just work as PV on > >HVM kernel. >=20 > --------------------------------------------------------------------= ------ >=20 > [1]=C3=8C=C3=A5=C3=91=C3=A9=C3=8D=C3=B8=C3=92=C3=97=C3=93=C3=8A=C3=8F= =C3=A42G=C2=B3=C2=AC=C5=BD=C3=B3=C5=BE=C5=93=C5=92=C3=BE=C2=A3=C2=AC=C3=87= =C3=A1=C3=8B=C3=89=C2=B7=C2=A2=C3=93=C3=85=C3=96=C3=8A=C5=BD=C3=B3=C2=B5=C3= =A7=C3=93=C2=B0=C2=A1=C2=A2=C5=BD=C3=B3=C3=95=C3=95=C3=86=C2=AC=C2=A3=C2=AC= =C3=8C=C3=A1=C3=8B=C3=993=C2=B1=C2=B6! >=20 > References >=20 > Visible links > 1. http://mail.163.com/html/110414_attachment/att1.htm > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel