From 4a4c29c96dde0eefd69054fd9e6b4255d4717799 Mon Sep 17 00:00:00 2001 From: Juergen Gross Date: Wed, 14 Jun 2017 17:12:45 +0200 Subject: xen: add sysfs node for guest type Currently there is no reliable user interface inside a Xen guest to determine its type (e.g. HVM, PV or PVH). Instead of letting user mode try to determine this by various rather hacky mechanisms (parsing of boot messages before they are gone, trying to make use of known subtle differences in behavior of some instructions), add a sysfs node /sys/hypervisor/guest_type to explicitly deliver this information as it is known to the kernel. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross --- Documentation/ABI/testing/sysfs-hypervisor-pmu | 23 ----------------- Documentation/ABI/testing/sysfs-hypervisor-xen | 34 ++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 23 deletions(-) delete mode 100644 Documentation/ABI/testing/sysfs-hypervisor-pmu create mode 100644 Documentation/ABI/testing/sysfs-hypervisor-xen (limited to 'Documentation/ABI') diff --git a/Documentation/ABI/testing/sysfs-hypervisor-pmu b/Documentation/ABI/testing/sysfs-hypervisor-pmu deleted file mode 100644 index 224faa105e18..000000000000 --- a/Documentation/ABI/testing/sysfs-hypervisor-pmu +++ /dev/null @@ -1,23 +0,0 @@ -What: /sys/hypervisor/pmu/pmu_mode -Date: August 2015 -KernelVersion: 4.3 -Contact: Boris Ostrovsky -Description: - Describes mode that Xen's performance-monitoring unit (PMU) - uses. Accepted values are - "off" -- PMU is disabled - "self" -- The guest can profile itself - "hv" -- The guest can profile itself and, if it is - privileged (e.g. dom0), the hypervisor - "all" -- The guest can profile itself, the hypervisor - and all other guests. Only available to - privileged guests. - -What: /sys/hypervisor/pmu/pmu_features -Date: August 2015 -KernelVersion: 4.3 -Contact: Boris Ostrovsky -Description: - Describes Xen PMU features (as an integer). A set bit indicates - that the corresponding feature is enabled. See - include/xen/interface/xenpmu.h for available features diff --git a/Documentation/ABI/testing/sysfs-hypervisor-xen b/Documentation/ABI/testing/sysfs-hypervisor-xen new file mode 100644 index 000000000000..c0edb3fdd6eb --- /dev/null +++ b/Documentation/ABI/testing/sysfs-hypervisor-xen @@ -0,0 +1,34 @@ +What: /sys/hypervisor/guest_type +Date: May 2017 +KernelVersion: 4.13 +Contact: xen-devel@lists.xenproject.org +Description: If running under Xen: + Type of guest: + "Xen": standard guest type on arm + "HVM": fully virtualized guest (x86) + "PV": paravirtualized guest (x86) + "PVH": fully virtualized guest without legacy emulation (x86) + +What: /sys/hypervisor/pmu/pmu_mode +Date: August 2015 +KernelVersion: 4.3 +Contact: Boris Ostrovsky +Description: If running under Xen: + Describes mode that Xen's performance-monitoring unit (PMU) + uses. Accepted values are + "off" -- PMU is disabled + "self" -- The guest can profile itself + "hv" -- The guest can profile itself and, if it is + privileged (e.g. dom0), the hypervisor + "all" -- The guest can profile itself, the hypervisor + and all other guests. Only available to + privileged guests. + +What: /sys/hypervisor/pmu/pmu_features +Date: August 2015 +KernelVersion: 4.3 +Contact: Boris Ostrovsky +Description: If running under Xen: + Describes Xen PMU features (as an integer). A set bit indicates + that the corresponding feature is enabled. See + include/xen/interface/xenpmu.h for available features -- cgit v1.2.3