From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Dan Magenheimer" Subject: RE: Shell test for pv vs hvm (vs dom0) Date: Sat, 23 Feb 2008 09:48:19 -0700 Message-ID: <20080223094819656.00000003172@djm-pc> References: Reply-To: "dan.magenheimer@oracle.com" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , Stephan Seitz Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Perhaps there's something in sysfs or proc somewhere that could discern between HVM and native? > > So a HVM Guest would ask "What hardware am I running on?" Interestingly, I just ran across a place in 2.6.18-based guests (e.g. RHEL5) in the timer code where a test is made whether an Intel or AMD "box" is being booted to decide whether or not to trust that TSC will be syncrhonized across multiple cpus. Obviously this test is invalid for virtual machines (though in this case, it is probably correct "most" of the time). > -----Original Message----- > From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] > Sent: Saturday, February 23, 2008 7:36 AM > To: Stephan Seitz > Cc: dan.magenheimer@oracle.com; xen-devel@lists.xensource.com > Subject: Re: [Xen-devel] Shell test for pv vs hvm (vs dom0) > = > = > There's already HVM strings in SMBIOS and ACPI tables, but they're not > particularly accessible from shell scripts in a generic way. > = > -- Keir > = > = > On 23/2/08 14:26, "Stephan Seitz" wrote: > = > > Could it be possible to define some bios magic for = > "hardware vendor"? > > So a HVM Guest would ask "What hardware am I running on?" > > > > Just a thought... > > > > Keir Fraser schrieb: > >> 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. > >> > >> -- Keir > >> > >> On 22/2/08 22:38, "Dan Magenheimer" = > wrote: > >> > >>> Thanks for pointing this tool out! Looks useful. > >>> > >>> Unfortunately, for it to be broadly useful, it would have > >>> to ship with all distros as compiling it "on demand" on > >>> the guest is often not an option. > > > > > = > = >