Skip to contentSkip to conversation

xen: add xen sysfs node

PATCH Superseded Juergen Gross 5 participants 33 messages May 22, 2017 2 messages not in the archive

Subsystems (5)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Juergen Gross

author maintainer
#0 lore raw

cover xen: add xen sysfs node

In order to be able to determine the Xen guest type from within the guest as a user there is currently no stable interface available.

Add a sysfs node for that purpose as the guest type information is available for the kernel.

While doing this document all the other Xen related sysfs nodes.

Juergen Gross (2):
doc,xen: document hypervisor sysfs nodes for xen
xen: add sysfs node for guest type

 Documentation/ABI/testing/sysfs-hypervisor     | 144 +++++++++++++++++++++++++
 Documentation/ABI/testing/sysfs-hypervisor-pmu |  23 ----
 MAINTAINERS                                    |   1 +
 arch/arm/xen/enlighten.c                       |   3 +
 arch/x86/xen/enlighten.c                       |   3 +
 arch/x86/xen/enlighten_hvm.c                   |   6 +-
 arch/x86/xen/enlighten_pv.c                    |   1 +
 drivers/xen/sys-hypervisor.c                   |  17 +++
 include/xen/xen.h                              |   2 +
 9 files changed, 175 insertions(+), 25 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-hypervisor
 delete mode 100644 Documentation/ABI/testing/sysfs-hypervisor-pmu
Signature · 1 line
2.12.0
author maintainer
#1 lore raw

PATCH 1/2 doc, xen: document hypervisor sysfs nodes for xen

Today only a few sysfs nodes under /sys/hypervisor/ are documented for Xen in Documentation/ABI/testing/sysfs-hypervisor-pmu. Rename this file to Documentation/ABI/testing/sysfs-hypervisor and add descriptions of the other nodes.

---
 Documentation/ABI/testing/sysfs-hypervisor     | 131 +++++++++++++++++++++++++
 Documentation/ABI/testing/sysfs-hypervisor-pmu |  23 -----
 MAINTAINERS                                    |   1 +
 3 files changed, 132 insertions(+), 23 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-hypervisor
 delete mode 100644 Documentation/ABI/testing/sysfs-hypervisor-pmu
Documentation/ABI/testing/sysfs-hypervisor new file +131 -0
new file mode 100644
index 000000000000..443196f0aa1c
@@ -0,0 +1,131 @@
+What:		/sys/hypervisor/compilation/compile_date
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Contains the build time stamp of the Xen hypervisor
+
+What:		/sys/hypervisor/compilation/compiled_by
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Contains information who built the Xen hypervisor
+
+What:		/sys/hypervisor/compilation/compiler
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Compiler which was used to build the Xen hypervisor
+
+What:		/sys/hypervisor/pmu/pmu_mode
+Date:		August 2015
+KernelVersion:	4.3
+Contact:	Boris Ostrovsky <[email protected]>
+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 <[email protected]>
+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
+
+What:		/sys/hypervisor/properties/capabilities
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Space separated list of supported guest system types. Each type
+		is in the format: <class>-<major>.<minor>-<arch>
+		With:
+			<class>: "xen" -- x86: paravirtualized, arm: standard
+				 "hvm" -- x86 only: full virtualized
+			<major>: major guest interface version
+			<minor>: minor guest interface version
+			<arch>:  architecture, e.g.:
+				 "x86_32": 32 bit x86 guest without PAE
+				 "x86_32p": 32 bit x86 guest with PAE
+				 "x86_64": 64 bit x86 guest
+				 "armv7l": 32 bit arm guest
+				 "aarch64": 64 bit arm guest
+
+What:		/sys/hypervisor/properties/changeset
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Changeset of the hypervisor (git commit)
+
+What:		/sys/hypervisor/properties/features
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Features the Xen hypervisor supports for the guest as defined
+		in include/xen/interface/features.h printed as a hex value.
+
+What:		/sys/hypervisor/properties/pagesize
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Default page size of the hypervisor printed as a hex value.
+
+What:		/sys/hypervisor/properties/virtual_start
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Virtual address of the hypervisor as a hex value.
+
+What:		/sys/hypervisor/type
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Type of hypervisor:
+		"xen": Xen hypervisor
+
+What:		/sys/hypervisor/uuid
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		UUID of the guest as known to the Xen hypervisor.
+
+What:		/sys/hypervisor/version/extra
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		The Xen version is in the format <major>.<minor><extra>
+		This is the <extra> part of it.
+
+What:		/sys/hypervisor/version/major
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		The Xen version is in the format <major>.<minor><extra>
+		This is the <major> part of it.
+
+What:		/sys/hypervisor/version/minor
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		The Xen version is in the format <major>.<minor><extra>
+		This is the <minor> part of it.
Documentation/ABI/testing/sysfs-hypervisor-pmu deleted +0 -23
deleted file mode 100644
index 224faa105e18..000000000000
@@ -1,23 +0,0 @@
-What:		/sys/hypervisor/pmu/pmu_mode
-Date:		August 2015
-KernelVersion:	4.3
-Contact:	Boris Ostrovsky <[email protected]>
-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 <[email protected]>
-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
MAINTAINERS +1 -0
index 503bcf4e3e8f..a5d2af148798 100644
@@ -13976,6 +13976,7 @@ F:	drivers/xen/
 F:	arch/x86/include/asm/xen/
 F:	include/xen/
 F:	include/uapi/xen/
+F:	Documentation/ABI/testing/sysfs-hypervisor
 
 XEN HYPERVISOR ARM
 M:	Stefano Stabellini <[email protected]>
Signature · 7 lines
2.12.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author maintainer
#2 lore raw

PATCH 1/2 doc,xen: document hypervisor sysfs nodes for xen

In reply to Juergen Gross

Today only a few sysfs nodes under /sys/hypervisor/ are documented for Xen in Documentation/ABI/testing/sysfs-hypervisor-pmu. Rename this file to Documentation/ABI/testing/sysfs-hypervisor and add descriptions of the other nodes.

---
 Documentation/ABI/testing/sysfs-hypervisor     | 131 +++++++++++++++++++++++++
 Documentation/ABI/testing/sysfs-hypervisor-pmu |  23 -----
 MAINTAINERS                                    |   1 +
 3 files changed, 132 insertions(+), 23 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-hypervisor
 delete mode 100644 Documentation/ABI/testing/sysfs-hypervisor-pmu
Documentation/ABI/testing/sysfs-hypervisor new file +131 -0
new file mode 100644
index 000000000000..443196f0aa1c
@@ -0,0 +1,131 @@
+What:		/sys/hypervisor/compilation/compile_date
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Contains the build time stamp of the Xen hypervisor
+
+What:		/sys/hypervisor/compilation/compiled_by
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Contains information who built the Xen hypervisor
+
+What:		/sys/hypervisor/compilation/compiler
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Compiler which was used to build the Xen hypervisor
+
+What:		/sys/hypervisor/pmu/pmu_mode
+Date:		August 2015
+KernelVersion:	4.3
+Contact:	Boris Ostrovsky <[email protected]>
+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 <[email protected]>
+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
+
+What:		/sys/hypervisor/properties/capabilities
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Space separated list of supported guest system types. Each type
+		is in the format: <class>-<major>.<minor>-<arch>
+		With:
+			<class>: "xen" -- x86: paravirtualized, arm: standard
+				 "hvm" -- x86 only: full virtualized
+			<major>: major guest interface version
+			<minor>: minor guest interface version
+			<arch>:  architecture, e.g.:
+				 "x86_32": 32 bit x86 guest without PAE
+				 "x86_32p": 32 bit x86 guest with PAE
+				 "x86_64": 64 bit x86 guest
+				 "armv7l": 32 bit arm guest
+				 "aarch64": 64 bit arm guest
+
+What:		/sys/hypervisor/properties/changeset
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Changeset of the hypervisor (git commit)
+
+What:		/sys/hypervisor/properties/features
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Features the Xen hypervisor supports for the guest as defined
+		in include/xen/interface/features.h printed as a hex value.
+
+What:		/sys/hypervisor/properties/pagesize
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Default page size of the hypervisor printed as a hex value.
+
+What:		/sys/hypervisor/properties/virtual_start
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Virtual address of the hypervisor as a hex value.
+
+What:		/sys/hypervisor/type
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		Type of hypervisor:
+		"xen": Xen hypervisor
+
+What:		/sys/hypervisor/uuid
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		UUID of the guest as known to the Xen hypervisor.
+
+What:		/sys/hypervisor/version/extra
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		The Xen version is in the format <major>.<minor><extra>
+		This is the <extra> part of it.
+
+What:		/sys/hypervisor/version/major
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		The Xen version is in the format <major>.<minor><extra>
+		This is the <major> part of it.
+
+What:		/sys/hypervisor/version/minor
+Date:		March 2009
+KernelVersion:	2.6.30
+Contact:	[email protected]
+Description:
+		The Xen version is in the format <major>.<minor><extra>
+		This is the <minor> part of it.
Documentation/ABI/testing/sysfs-hypervisor-pmu deleted +0 -23
deleted file mode 100644
index 224faa105e18..000000000000
@@ -1,23 +0,0 @@
-What:		/sys/hypervisor/pmu/pmu_mode
-Date:		August 2015
-KernelVersion:	4.3
-Contact:	Boris Ostrovsky <[email protected]>
-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 <[email protected]>
-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
MAINTAINERS +1 -0
index 503bcf4e3e8f..a5d2af148798 100644
@@ -13976,6 +13976,7 @@ F:	drivers/xen/
 F:	arch/x86/include/asm/xen/
 F:	include/xen/
 F:	include/uapi/xen/
+F:	Documentation/ABI/testing/sysfs-hypervisor
 
 XEN HYPERVISOR ARM
 M:	Stefano Stabellini <[email protected]>
Signature · 1 line
2.12.0
#3 lore raw

Re: [PATCH 1/2] doc, xen: document hypervisor sysfs nodes for xen

Documentation/ABI/testing/sysfs-hypervisor

Quoted 15 lines · Juergen Gross

Today only a few sysfs nodes under /sys/hypervisor/ are documented for Xen in Documentation/ABI/testing/sysfs-hypervisor-pmu. Rename this file to Documentation/ABI/testing/sysfs-hypervisor and add descriptions of the other nodes.

---
 Documentation/ABI/testing/sysfs-hypervisor     | 131 +++++++++++++++++++++++++
 Documentation/ABI/testing/sysfs-hypervisor-pmu |  23 -----
 MAINTAINERS                                    |   1 +
 3 files changed, 132 insertions(+), 23 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-hypervisor
 delete mode 100644 Documentation/ABI/testing/sysfs-hypervisor-pmu
Documentation/ABI/testing/sysfs-hypervisor +0 -0

I wonder whether at least some of the non-pmu entries should by now be considered stable.

