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: [Xen-devel] Looking for advice/help on debugging a module in a live

To: cm ko <cm83646@xxxxxxxxx>
Subject: Re: [Xen-devel] Looking for advice/help on debugging a module in a live kernel
From: "Andrew D. Ball" <aball@xxxxxxxxxxxxxxxxxx>
Date: Wed, 31 Jan 2007 08:30:15 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 31 Jan 2007 05:29:53 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <594023.80865.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Systems and Technology Group
References: <594023.80865.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: aball@xxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
First off, printk()'s and other logging-like things are your friend for
kernel work.
On Sat, 2007-01-27 at 16:43 -0800, cm ko wrote:
> Hello all,
> I am new to Xen and would appreciate any help I can get.  I am working
> on a block device driver and I would like to be able to symbolically
> debug the module. (via break points, etc.)
> 
> I am a little bit confused on a couple of things and hoping someone
> can help me out.
> 
> 1) It appears that I have two choices - either paravirtualized or
> fully virtualized.  Do anyone have suggestions on how to determine
> which way to go?  At the moment, I am thinking using full
> virtualization and load my driver into the kernel running on the guest
> machine.  Am I off on this?

It's likely to be easier to work on purely paravirtualized guest domains
first, then port as a paravirtual driver for HVM domains.  Hopefully the
porting isn't too hard, at least for Linuxen in HVM guest domains.

> 
> 2) if I choose fully virtualized option, is it possible to attach
> debbuger on the live kernel running on the guest machine?  Does it
> mean that hvmloader has to be recompiled with -g option?

You definitely don't need to use '-g' for hvmloader.  It just has some
images for firmware that it loads into memory and then it goes away.

I'll bet that you can use the virtual serial port for HVM guest domains
and regular kernel debugging support for it.

> 
> 3) if I choose paravirtulaized kernel, which kernel should I install
> my module?  Kernel for Dom0 or DomU?

I never thought having a separation of dom0 and domU kernels was a
spectacular idea.  I'd just use the dom0 kernel for everything or a -xen
kernel (not -xen{0,u}).  The separation saves you a few Kb of RAM.
That's the only benefit of separate dom{0,u} kernels that I know about.

> 4) Where can I find the media for operating system for paravirtualized
> virtual system?

You mean how do you deploy an OS into a paravirtualized domain?

For SuSE, you do it with YaST, or you make a Xen installation initrd
with mkinstallinitrd (and some Xen-specific option that I've forgotten
but can look up if you need it).  Then you boot with one of the Xen
kernels and the installation initrd.  However, that's unlikely to match
the kernel you have from xen-unstable for modules in the initrd.  guest
bootloaders like pygrub may help with this type of mess soon if not
already.

For Redhat and Fedora, there are some need utilities built on top of
libvir(t)? .
I don't know what they are, but last time I saw them, they were
excellent.

> 
> Thanks in advance for you help,
> 

You're welcome.

> CM
> 
> 

Peace.
Andrew
===========
Andrew D. Ball
software engineer, IBM Systems and Technology Group
> 
> ______________________________________________________________________
> It's here! Your new message!
> Get new email alerts with the free Yahoo! Toolbar.
> _______________________________________________
> 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

<Prev in Thread] Current Thread [Next in Thread>