From patchwork Wed Feb 5 10:11:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?SsO8cmdlbiBHcm/Dnw==?= X-Patchwork-Id: 11366003 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 19A19112B for ; Wed, 5 Feb 2020 10:12:57 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0052E20661 for ; Wed, 5 Feb 2020 10:12:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0052E20661 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1izHey-0003HX-Pm; Wed, 05 Feb 2020 10:11:52 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1izHey-0003HE-0g for xen-devel@lists.xenproject.org; Wed, 05 Feb 2020 10:11:52 +0000 X-Inumbo-ID: e9e13d6e-47ff-11ea-90ba-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e9e13d6e-47ff-11ea-90ba-12813bfff9fa; Wed, 05 Feb 2020 10:11:45 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 934D5AF9F; Wed, 5 Feb 2020 10:11:44 +0000 (UTC) From: Juergen Gross To: xen-devel@lists.xenproject.org Date: Wed, 5 Feb 2020 11:11:33 +0100 Message-Id: <20200205101141.24769-1-jgross@suse.com> X-Mailer: git-send-email 2.16.4 Subject: [Xen-devel] [PATCH v4 0/8] Add hypervisor sysfs-like support X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Kevin Tian , Stefano Stabellini , Julien Grall , Jun Nakajima , Wei Liu , Konrad Rzeszutek Wilk , George Dunlap , Andrew Cooper , Ian Jackson , Jan Beulich , Daniel De Graaf , Volodymyr Babchuk , =?utf-8?q?Roger_Pau_Monn?= =?utf-8?q?=C3=A9?= MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On the 2019 Xen developer summit there was agreement that the Xen hypervisor should gain support for a hierarchical name-value store similar to the Linux kernel's sysfs. This is a first implementation of that idea adding the basic functionality to hypervisor and tools side. The interface to any user program making use of that "xen-hypfs" is a new library "libxenhypfs" with a stable interface. As a followup switching libxl to use the hypervisor file system for runtime parameter modifications is possible. This would enable removal of the XEN_SYSCTL_set_parameter sysctl operation. Changes in V4: - former patch 2 removed as already committed - addressed review comments Changes in V3: - major rework, especially by supporting binary contents of entries - added several new patches (1, 2, 7) - full support of all runtime parameters - support of writing entries (especially runtime parameters) Changes in V2: - all comments to V1 addressed - added man-page for xenhypfs tool - added runtime parameter read access for string parameters Changes in V1: - renamed xenfs ->xenhypfs - added writable entries support at the interface level and in the xenhypfs tool - added runtime parameter read access (integer type only for now) - added docs/misc/hypfs-paths.pandoc for path descriptions Juergen Gross (8): xen: add a generic way to include binary files as variables docs: add feature document for Xen hypervisor sysfs-like support xen: add basic hypervisor filesystem support libs: add libxenhypfs tools: add xenfs tool xen: provide version information in hypfs xen: add /buildinfo/config entry to hypervisor filesystem xen: add runtime parameter access support to hypfs .gitignore | 6 + docs/features/hypervisorfs.pandoc | 92 +++++++ docs/man/xenhypfs.1.pod | 61 +++++ docs/misc/hypfs-paths.pandoc | 163 +++++++++++ tools/Rules.mk | 6 + tools/libs/Makefile | 1 + tools/libs/hypfs/Makefile | 16 ++ tools/libs/hypfs/core.c | 533 ++++++++++++++++++++++++++++++++++++ tools/libs/hypfs/include/xenhypfs.h | 75 +++++ tools/libs/hypfs/libxenhypfs.map | 10 + tools/libs/hypfs/xenhypfs.pc.in | 10 + tools/misc/Makefile | 6 + tools/misc/xenhypfs.c | 189 +++++++++++++ xen/arch/arm/traps.c | 1 + xen/arch/arm/xen.lds.S | 5 + xen/arch/x86/hvm/hypercall.c | 1 + xen/arch/x86/hvm/vmx/vmcs.c | 17 +- xen/arch/x86/hypercall.c | 1 + xen/arch/x86/pv/domain.c | 7 +- xen/arch/x86/pv/hypercall.c | 1 + xen/arch/x86/xen.lds.S | 5 + xen/common/Makefile | 13 + xen/common/grant_table.c | 17 +- xen/common/hypfs.c | 396 +++++++++++++++++++++++++++ xen/common/kernel.c | 78 +++++- xen/drivers/char/console.c | 49 +++- xen/include/public/hypfs.h | 127 +++++++++ xen/include/public/xen.h | 1 + xen/include/xen/hypercall.h | 8 + xen/include/xen/hypfs.h | 112 ++++++++ xen/include/xen/kernel.h | 3 + xen/include/xen/param.h | 74 ++++- xen/include/xlat.lst | 2 + xen/tools/binfile | 41 +++ xen/xsm/flask/Makefile | 5 +- xen/xsm/flask/flask-policy.S | 16 -- 36 files changed, 2109 insertions(+), 39 deletions(-) create mode 100644 docs/features/hypervisorfs.pandoc create mode 100644 docs/man/xenhypfs.1.pod create mode 100644 docs/misc/hypfs-paths.pandoc create mode 100644 tools/libs/hypfs/Makefile create mode 100644 tools/libs/hypfs/core.c create mode 100644 tools/libs/hypfs/include/xenhypfs.h create mode 100644 tools/libs/hypfs/libxenhypfs.map create mode 100644 tools/libs/hypfs/xenhypfs.pc.in create mode 100644 tools/misc/xenhypfs.c create mode 100644 xen/common/hypfs.c create mode 100644 xen/include/public/hypfs.h create mode 100644 xen/include/xen/hypfs.h create mode 100755 xen/tools/binfile delete mode 100644 xen/xsm/flask/flask-policy.S