-boris

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw

Re: [PATCH 1/2] doc,xen: document hypervisor sysfs nodes for xen

In reply to Juergen Gross

Documentation/ABI/testing/sysfs-hypervisor

Quoted 15 lines · Juergen Gross

Today only a few sysfs nodes under /sys/hypervisor/ are documented for Xen in Documentation/ABI/testing/sysfs-hypervisor-pmu. Rename this file to Documentation/ABI/testing/sysfs-hypervisor and add descriptions of the other nodes.

---
 Documentation/ABI/testing/sysfs-hypervisor     | 131 +++++++++++++++++++++++++
 Documentation/ABI/testing/sysfs-hypervisor-pmu |  23 -----
 MAINTAINERS                                    |   1 +
 3 files changed, 132 insertions(+), 23 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-hypervisor
 delete mode 100644 Documentation/ABI/testing/sysfs-hypervisor-pmu
Documentation/ABI/testing/sysfs-hypervisor +0 -0

I wonder whether at least some of the non-pmu entries should by now be considered stable.

-boris

author maintainer
#5 lore raw

Re: [PATCH 1/2] doc, xen: document hypervisor sysfs nodes for xen

Quoted 15 lines · Boris Ostrovsky
Quoted 14 lines · Juergen Gross

Today only a few sysfs nodes under /sys/hypervisor/ are documented for Xen in Documentation/ABI/testing/sysfs-hypervisor-pmu. Rename this file to Documentation/ABI/testing/sysfs-hypervisor and add descriptions of the other nodes.

---
 Documentation/ABI/testing/sysfs-hypervisor     | 131 +++++++++++++++++++++++++
 Documentation/ABI/testing/sysfs-hypervisor-pmu |  23 -----
 MAINTAINERS                                    |   1 +
 3 files changed, 132 insertions(+), 23 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-hypervisor
 delete mode 100644 Documentation/ABI/testing/sysfs-hypervisor-pmu
Quoted 4 lines

Documentation/ABI/testing/sysfs-hypervisor

Quoted 1 line
Documentation/ABI/testing/sysfs-hypervisor +0 -0

I wonder whether at least some of the non-pmu entries should by now be considered stable.

Hmm, do you think the pmu entries are not?

I could:

a) move sysfs-hypervisor as posted here to stable
b) leave the pmu entries in testing and just add another doc for the non-pmu entries in stable
c) do some split of the non-pmu entries (which to put where?)
d) or let it all in testing

Next question then: where to put the new guest_type of patch 2?

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author maintainer
#6 lore raw

Re: [PATCH 1/2] doc,xen: document hypervisor sysfs nodes for xen

In reply to Boris Ostrovsky
Quoted 15 lines · Boris Ostrovsky
Quoted 14 lines · Juergen Gross

Today only a few sysfs nodes under /sys/hypervisor/ are documented for Xen in Documentation/ABI/testing/sysfs-hypervisor-pmu. Rename this file to Documentation/ABI/testing/sysfs-hypervisor and add descriptions of the other nodes.

---
 Documentation/ABI/testing/sysfs-hypervisor     | 131 +++++++++++++++++++++++++
 Documentation/ABI/testing/sysfs-hypervisor-pmu |  23 -----
 MAINTAINERS                                    |   1 +
 3 files changed, 132 insertions(+), 23 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-hypervisor
 delete mode 100644 Documentation/ABI/testing/sysfs-hypervisor-pmu
Quoted 4 lines

Documentation/ABI/testing/sysfs-hypervisor

Quoted 1 line
Documentation/ABI/testing/sysfs-hypervisor +0 -0

I wonder whether at least some of the non-pmu entries should by now be considered stable.

Hmm, do you think the pmu entries are not?

I could:

a) move sysfs-hypervisor as posted here to stable
b) leave the pmu entries in testing and just add another doc for the non-pmu entries in stable
c) do some split of the non-pmu entries (which to put where?)
d) or let it all in testing

Next question then: where to put the new guest_type of patch 2?

Juergen

#7 lore raw

Re: [PATCH 1/2] doc,xen: document hypervisor sysfs nodes for xen

Quoted 16 lines · Juergen Gross
Quoted 15 lines · Boris Ostrovsky
Quoted 14 lines · Juergen Gross

Today only a few sysfs nodes under /sys/hypervisor/ are documented for Xen in Documentation/ABI/testing/sysfs-hypervisor-pmu. Rename this file to Documentation/ABI/testing/sysfs-hypervisor and add descriptions of the other nodes.

---
 Documentation/ABI/testing/sysfs-hypervisor     | 131 +++++++++++++++++++++++++
 Documentation/ABI/testing/sysfs-hypervisor-pmu |  23 -----
 MAINTAINERS                                    |   1 +
 3 files changed, 132 insertions(+), 23 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-hypervisor
 delete mode 100644 Documentation/ABI/testing/sysfs-hypervisor-pmu
Quoted 4 lines
Quoted 3 lines

Documentation/ABI/testing/sysfs-hypervisor

Quoted 1 line
Documentation/ABI/testing/sysfs-hypervisor +0 -0

I wonder whether at least some of the non-pmu entries should by now be considered stable.

Hmm, do you think the pmu entries are not?

Given XSA-163 I don't think we can declare PMU stable.

Quoted 8 lines

I could:

a) move sysfs-hypervisor as posted here to stable
b) leave the pmu entries in testing and just add another doc for the non-pmu entries in stable
c) do some split of the non-pmu entries (which to put where?)
d) or let it all in testing

I'd say (b).

Quoted 2 lines

Next question then: where to put the new guest_type of patch 2?

Since this is just being added testing/sysfs-hypervisor seems to be the proper place. Especially with documentation suggesting that 2-year back-compatibility is needed for an interface to be declared stable.

-boris

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author maintainer
#8 lore raw

PATCH 2/2 xen: add sysfs node for guest type

In reply to Juergen Gross

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.

---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +13 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)
+
 What:		/sys/hypervisor/pmu/pmu_mode
 Date:		August 2015
 KernelVersion:	4.3
arch/arm/xen/enlighten.c +3 -0
index ba7f4c8f5c3e..d2100f79e458 100644
@@ -43,6 +43,9 @@ EXPORT_SYMBOL(xen_start_info);
 enum xen_domain_type xen_domain_type = XEN_NATIVE;
 EXPORT_SYMBOL(xen_domain_type);
 
+char *xen_guest_type = "native";
+EXPORT_SYMBOL_GPL(xen_guest_type);
+
 struct shared_info xen_dummy_shared_info;
 struct shared_info *HYPERVISOR_shared_info = (void *)&xen_dummy_shared_info;
 
arch/x86/xen/enlighten.c +3 -0
index a5ffcbb20cc0..53bd23dfecac 100644
@@ -47,6 +47,9 @@ EXPORT_PER_CPU_SYMBOL(xen_vcpu_id);
 enum xen_domain_type xen_domain_type = XEN_NATIVE;
 EXPORT_SYMBOL_GPL(xen_domain_type);
 
+char *xen_guest_type = "HVM";
+EXPORT_SYMBOL_GPL(xen_guest_type);
+
 unsigned long *machine_to_phys_mapping = (void *)MACH2PHYS_VIRT_START;
 EXPORT_SYMBOL(machine_to_phys_mapping);
 unsigned long  machine_to_phys_nr;
arch/x86/xen/enlighten_hvm.c +4 -2
index a6d014f47e52..ba6dbff8675d 100644
@@ -68,13 +68,15 @@ static void __init init_hvm_pv_info(void)
 	xen_domain_type = XEN_HVM_DOMAIN;
 
 	/* PVH set up hypercall page in xen_prepare_pvh(). */
-	if (xen_pvh_domain())
+	if (xen_pvh_domain()) {
 		pv_info.name = "Xen PVH";
-	else {
+		xen_guest_type = "PVH";
+	} else {
 		u64 pfn;
 		uint32_t msr;
 
 		pv_info.name = "Xen HVM";
+		xen_guest_type = "PVHVM";
 		msr = cpuid_ebx(base + 2);
 		pfn = __pa(hypercall_page);
 		wrmsr_safe(msr, (u32)pfn, (u32)(pfn >> 32));
arch/x86/xen/enlighten_pv.c +1 -0
index f33eef4ebd12..7ac5e93d96f3 100644
@@ -1255,6 +1255,7 @@ asmlinkage __visible void __init xen_start_kernel(void)
 		return;
 
 	xen_domain_type = XEN_PV_DOMAIN;
+	xen_guest_type = "PV";
 
 	xen_setup_features();
 
drivers/xen/sys-hypervisor.c +17 -0
index 84106f9c456c..d641e9970d5d 100644
@@ -50,6 +50,18 @@ static int __init xen_sysfs_type_init(void)
 	return sysfs_create_file(hypervisor_kobj, &type_attr.attr);
 }
 
+static ssize_t guest_type_show(struct hyp_sysfs_attr *attr, char *buffer)
+{
+	return sprintf(buffer, "%s\n", xen_guest_type);
+}
+
+HYPERVISOR_ATTR_RO(guest_type);
+
+static int __init xen_sysfs_guest_type_init(void)
+{
+	return sysfs_create_file(hypervisor_kobj, &guest_type_attr.attr);
+}
+
 /* xen version attributes */
 static ssize_t major_show(struct hyp_sysfs_attr *attr, char *buffer)
 {
@@ -471,6 +483,9 @@ static int __init hyper_sysfs_init(void)
 	ret = xen_sysfs_type_init();
 	if (ret)
 		goto out;
+	ret = xen_sysfs_guest_type_init();
+	if (ret)
+		goto guest_type_out;
 	ret = xen_sysfs_version_init();
 	if (ret)
 		goto version_out;
@@ -502,6 +517,8 @@ static int __init hyper_sysfs_init(void)
 comp_out:
 	sysfs_remove_group(hypervisor_kobj, &version_group);
 version_out:
+	sysfs_remove_file(hypervisor_kobj, &guest_type_attr.attr);
+guest_type_out:
 	sysfs_remove_file(hypervisor_kobj, &type_attr.attr);
 out:
 	return ret;
include/xen/xen.h +2 -0
index 6e8b7fc79801..3defb2e03c8b 100644
@@ -9,8 +9,10 @@ enum xen_domain_type {
 
 #ifdef CONFIG_XEN
 extern enum xen_domain_type xen_domain_type;
+extern char *xen_guest_type;
 #else
 #define xen_domain_type		XEN_NATIVE
+#define xen_guest_type		"native"
 #endif
 
 #define xen_domain()		(xen_domain_type != XEN_NATIVE)
Signature · 7 lines
2.12.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
author maintainer
#9 lore raw

PATCH 2/2 xen: add sysfs node for guest type

In reply to Juergen Gross

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.

---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +13 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)
+
 What:		/sys/hypervisor/pmu/pmu_mode
 Date:		August 2015
 KernelVersion:	4.3
arch/arm/xen/enlighten.c +3 -0
index ba7f4c8f5c3e..d2100f79e458 100644
@@ -43,6 +43,9 @@ EXPORT_SYMBOL(xen_start_info);
 enum xen_domain_type xen_domain_type = XEN_NATIVE;
 EXPORT_SYMBOL(xen_domain_type);
 
+char *xen_guest_type = "native";
+EXPORT_SYMBOL_GPL(xen_guest_type);
+
 struct shared_info xen_dummy_shared_info;
 struct shared_info *HYPERVISOR_shared_info = (void *)&xen_dummy_shared_info;
 
arch/x86/xen/enlighten.c +3 -0
index a5ffcbb20cc0..53bd23dfecac 100644
@@ -47,6 +47,9 @@ EXPORT_PER_CPU_SYMBOL(xen_vcpu_id);
 enum xen_domain_type xen_domain_type = XEN_NATIVE;
 EXPORT_SYMBOL_GPL(xen_domain_type);
 
+char *xen_guest_type = "HVM";
+EXPORT_SYMBOL_GPL(xen_guest_type);
+
 unsigned long *machine_to_phys_mapping = (void *)MACH2PHYS_VIRT_START;
 EXPORT_SYMBOL(machine_to_phys_mapping);
 unsigned long  machine_to_phys_nr;
arch/x86/xen/enlighten_hvm.c +4 -2
index a6d014f47e52..ba6dbff8675d 100644
@@ -68,13 +68,15 @@ static void __init init_hvm_pv_info(void)
 	xen_domain_type = XEN_HVM_DOMAIN;
 
 	/* PVH set up hypercall page in xen_prepare_pvh(). */
-	if (xen_pvh_domain())
+	if (xen_pvh_domain()) {
 		pv_info.name = "Xen PVH";
-	else {
+		xen_guest_type = "PVH";
+	} else {
 		u64 pfn;
 		uint32_t msr;
 
 		pv_info.name = "Xen HVM";
+		xen_guest_type = "PVHVM";
 		msr = cpuid_ebx(base + 2);
 		pfn = __pa(hypercall_page);
 		wrmsr_safe(msr, (u32)pfn, (u32)(pfn >> 32));
arch/x86/xen/enlighten_pv.c +1 -0
index f33eef4ebd12..7ac5e93d96f3 100644
@@ -1255,6 +1255,7 @@ asmlinkage __visible void __init xen_start_kernel(void)
 		return;
 
 	xen_domain_type = XEN_PV_DOMAIN;
+	xen_guest_type = "PV";
 
 	xen_setup_features();
 
drivers/xen/sys-hypervisor.c +17 -0
index 84106f9c456c..d641e9970d5d 100644
@@ -50,6 +50,18 @@ static int __init xen_sysfs_type_init(void)
 	return sysfs_create_file(hypervisor_kobj, &type_attr.attr);
 }
 
+static ssize_t guest_type_show(struct hyp_sysfs_attr *attr, char *buffer)
+{
+	return sprintf(buffer, "%s\n", xen_guest_type);
+}
+
+HYPERVISOR_ATTR_RO(guest_type);
+
+static int __init xen_sysfs_guest_type_init(void)
+{
+	return sysfs_create_file(hypervisor_kobj, &guest_type_attr.attr);
+}
+
 /* xen version attributes */
 static ssize_t major_show(struct hyp_sysfs_attr *attr, char *buffer)
 {
@@ -471,6 +483,9 @@ static int __init hyper_sysfs_init(void)
 	ret = xen_sysfs_type_init();
 	if (ret)
 		goto out;
+	ret = xen_sysfs_guest_type_init();
+	if (ret)
+		goto guest_type_out;
 	ret = xen_sysfs_version_init();
 	if (ret)
 		goto version_out;
@@ -502,6 +517,8 @@ static int __init hyper_sysfs_init(void)
 comp_out:
 	sysfs_remove_group(hypervisor_kobj, &version_group);
 version_out:
+	sysfs_remove_file(hypervisor_kobj, &guest_type_attr.attr);
+guest_type_out:
 	sysfs_remove_file(hypervisor_kobj, &type_attr.attr);
 out:
 	return ret;
include/xen/xen.h +2 -0
index 6e8b7fc79801..3defb2e03c8b 100644
@@ -9,8 +9,10 @@ enum xen_domain_type {
 
 #ifdef CONFIG_XEN
 extern enum xen_domain_type xen_domain_type;
+extern char *xen_guest_type;
 #else
 #define xen_domain_type		XEN_NATIVE
+#define xen_guest_type		"native"
 #endif
 
 #define xen_domain()		(xen_domain_type != XEN_NATIVE)
Signature · 1 line
2.12.0
#10 lore raw

Re: [PATCH 2/2] xen: add sysfs node for guest type

Quoted 7 lines
Documentation/ABI/testing/sysfs-hypervisor +0 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 29

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +8 -0
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)

Can we ever get this? Xen sysfs node won't load unless we are !XEN_NATIVE and then we are either PVH or PVHVM.

-boris

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected]

Quoted 6 lines
Documentation/ABI/testing/sysfs-hypervisor +5 -0
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)
+
 

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#11 lore raw

Re: [PATCH 2/2] xen: add sysfs node for guest type

In reply to Juergen Gross
Quoted 7 lines
Documentation/ABI/testing/sysfs-hypervisor +0 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 29

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +8 -0
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)

Can we ever get this? Xen sysfs node won't load unless we are !XEN_NATIVE and then we are either PVH or PVHVM.

-boris

Quoted 6 lines
Documentation/ABI/testing/sysfs-hypervisor +5 -0
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)
+
 
author maintainer
#12 lore raw

Re: [PATCH 2/2] xen: add sysfs node for guest type

Quoted 9 lines · Boris Ostrovsky
Quoted 9 lines
Documentation/ABI/testing/sysfs-hypervisor +0 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
Quoted 11 lines

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 29

Quoted 8 lines
Documentation/ABI/testing/sysfs-hypervisor +8 -0
+What:		/sys/hypervisor/guest_type
+Date:		May 2017
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)

Can we ever get this? Xen sysfs node won't load unless we are !XEN_NATIVE and then we are either PVH or PVHVM.

When we remove PVHVM as suggested by Andrew, HVM will be kept. :-)

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author maintainer
#13 lore raw

Re: [PATCH 2/2] xen: add sysfs node for guest type

In reply to Boris Ostrovsky
Quoted 9 lines · Boris Ostrovsky
Quoted 9 lines
Documentation/ABI/testing/sysfs-hypervisor +0 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
Quoted 11 lines

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 29

Quoted 8 lines
Documentation/ABI/testing/sysfs-hypervisor +8 -0
+What:		/sys/hypervisor/guest_type
+Date:		May 2017
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)

Can we ever get this? Xen sysfs node won't load unless we are !XEN_NATIVE and then we are either PVH or PVHVM.

When we remove PVHVM as suggested by Andrew, HVM will be kept. :-)

Juergen

#14 lore raw

Re: [PATCH 2/2] xen: add sysfs node for guest type

In reply to Juergen Gross
Quoted 29 lines · Juergen Gross

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.

---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +2 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +10 -0
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

I'm not sure this is wise split. PVHVM is a spectrum which changes dynamically, especially in the presence of hardware APIC support.

I'd suggest guest type being straight PV or HVM (being the container type), and a list of items (interrupts, timers, legacy emulation) which are either using paravirt or native interfaces, or are not used at all.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#15 lore raw

Re: [Xen-devel] [PATCH 2/2] xen: add sysfs node for guest type

In reply to Juergen Gross
Quoted 29 lines · Juergen Gross

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.

---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +2 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +10 -0
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

I'm not sure this is wise split. PVHVM is a spectrum which changes dynamically, especially in the presence of hardware APIC support.

I'd suggest guest type being straight PV or HVM (being the container type), and a list of items (interrupts, timers, legacy emulation) which are either using paravirt or native interfaces, or are not used at all.

~Andrew

author maintainer
#16 lore raw

Re: [Xen-devel] [PATCH 2/2] xen: add sysfs node for guest type

Quoted 44 lines · Andrew Cooper
Quoted 29 lines · Juergen Gross

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.

---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +2 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +10 -0
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

I'm not sure this is wise split. PVHVM is a spectrum which changes dynamically, especially in the presence of hardware APIC support.

Quoted 3 lines

I'd suggest guest type being straight PV or HVM (being the container type), and a list of items (interrupts, timers, legacy emulation) which are either using paravirt or native interfaces, or are not used at all.

Dropping PVHVM from this list is okay, but I'd like to keep PVH. Even if technically it _is_ HVM without legacy emulation, for the user it is more some kind of a guest type than just an attribute.

Juergen

author maintainer
#17 lore raw

Re: [PATCH 2/2] xen: add sysfs node for guest type

In reply to Andrew Cooper
Quoted 44 lines · Andrew Cooper
Quoted 29 lines · Juergen Gross

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.

---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +2 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +10 -0
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

I'm not sure this is wise split. PVHVM is a spectrum which changes dynamically, especially in the presence of hardware APIC support.

Quoted 3 lines

I'd suggest guest type being straight PV or HVM (being the container type), and a list of items (interrupts, timers, legacy emulation) which are either using paravirt or native interfaces, or are not used at all.

Dropping PVHVM from this list is okay, but I'd like to keep PVH. Even if technically it _is_ HVM without legacy emulation, for the user it is more some kind of a guest type than just an attribute.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#18 lore raw

Re: [PATCH 2/2] xen: add sysfs node for guest type

In reply to Andrew Cooper
Quoted 43 lines · Andrew Cooper
Quoted 29 lines · Juergen Gross

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.

---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +2 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +10 -0
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

I'm not sure this is wise split. PVHVM is a spectrum which changes dynamically, especially in the presence of hardware APIC support.

Quoted 3 lines

I'd suggest guest type being straight PV or HVM (being the container type), and a list of items (interrupts, timers, legacy emulation) which are either using paravirt or native interfaces, or are not used at all.

Can these be exposed via HVM CPUID leaf?

-boris

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#19 lore raw

Re: [Xen-devel] [PATCH 2/2] xen: add sysfs node for guest type

In reply to Andrew Cooper
Quoted 43 lines · Andrew Cooper
Quoted 29 lines · Juergen Gross

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.

---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +2 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +10 -0
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

I'm not sure this is wise split. PVHVM is a spectrum which changes dynamically, especially in the presence of hardware APIC support.

Quoted 3 lines

I'd suggest guest type being straight PV or HVM (being the container type), and a list of items (interrupts, timers, legacy emulation) which are either using paravirt or native interfaces, or are not used at all.

Can these be exposed via HVM CPUID leaf?

-boris

#20 lore raw

Re: [PATCH 2/2] xen: add sysfs node for guest type

Quoted 44 lines · Boris Ostrovsky
Quoted 43 lines · Andrew Cooper
Quoted 29 lines · Juergen Gross

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.

---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +2 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +10 -0
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

I'm not sure this is wise split. PVHVM is a spectrum which changes dynamically, especially in the presence of hardware APIC support.

Quoted 4 lines
Quoted 3 lines

I'd suggest guest type being straight PV or HVM (being the container type), and a list of items (interrupts, timers, legacy emulation) which are either using paravirt or native interfaces, or are not used at all.

Can these be exposed via HVM CPUID leaf?

The HVM CPUID leaf provides information about the available options to the kernel, but only Linux can make its mind up which interface to use.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#21 lore raw

Re: [Xen-devel] [PATCH 2/2] xen: add sysfs node for guest type

In reply to Boris Ostrovsky
Quoted 44 lines · Boris Ostrovsky
Quoted 43 lines · Andrew Cooper
Quoted 29 lines · Juergen Gross

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.

---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +2 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +10 -0
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

I'm not sure this is wise split. PVHVM is a spectrum which changes dynamically, especially in the presence of hardware APIC support.

Quoted 4 lines
Quoted 3 lines

I'd suggest guest type being straight PV or HVM (being the container type), and a list of items (interrupts, timers, legacy emulation) which are either using paravirt or native interfaces, or are not used at all.

Can these be exposed via HVM CPUID leaf?

The HVM CPUID leaf provides information about the available options to the kernel, but only Linux can make its mind up which interface to use.

~Andrew

#22 lore raw

Re: [Xen-devel] [PATCH 2/2] xen: add sysfs node for guest type

In reply to Juergen Gross

include/xen/xen.h enum xen_domain_type { · line 12

Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 22.05.17 at 10:57, <[email protected]> wrote:
include/xen/xen.h +1 -0
@@ -9,8 +9,10 @@ enum xen_domain_type {
 
 #ifdef CONFIG_XEN
 extern enum xen_domain_type xen_domain_type;
+extern char *xen_guest_type;

const char * ?

Jan

#23 lore raw

Re: [PATCH 2/2] xen: add sysfs node for guest type

In reply to Juergen Gross

include/xen/xen.h enum xen_domain_type { · line 12

Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 22.05.17 at 10:57, <[email protected]> wrote:
include/xen/xen.h +1 -0
@@ -9,8 +9,10 @@ enum xen_domain_type {
 
 #ifdef CONFIG_XEN
 extern enum xen_domain_type xen_domain_type;
+extern char *xen_guest_type;

const char * ?

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

author maintainer
#25 lore raw

Re: [PATCH 2/2] xen: add sysfs node for guest type

Quoted 10 lines · Jan Beulich

include/xen/xen.h enum xen_domain_type { · line 12

Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 22.05.17 at 10:57, <[email protected]> wrote:
include/xen/xen.h +1 -0
@@ -9,8 +9,10 @@ enum xen_domain_type {
 
 #ifdef CONFIG_XEN
 extern enum xen_domain_type xen_domain_type;
+extern char *xen_guest_type;

const char * ?

Yes.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author maintainer
#26 lore raw

Re: [Xen-devel] [PATCH 2/2] xen: add sysfs node for guest type

In reply to a message not in the archive
Quoted 10 lines · Jan Beulich

include/xen/xen.h enum xen_domain_type { · line 12

Quoted 8 lines
Quoted 1 line
Quoted 1 line · On 22.05.17 at 10:57, <[email protected]> wrote:
include/xen/xen.h +1 -0
@@ -9,8 +9,10 @@ enum xen_domain_type {
 
 #ifdef CONFIG_XEN
 extern enum xen_domain_type xen_domain_type;
+extern char *xen_guest_type;

const char * ?

Yes.

Juergen

#27 lore raw

Re: [PATCH 2/2] xen: add sysfs node for guest type

In reply to Juergen Gross
Quoted 11 lines · Juergen Gross

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.

---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++

You forgot to CC Greg KH who is the maintainer of that file.

Quoted 18 lines
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +2 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +10 -0
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

What about KVM? Shouldn't that also be here?

And what should be there if say you boot without Xen, what is the correct value on x86 (above 'native' says arm)?

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#28 lore raw

Re: [Xen-devel] [PATCH 2/2] xen: add sysfs node for guest type

In reply to Juergen Gross
Quoted 11 lines · Juergen Gross

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.

---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++

You forgot to CC Greg KH who is the maintainer of that file.

Quoted 18 lines
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +2 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +10 -0
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

What about KVM? Shouldn't that also be here?

And what should be there if say you boot without Xen, what is the correct value on x86 (above 'native' says arm)?

author maintainer
#29 lore raw

Re: [PATCH 2/2] xen: add sysfs node for guest type

Quoted 9 lines · Konrad Rzeszutek Wilk
Quoted 8 lines · Juergen Gross

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.

Quoted 5 lines
Quoted 3 lines
---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++

You forgot to CC Greg KH who is the maintainer of that file.

Hmm, right.

Quoted 16 lines
Quoted 16 lines
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +0 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
Quoted 14 lines

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 12 lines
Documentation/ABI/testing/sysfs-hypervisor +12 -0
+What:		/sys/hypervisor/guest_type
+Date:		May 2017
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

What about KVM? Shouldn't that also be here?

/sys/hypervisor is Xen-only (at least up to now).

Quoted 2 lines

And what should be there if say you boot without Xen, what is the correct value on x86 (above 'native' says arm)?

The node isn't existing.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author maintainer
#30 lore raw

Re: [Xen-devel] [PATCH 2/2] xen: add sysfs node for guest type

In reply to Konrad Rzeszutek Wilk
Quoted 9 lines · Konrad Rzeszutek Wilk
Quoted 8 lines · Juergen Gross

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.

Quoted 5 lines
Quoted 3 lines
---
 Documentation/ABI/testing/sysfs-hypervisor | 13 +++++++++++++

You forgot to CC Greg KH who is the maintainer of that file.

Hmm, right.

Quoted 16 lines
Quoted 16 lines
 arch/arm/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten.c                   |  3 +++
 arch/x86/xen/enlighten_hvm.c               |  6 ++++--
 arch/x86/xen/enlighten_pv.c                |  1 +
 drivers/xen/sys-hypervisor.c               | 17 +++++++++++++++++
 include/xen/xen.h                          |  2 ++
 7 files changed, 43 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-hypervisor +0 -0
index 443196f0aa1c..06850f74ebd4 100644
@@ -19,6 +19,19 @@ Contact:	[email protected]
 Description:
 		Compiler which was used to build the Xen hypervisor
 
Quoted 14 lines

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 12 lines
Documentation/ABI/testing/sysfs-hypervisor +12 -0
+What:		/sys/hypervisor/guest_type
+Date:		May 2017
+KernelVersion:	4.12
+Contact:	[email protected]
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

What about KVM? Shouldn't that also be here?

/sys/hypervisor is Xen-only (at least up to now).

Quoted 2 lines

And what should be there if say you boot without Xen, what is the correct value on x86 (above 'native' says arm)?

The node isn't existing.

Juergen

#31 lore raw

Re: [Xen-devel] [PATCH 2/2] xen: add sysfs node for guest type

Quoted 24 lines
Quoted 1 line
Quoted 1 line · On 22.05.17 at 17:28, <[email protected]> wrote:
Quoted 7 lines · Konrad Rzeszutek Wilk
Quoted 6 lines · Juergen Gross
Documentation/ABI/testing/sysfs-hypervisor +0 -0
@@ -19,6 +19,19 @@ Contact:	[email protected] 
 Description:
 		Compiler which was used to build the Xen hypervisor
 
Quoted 14 lines

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 12 lines
Documentation/ABI/testing/sysfs-hypervisor +12 -0
+What:		/sys/hypervisor/guest_type
+Date:		May 2017
+KernelVersion:	4.12
+Contact:	[email protected] 
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

What about KVM? Shouldn't that also be here?

Quoted 1 line

/sys/hypervisor is Xen-only (at least up to now).

How that? It's being created by drivers/base/hypervisor.c, and iirc had been introduced for s390 originally.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

author maintainer
#33 lore raw

Re: [PATCH 2/2] xen: add sysfs node for guest type

Quoted 24 lines · Jan Beulich
Quoted 24 lines
Quoted 1 line
Quoted 1 line · On 22.05.17 at 17:28, <[email protected]> wrote:
Quoted 21 lines · Konrad Rzeszutek Wilk
Quoted 8 lines · Juergen Gross
Documentation/ABI/testing/sysfs-hypervisor +2 -0
@@ -19,6 +19,19 @@ Contact:	[email protected] 
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +10 -0
+KernelVersion:	4.12
+Contact:	[email protected] 
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

What about KVM? Shouldn't that also be here?

Quoted 4 lines
Quoted 1 line

/sys/hypervisor is Xen-only (at least up to now).

How that? It's being created by drivers/base/hypervisor.c, and iirc had been introduced for s390 originally.

Hmm, cscope fooled me. Maybe it should build the data base for all architectures...

Thanks for the note!

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author maintainer
#34 lore raw

Re: [Xen-devel] [PATCH 2/2] xen: add sysfs node for guest type

In reply to a message not in the archive
Quoted 24 lines · Jan Beulich
Quoted 24 lines
Quoted 1 line
Quoted 1 line · On 22.05.17 at 17:28, <[email protected]> wrote:
Quoted 21 lines · Konrad Rzeszutek Wilk
Quoted 8 lines · Juergen Gross
Documentation/ABI/testing/sysfs-hypervisor +2 -0
@@ -19,6 +19,19 @@ Contact:	[email protected] 
 Description:
 		Compiler which was used to build the Xen hypervisor
 
+What:		/sys/hypervisor/guest_type
+Date:		May 2017

Documentation/ABI/testing/sysfs-hypervisor Contact: [email protected] · line 33

Quoted 10 lines
Documentation/ABI/testing/sysfs-hypervisor +10 -0
+KernelVersion:	4.12
+Contact:	[email protected] 
+Description:
+		Type of guest:
+		"native": standard guest type on arm
+		"HVM": fully virtualized guest (x86)
+		"PV": paravirtualized guest (x86)
+		"PVH": fully virtualized guest without legacy emulation (x86)
+		"PVHVM": fully virtualized guest using paravirtualized
+			interfaces (e.g. interrupts, timers) (x86)

What about KVM? Shouldn't that also be here?

Quoted 4 lines
Quoted 1 line

/sys/hypervisor is Xen-only (at least up to now).

How that? It's being created by drivers/base/hypervisor.c, and iirc had been introduced for s390 originally.

Hmm, cscope fooled me. Maybe it should build the data base for all architectures...

Thanks for the note!

Juergen