From nobody Fri Dec 19 17:20:22 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=boeing.com ARC-Seal: i=1; a=rsa-sha256; t=1747206825; cv=none; d=zohomail.com; s=zohoarc; b=YtseBY2CjL8W1kZqV1k34LSRCr7wH0ANNCflJr+9iNukJy060R+xnWnTpNgYVAKvSPxiYiupWlr8lwOvkby7XwgpzyZ5mChZ4y90tpb9SHZyT32B5aCa22mnxKL/Gurw+VbDLXK1qsOqVrn96Cka778B3UWrpvfTXO2bhVjj8bY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1747206825; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SqhQ9oLNBoOgUzMMxOjrt8HiB1Bp3rr566Xpah5pmvc=; b=ItxsK7jceDdujvHdN9nDoewoy7b+q6TpJY4OqGiBFT5aVvQyWOI6TkbrSl9WLBofvpHEkvCG4CM7l05++cG/ej+XE6XTCBgY/lIkwUD+IVDhoE7DPSpAMVdpt4axabT415mrysXFs450U51cBceECOIoVveeYGnA2MPoAlHhS/w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 174720682504298.89862029597339; Wed, 14 May 2025 00:13:45 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.983860.1370051 (Exim 4.92) (envelope-from ) id 1uF6Iu-0004m7-Fe; Wed, 14 May 2025 07:13:24 +0000 Received: by outflank-mailman (output) from mailman id 983860.1370051; Wed, 14 May 2025 07:13:24 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uF6Iu-0004m0-CM; Wed, 14 May 2025 07:13:24 +0000 Received: by outflank-mailman (input) for mailman id 983860; Wed, 14 May 2025 07:13:23 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uF6It-0004Xa-8z for xen-devel@lists.xenproject.org; Wed, 14 May 2025 07:13:23 +0000 Received: from ewa-mbsout-01.mbs.boeing.net (ewa-mbsout-01.mbs.boeing.net [130.76.20.194]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id e9142e51-3092-11f0-9eb6-5ba50f476ded; Wed, 14 May 2025 09:13:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by ewa-mbsout-01.mbs.boeing.net (8.15.2/8.15.2/DOWNSTREAM_MBSOUT) with SMTP id 54E7DH0Y014578; Wed, 14 May 2025 00:13:17 -0700 Received: from phx-av-01.mbs.boeing.net (phx-av-01.mbs.boeing.net [137.136.102.153]) by ewa-mbsout-01.mbs.boeing.net (8.15.2/8.15.2/8.15.2/UPSTREAM_MBSOUT) with ESMTPS id 54E7DDtd014540 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 14 May 2025 00:13:14 -0700 Received: from localhost (localhost [127.0.0.1]) by phx-av-01.mbs.boeing.net (8.15.2/8.15.2/DOWNSTREAM_RELAY) with SMTP id 54E7DDpV008750; Wed, 14 May 2025 00:13:13 -0700 Received: from localhost.localdomain ([144.112.81.43]) by phx-av-01.mbs.boeing.net (8.15.2/8.15.2/UPSTREAM_RELAY) with ESMTP id 54E7CtL3007958; Wed, 14 May 2025 00:13:02 -0700 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: e9142e51-3092-11f0-9eb6-5ba50f476ded DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boeing.com; s=boeing-s1912; t=1747206797; bh=SqhQ9oLNBoOgUzMMxOjrt8HiB1Bp3rr566Xpah5pmvc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WtyXEAkx21/9WQleAn0FTSHD1Z45whBPDqdu+nbLxqqZS1/7OoQA+AOqdnwHmwq0V 5AdBFg7Zc1EA535yxkEACTlVu/3zYltHK3VwZ7vRaYEznVnpZt4AsRG8glqZoIJwYn XmzWfjGTu4+YX/+Iqg7tebvIP38Tj0WI3uxjhREop0IJZ89GAFq4fg0K3XQTNAScSF IwVmDjkeh5nuhqYtLjdvt1+fSJH/BwT8yxeHXWItdu4HcaYnZYKNhfCL/9KahoL0V1 HFcI3zEjcSGOcFOZf+NYkGe1960W2l1aUP7KNKbxqubNFjHO2BO9zj7uhRSVA9CNrZ sZnDMtCfFecuw== From: Sookyung Ahn To: xen-devel@lists.xenproject.org Cc: matthew.l.weber3@boeing.com, joshua.c.whitehead@boeing.com, Anderson.Choi@boeing.com, brian.j.wood2@boeing.com, haesun.kim@boeing.com, Sookyung Ahn Subject: [RFC PATCH 2/2] add document minimal_xen_tools.pandoc Date: Wed, 14 May 2025 07:12:50 +0000 Message-Id: <0267d6a430a11b9387d56514f963b6a5c6033450.1747205627.git.sookyung.ahn@boeing.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-ZohoMail-DKIM: pass (identity @boeing.com) X-ZM-MESSAGEID: 1747206825851019000 --- docs/designs/minimal_xen_tools.pandoc | 147 ++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 docs/designs/minimal_xen_tools.pandoc diff --git a/docs/designs/minimal_xen_tools.pandoc b/docs/designs/minimal_x= en_tools.pandoc new file mode 100644 index 0000000000..32e0e8d002 --- /dev/null +++ b/docs/designs/minimal_xen_tools.pandoc @@ -0,0 +1,147 @@ +- [Minimal Xen-tools](#minimal-xen-tools) + - [`xen-tools` : full vs minimal](#xen-tools--full-vs-minimal) + - [Components of minimal `xen-tools`](#components-of-minimal-xen-tools) + - [How to enable minimal `xen-tools`](#how-to-enable-minimal-xen-tools) + - [How to include a component which is excluded](#how-to-include-a-compo= nent-which-is-excluded) + - [Library](#library) + - [Tool](#tool) + +# Minimal Xen-tools + +Purpose : To enhance `xen-tools` for users who require only a minimal subs= et of its functionality, particularly in safety-critical domains such as ae= rospace.=20 + +## `xen-tools` : full vs minimal + +- total size of **full** `xen-tools` and **minimal** `xen-tools` + +| | full | minimal | +|------| ------------ | ------------ | +|ipks | 8.1M (8216K) | **1.3M** (1276K) | +|image | 26M (25944K) | **4.6M** (4664)K | + +## Components of minimal `xen-tools` + +| `xen-tools-` | included | Rationale = | remark | +|---------------------| -------- | ---------------------------------------= --------------------- | ------- | +| libxencall | yes | library to provide hypercall interface = | | +| libxenctrl | yes | library to provide interface for the AR= INC 653 scheduler | partially included | +| libxendevicemodel | no | library to support device model. Not ne= eded | | +| libxenevtchn | no | library to support event channel. Not n= eeded with static event channel | | +| libxenforeignmemory | yes | library to support memory management f= or hypercall buffer | | +| libxengnttab | no | library to support grant table. We are = plainning to use static shared memory instaed of grant table to avoid dynam= ic memory allocation. | | +| libxenguest | no | library to support control and manage t= he domUs. Not required with dom0less | | +| libxenhypfs | no | library to provide interface for hyperv= isor fs. We don't access hypervisor fs. | | +| libxenlight | no | library to support `xl`. We don't use `= xl` at all | | +| libxenstat | no | library to monitor statistic data of do= mUs with `xentop`. We don't use it | | +| libxenstore | no | library to access `XenStore`. We don't = use `XenStore`. | | +| libxenutil | no | library to provide common utilities. | | +| libxenvchan | no | library to provide interface for vchan(= vitual channel). We don't use vchan | | +| libxentoolcore | yes | managing libraries' handlers = | | +| libxentoollog | yes | library to provide logging interface = | can be removed | +| 9pfsd | no | network file system protocol. = | had dependency on `XenStore` | +| consold | no | `ctrl-a` =C3=973 replaces it = | | +| dev | yes | header files = | | +| flask | yes | Xen security policy framework (XSM/FLAS= K) | disabled | +| flask-tools | yes | tools to manage FLASK policy = | disabled | +| fuzz | no | FUZZ test tool = | | +| fsimage | yes | file system image generator for domUs; = depends on `pygrub` | | +| hvmloader | no | legacy BIOS loader for HVM guests = | | +| libacpi | no | Advanced Configuration and Power Interf= ace | disabled | +| pygrub | yes | bootloader parser for domU kernels = | enabled | +| reums | yes | tool for failover of domUs via periodic= backup; requires `libnl3` | need to check dependency with `libxenlight` (x= l) | +| scripts-block | yes | scripts for block device = | | +| scripts-common | yes | scripts for common utilities = | | +| scripts-network | yes | scripts for domU network setup = | | +| shim | yes | EFI loader to launch Xen as a bootloade= r | disabled | +| xenpaging | no | domain paging tools not used = | | +| xenpmd | no | xen power management daemon = | had dependency on `XenStore` | +| xenstored | no | Xen Store Daemon providing simple tree-= like database | had dependency on `XenStore`, and event channel | +| xenwatchdogd | no | watchdog daemon. Not needed = | | +| volatiles | yes | runtime files (e.g. sockets, pid) for X= en tools | | +| xencommons | yes | startup script for Xen toolstack = | | +| xendomains | yes | init scirpt to autostart and shutdown d= omUs at boot/shutdown | | +| xentrace | no | trace Xen internal events. kind of debu= gging and monitoring tool. Not needed | | +| xenmon | no | live trace monitor = | requires `xentrace` | + +## How to enable minimal `xen-tools` + +- Ensure the following lines are present in `local.conf`: + +``` conf +# Enable minimal-xen-tools mode +ENABLE_MINIMAL_XEN_TOOLS =3D "true" +# Append minimal-xen-tools feature to xen-tools build configuration +PACKAGECONFIG:append:pn-xen-tools =3D " minimal-xen-tools" +``` + +- `minimal-xen-tools` will be enabled if `ENABLE_MINIMAL_XEN_TOOLS` is set= to `true` + +## How to include a component which is excluded + +### Library + +- Modify `xen/tools/libs/Makefile` and `xen/tools/libs/uselibs.mk` as foll= ows to include the library's source code in the build + +@xen/tools/libs/Makefile + +```makefile +ifeq ($(CONFIG_MINIMAL_TOOLS),y) +SUBDIRS-y :=3D +SUBDIRS-y +=3D toolcore +SUBDIRS-y +=3D toollog +SUBDIRS-y +=3D call +SUBDIRS-y +=3D foreignmemory +SUBDIRS-y +=3D ctrl +SUBDIRS-y +=3D xxx # include 'xxx' to build=20 +endif +``` + +@xen/tools/libs/uselibs.mk + +```makefile +ifeq ($(CONFIG_MINIMAL_TOOLS),y) + LIBS_LIBS +=3D toolcore + USELIBS_toolcore :=3D=20 + LIBS_LIBS +=3D toollog + USELIBS_toollog :=3D + LIBS_LIBS +=3D call + USELIBS_call :=3D toollog toolcore + LIBS_LIBS +=3D foreignmemory + USELIBS_foreignmemory :=3D toollog toolcore + LIBS_LIBS +=3D ctrl + USELIBS_ctrl :=3D toollog call foreignmemory + LIBS_LIBS +=3D xxx # add 'xxx' + USELIBS_xxx :=3D toollog toolcore aaa # dependency of 'xxx' =20 +else + LIBS_LIBS +=3D toolcore + +``` + +- Modify `xen/tools/libs/ctrl/Makefile.common` if you want to include part= of `libxenctrl` + +### Tool + +- Modify `xen/tools/Makefile` as follows to include the source code in the= build + +``` makefile +ifeq ($(CONFIG_MINIMAL_TOOLS),y) +SUBDIRS-y :=3D +SUBDIRS-y +=3D libs +SUBDIRS-y +=3D flask +SUBDIRS-y +=3D hotplug +SUBDIRS-y +=3D xxx # include 'xxx' to build=20 +SUBDIRS-$(CONFIG_X86) +=3D firmware +SUBDIRS-$(CONFIG_LIBFSIMAGE) +=3D libfsimage + +# do not recurse in to a dir we are about to delete +ifneq "$(MAKECMDGOALS)" "distclean" +SUBDIRS-$(CONFIG_QEMU_TRAD) +=3D qemu-xen-traditional-dir +SUBDIRS-$(CONFIG_QEMU_XEN) +=3D qemu-xen-dir +endif +#SUBDIRS-y +=3D python +SUBDIRS-$(CONFIG_PYGRUB) +=3D pygrub +SUBDIRS-$(OCAML_TOOLS) +=3D ocaml +endif +``` + +- The `xen/tools/configure.ac` file should also be modified appropriately = as needed. In this case, you should ensure that updating `configure` file a= nd executing it during the build. --=20 2.34.1