mjfeeney@hotmail.com
2006-Jul-26 22:10 UTC
[Xen-users] How to determine if executing under Xen
Hello, I apologize if this has been asked before. I searched but could not find a similar question. I am writing a device driver targeted for Linux 2.6.16 running under Xen 3.0. Is there an easy mechanism for my code to determine if Linux is running as a Xen domain rather than natively? I want to behave slightly differently in each case. Thanks - Martin _________________________________________________________________ Try Live.com: where your online world comes together - with news, sports, weather, and much more. http://www.live.com/getstarted _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
dasari dakshina
2006-Jul-27 03:28 UTC
Re: [Xen-users] How to determine if executing under Xen
Hi, If its Dom0 You can check if xend is runnning.If so its running on Xen. Thanks, Dakshina --- mjfeeney@hotmail.com wrote:> Hello, > > I apologize if this has been asked before. I > searched but could not find a similar question. > > > I am writing a device driver targeted for Linux > 2.6.16 running under Xen 3.0. Is there an easy > mechanism for my code to determine if Linux is > running as a Xen domain rather than natively? I > want to behave slightly differently in each case. > Thanks - Martin >_________________________________________________________________> Try Live.com: where your online world comes together > - with news, sports, weather, and much more. > http://www.live.com/getstarted>_______________________________________________> Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Henning Sprang
2006-Jul-27 10:23 UTC
Re: [Xen-users] How to determine if executing under Xen
On 7/27/06, mjfeeney@hotmail.com <mjfeeney@hotmail.com> wrote:> > Hello, > > I apologize if this has been asked before. I searched but could not find a > similar question. > > I am writing a device driver targeted for Linux 2.6.16 running under Xen > 3.0.If this is the target, why worry about scenarios when the driver is no running on xen?> Is there an easy mechanism for my code to determine if Linux is > running as a Xen domain rather than natively? I want to behave slightly > differently in each case.Sounds like a xen developer question. I am not kernel hacker enough to know how a kernel module can find which other modules are active. If there''s a way, I''d just check for the xen specific modules. For example, the xen kernel is running on a specific subarchitecture of i386, if you can find that, you are on a xen kernel. Henning _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Andrej Radonic
2006-Jul-27 10:50 UTC
Re: [Xen-users] How to determine if executing under Xen
Henning Sprang schrieb:> On 7/27/06, mjfeeney@hotmail.com <mjfeeney@hotmail.com> wrote: >> >> Hello, >> >> I apologize if this has been asked before. I searched but could not >> find a >> similar question. >> >> I am writing a device driver targeted for Linux 2.6.16 running under Xen >> 3.0. > > If this is the target, why worry about scenarios when the driver is no > running on xen? > >> Is there an easy mechanism for my code to determine if Linux is >> running as a Xen domain rather than natively? I want to behave slightly >> differently in each case. > > Sounds like a xen developer question. > > I am not kernel hacker enough to know how a kernel module can find > which other modules are active. If there''s a way, I''d just check for > the xen specific modules. For example, the xen kernel is running on a > specific subarchitecture of i386, if you can find that, you are on a > xen kernel.have a look a the Xen Demo-CD. Some time ago I had a look at all the scripts hacked in to it to do all kinds of magic stuff (like auto-starting vncviewer and so on. I remember stumbling across several places whith checks if the instance is runnnig as guest or dom0. Bye, Andrej _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users