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] Shell test for pv vs hvm (vs dom0)

To: "Daniel P. Berrange" <berrange@xxxxxxxxxx>, "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "Alex Williamson" <alex.williamson@xxxxxx>
Subject: RE: [Xen-devel] Shell test for pv vs hvm (vs dom0)
From: "Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx>
Date: Mon, 25 Feb 2008 08:38:13 -0700
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 25 Feb 2008 07:39:49 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20080225134531.GE2614@xxxxxxxxxx>
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: Oracle Corporation
Reply-to: "dan.magenheimer@xxxxxxxxxx" <dan.magenheimer@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Ach3xGyoNOFMbUs8QFKWjTqtLzGAjw==
Thanks much!  These are great!

> -----Original Message-----
> From: Daniel P. Berrange [mailto:berrange@xxxxxxxxxx]
> Sent: Monday, February 25, 2008 6:46 AM
> To: Keir Fraser
> Cc: Alex Williamson; dan.magenheimer@xxxxxxxxxx;
> xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] Shell test for pv vs hvm (vs dom0)
> 
> 
> On Mon, Feb 25, 2008 at 01:40:05PM +0000, Keir Fraser wrote:
> > Yes, that should work for Linux just fine I think.
> 
> On x86 at least you also have the option of using  dmidecode 
> to detect an
> HVM guest, looking for 'Xen' in the 'System Information' block.
> 
> And the 'xen-detect' command in tools/misc/ provides another way to
> detect presence of Xen PV vs HVM.
> 
> > On 25/2/08 12:58, "Alex Williamson" <alex.williamson@xxxxxx> wrote:
> >
> > >
> > > On Sat, 2008-02-23 at 08:18 +0000, Keir Fraser wrote:
> > >> There's no general way to discriminate between HVM and 
> native from a shell
> > >> script. You might discriminate between HVM and PV on 
> Linux by looking for
> > >> /sys/hypervisor or /proc/xen.
> > >
> > > Isn't something like this generally sufficient for a shell script?
> > >
> > > lspci -n | grep -q "5853:0001"
> > > if [ $? -eq 0 ]; then
> > > # HVM domain
> > > elif [ -d /proc/xen ]; then
> > > if grep -q "control_d" /proc/xen/capabilities; then
> > > # DOM0
> > > else
> > > # DOMU
> > > fi
> > > else
> > > # Native
> > > fi
> > >
> > > It seems fairly reliable on ia64 for Xen 3.x.  Thanks,
> > >
> > > Alex
> >
> >
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-devel
> 
> --
> |=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 
> 978 392 2496 -=|
> |=-           Perl modules: http://search.cpan.org/~danberr/  
>             -=|
> |=-               Projects: http://freshmeat.net/~danielpb/   
>             -=|
> |=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF 
> F742 7D3B 9505  -=|
>


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

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