From patchwork Tue Nov 17 18:24:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= X-Patchwork-Id: 11913209 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 88C011668 for ; Tue, 17 Nov 2020 18:25:23 +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 4D3A62467A for ; Tue, 17 Nov 2020 18:25:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="CA5HiP0b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D3A62467A Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.29204.58460 (Exim 4.92) (envelope-from ) id 1kf5ec-0000Jk-9d; Tue, 17 Nov 2020 18:24:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 29204.58460; Tue, 17 Nov 2020 18:24:34 +0000 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" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kf5ec-0000Ja-64; Tue, 17 Nov 2020 18:24:34 +0000 Received: by outflank-mailman (input) for mailman id 29204; Tue, 17 Nov 2020 18:24:32 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kf5ea-0000JQ-9R for xen-devel@lists.xenproject.org; Tue, 17 Nov 2020 18:24:32 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1fa9788e-34b1-401f-83d8-b0ee46c4d5b4; Tue, 17 Nov 2020 18:24:31 +0000 (UTC) Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kf5ea-0000JQ-9R for xen-devel@lists.xenproject.org; Tue, 17 Nov 2020 18:24:32 +0000 X-Inumbo-ID: 1fa9788e-34b1-401f-83d8-b0ee46c4d5b4 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1fa9788e-34b1-401f-83d8-b0ee46c4d5b4; Tue, 17 Nov 2020 18:24:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1605637471; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+xpoQqJ/pbgvLZlCMz1D78iIlwiuXy9MMBl0DGtdCWE=; b=CA5HiP0bTqJl34cCj37MKkMHVFDfiG8HgMgKqpkAyJkvXcgiWaOXHLjm UW77X5sRFZ70SInqNyhk8po1UXdMBEspaDSerOiG5V0tFFZy3Q47yWPRR 7FGpmX21ZzFaxg7bFojPhcW5kPVXqTPKutXalRMyNsWVln2WL4oBTOsb7 4=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: PZ7B6VkG7TYTQ2LzJFIJRinvipug0hywn82BZW1WgXjggOwuGai/BfAMIa5zeFsaSgs3RNVUeP aNMbS7ycFA2wEYeeazq0OTL4nM/NVBgaogeFB2rD0j6AVldImmO9vekRPzem3mTAXMWtDHn0s1 Ub31NwE0KhnTSGXDpNY86dadJgb9iArgWkXeh0ytArYEotGe5Rj7Eu9Ar7OIhH8Yx8xeQb8mAl Uk7R+fjlrbDniwA0iPQqPuRuMdvv8j4J6HzD02EloMPWcMz0xmnHpz/ElatiFrUQWc4UYYEHF8 284= X-SBRS: None X-MesageID: 31385518 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.77,486,1596513600"; d="scan'208";a="31385518" From: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= To: CC: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= , "Doug Goldstein" Subject: [PATCH v1 1/4] automation/scripts/containerize: fix DOCKER_CMD=podman Date: Tue, 17 Nov 2020 18:24:09 +0000 Message-ID: <28469d0fea059a51694c6fa3b5bd3971696a4f13.1605636800.git.edvin.torok@citrix.com> X-Mailer: git-send-email 2.18.4 In-Reply-To: References: MIME-Version: 1.0 On CentOS 8 with SELinux containerize doesn't work at all: Make sure that the source code and SSH agent directories are passed on with SELinux relabeling enabled. (`-security-opt label=disabled` would be another option) Signed-off-by: Edwin Török Acked-by: Doug Goldstein --- automation/scripts/containerize | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/automation/scripts/containerize b/automation/scripts/containerize index a75d54566c..ed991bb79c 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -7,7 +7,7 @@ # and /etc/subgid. # docker_cmd=${DOCKER_CMD:-"docker"} -[ "$DOCKER_CMD" = "podman" ] && userns_podman="--userns=keep-id" +[ "$DOCKER_CMD" = "podman" ] && userns_podman="--userns=keep-id" selinux=",z" einfo() { echo "$*" >&2 @@ -95,9 +95,9 @@ einfo "*** Launching container ..." exec ${docker_cmd} run \ ${userarg} \ ${SSH_AUTH_SOCK:+-e SSH_AUTH_SOCK="/tmp/ssh-agent/${SSH_AUTH_NAME}"} \ - -v "${CONTAINER_PATH}":/build:rw \ + -v "${CONTAINER_PATH}":/build:rw${selinux} \ -v "${HOME}/.ssh":/root/.ssh:ro \ - ${SSH_AUTH_DIR:+-v "${SSH_AUTH_DIR}":/tmp/ssh-agent} \ + ${SSH_AUTH_DIR:+-v "${SSH_AUTH_DIR}":/tmp/ssh-agent${selinux}} \ ${XEN_CONFIG_EXPERT:+-e XEN_CONFIG_EXPERT=${XEN_CONFIG_EXPERT}} \ ${CONTAINER_ARGS} \ -${termint}i --rm -- \ From patchwork Tue Nov 17 18:24:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= X-Patchwork-Id: 11913211 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 81E7C14C0 for ; Tue, 17 Nov 2020 18:25:25 +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 4C7F62467A for ; Tue, 17 Nov 2020 18:25:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="X04BZn3D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4C7F62467A Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.29205.58466 (Exim 4.92) (envelope-from ) id 1kf5ec-0000KR-L0; Tue, 17 Nov 2020 18:24:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 29205.58466; Tue, 17 Nov 2020 18:24:34 +0000 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" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kf5ec-0000K5-Ef; Tue, 17 Nov 2020 18:24:34 +0000 Received: by outflank-mailman (input) for mailman id 29205; Tue, 17 Nov 2020 18:24:33 +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.92) (envelope-from ) id 1kf5eb-0000JV-A4 for xen-devel@lists.xenproject.org; Tue, 17 Nov 2020 18:24:33 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 685c27c8-d13e-44bb-b2c3-2762a5b9c7fb; Tue, 17 Nov 2020 18:24:32 +0000 (UTC) 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.92) (envelope-from ) id 1kf5eb-0000JV-A4 for xen-devel@lists.xenproject.org; Tue, 17 Nov 2020 18:24:33 +0000 X-Inumbo-ID: 685c27c8-d13e-44bb-b2c3-2762a5b9c7fb Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 685c27c8-d13e-44bb-b2c3-2762a5b9c7fb; Tue, 17 Nov 2020 18:24:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1605637472; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=eJ2hLKgOfS8/P8g/B8+o58K3OleQXpKSYMGB+jKi44U=; b=X04BZn3DyFbok95nRtc3LwEcRPZwNWCVqFNWH80Xv/J1lrtKnyHYGLH0 EvnOEX3lSRx329ue1c8jC6Fu4aQvk0TPqarYPrAZb4tckZ9Z48/ZC1Hpi KRPqeQY/lfQAxMKvfhvd5maVbqBnaIazi74li5XvawTl89l2nuBnol7N5 g=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: Duet1FZ93wPHjC75zY2ZTMyUr//3RCwPwahrIs/3iL1IC6BUuvJE9QfJRy1GENt7YOb79PvcI4 GUe1Ym/N+jKTQcxQHlY+LNPJKNMAzRE6bKP/pz4zsb0zy208zS4gZpbdE2ZeSbEbZ1PDXDK3R8 EEuFh18kA64U6gNz4sfOad44H28UqM1yIXvY4D9oBWnjLG972VWjCI/gAkBLbJ4dvaAckVRFiX gN4rxYrYlJoPV7Hl2BJ6CeOL9FT4u9Q4XQldWOYPKbgcVouepKmwFZePAWU98szHW7dovLbTz3 Iac= X-SBRS: None X-MesageID: 31365326 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.77,486,1596513600"; d="scan'208";a="31365326" From: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= To: CC: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= , "Doug Goldstein" Subject: [PATCH v1 2/4] automation/: add Ubuntu:focal container Date: Tue, 17 Nov 2020 18:24:10 +0000 Message-ID: <42b2b80779e264d60fa3daf01110fece34f00696.1605636800.git.edvin.torok@citrix.com> X-Mailer: git-send-email 2.18.4 In-Reply-To: References: MIME-Version: 1.0 Signed-off-by: Edwin Török Acked-by: Doug Goldstein --- automation/build/ubuntu/focal.dockerfile | 50 ++++++++++++++++++++++++ automation/scripts/containerize | 1 + 2 files changed, 51 insertions(+) create mode 100644 automation/build/ubuntu/focal.dockerfile diff --git a/automation/build/ubuntu/focal.dockerfile b/automation/build/ubuntu/focal.dockerfile new file mode 100644 index 0000000000..1f014b67bc --- /dev/null +++ b/automation/build/ubuntu/focal.dockerfile @@ -0,0 +1,50 @@ +FROM ubuntu:20.04 +LABEL maintainer.name="The Xen Project " \ + maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive +ENV USER root + +RUN mkdir /build +WORKDIR /build + +# build depends +RUN apt-get update && \ + apt-get --quiet --yes install \ + build-essential \ + zlib1g-dev \ + libncurses5-dev \ + libssl-dev \ + python-dev \ + python3-dev \ + xorg-dev \ + uuid-dev \ + libyajl-dev \ + libaio-dev \ + libglib2.0-dev \ + clang \ + libpixman-1-dev \ + pkg-config \ + flex \ + bison \ + gettext \ + acpica-tools \ + bin86 \ + bcc \ + liblzma-dev \ + libc6-dev-i386 \ + libnl-3-dev \ + ocaml-nox \ + libfindlib-ocaml-dev \ + libsystemd-dev \ + markdown \ + transfig \ + pandoc \ + checkpolicy \ + wget \ + git \ + nasm \ + && \ + apt-get autoremove -y && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/* diff --git a/automation/scripts/containerize b/automation/scripts/containerize index ed991bb79c..94ff8b1ca8 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -29,6 +29,7 @@ case "_${CONTAINER}" in _centos7) CONTAINER="${BASE}/centos:7" ;; _centos72) CONTAINER="${BASE}/centos:7.2" ;; _fedora) CONTAINER="${BASE}/fedora:29";; + _focal) CONTAINER="${BASE}/ubuntu:focal" ;; _jessie) CONTAINER="${BASE}/debian:jessie" ;; _stretch|_) CONTAINER="${BASE}/debian:stretch" ;; _unstable|_) CONTAINER="${BASE}/debian:unstable" ;; From patchwork Tue Nov 17 18:24:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= X-Patchwork-Id: 11913207 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 B16781668 for ; Tue, 17 Nov 2020 18:25:19 +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 732D22467A for ; Tue, 17 Nov 2020 18:25:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="K0t21k+9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 732D22467A Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.29208.58508 (Exim 4.92) (envelope-from ) id 1kf5ek-0000T1-KK; Tue, 17 Nov 2020 18:24:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 29208.58508; Tue, 17 Nov 2020 18:24:42 +0000 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" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kf5ek-0000Sq-GP; Tue, 17 Nov 2020 18:24:42 +0000 Received: by outflank-mailman (input) for mailman id 29208; Tue, 17 Nov 2020 18:24:42 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kf5ek-0000JQ-4X for xen-devel@lists.xenproject.org; Tue, 17 Nov 2020 18:24:42 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a928d525-978b-4330-9a74-8d722926b385; Tue, 17 Nov 2020 18:24:38 +0000 (UTC) Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kf5ek-0000JQ-4X for xen-devel@lists.xenproject.org; Tue, 17 Nov 2020 18:24:42 +0000 X-Inumbo-ID: a928d525-978b-4330-9a74-8d722926b385 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id a928d525-978b-4330-9a74-8d722926b385; Tue, 17 Nov 2020 18:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1605637479; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CtykqrKDJP663B6ErlZm6r+lHmD7f9GNtBRjUYk3JhQ=; b=K0t21k+9dWUlqzIhKlqURCvhhE58HeSX40fg5zgLYwUcPEmi+UvUn6np qNQCJqcwk+V2c7F/dzO6/b8lLf/oFfS28Zu9eyLu8ORocbDR3jTpmVUUG jVQlNQGK1zZvaZ5vHFbtQupS0dEpnBNt7pAkRUr/StQGbNgclogiPM7JC k=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: vV+tv1oYOZIXI216rBlo81pHarJwZSElKGw/uZUv3fXFBMiX8AizwokD/Xz7WCRqWf10mPeoxI HzqD1Qgh/Ar/D02fMWFpjmjl46nWBJTm28N7c2l6LvxwINePunbjJrDRiwzgbd3Uc5fRdGuwKb IQ6PXXXnS7S/5ya2m6p+7xmqr09AET9rn6h+CezA/zJfr0HP6OA1SFPhs6l7fCpWQD991hG59U C/uRZYLzwruOye3A0aTT6RcFIGUYKuJ+rQlqo6hI+2UU3XLMa9jnZnKVuIhLxpHCCO0/EuLINC rhA= X-SBRS: None X-MesageID: 31365339 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.77,486,1596513600"; d="scan'208";a="31365339" From: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= To: CC: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= , "Andrew Cooper" , George Dunlap , Ian Jackson , Jan Beulich , "Julien Grall" , Stefano Stabellini , Wei Liu , Christian Lindig , David Scott Subject: [PATCH v1 3/4] Makefile: add build-tools-oxenstored Date: Tue, 17 Nov 2020 18:24:11 +0000 Message-ID: <516274ccf7ce5958251fa36b1bd63b3216937b8b.1605636800.git.edvin.torok@citrix.com> X-Mailer: git-send-email 2.18.4 In-Reply-To: References: MIME-Version: 1.0 As a convenience so that oxenstored patches can be compile-tested using upstream's build-system before submitting upstream. Signed-off-by: Edwin Török Acked-by: Wei Liu --- Makefile | 6 ++++++ tools/ocaml/Makefile | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/Makefile b/Makefile index 9ad2602f63..96d32cfd50 100644 --- a/Makefile +++ b/Makefile @@ -62,6 +62,12 @@ build-xen: build-tools: build-tools-public-headers $(MAKE) -C tools build +.PHONY: build-tools-oxenstored +build-tools-oxenstored: build-tools-public-headers + $(MAKE) -s -C tools/ocaml clean + $(MAKE) -s -C tools/libs + $(MAKE) -C tools/ocaml build-tools-oxenstored + .PHONY: build-stubdom build-stubdom: mini-os-dir build-tools-public-headers $(MAKE) -C stubdom build diff --git a/tools/ocaml/Makefile b/tools/ocaml/Makefile index 66f2d6b131..a7c04b6546 100644 --- a/tools/ocaml/Makefile +++ b/tools/ocaml/Makefile @@ -26,3 +26,11 @@ clean: subdirs-clean .PHONY: distclean distclean: subdirs-distclean + +.PHONY: build-tools-oxenstored +build-tools-oxenstored: + $(MAKE) -s -C libs/eventchn + $(MAKE) -s -C libs/mmap + $(MAKE) -s -C libs/xb + $(MAKE) -s -C libs/xc + $(MAKE) -C xenstored From patchwork Tue Nov 17 18:24:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= X-Patchwork-Id: 11913205 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 C0FCC1668 for ; Tue, 17 Nov 2020 18:25:02 +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 740852467A for ; Tue, 17 Nov 2020 18:25:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="CDCQMG7Z" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 740852467A Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.29207.58496 (Exim 4.92) (envelope-from ) id 1kf5ej-0000Qd-9p; Tue, 17 Nov 2020 18:24:41 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 29207.58496; Tue, 17 Nov 2020 18:24:41 +0000 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" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kf5ej-0000QS-60; Tue, 17 Nov 2020 18:24:41 +0000 Received: by outflank-mailman (input) for mailman id 29207; Tue, 17 Nov 2020 18:24:39 +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.92) (envelope-from ) id 1kf5eh-0000Nf-64 for xen-devel@lists.xenproject.org; Tue, 17 Nov 2020 18:24:39 +0000 Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 85000255-6885-414e-a09d-84777ce71f9c; Tue, 17 Nov 2020 18:24:38 +0000 (UTC) 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.92) (envelope-from ) id 1kf5eh-0000Nf-64 for xen-devel@lists.xenproject.org; Tue, 17 Nov 2020 18:24:39 +0000 X-Inumbo-ID: 85000255-6885-414e-a09d-84777ce71f9c Received: from esa5.hc3370-68.iphmx.com (unknown [216.71.155.168]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 85000255-6885-414e-a09d-84777ce71f9c; Tue, 17 Nov 2020 18:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1605637478; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=i6bm0XeGGoT0blOMLK0wVmpS37YcigZ/KepZXeFkhVk=; b=CDCQMG7ZH8K/EbvBWB+MpbTHoI9j8xNVqXJDi0aD7ISfwA2KK4kf0n5l uyLNDLTtlopMu0agRfSkEF6mBfIwQwI3XlWwjeRqQVDYibbTFFJVwDnTL WTjAk2E6SqwnZjZew5xCt8v8jPswBRB3ZH/XNVK2vA+aDt7Cw6QSJugEJ Y=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: 1YBI43kkoek/v47lc4t9Y8IDbe6KSH18dXeybFs4y06H72P+DI3XEiaAsV1+7yaI0gHedJaL4e PtPON66JBgeg0xnC3DNtU3+Du5cRE/i0ERcZoA7RQUJc6v8wir9J5A2fLmzacY0ImEjwPPfW0z 6eMrNLnQYeeZ7agMNQK31Ay667AnvslrDpmTZ1p6xOUaxPaPnu4Ad07f30GqZRs5bEh3IbINPD je1isAWr+ASL7t04L0xOPt4qOspvC0qHF+6hkGReaC6amHYQT3dVlj6vCYsULEpGY1Vn/lCjfI REE= X-SBRS: None X-MesageID: 31385525 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.77,486,1596513600"; d="scan'208";a="31385525" From: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= To: CC: =?utf-8?b?RWR3aW4gVMO2csO2aw==?= , "Christian Lindig" , David Scott , "Ian Jackson" , Wei Liu Subject: [PATCH v1 4/4] tools/ocaml/libs/xc: backward compatible domid control at domain creation time Date: Tue, 17 Nov 2020 18:24:12 +0000 Message-ID: <559929d2ae95f6527e5050051c917b7586182ad2.1605636800.git.edvin.torok@citrix.com> X-Mailer: git-send-email 2.18.4 In-Reply-To: References: MIME-Version: 1.0 One can specify the domid to use when creating the domain, but this was hardcoded to 0. Keep the existing `domain_create` function (and the type of its parameters) as is to make backwards compatibility easier. Introduce a new `domain_create_domid` OCaml API that allows specifying the domid. A new version of xenopsd can choose to start using this, while old versions of xenopsd will keep building and using the old API. Controlling the domid can be useful during testing or migration. Signed-off-by: Edwin Török --- tools/ocaml/libs/xc/xenctrl.ml | 3 +++ tools/ocaml/libs/xc/xenctrl.mli | 2 ++ tools/ocaml/libs/xc/xenctrl_stubs.c | 9 +++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/ocaml/libs/xc/xenctrl.ml b/tools/ocaml/libs/xc/xenctrl.ml index e878699b0a..9d720886e9 100644 --- a/tools/ocaml/libs/xc/xenctrl.ml +++ b/tools/ocaml/libs/xc/xenctrl.ml @@ -182,6 +182,9 @@ let with_intf f = external domain_create: handle -> domctl_create_config -> domid = "stub_xc_domain_create" +external domain_create_domid: handle -> domctl_create_config -> domid -> domid + = "stub_xc_domain_create_domid" + external domain_sethandle: handle -> domid -> string -> unit = "stub_xc_domain_sethandle" diff --git a/tools/ocaml/libs/xc/xenctrl.mli b/tools/ocaml/libs/xc/xenctrl.mli index e64907df8e..e629022901 100644 --- a/tools/ocaml/libs/xc/xenctrl.mli +++ b/tools/ocaml/libs/xc/xenctrl.mli @@ -145,6 +145,8 @@ val close_handle: unit -> unit external domain_create : handle -> domctl_create_config -> domid = "stub_xc_domain_create" +external domain_create_domid : handle -> domctl_create_config -> domid -> domid + = "stub_xc_domain_create_domid" external domain_sethandle : handle -> domid -> string -> unit = "stub_xc_domain_sethandle" external domain_max_vcpus : handle -> domid -> int -> unit = "stub_xc_domain_max_vcpus" diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c index 94aba38a42..bb718fd164 100644 --- a/tools/ocaml/libs/xc/xenctrl_stubs.c +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c @@ -175,7 +175,7 @@ static unsigned int ocaml_list_to_c_bitmap(value l) return val; } -CAMLprim value stub_xc_domain_create(value xch, value config) +CAMLprim value stub_xc_domain_create_domid(value xch, value config, value want_domid) { CAMLparam2(xch, config); CAMLlocal2(l, arch_domconfig); @@ -191,7 +191,7 @@ CAMLprim value stub_xc_domain_create(value xch, value config) #define VAL_MAX_MAPTRACK_FRAMES Field(config, 7) #define VAL_ARCH Field(config, 8) - uint32_t domid = 0; + uint32_t domid = Int_val(want_domid); int result; struct xen_domctl_createdomain cfg = { .ssidref = Int32_val(VAL_SSIDREF), @@ -262,6 +262,11 @@ CAMLprim value stub_xc_domain_create(value xch, value config) CAMLreturn(Val_int(domid)); } +CAMLprim value stub_xc_domain_create(value xch, value config, value want_domid) +{ + return stub_xc_domain_create_domid(xch, config, Val_int(0)); +} + CAMLprim value stub_xc_domain_max_vcpus(value xch, value domid, value max_vcpus) {