Re: [PATCH] hypervisor: new tool for hypervisor detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 29 September 2008 15:17:28 Matthias Koenig wrote:> +ÂÂÂÂÂÂÂ * First check if we are running in a para-virtualized guest.> +ÂÂÂÂÂÂÂ */> +ÂÂÂÂÂÂÂif ((!access("/sys/hypervisor", F_OK) ||> + Â Â Â Â Â Â(!access("/proc/xen", F_OK)))) {> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ/*> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ * For now we are only dealing with para-virtualized> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ * Linux guests (para-virtualized on Xen). So, this must be> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ * Xen based.> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ */> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂxen_pv = 1;> +ÂÂÂÂÂÂÂ}This code does not appear to consider the possibility of running on real hardware.  (And to be pedantic, if /sys and /proc are not mounted, strange things will happen.)
&:-)ÿô.nlj·Ÿ®‰­†+%ŠË±é¥Šwÿº{.nlj·®¶)ÿ–)îàíèjg¬±¨¶‰šŽŠÝjÿ¾«þG«é¸¢·¦j:+v‰¨Šwèm¶Ÿÿþø®w¥þŠà£¢·hšâÿ†Ù


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux