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

Re: [Xen-devel] [PATCH] tools: fix xen-detect to correctly identify domU type

On 03/23/2016 07:33 AM, Juergen Gross wrote:
On 23/03/16 11:55, Andrew Cooper wrote:
On 23/03/16 10:52, Juergen Gross wrote:
On 23/03/16 11:32, David Vrabel wrote:
On 23/03/16 10:25, Jan Beulich wrote:
On 23.03.16 at 11:14, <JGross@xxxxxxxx> wrote:
7. Report type according to features found (this is a little bit
    ugly: we have to rely on the current hypervisor implementation
    regarding the bits set for the different guest types).
Well, in some of the cases feature flags only make sense for one
kind of guest, so if such a flag is set it could be used as positive
indication (while it being clear may then still mean nothing).

Would it make sense to add another file to /sys/hypervisor/properties?
Something like guest_type, containing "pv", "hvm" or "pvh"? If existing
this could be used to report the guest type.
That would seem a good idea to me. What do others, namely
Linux maintainers, think?
What's the use case for user space knowing if it's in a PV or HVM domain?
The first thing coming to my mind would be diagnostic tools.
Having the admin able to tell for informational purposes is useful.
They can find out by looking at the top of `dmesg`, but a hypervisor
sysfs node is cleaner than requiring the admin to know every printk()
variant that Xen puts out.
Especially on a long running guest this information might be not
available in case of trouble.

What about dmidecode?

Unprivileged PV guests will return nothing:

[root@dhcp-burlington7-2nd-B-east-10-152-55-140 ~]# dmidecode
# dmidecode 2.11
# No SMBIOS nor DMI entry point found, sorry.
[root@dhcp-burlington7-2nd-B-east-10-152-55-140 ~]#

HVM guests will say something like:

System Information
    Manufacturer: Xen
    Product Name: HVM domU

and dom0 will report actual info.


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.