lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080929205634.GA2907@nb.net.home>
Date:	Mon, 29 Sep 2008 22:56:34 +0200
From:	Karel Zak <kzak@...hat.com>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	akataria@...are.com, Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	LKML <linux-kernel@...r.kernel.org>,
	the arch/x86 maintainers <x86@...nel.org>,
	Jeremy Fitzhardinge <jeremy@...p.org>, avi@...hat.com,
	Rusty Russell <rusty@...tcorp.com.au>,
	Zachary Amsden <zach@...are.com>,
	Dan Hecht <dhecht@...are.com>, Jun.Nakajima@...el.com,
	ksrinivasan@...ell.com, Matthias Koenig <mkoenig@...e.de>
Subject: Re: Use CPUID to communicate with the hypervisor.

On Fri, Sep 26, 2008 at 05:09:00PM -0700, H. Peter Anvin wrote:
> Alok Kataria wrote:
>> +{
>> +	if (cpu_has_hypervisor) {
>> +		unsigned int eax, ebx, ecx, edx;
>> +		char hyper_vendor_id[13];
>> +
>> +		cpuid(HYPERVISOR_INFO_LEAF, &eax, &ebx, &ecx, &edx);
>> +		memcpy(hyper_vendor_id + 0, &ebx, 4);
>> +		memcpy(hyper_vendor_id + 4, &ecx, 4);
>> +		memcpy(hyper_vendor_id + 8, &edx, 4);
>> +		hyper_vendor_id[12] = '\0';
>> +		printk(KERN_INFO "Hypervisor vendor id %s\n", hyper_vendor_id);
>> +	}
>> +}
>> +
>
> This should be broken out into a separate file in cpu/*, because we  
> *will* need to detect hypervisors by other means.

 Yes. It would be nice to have "Hypervisor vendor id" somewhere in
 /sys or /proc. It seems that userspace is already hungry for that
 information:

 http://article.gmane.org/gmane.linux.utilities.util-linux-ng/1788

    Karel

-- 
 Karel Zak  <kzak@...hat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