[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/8] tools/xenstored: allow domU to get own features
- To: Juergen Gross <jgross@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Mon, 20 Apr 2026 17:28:34 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=26xqOvvXQHptsIYYwqzi2V5Krx1Y9DPz9R1+yB4pqvs=; b=CzYK/4jHtL1v5m+LgeosMTedTpo5NI9SHEoByQk/Ui7/Z7nAnCZDESRaiNVxcCg+xo5N3AELC9s3fZDhre6z40NHu9gANYx0BHDxDPzgfZH8SodVyEaP+MduqwNmjzJw6+rcrNxNhkZoCvdewvOO1stJYNLs9MKwZC7gSngHi+kXhdUcZC/FIb3RpqgiF5eizT/ymt1XoNVEg41Tdi9NUI4o9AILsGn9Q+34kkS3eLge7nbdI8DAETKRb/JZ1RVflyRNFu7iCChVFwdNaRylipW0OEYs2umst1WofjJHcfdzNylZE1TpBxm3DlS/kmQO+U2/5Risg0DMVdLFcAhcnw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dMUelBZXaGBkphqheZp35pSI5IsMeb18f7eo0FvtCBRyCU9gyLSXr7G5T5Na+3mmUGsARMCWxURUg94nLsMnNgPVqoyyFuSdiHwcBXeKU9aDOwWV0FVlzfTJ1ie2DD1Sfbylwyt+1KThMr40rj1rZN63wkmO/wgXktz1GGwecLPFkU6PTJ1fet+QE7yzhF7AgAG/zjuD6RRuvCfx+qe7wa9KN6Fk1ENCzvUcopC4jq7PXlZS8f9dFQrdWCCSQlvE4Cze/poEUoEtEqQmT2PUOcT+lOUSe0c5pshla3gHW66L1rbdRims1K/hrPa3DkmmRrmpQU9N/8bfaIifWUrmfw==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Mon, 20 Apr 2026 21:28:45 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2026-03-13 03:47, Juergen Gross wrote:
Expand the XS_GET_FEATURE command to allow an unprivileged domain to
read its own available features. While this information is available
via the related field in the shared page used for communication with
Xenstore, user land components of the domU would need special support
in the related kernel driver to obtain that data. With supporting the
XS_GET_FEATURE for that purpose, only an up to date libxenstore is
needed.
Signed-off-by: Juergen Gross <jgross@xxxxxxxx>
---
docs/misc/xenstore.txt | 9 +++++----
tools/xenstored/core.c | 3 +--
tools/xenstored/domain.c | 16 +++++++++++-----
3 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/docs/misc/xenstore.txt b/docs/misc/xenstore.txt
index 4eccbc2f7f..8a2c19d116 100644
--- a/docs/misc/xenstore.txt
+++ b/docs/misc/xenstore.txt
@@ -427,13 +427,14 @@ SET_FEATURE <domid>|<value>|
to set a bit for a feature not being supported by the running
Xenstore will be denied. Providing no <domid> with the
GET_FEATURE command will return the features which are supported
- by Xenstore.
+ by Xenstore for the domain issuing the command.
SET_FEATURE for a domain will be rejected after the INTRODUCE
- command for this domain has been sent to xenstored.
+ command for this domain has been sent to xenstored. This has the
+ effect that dom0 will always have all supported features enabled.
This statement...
--- a/tools/xenstored/domain.c
+++ b/tools/xenstored/domain.c
@@ -1293,17 +1293,23 @@ int do_get_feature(const void *ctx, struct connection
*conn,
char *result;
n_args = get_strings(in, vec, ARRAY_SIZE(vec));
- if (n_args > 1)
- return EINVAL;
- if (n_args == 1) {
+ if (!n_args) {
+ features = conn->domain ? conn->domain->features
+ : XENSTORE_FEATURES;
... cover this, yes? With a stubdom, dom0 will have conn->domain.
conn->domain->features is initialized to XENSTORE_FEATURES and cannot
change. Provided that is correct:
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
Thanks,
Jason
|