Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1663543 > unrolled thread
| Started by | Juergen Gross <jgross@suse.com> |
|---|---|
| First post | 2017-06-12 16:30 +0200 |
| Last post | 2017-06-14 17:00 +0200 |
| Articles | 9 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH v3 0/4] xen: add xen sysfs nodes Juergen Gross <jgross@suse.com> - 2017-06-12 16:30 +0200
[PATCH v3 1/4] doc,xen: document hypervisor sysfs nodes for xen Juergen Gross <jgross@suse.com> - 2017-06-12 16:30 +0200
Re: [PATCH v3 1/4] doc,xen: document hypervisor sysfs nodes for xen Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-06-14 16:50 +0200
Re: [PATCH v3 1/4] doc,xen: document hypervisor sysfs nodes for xen Stefano Stabellini <sstabellini@kernel.org> - 2017-06-14 21:10 +0200
[PATCH v3 4/4] xen: add sysfs node for hypervisor build id Juergen Gross <jgross@suse.com> - 2017-06-12 16:30 +0200
Re: [PATCH v3 4/4] xen: add sysfs node for hypervisor build id Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-06-14 17:10 +0200
Re: [PATCH v3 4/4] xen: add sysfs node for hypervisor build id Juergen Gross <jgross@suse.com> - 2017-06-14 17:10 +0200
[PATCH v3 3/4] xen: sync include/xen/interface/version.h Juergen Gross <jgross@suse.com> - 2017-06-12 16:30 +0200
Re: [PATCH v3 3/4] xen: sync include/xen/interface/version.h Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-06-14 17:00 +0200
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Date | 2017-06-12 16:30 +0200 |
| Subject | [PATCH v3 0/4] xen: add xen sysfs nodes |
| Message-ID | <tRyvU-3dT-5@gated-at.bofh.it> |
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.
Add another node to show the Xen hypervisor buildid in order to make
hypervisor live patching easier.
Juergen Gross (4):
doc,xen: document hypervisor sysfs nodes for xen
xen: add sysfs node for guest type
xen: sync include/xen/interface/version.h
xen: add sysfs node for hypervisor build id
Documentation/ABI/stable/sysfs-hypervisor-xen | 119 +++++++++++++++++++++
.../{sysfs-hypervisor-pmu => sysfs-hypervisor-xen} | 24 ++++-
MAINTAINERS | 2 +
arch/arm/xen/enlighten.c | 3 +
arch/x86/xen/enlighten.c | 3 +
arch/x86/xen/enlighten_hvm.c | 5 +-
arch/x86/xen/enlighten_pv.c | 1 +
drivers/xen/sys-hypervisor.c | 46 ++++++++
include/xen/interface/version.h | 15 +++
include/xen/xen.h | 2 +
10 files changed, 216 insertions(+), 4 deletions(-)
create mode 100644 Documentation/ABI/stable/sysfs-hypervisor-xen
rename Documentation/ABI/testing/{sysfs-hypervisor-pmu => sysfs-hypervisor-xen} (54%)
--
2.12.3
[toc] | [next] | [standalone]
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Date | 2017-06-12 16:30 +0200 |
| Subject | [PATCH v3 1/4] doc,xen: document hypervisor sysfs nodes for xen |
| Message-ID | <tRyvU-3dT-19@gated-at.bofh.it> |
| In reply to | #1663543 |
Today only a few sysfs nodes under /sys/hypervisor/ are documented
for Xen in Documentation/ABI/testing/sysfs-hypervisor-pmu.
Add the remaining Xen sysfs nodes under /sys/hypervisor/ in a new
file Documentation/ABI/stable/sysfs-hypervisor-xen and add the Xen
specific sysfs docs to the MAINTAINERS file.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
V3:
- added hint for hidden values where appropriate (Andrew Cooper)
V2:
- rename file to Documentation/ABI/stable/sysfs-hypervisor-xen in
order to reflect Xen dependency
- leave pmu entries in old file under testing (Boris Ostrovsky)
---
Documentation/ABI/stable/sysfs-hypervisor-xen | 119 ++++++++++++++++++++++++++
MAINTAINERS | 2 +
2 files changed, 121 insertions(+)
create mode 100644 Documentation/ABI/stable/sysfs-hypervisor-xen
diff --git a/Documentation/ABI/stable/sysfs-hypervisor-xen b/Documentation/ABI/stable/sysfs-hypervisor-xen
new file mode 100644
index 000000000000..e413154128b8
--- /dev/null
+++ b/Documentation/ABI/stable/sysfs-hypervisor-xen
@@ -0,0 +1,119 @@
+What: /sys/hypervisor/compilation/compile_date
+Date: March 2009
+KernelVersion: 2.6.30
+Contact: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ Contains the build time stamp of the Xen hypervisor
+ Might return "<denied>" in case of special security settings
+ in the hypervisor.
+
+What: /sys/hypervisor/compilation/compiled_by
+Date: March 2009
+KernelVersion: 2.6.30
+Contact: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ Contains information who built the Xen hypervisor
+ Might return "<denied>" in case of special security settings
+ in the hypervisor.
+
+What: /sys/hypervisor/compilation/compiler
+Date: March 2009
+KernelVersion: 2.6.30
+Contact: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ Compiler which was used to build the Xen hypervisor
+ Might return "<denied>" in case of special security settings
+ in the hypervisor.
+
+What: /sys/hypervisor/properties/capabilities
+Date: March 2009
+KernelVersion: 2.6.30
+Contact: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ 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: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ Changeset of the hypervisor (git commit)
+ Might return "<denied>" in case of special security settings
+ in the hypervisor.
+
+What: /sys/hypervisor/properties/features
+Date: March 2009
+KernelVersion: 2.6.30
+Contact: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ 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: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ Default page size of the hypervisor printed as a hex value.
+ Might return "0" in case of special security settings
+ in the hypervisor.
+
+What: /sys/hypervisor/properties/virtual_start
+Date: March 2009
+KernelVersion: 2.6.30
+Contact: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ Virtual address of the hypervisor as a hex value.
+
+What: /sys/hypervisor/type
+Date: March 2009
+KernelVersion: 2.6.30
+Contact: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ Type of hypervisor:
+ "xen": Xen hypervisor
+
+What: /sys/hypervisor/uuid
+Date: March 2009
+KernelVersion: 2.6.30
+Contact: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ UUID of the guest as known to the Xen hypervisor.
+
+What: /sys/hypervisor/version/extra
+Date: March 2009
+KernelVersion: 2.6.30
+Contact: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ The Xen version is in the format <major>.<minor><extra>
+ This is the <extra> part of it.
+ Might return "<denied>" in case of special security settings
+ in the hypervisor.
+
+What: /sys/hypervisor/version/major
+Date: March 2009
+KernelVersion: 2.6.30
+Contact: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ 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: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ The Xen version is in the format <major>.<minor><extra>
+ This is the <minor> part of it.
diff --git a/MAINTAINERS b/MAINTAINERS
index 09b5ab6a8a5c..68c31aebb79c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13982,6 +13982,8 @@ F: drivers/xen/
F: arch/x86/include/asm/xen/
F: include/xen/
F: include/uapi/xen/
+F: Documentation/ABI/stable/sysfs-hypervisor-xen
+F: Documentation/ABI/testing/sysfs-hypervisor-pmu
XEN HYPERVISOR ARM
M: Stefano Stabellini <sstabellini@kernel.org>
--
2.12.3
[toc] | [prev] | [next] | [standalone]
| From | Boris Ostrovsky <boris.ostrovsky@oracle.com> |
|---|---|
| Date | 2017-06-14 16:50 +0200 |
| Subject | Re: [PATCH v3 1/4] doc,xen: document hypervisor sysfs nodes for xen |
| Message-ID | <tShMl-6qR-13@gated-at.bofh.it> |
| In reply to | #1663547 |
+ Stefano for ARM. On 06/12/2017 10:21 AM, Juergen Gross wrote: > Today only a few sysfs nodes under /sys/hypervisor/ are documented > for Xen in Documentation/ABI/testing/sysfs-hypervisor-pmu. > > Add the remaining Xen sysfs nodes under /sys/hypervisor/ in a new > file Documentation/ABI/stable/sysfs-hypervisor-xen and add the Xen > specific sysfs docs to the MAINTAINERS file. > > Signed-off-by: Juergen Gross <jgross@suse.com> > --- > V3: > - added hint for hidden values where appropriate (Andrew Cooper) > > V2: > - rename file to Documentation/ABI/stable/sysfs-hypervisor-xen in > order to reflect Xen dependency > - leave pmu entries in old file under testing (Boris Ostrovsky) > --- > Documentation/ABI/stable/sysfs-hypervisor-xen | 119 ++++++++++++++++++++++++++ > MAINTAINERS | 2 + > 2 files changed, 121 insertions(+) > create mode 100644 Documentation/ABI/stable/sysfs-hypervisor-xen > > diff --git a/Documentation/ABI/stable/sysfs-hypervisor-xen b/Documentation/ABI/stable/sysfs-hypervisor-xen > new file mode 100644 > index 000000000000..e413154128b8 > --- /dev/null > +++ b/Documentation/ABI/stable/sysfs-hypervisor-xen > @@ -0,0 +1,119 @@ > +What: /sys/hypervisor/compilation/compile_date > +Date: March 2009 > +KernelVersion: 2.6.30 > +Contact: xen-devel@lists.xenproject.org > +Description: If running under Xen: > + Contains the build time stamp of the Xen hypervisor > + Might return "<denied>" in case of special security settings > + in the hypervisor. > + > +What: /sys/hypervisor/compilation/compiled_by > +Date: March 2009 > +KernelVersion: 2.6.30 > +Contact: xen-devel@lists.xenproject.org > +Description: If running under Xen: > + Contains information who built the Xen hypervisor > + Might return "<denied>" in case of special security settings > + in the hypervisor. > + > +What: /sys/hypervisor/compilation/compiler > +Date: March 2009 > +KernelVersion: 2.6.30 > +Contact: xen-devel@lists.xenproject.org > +Description: If running under Xen: > + Compiler which was used to build the Xen hypervisor > + Might return "<denied>" in case of special security settings > + in the hypervisor. > + > +What: /sys/hypervisor/properties/capabilities > +Date: March 2009 > +KernelVersion: 2.6.30 > +Contact: xen-devel@lists.xenproject.org > +Description: If running under Xen: > + 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 s/full/fully/ Other than that Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> -boris > + <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: xen-devel@lists.xenproject.org > +Description: If running under Xen: > + Changeset of the hypervisor (git commit) > + Might return "<denied>" in case of special security settings > + in the hypervisor. > + > +What: /sys/hypervisor/properties/features > +Date: March 2009 > +KernelVersion: 2.6.30 > +Contact: xen-devel@lists.xenproject.org > +Description: If running under Xen: > + 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: xen-devel@lists.xenproject.org > +Description: If running under Xen: > + Default page size of the hypervisor printed as a hex value. > + Might return "0" in case of special security settings > + in the hypervisor. > + > +What: /sys/hypervisor/properties/virtual_start > +Date: March 2009 > +KernelVersion: 2.6.30 > +Contact: xen-devel@lists.xenproject.org > +Description: If running under Xen: > + Virtual address of the hypervisor as a hex value. > + > +What: /sys/hypervisor/type > +Date: March 2009 > +KernelVersion: 2.6.30 > +Contact: xen-devel@lists.xenproject.org > +Description: If running under Xen: > + Type of hypervisor: > + "xen": Xen hypervisor > + > +What: /sys/hypervisor/uuid > +Date: March 2009 > +KernelVersion: 2.6.30 > +Contact: xen-devel@lists.xenproject.org > +Description: If running under Xen: > + UUID of the guest as known to the Xen hypervisor. > + > +What: /sys/hypervisor/version/extra > +Date: March 2009 > +KernelVersion: 2.6.30 > +Contact: xen-devel@lists.xenproject.org > +Description: If running under Xen: > + The Xen version is in the format <major>.<minor><extra> > + This is the <extra> part of it. > + Might return "<denied>" in case of special security settings > + in the hypervisor. > + > +What: /sys/hypervisor/version/major > +Date: March 2009 > +KernelVersion: 2.6.30 > +Contact: xen-devel@lists.xenproject.org > +Description: If running under Xen: > + 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: xen-devel@lists.xenproject.org > +Description: If running under Xen: > + The Xen version is in the format <major>.<minor><extra> > + This is the <minor> part of it. > diff --git a/MAINTAINERS b/MAINTAINERS > index 09b5ab6a8a5c..68c31aebb79c 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -13982,6 +13982,8 @@ F: drivers/xen/ > F: arch/x86/include/asm/xen/ > F: include/xen/ > F: include/uapi/xen/ > +F: Documentation/ABI/stable/sysfs-hypervisor-xen > +F: Documentation/ABI/testing/sysfs-hypervisor-pmu > > XEN HYPERVISOR ARM > M: Stefano Stabellini <sstabellini@kernel.org>
[toc] | [prev] | [next] | [standalone]
| From | Stefano Stabellini <sstabellini@kernel.org> |
|---|---|
| Date | 2017-06-14 21:10 +0200 |
| Subject | Re: [PATCH v3 1/4] doc,xen: document hypervisor sysfs nodes for xen |
| Message-ID | <tSlPX-Gm-11@gated-at.bofh.it> |
| In reply to | #1665894 |
On Wed, 14 Jun 2017, Boris Ostrovsky wrote: > + Stefano for ARM. > > On 06/12/2017 10:21 AM, Juergen Gross wrote: > > Today only a few sysfs nodes under /sys/hypervisor/ are documented > > for Xen in Documentation/ABI/testing/sysfs-hypervisor-pmu. > > > > Add the remaining Xen sysfs nodes under /sys/hypervisor/ in a new > > file Documentation/ABI/stable/sysfs-hypervisor-xen and add the Xen > > specific sysfs docs to the MAINTAINERS file. > > > > Signed-off-by: Juergen Gross <jgross@suse.com> > > --- > > V3: > > - added hint for hidden values where appropriate (Andrew Cooper) > > > > V2: > > - rename file to Documentation/ABI/stable/sysfs-hypervisor-xen in > > order to reflect Xen dependency > > - leave pmu entries in old file under testing (Boris Ostrovsky) > > --- > > Documentation/ABI/stable/sysfs-hypervisor-xen | 119 ++++++++++++++++++++++++++ > > MAINTAINERS | 2 + > > 2 files changed, 121 insertions(+) > > create mode 100644 Documentation/ABI/stable/sysfs-hypervisor-xen > > > > diff --git a/Documentation/ABI/stable/sysfs-hypervisor-xen b/Documentation/ABI/stable/sysfs-hypervisor-xen > > new file mode 100644 > > index 000000000000..e413154128b8 > > --- /dev/null > > +++ b/Documentation/ABI/stable/sysfs-hypervisor-xen > > @@ -0,0 +1,119 @@ > > +What: /sys/hypervisor/compilation/compile_date > > +Date: March 2009 > > +KernelVersion: 2.6.30 > > +Contact: xen-devel@lists.xenproject.org > > +Description: If running under Xen: > > + Contains the build time stamp of the Xen hypervisor > > + Might return "<denied>" in case of special security settings > > + in the hypervisor. > > + > > +What: /sys/hypervisor/compilation/compiled_by > > +Date: March 2009 > > +KernelVersion: 2.6.30 > > +Contact: xen-devel@lists.xenproject.org > > +Description: If running under Xen: > > + Contains information who built the Xen hypervisor > > + Might return "<denied>" in case of special security settings > > + in the hypervisor. > > + > > +What: /sys/hypervisor/compilation/compiler > > +Date: March 2009 > > +KernelVersion: 2.6.30 > > +Contact: xen-devel@lists.xenproject.org > > +Description: If running under Xen: > > + Compiler which was used to build the Xen hypervisor > > + Might return "<denied>" in case of special security settings > > + in the hypervisor. > > + > > +What: /sys/hypervisor/properties/capabilities > > +Date: March 2009 > > +KernelVersion: 2.6.30 > > +Contact: xen-devel@lists.xenproject.org > > +Description: If running under Xen: > > + 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 > > s/full/fully/ > > Other than that > > Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> > > + <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: xen-devel@lists.xenproject.org > > +Description: If running under Xen: > > + Changeset of the hypervisor (git commit) > > + Might return "<denied>" in case of special security settings > > + in the hypervisor. > > + > > +What: /sys/hypervisor/properties/features > > +Date: March 2009 > > +KernelVersion: 2.6.30 > > +Contact: xen-devel@lists.xenproject.org > > +Description: If running under Xen: > > + 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: xen-devel@lists.xenproject.org > > +Description: If running under Xen: > > + Default page size of the hypervisor printed as a hex value. > > + Might return "0" in case of special security settings > > + in the hypervisor. > > + > > +What: /sys/hypervisor/properties/virtual_start > > +Date: March 2009 > > +KernelVersion: 2.6.30 > > +Contact: xen-devel@lists.xenproject.org > > +Description: If running under Xen: > > + Virtual address of the hypervisor as a hex value. > > + > > +What: /sys/hypervisor/type > > +Date: March 2009 > > +KernelVersion: 2.6.30 > > +Contact: xen-devel@lists.xenproject.org > > +Description: If running under Xen: > > + Type of hypervisor: > > + "xen": Xen hypervisor > > + > > +What: /sys/hypervisor/uuid > > +Date: March 2009 > > +KernelVersion: 2.6.30 > > +Contact: xen-devel@lists.xenproject.org > > +Description: If running under Xen: > > + UUID of the guest as known to the Xen hypervisor. > > + > > +What: /sys/hypervisor/version/extra > > +Date: March 2009 > > +KernelVersion: 2.6.30 > > +Contact: xen-devel@lists.xenproject.org > > +Description: If running under Xen: > > + The Xen version is in the format <major>.<minor><extra> > > + This is the <extra> part of it. > > + Might return "<denied>" in case of special security settings > > + in the hypervisor. > > + > > +What: /sys/hypervisor/version/major > > +Date: March 2009 > > +KernelVersion: 2.6.30 > > +Contact: xen-devel@lists.xenproject.org > > +Description: If running under Xen: > > + 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: xen-devel@lists.xenproject.org > > +Description: If running under Xen: > > + The Xen version is in the format <major>.<minor><extra> > > + This is the <minor> part of it. > > diff --git a/MAINTAINERS b/MAINTAINERS > > index 09b5ab6a8a5c..68c31aebb79c 100644 > > --- a/MAINTAINERS > > +++ b/MAINTAINERS > > @@ -13982,6 +13982,8 @@ F: drivers/xen/ > > F: arch/x86/include/asm/xen/ > > F: include/xen/ > > F: include/uapi/xen/ > > +F: Documentation/ABI/stable/sysfs-hypervisor-xen > > +F: Documentation/ABI/testing/sysfs-hypervisor-pmu > > > > XEN HYPERVISOR ARM > > M: Stefano Stabellini <sstabellini@kernel.org> >
[toc] | [prev] | [next] | [standalone]
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Date | 2017-06-12 16:30 +0200 |
| Subject | [PATCH v3 4/4] xen: add sysfs node for hypervisor build id |
| Message-ID | <tRyvU-3dT-23@gated-at.bofh.it> |
| In reply to | #1663543 |
For support of Xen hypervisor live patching the hypervisor build id is
needed. Add a node /sys/hypervisor/properties/buildid containing the
information.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
Documentation/ABI/testing/sysfs-hypervisor-xen | 11 +++++++++-
drivers/xen/sys-hypervisor.c | 29 ++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/Documentation/ABI/testing/sysfs-hypervisor-xen b/Documentation/ABI/testing/sysfs-hypervisor-xen
index c0edb3fdd6eb..53b7b2ea7515 100644
--- a/Documentation/ABI/testing/sysfs-hypervisor-xen
+++ b/Documentation/ABI/testing/sysfs-hypervisor-xen
@@ -1,5 +1,5 @@
What: /sys/hypervisor/guest_type
-Date: May 2017
+Date: June 2017
KernelVersion: 4.13
Contact: xen-devel@lists.xenproject.org
Description: If running under Xen:
@@ -32,3 +32,12 @@ 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
+
+What: /sys/hypervisor/properties/buildid
+Date: June 2017
+KernelVersion: 4.13
+Contact: xen-devel@lists.xenproject.org
+Description: If running under Xen:
+ Build id of the hypervisor, needed for hypervisor live patching.
+ Might return "<denied>" in case of special security settings
+ in the hypervisor.
diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c
index d641e9970d5d..92307636ed54 100644
--- a/drivers/xen/sys-hypervisor.c
+++ b/drivers/xen/sys-hypervisor.c
@@ -339,12 +339,41 @@ static ssize_t features_show(struct hyp_sysfs_attr *attr, char *buffer)
HYPERVISOR_ATTR_RO(features);
+static ssize_t buildid_show(struct hyp_sysfs_attr *attr, char *buffer)
+{
+ ssize_t ret;
+ struct xen_build_id dummy;
+ struct xen_build_id *buildid;
+
+ dummy.len = 0;
+ ret = HYPERVISOR_xen_version(XENVER_get_features, &dummy);
+ if (ret < 0) {
+ if (ret == -EPERM)
+ ret = sprintf(buffer, "<denied>");
+ return ret;
+ }
+
+ buildid = kmalloc(sizeof(*buildid) + dummy.len, GFP_KERNEL);
+ if (!buildid)
+ return -ENOMEM;
+
+ ret = HYPERVISOR_xen_version(XENVER_get_features, buildid);
+ if (ret > 0)
+ ret = sprintf(buffer, "%s", buildid->buf);
+ kfree(buildid);
+
+ return ret;
+}
+
+HYPERVISOR_ATTR_RO(buildid);
+
static struct attribute *xen_properties_attrs[] = {
&capabilities_attr.attr,
&changeset_attr.attr,
&virtual_start_attr.attr,
&pagesize_attr.attr,
&features_attr.attr,
+ &buildid_attr.attr,
NULL
};
--
2.12.3
[toc] | [prev] | [next] | [standalone]
| From | Boris Ostrovsky <boris.ostrovsky@oracle.com> |
|---|---|
| Date | 2017-06-14 17:10 +0200 |
| Subject | Re: [PATCH v3 4/4] xen: add sysfs node for hypervisor build id |
| Message-ID | <tSi5H-6MW-9@gated-at.bofh.it> |
| In reply to | #1663549 |
On 06/12/2017 10:21 AM, Juergen Gross wrote:
> For support of Xen hypervisor live patching the hypervisor build id is
> needed. Add a node /sys/hypervisor/properties/buildid containing the
> information.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> Documentation/ABI/testing/sysfs-hypervisor-xen | 11 +++++++++-
> drivers/xen/sys-hypervisor.c | 29 ++++++++++++++++++++++++++
> 2 files changed, 39 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/ABI/testing/sysfs-hypervisor-xen b/Documentation/ABI/testing/sysfs-hypervisor-xen
> index c0edb3fdd6eb..53b7b2ea7515 100644
> --- a/Documentation/ABI/testing/sysfs-hypervisor-xen
> +++ b/Documentation/ABI/testing/sysfs-hypervisor-xen
> @@ -1,5 +1,5 @@
> What: /sys/hypervisor/guest_type
> -Date: May 2017
> +Date: June 2017
> KernelVersion: 4.13
> Contact: xen-devel@lists.xenproject.org
> Description: If running under Xen:
> @@ -32,3 +32,12 @@ 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
> +
> +What: /sys/hypervisor/properties/buildid
> +Date: June 2017
> +KernelVersion: 4.13
> +Contact: xen-devel@lists.xenproject.org
> +Description: If running under Xen:
> + Build id of the hypervisor, needed for hypervisor live patching.
> + Might return "<denied>" in case of special security settings
> + in the hypervisor.
It might? I don't see xen_deny() calls in XENVER_build_id (as I said
below, assuming that's the command you are using).
> diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c
> index d641e9970d5d..92307636ed54 100644
> --- a/drivers/xen/sys-hypervisor.c
> +++ b/drivers/xen/sys-hypervisor.c
> @@ -339,12 +339,41 @@ static ssize_t features_show(struct hyp_sysfs_attr *attr, char *buffer)
>
> HYPERVISOR_ATTR_RO(features);
>
> +static ssize_t buildid_show(struct hyp_sysfs_attr *attr, char *buffer)
> +{
> + ssize_t ret;
> + struct xen_build_id dummy;
> + struct xen_build_id *buildid;
> +
> + dummy.len = 0;
> + ret = HYPERVISOR_xen_version(XENVER_get_features, &dummy);
Why XENVER_get_features and not XENVER_build_id?
> + if (ret < 0) {
> + if (ret == -EPERM)
> + ret = sprintf(buffer, "<denied>");
> + return ret;
> + }
Assuming you meant XENVER_build_id, how is this supposed to work?
Hypervisor code specifically has
if ( build_id.len == 0 )
return -EINVAL;
-boris
> +
> + buildid = kmalloc(sizeof(*buildid) + dummy.len, GFP_KERNEL);
> + if (!buildid)
> + return -ENOMEM;
> +
> + ret = HYPERVISOR_xen_version(XENVER_get_features, buildid);
> + if (ret > 0)
> + ret = sprintf(buffer, "%s", buildid->buf);
> + kfree(buildid);
> +
> + return ret;
> +}
> +
> +HYPERVISOR_ATTR_RO(buildid);
> +
> static struct attribute *xen_properties_attrs[] = {
> &capabilities_attr.attr,
> &changeset_attr.attr,
> &virtual_start_attr.attr,
> &pagesize_attr.attr,
> &features_attr.attr,
> + &buildid_attr.attr,
> NULL
> };
>
[toc] | [prev] | [next] | [standalone]
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Date | 2017-06-14 17:10 +0200 |
| Subject | Re: [PATCH v3 4/4] xen: add sysfs node for hypervisor build id |
| Message-ID | <tSi5H-6MW-13@gated-at.bofh.it> |
| In reply to | #1665908 |
On 14/06/17 17:00, Boris Ostrovsky wrote:
> On 06/12/2017 10:21 AM, Juergen Gross wrote:
>> For support of Xen hypervisor live patching the hypervisor build id is
>> needed. Add a node /sys/hypervisor/properties/buildid containing the
>> information.
>>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>> ---
>> Documentation/ABI/testing/sysfs-hypervisor-xen | 11 +++++++++-
>> drivers/xen/sys-hypervisor.c | 29 ++++++++++++++++++++++++++
>> 2 files changed, 39 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/ABI/testing/sysfs-hypervisor-xen b/Documentation/ABI/testing/sysfs-hypervisor-xen
>> index c0edb3fdd6eb..53b7b2ea7515 100644
>> --- a/Documentation/ABI/testing/sysfs-hypervisor-xen
>> +++ b/Documentation/ABI/testing/sysfs-hypervisor-xen
>> @@ -1,5 +1,5 @@
>> What: /sys/hypervisor/guest_type
>> -Date: May 2017
>> +Date: June 2017
>> KernelVersion: 4.13
>> Contact: xen-devel@lists.xenproject.org
>> Description: If running under Xen:
>> @@ -32,3 +32,12 @@ 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
>> +
>> +What: /sys/hypervisor/properties/buildid
>> +Date: June 2017
>> +KernelVersion: 4.13
>> +Contact: xen-devel@lists.xenproject.org
>> +Description: If running under Xen:
>> + Build id of the hypervisor, needed for hypervisor live patching.
>> + Might return "<denied>" in case of special security settings
>> + in the hypervisor.
>
> It might? I don't see xen_deny() calls in XENVER_build_id (as I said
> below, assuming that's the command you are using).
>
>> diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c
>> index d641e9970d5d..92307636ed54 100644
>> --- a/drivers/xen/sys-hypervisor.c
>> +++ b/drivers/xen/sys-hypervisor.c
>> @@ -339,12 +339,41 @@ static ssize_t features_show(struct hyp_sysfs_attr *attr, char *buffer)
>>
>> HYPERVISOR_ATTR_RO(features);
>>
>> +static ssize_t buildid_show(struct hyp_sysfs_attr *attr, char *buffer)
>> +{
>> + ssize_t ret;
>> + struct xen_build_id dummy;
>> + struct xen_build_id *buildid;
>> +
>> + dummy.len = 0;
>> + ret = HYPERVISOR_xen_version(XENVER_get_features, &dummy);
>
> Why XENVER_get_features and not XENVER_build_id?
The patch is looking different in my local tree. I might have missed to
do a commit before creating the patch via git format-patch. Will resend.
Juergen
[toc] | [prev] | [next] | [standalone]
| From | Juergen Gross <jgross@suse.com> |
|---|---|
| Date | 2017-06-12 16:30 +0200 |
| Subject | [PATCH v3 3/4] xen: sync include/xen/interface/version.h |
| Message-ID | <tRyvV-3dT-31@gated-at.bofh.it> |
| In reply to | #1663543 |
Sync include/xen/interface/version.h with the Xen source.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
include/xen/interface/version.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/include/xen/interface/version.h b/include/xen/interface/version.h
index 7ff6498679a3..145f12f9ecec 100644
--- a/include/xen/interface/version.h
+++ b/include/xen/interface/version.h
@@ -63,4 +63,19 @@ struct xen_feature_info {
/* arg == xen_domain_handle_t. */
#define XENVER_guest_handle 8
+#define XENVER_commandline 9
+struct xen_commandline {
+ char buf[1024];
+};
+
+/*
+ * Return value is the number of bytes written, or XEN_Exx on error.
+ * Calling with empty parameter returns the size of build_id.
+ */
+#define XENVER_build_id 10
+struct xen_build_id {
+ uint32_t len; /* IN: size of buf[]. */
+ unsigned char buf[];
+};
+
#endif /* __XEN_PUBLIC_VERSION_H__ */
--
2.12.3
[toc] | [prev] | [next] | [standalone]
| From | Boris Ostrovsky <boris.ostrovsky@oracle.com> |
|---|---|
| Date | 2017-06-14 17:00 +0200 |
| Subject | Re: [PATCH v3 3/4] xen: sync include/xen/interface/version.h |
| Message-ID | <tShW1-6u5-9@gated-at.bofh.it> |
| In reply to | #1663551 |
On 06/12/2017 10:21 AM, Juergen Gross wrote: > Sync include/xen/interface/version.h with the Xen source. > > Signed-off-by: Juergen Gross <jgross@suse.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web