WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: Re:Re:Re: [Xen-devel] some errors of pvonhvm : xen-blkfront

To: topperxin <topperxin@xxxxxxx>
Subject: Re: Re:Re:Re: [Xen-devel] some errors of pvonhvm : xen-blkfront
From: Pasi Kärkkäinen <pasik@xxxxxx>
Date: Tue, 26 Apr 2011 11:45:41 +0300
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Tue, 26 Apr 2011 01:46:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4b1a365a.3eb1.12f8aa7d3f5.Coremail.topperxin@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <alpine.DEB.2.00.1104201814200.10886@kaball-desktop> <alpine.DEB.2.00.1104181501280.10886@kaball-desktop> <20110414125630.GA5548@xxxxxxxxxxxx> <osstest-6825-mainreport@xxxxxxx> <66684b04.29ba.12f4cc06df5.Coremail.topperxin@xxxxxxx> <5e61aa4c.ee8b.12f67dcbfc7.Coremail.topperxin@xxxxxxx> <302b6f7.5cc1.12f6c5e34cb.Coremail.topperxin@xxxxxxx> <4b1a365a.3eb1.12f8aa7d3f5.Coremail.topperxin@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
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 our
>    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 kernel
>    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.24),
>    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 debug 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. 

But I think it's better to use the new upstream-included PVHVM drivers these 
days.

-- Pasi

>          Since I known that the pv-drivers will be included in linux kernel
>    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 stated
>    in this mail.
>         What should I do next? Is this method ok?
>    Could you please tell me, when you write the xen-blkfront disk drivers for
>    linux kernel 2.6.36, how do you debug it when you meet errors?
>         Thank you very much.
> 
> 
>  At 2011-04-21 01:24:25£¬"Stefano Stabellini" 
> <stefano.stabellini@xxxxxxxxxxxxx> wrote:
> 
>  >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:
>  >> ====================================================
>  >>    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='(hd0,msdos1)'
>  >>         search --no-floppy --fs-uuid --set 
> 3336889c-576e-4088-a6ff-89e869289766
>  >>         linux   /boot/vmlinuz-2.6.35.4 
> root=UUID=3336889c-576e-4088-a6ff-89e869289766 ro 
> xen_emul_unplug=aux-ide-disks
>  >>         initrd  /boot/initrd.img-2.6.35.4.pvonhvm.0415
>  >> }
>  >> =======================================================
>  >>
>  >> 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. there are 
> several parameters, such as:
>  >>
>  >> ===================================================================
>  >>                 if (!strncmp(p, "all", l))
>  >>                         xen_emul_unplug |= XEN_UNPLUG_ALL;
>  >>                 else if (!strncmp(p, "ide-disks", l))
>  >>                         xen_emul_unplug |= XEN_UNPLUG_ALL_IDE_DISKS;
>  >>                 else if (!strncmp(p, "aux-ide-disks", l))
>  >>                         xen_emul_unplug |= XEN_UNPLUG_AUX_IDE_DISKS;
>  >>                 else if (!strncmp(p, "nics", l))
>  >>                         xen_emul_unplug |= XEN_UNPLUG_ALL_NICS;
>  >>                 else if (!strncmp(p, "unnecessary", l))
>  >>                         xen_emul_unplug |= XEN_UNPLUG_UNNECESSARY;
>  >>                 else if (!strncmp(p, "never", l))                         
> xen_emul_unplug |= XEN_UNPLUG_NEVER;
>  >> =========================================================
>  >> In my opinion , If I want to use the emulated disk , I should set
>  >>
>  >>               xen_emul_unplug = XEN_UNPLUG_UNNECESSARY or
>  >>
>  >>               xen_emul_unplug = XEN_NEVER
>  >>
>  >> right? I try these two ways, but I still failed.
>  >
>  >If you specify xen_emul_unplug=XEN_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=/dev/sda if you want to
>  >make sure that you are using the emulated path.
>  >Also you need to specify hd* devices in your disk line in the VM config
>  >file, like this:
>  >
>  >disk = [ '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.
> 
>    --------------------------------------------------------------------------
> 
>    [1]ÌåÑéÍøÒ×ÓÊÏä2G³¬ŽóžœŒþ£¬ÇáËÉ·¢ÓÅÖÊŽóµçÓ°¡¢ŽóÕÕƬ£¬ÌáËÙ3±¶!
> 
> References
> 
>    Visible links
>    1. http://mail.163.com/html/110414_attachment/att1.htm

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel