From xen-changelog-bounces@lists.xenproject.org Mon Jul 01 17:44:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 01 Jul 2024 17:44:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.751853.1159931 (Exim 4.92) (envelope-from ) id 1sOL4P-0005OR-32; Mon, 01 Jul 2024 17:44:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 751853.1159931; Mon, 01 Jul 2024 17:44:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOL4P-0005OJ-0P; Mon, 01 Jul 2024 17:44:05 +0000 Received: by outflank-mailman (input) for mailman id 751853; Mon, 01 Jul 2024 17:44:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOL4O-0005OD-49 for xen-changelog@lists.xenproject.org; Mon, 01 Jul 2024 17:44:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOL4N-0003u6-LO for xen-changelog@lists.xenproject.org; Mon, 01 Jul 2024 17:44:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOL4N-0003RJ-I2 for xen-changelog@lists.xenproject.org; Mon, 01 Jul 2024 17:44:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Jp6h4b8nCVc5mZ9AhRoC0bGpNanJniH2o6Y70N6p3AY=; b=wxVguQdAr8J5yi8TXUWX2QP5oi pYTQh63HekPo3yQRNVaSde7FnFeTv0gxqMbgup9C7Sss7ZKtvsP2DZHXey7YxdZRWPVWkbuotIkpw GDlqKaPpBa1uJZZhSt/Ny1EduwgeFvU0qT7Sqt7AwDqukPS6UcpXWWGnMZGYx6uCVvxY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.19 RC1) Message-Id: Date: Mon, 01 Jul 2024 17:44:03 +0000 commit 7584e39986ef2cb4816892ffaefb26f4ad063468 Author: Julien Grall AuthorDate: Mon Jul 1 18:21:01 2024 +0100 Commit: Julien Grall CommitDate: Mon Jul 1 18:21:01 2024 +0100 Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.19 RC1) Signed-off-by: Julien Grall --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index 1a3938b6c4..e7aa8ceaaf 100644 --- a/Config.mk +++ b/Config.mk @@ -221,7 +221,7 @@ OVMF_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/ovmf.git OVMF_UPSTREAM_REVISION ?= ba91d0292e593df8528b66f99c1b0b14fadc8e16 QEMU_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/qemu-xen.git -QEMU_UPSTREAM_REVISION ?= master +QEMU_UPSTREAM_REVISION ?= 0df9387c8983e1b1e72d8c574356f572342c03e6 MINIOS_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/mini-os.git MINIOS_UPSTREAM_REVISION ?= 8b038c7411ae7e823eaf6d15d5efbe037a07197a -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 01 17:44:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 01 Jul 2024 17:44:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.751854.1159935 (Exim 4.92) (envelope-from ) id 1sOL4Z-0005Pp-4a; Mon, 01 Jul 2024 17:44:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 751854.1159935; Mon, 01 Jul 2024 17:44:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOL4Z-0005Ph-1l; Mon, 01 Jul 2024 17:44:15 +0000 Received: by outflank-mailman (input) for mailman id 751854; Mon, 01 Jul 2024 17:44:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOL4X-0005PY-Pm for xen-changelog@lists.xenproject.org; Mon, 01 Jul 2024 17:44:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOL4X-0003vg-P1 for xen-changelog@lists.xenproject.org; Mon, 01 Jul 2024 17:44:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOL4X-0003Ry-Ng for xen-changelog@lists.xenproject.org; Mon, 01 Jul 2024 17:44:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=8LdfYjzss/YAsooIP9efgmjNsDW8wx+0Tld4BTCncYQ=; b=pibIkTfnE7Zo8VbmgobKM9qHml BAUpGoy/tYtKrikD2rALtDNNuYI2ImfZ2x1oiNWZ7dZuUGYylLY49TpwOlEVLx8RTTjyPpLuK/BkT v5GXYg7WZWnS2TnMbTnWTcMOh2dugVSgZd9iukkNGpsOO/1c7B3TNTsiV4WYlv3qOAwY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] Update Xen version to 4.19-rc Message-Id: Date: Mon, 01 Jul 2024 17:44:13 +0000 commit 4a73eb4c205d6b2d3e44f3f9ec98dc0e44481f7b Author: Julien Grall AuthorDate: Mon Jul 1 18:31:34 2024 +0100 Commit: Julien Grall CommitDate: Mon Jul 1 18:31:39 2024 +0100 Update Xen version to 4.19-rc Signed-off-by: Julien Grall --- README | 16 ++++++++-------- SUPPORT.md | 2 +- xen/Makefile | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README b/README index c8a108449e..428e45549a 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ -############################################################ -__ __ _ _ _ -\ \/ /___ _ __ _ _ _ __ ___| |_ __ _| |__ | | ___ - \ // _ \ '_ \ _____| | | | '_ \/ __| __/ _` | '_ \| |/ _ \ - / \ __/ | | |_____| |_| | | | \__ \ || (_| | |_) | | __/ -/_/\_\___|_| |_| \__,_|_| |_|___/\__\__,_|_.__/|_|\___| - -############################################################ +################################################# +__ __ _ _ _ ___ +\ \/ /___ _ __ | || | / |/ _ \ _ __ ___ + \ // _ \ '_ \ | || |_ | | (_) |_____| '__/ __| + / \ __/ | | | |__ _|| |\__, |_____| | | (__ +/_/\_\___|_| |_| |_|(_)_| /_/ |_| \___| + +################################################# https://www.xen.org/ diff --git a/SUPPORT.md b/SUPPORT.md index 711aacf346..77d2a7a7db 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -9,7 +9,7 @@ for the definitions of the support status levels etc. # Release Support - Xen-Version: 4.19-unstable + Xen-Version: 4.19-rc Initial-Release: n/a Supported-Until: TBD Security-Support-Until: Unreleased - not yet security-supported diff --git a/xen/Makefile b/xen/Makefile index da8855f3c3..58ce6e468e 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -6,7 +6,7 @@ this-makefile := $(call lastword,$(MAKEFILE_LIST)) # All other places this is stored (eg. compile.h) should be autogenerated. export XEN_VERSION = 4 export XEN_SUBVERSION = 19 -export XEN_EXTRAVERSION ?= -unstable$(XEN_VENDORVERSION) +export XEN_EXTRAVERSION ?= 0-rc$(XEN_VENDORVERSION) export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) -include xen-version -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 02 06:44:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 02 Jul 2024 06:44:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.751974.1160088 (Exim 4.92) (envelope-from ) id 1sOXFF-0006fF-69; Tue, 02 Jul 2024 06:44:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 751974.1160088; Tue, 02 Jul 2024 06:44:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOXFF-0006f8-3j; Tue, 02 Jul 2024 06:44:05 +0000 Received: by outflank-mailman (input) for mailman id 751974; Tue, 02 Jul 2024 06:44:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOXFD-0006f2-ND for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 06:44:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOXFD-00009h-L1 for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 06:44:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOXFD-0007C9-JD for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 06:44:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=zfR5gMeHKHZHDPni7xvhZAQFXiGsg8XC+aXarHlGrZ0=; b=s6p0SS9GtCLaa8cdeNe+4uIuLh mt8+QztMmkVpRPJYmJfxn3AvFn5NU0ZoYyPTzcmI4IKzf88u0lYsCKaFnN8ZJ8alxmvKwFh8iiWFD BGiIrtuoLfJTULbJcSeRPBHnBuhb99iJrCObmGYPU4MPq8tFOFlci+Nh4Snzpf8Sogfg=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] pirq_cleanup_check() leaks Message-Id: Date: Tue, 02 Jul 2024 06:44:03 +0000 commit daa90dfea9175c07f13d1a2d901857b2dd14d080 Author: Jan Beulich AuthorDate: Tue Jul 2 08:35:56 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 2 08:35:56 2024 +0200 pirq_cleanup_check() leaks Its original introduction had two issues: For one the "common" part of the checks (carried out in the macro) was inverted. And then after removal from the radix tree the structure wasn't scheduled for freeing. (All structures still left in the radix tree would be freed upon domain destruction, though.) For the freeing to be safe even if it didn't use RCU (i.e. to avoid use- after-free), re-arrange checks/operations in evtchn_close(), such that the pointer wouldn't be used anymore after calling pirq_cleanup_check() (noting that unmap_domain_pirq_emuirq() itself calls the function in the success case). Fixes: c24536b636f2 ("replace d->nr_pirqs sized arrays with radix tree") Fixes: 79858fee307c ("xen: fix hvm_domain_use_pirq's behavior") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Release-Acked-By: Oleksii Kurochko --- xen/arch/x86/irq.c | 1 + xen/common/event_channel.c | 11 ++++++++--- xen/include/xen/irq.h | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 9a611c79e0..017a94e311 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1400,6 +1400,7 @@ void (pirq_cleanup_check)(struct pirq *pirq, struct domain *d) if ( radix_tree_delete(&d->pirq_tree, pirq->pirq) != pirq ) BUG(); + free_pirq_struct(pirq); } /* Flush all ready EOIs from the top of this CPU's pending-EOI stack. */ diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index a67feff989..aac7d4b93f 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -710,9 +710,14 @@ int evtchn_close(struct domain *d1, int port1, bool guest) if ( !is_hvm_domain(d1) ) pirq_guest_unbind(d1, pirq); pirq->evtchn = 0; - pirq_cleanup_check(pirq, d1); - if ( is_hvm_domain(d1) && domain_pirq_to_irq(d1, pirq->pirq) > 0 ) - unmap_domain_pirq_emuirq(d1, pirq->pirq); + if ( !is_hvm_domain(d1) || + domain_pirq_to_irq(d1, pirq->pirq) <= 0 || + unmap_domain_pirq_emuirq(d1, pirq->pirq) < 0 ) + /* + * The successful path of unmap_domain_pirq_emuirq() will have + * called pirq_cleanup_check() already. + */ + pirq_cleanup_check(pirq, d1); } unlink_pirq_port(chn1, d1->vcpu[chn1->notify_vcpu_id]); break; diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index 17211f3399..ee45d19af8 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -186,7 +186,7 @@ extern struct pirq *pirq_get_info(struct domain *d, int pirq); void pirq_cleanup_check(struct pirq *pirq, struct domain *d); #define pirq_cleanup_check(pirq, d) \ - ((pirq)->evtchn ? pirq_cleanup_check(pirq, d) : (void)0) + (!(pirq)->evtchn ? pirq_cleanup_check(pirq, d) : (void)0) extern void pirq_guest_eoi(struct pirq *pirq); extern void desc_guest_eoi(struct irq_desc *desc, struct pirq *pirq); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 02 06:44:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 02 Jul 2024 06:44:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.751975.1160094 (Exim 4.92) (envelope-from ) id 1sOXFP-0006gw-8h; Tue, 02 Jul 2024 06:44:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 751975.1160094; Tue, 02 Jul 2024 06:44:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOXFP-0006go-58; Tue, 02 Jul 2024 06:44:15 +0000 Received: by outflank-mailman (input) for mailman id 751975; Tue, 02 Jul 2024 06:44:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOXFN-0006gg-Op for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 06:44:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOXFN-0000Bd-O5 for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 06:44:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOXFN-0007Cr-NB for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 06:44:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=tb7jewk4GKjfEFB5vwv7WDns/NHhMOxtc3PGPSKza6w=; b=cxmCiDGhPQrVsE80r747X5nVaT xqzBAxEXfQluyyK8z0YwXqHiXSoGySiGb5wZzfb6fFe9BMn62MmyCNDd6vh+NFSSy2YXMMVvLeaNP hkcLpqvFmkzb2O4e5fWCMlglINspIBZD/EwWqW+USxTEqBt0xm+5WiX1LusBK9h/AmtI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/common: fix build issue for common/trace.c Message-Id: Date: Tue, 02 Jul 2024 06:44:13 +0000 commit 9ec74bdb2582dc5b0517e05a3650d24745889c2b Author: Oleksii Kurochko AuthorDate: Tue Jul 2 08:36:47 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 2 08:36:47 2024 +0200 xen/common: fix build issue for common/trace.c During Gitlab CI randconfig job for RISC-V failed witn an error: common/trace.c:57:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__read_mostly' 57 | static u32 data_size __read_mostly; Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich Acked-by: George Dunlap Release-Acked-by: Oleksii Kurochko --- xen/common/trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/common/trace.c b/xen/common/trace.c index c9c555094b..c33f115b6c 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 02 07:33:08 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 02 Jul 2024 07:33:08 +0000 Received: from list by lists.xenproject.org with outflank-mailman.751996.1160127 (Exim 4.92) (envelope-from ) id 1sOY0c-00054t-8e; Tue, 02 Jul 2024 07:33:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 751996.1160127; Tue, 02 Jul 2024 07:33:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOY0c-00054l-62; Tue, 02 Jul 2024 07:33:02 +0000 Received: by outflank-mailman (input) for mailman id 751996; Tue, 02 Jul 2024 07:33:01 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOY0b-00054f-QZ for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 07:33:01 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOY0b-00014X-Ot for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 07:33:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOY0b-0003zw-Nq for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 07:33:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=3YL5f/XBWZbZ80gHY9ov3Kma4hu1QcTY0+xJfrQ1hJ8=; b=hKntqflhd/rY48NuvlEG1SedTD UO6j4HQABNSEfZMdjLeoxG8RY88XrlRBjS/cGfjf8PwHSP6biFrDg9YkSBOpAdRTW2YoEQ8EL+xK+ +gs7CqIiEhfEN+KhW8jGspua8loAOOKSxu9UCkBegHujiKZvkcnEUk5L2s1DJ35wzLkU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.19 RC1) Message-Id: Date: Tue, 02 Jul 2024 07:33:01 +0000 commit 7584e39986ef2cb4816892ffaefb26f4ad063468 Author: Julien Grall AuthorDate: Mon Jul 1 18:21:01 2024 +0100 Commit: Julien Grall CommitDate: Mon Jul 1 18:21:01 2024 +0100 Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.19 RC1) Signed-off-by: Julien Grall --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index 1a3938b6c4..e7aa8ceaaf 100644 --- a/Config.mk +++ b/Config.mk @@ -221,7 +221,7 @@ OVMF_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/ovmf.git OVMF_UPSTREAM_REVISION ?= ba91d0292e593df8528b66f99c1b0b14fadc8e16 QEMU_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/qemu-xen.git -QEMU_UPSTREAM_REVISION ?= master +QEMU_UPSTREAM_REVISION ?= 0df9387c8983e1b1e72d8c574356f572342c03e6 MINIOS_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/mini-os.git MINIOS_UPSTREAM_REVISION ?= 8b038c7411ae7e823eaf6d15d5efbe037a07197a -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 02 07:33:12 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 02 Jul 2024 07:33:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.751997.1160130 (Exim 4.92) (envelope-from ) id 1sOY0m-00058i-A5; Tue, 02 Jul 2024 07:33:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 751997.1160130; Tue, 02 Jul 2024 07:33:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOY0m-00058b-7X; Tue, 02 Jul 2024 07:33:12 +0000 Received: by outflank-mailman (input) for mailman id 751997; Tue, 02 Jul 2024 07:33:11 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOY0l-00058T-Si for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 07:33:11 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOY0l-00014s-Rx for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 07:33:11 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOY0l-00040b-R1 for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 07:33:11 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=U7q+HIudCOZBDVQHNfnlp8RfpvbtOPTJbzEoJcRbySo=; b=n7FAv3hIQeNrrFyTfPi/U0I2lN 8W7K7LV7HcRdqJkBEbioJrbJsyGsVWD3w6pNGmLzvbvRBxU4x3Pl0jncc0iWTbBEnROyNcYrgOVNI cZK2EUHZDajkipzvv5iTzM+/1uWKIIww63h0zVAVOO/yjPR7cVH/D8Mf05iHw4cf540M=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] Update Xen version to 4.19-rc Message-Id: Date: Tue, 02 Jul 2024 07:33:11 +0000 commit 4a73eb4c205d6b2d3e44f3f9ec98dc0e44481f7b Author: Julien Grall AuthorDate: Mon Jul 1 18:31:34 2024 +0100 Commit: Julien Grall CommitDate: Mon Jul 1 18:31:39 2024 +0100 Update Xen version to 4.19-rc Signed-off-by: Julien Grall --- README | 16 ++++++++-------- SUPPORT.md | 2 +- xen/Makefile | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README b/README index c8a108449e..428e45549a 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ -############################################################ -__ __ _ _ _ -\ \/ /___ _ __ _ _ _ __ ___| |_ __ _| |__ | | ___ - \ // _ \ '_ \ _____| | | | '_ \/ __| __/ _` | '_ \| |/ _ \ - / \ __/ | | |_____| |_| | | | \__ \ || (_| | |_) | | __/ -/_/\_\___|_| |_| \__,_|_| |_|___/\__\__,_|_.__/|_|\___| - -############################################################ +################################################# +__ __ _ _ _ ___ +\ \/ /___ _ __ | || | / |/ _ \ _ __ ___ + \ // _ \ '_ \ | || |_ | | (_) |_____| '__/ __| + / \ __/ | | | |__ _|| |\__, |_____| | | (__ +/_/\_\___|_| |_| |_|(_)_| /_/ |_| \___| + +################################################# https://www.xen.org/ diff --git a/SUPPORT.md b/SUPPORT.md index 711aacf346..77d2a7a7db 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -9,7 +9,7 @@ for the definitions of the support status levels etc. # Release Support - Xen-Version: 4.19-unstable + Xen-Version: 4.19-rc Initial-Release: n/a Supported-Until: TBD Security-Support-Until: Unreleased - not yet security-supported diff --git a/xen/Makefile b/xen/Makefile index da8855f3c3..58ce6e468e 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -6,7 +6,7 @@ this-makefile := $(call lastword,$(MAKEFILE_LIST)) # All other places this is stored (eg. compile.h) should be autogenerated. export XEN_VERSION = 4 export XEN_SUBVERSION = 19 -export XEN_EXTRAVERSION ?= -unstable$(XEN_VENDORVERSION) +export XEN_EXTRAVERSION ?= 0-rc$(XEN_VENDORVERSION) export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) -include xen-version -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 02 10:00:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 02 Jul 2024 10:00:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752210.1160356 (Exim 4.92) (envelope-from ) id 1sOaIv-0002aO-6S; Tue, 02 Jul 2024 10:00:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752210.1160356; Tue, 02 Jul 2024 10:00:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaIv-0002Zt-2g; Tue, 02 Jul 2024 10:00:05 +0000 Received: by outflank-mailman (input) for mailman id 752210; Tue, 02 Jul 2024 10:00:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaIt-0002Jn-Mj for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:00:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaIt-0004Am-Ir for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:00:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOaIt-0006oX-H6 for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:00:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=X70Z64yWX7NWnwJ/ZBJbEcnD60HikqL7ylwJuHCsQHM=; b=jRjpd124oXwqmsv397NDIhGz7G obIXFnIBBo1zGGBCWRP88Lc1zLut522pGl4Udz+sJ+4ZNYMo5YxiibMPv2UJd5rq0W7E6eM3ALYhx g2enfDlfzLS1mLRn6jzC/KMc1Akn5NiQimesSAN/Dz0jNhTCmYo3QFxRCqINpKyJWA7o=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment() Message-Id: Date: Tue, 02 Jul 2024 10:00:03 +0000 commit 4c3a618b0adaa0cd59e0fa0898bb60978b8b3a5f Author: Andrew Cooper AuthorDate: Thu Jun 27 13:22:14 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 2 10:50:18 2024 +0100 tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment() xc_dom_alloc_segment() is passed a size in bytes, calculates a size in pages from it, then fills in the new segment information with a bytes value re-calculated from the number of pages. This causes the module information given to the guest (MB, or PVH) to have incorrect sizes; specifically, sizes rounded up to the next page. This in turn is problematic for Xen. When Xen finds a gzipped module, it peeks at the end metadata to judge the decompressed size, which is a -4 backreference from the reported end of the module. Fill in seg->vend using the correct number of bytes. Fixes: ea7c8a3d0e82 ("libxc: reorganize domain builder guest memory allocator") Signed-off-by: Andrew Cooper Acked-by: Anthony PERARD Release-Acked-by: Oleksii Kurochko --- tools/libs/guest/xg_dom_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/guest/xg_dom_core.c b/tools/libs/guest/xg_dom_core.c index c4f4e7f3e2..f5521d528b 100644 --- a/tools/libs/guest/xg_dom_core.c +++ b/tools/libs/guest/xg_dom_core.c @@ -601,7 +601,7 @@ int xc_dom_alloc_segment(struct xc_dom_image *dom, memset(ptr, 0, pages * page_size); seg->vstart = start; - seg->vend = dom->virt_alloc_end; + seg->vend = start + size; DOMPRINTF("%-20s: %-12s : 0x%" PRIx64 " -> 0x%" PRIx64 " (pfn 0x%" PRIpfn " + 0x%" PRIpfn " pages)", -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 02 10:00:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 02 Jul 2024 10:00:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752211.1160359 (Exim 4.92) (envelope-from ) id 1sOaJ4-0002kN-6u; Tue, 02 Jul 2024 10:00:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752211.1160359; Tue, 02 Jul 2024 10:00:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaJ4-0002kF-44; Tue, 02 Jul 2024 10:00:14 +0000 Received: by outflank-mailman (input) for mailman id 752211; Tue, 02 Jul 2024 10:00:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaJ3-0002k9-Nj for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:00:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaJ3-0004Aq-N0 for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:00:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOaJ3-0006qM-L6 for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:00:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=6sz7Y1CBKcDrbCWH96rvcIi9ezx1xp8+Z1mu6WGGfnk=; b=2KzrW/q+JqlflSB+2P25FDCWbO faicOCgBekTZVu2gVkpOUxrnAsWtwtTt4Ccq3etzAjYPTawDZimeXXVENd3UXh3N6u4BGaQKKSvEr 7RtsREy3xJBRtczyvDbTzYLXMIzU6KisE2Vr72qIznloHWBPijgbVskDw7k8c8FTUsWk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/libxs: Fix CLOEXEC handling in get_dev() Message-Id: Date: Tue, 02 Jul 2024 10:00:13 +0000 commit bf7c1464706adfa903f1e7d59383d042c3a88e39 Author: Andrew Cooper AuthorDate: Fri Jun 28 14:10:12 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 2 10:51:06 2024 +0100 tools/libxs: Fix CLOEXEC handling in get_dev() Move the O_CLOEXEC compatibility outside of an #ifdef USE_PTHREAD block. Introduce set_cloexec() to wrap fcntl() setting FD_CLOEXEC. It will be reused for other CLOEXEC fixes too. Use set_cloexec() when O_CLOEXEC isn't available as a best-effort fallback. Fixes: f4f2f3402b2f ("tools/libxs: Open /dev/xen/xenbus fds as O_CLOEXEC") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD --- tools/libs/store/xs.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 1498515073..037e79d98b 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -40,6 +40,10 @@ #include #include +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + struct xs_stored_msg { XEN_TAILQ_ENTRY(struct xs_stored_msg) list; struct xsd_sockmsg hdr; @@ -54,10 +58,6 @@ struct xs_stored_msg { #include #endif -#ifndef O_CLOEXEC -#define O_CLOEXEC 0 -#endif - struct xs_handle { /* Communications channel to xenstore daemon. */ int fd; @@ -176,6 +176,16 @@ static bool setnonblock(int fd, int nonblock) { return true; } +static bool set_cloexec(int fd) +{ + int flags = fcntl(fd, F_GETFL); + + if (flags < 0) + return false; + + return fcntl(fd, flags | FD_CLOEXEC) >= 0; +} + int xs_fileno(struct xs_handle *h) { char c = 0; @@ -230,8 +240,24 @@ error: static int get_dev(const char *connect_to) { - /* We cannot open read-only because requests are writes */ - return open(connect_to, O_RDWR | O_CLOEXEC); + int fd, saved_errno; + + fd = open(connect_to, O_RDWR | O_CLOEXEC); + if (fd < 0) + return -1; + + /* Compat for non-O_CLOEXEC environments. Racy. */ + if (!O_CLOEXEC && !set_cloexec(fd)) + goto error; + + return fd; + +error: + saved_errno = errno; + close(fd); + errno = saved_errno; + + return -1; } static int all_restrict_cb(Xentoolcore__Active_Handle *ah, domid_t domid) { -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 02 10:00:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 02 Jul 2024 10:00:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752212.1160363 (Exim 4.92) (envelope-from ) id 1sOaJF-0002nZ-9U; Tue, 02 Jul 2024 10:00:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752212.1160363; Tue, 02 Jul 2024 10:00:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaJF-0002nP-6j; Tue, 02 Jul 2024 10:00:25 +0000 Received: by outflank-mailman (input) for mailman id 752212; Tue, 02 Jul 2024 10:00:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaJD-0002n0-Rh for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:00:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaJD-0004B5-QE for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:00:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOaJD-0006s0-P8 for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:00:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=71cS+Cz4BodnOD3WmewQQF1SjlXkggGG/DiWwyAb7s0=; b=ncdcGRthXHA7szcuc81Op6knla cTV2KN2nytzP6zRPmV4I+giQSIIIbMcfhvGtD+WLYIx7FRwSsubpq+H0NT4uwcZxHzq311n46MGC1 AYVvBd9PAzmUwv8R24W97ZhDGQSsmNFvz185wseuwgj3Z6G1Q1ylyGjNTu2KfyVvH08Q=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/libxs: Fix CLOEXEC handling in get_socket() Message-Id: Date: Tue, 02 Jul 2024 10:00:23 +0000 commit 1957dd6aff931877fc22699d8f2d4be8728014ba Author: Andrew Cooper AuthorDate: Fri Jun 28 11:24:14 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 2 10:51:11 2024 +0100 tools/libxs: Fix CLOEXEC handling in get_socket() get_socket() opens a socket, then uses fcntl() to set CLOEXEC. This is racy with exec(). Open the socket with SOCK_CLOEXEC. Use the same compatibility strategy as O_CLOEXEC on ancient versions of Linux. Reported-by: Frediano Ziglio Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD --- tools/libs/store/xs.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 037e79d98b..11a766c508 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -44,6 +44,10 @@ #define O_CLOEXEC 0 #endif +#ifndef SOCK_CLOEXEC +#define SOCK_CLOEXEC 0 +#endif + struct xs_stored_msg { XEN_TAILQ_ENTRY(struct xs_stored_msg) list; struct xsd_sockmsg hdr; @@ -207,16 +211,14 @@ int xs_fileno(struct xs_handle *h) static int get_socket(const char *connect_to) { struct sockaddr_un addr; - int sock, saved_errno, flags; + int sock, saved_errno; - sock = socket(PF_UNIX, SOCK_STREAM, 0); + sock = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); if (sock < 0) return -1; - if ((flags = fcntl(sock, F_GETFD)) < 0) - goto error; - flags |= FD_CLOEXEC; - if (fcntl(sock, F_SETFD, flags) < 0) + /* Compat for non-SOCK_CLOEXEC environments. Racy. */ + if (!SOCK_CLOEXEC && !set_cloexec(sock)) goto error; addr.sun_family = AF_UNIX; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 02 10:00:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 02 Jul 2024 10:00:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752213.1160366 (Exim 4.92) (envelope-from ) id 1sOaJP-0002qc-Ah; Tue, 02 Jul 2024 10:00:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752213.1160366; Tue, 02 Jul 2024 10:00:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaJP-0002qU-86; Tue, 02 Jul 2024 10:00:35 +0000 Received: by outflank-mailman (input) for mailman id 752213; Tue, 02 Jul 2024 10:00:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaJN-0002qH-UU for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:00:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaJN-0004BB-To for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:00:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOaJN-0006tC-Sw for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:00:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=prDLOG/aF3c6Fce/waLWtEMNKpQrFXvF85VOZ10PLUU=; b=uy5xfntT/UevUDHJ2L6KdCC+aT cr0qFw0d0eoHeUm+9xttarwG+EJYF5NrIVMDicG0/39TOUwD1y2ZE+83hqlj8FQbF3KxMNSLpNyGr kCv3ZlWmKOuNrK5epOSQEd44n9SuYVaBqUL38zzu19RJXX8BkqhmroAuU2m9T/49GCUI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/libxs: Fix CLOEXEC handling in xs_fileno() Message-Id: Date: Tue, 02 Jul 2024 10:00:33 +0000 commit a2ff677852f0ce05fa335e8e5682bf2ae0c916ee Author: Andrew Cooper AuthorDate: Fri Jun 28 14:04:30 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 2 10:52:59 2024 +0100 tools/libxs: Fix CLOEXEC handling in xs_fileno() xs_fileno() opens a pipe on first use to communicate between the watch thread and the main thread. Nothing ever sets CLOEXEC on the file descriptors. Check for the availability of the pipe2() function with configure. Despite starting life as Linux-only, FreeBSD and NetBSD have gained it. When pipe2() isn't available, try our best with pipe() and set_cloexec(). Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD --- tools/config.h.in | 3 +++ tools/configure | 12 ++++++++++++ tools/configure.ac | 2 ++ tools/libs/store/xs.c | 16 +++++++++++++++- 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/tools/config.h.in b/tools/config.h.in index 0bb2fe08a1..50ad60fcb0 100644 --- a/tools/config.h.in +++ b/tools/config.h.in @@ -39,6 +39,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `pipe2' function. */ +#undef HAVE_PIPE2 + /* pygrub enabled */ #undef HAVE_PYGRUB diff --git a/tools/configure b/tools/configure index 459bfb5652..a6b43bfc60 100755 --- a/tools/configure +++ b/tools/configure @@ -9751,6 +9751,18 @@ if test "$ax_found" = "0"; then : fi +for ac_func in pipe2 +do : + ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +if test "x$ac_cv_func_pipe2" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PIPE2 1 +_ACEOF + +fi +done + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/tools/configure.ac b/tools/configure.ac index 851887080c..ac0fdc4314 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -543,4 +543,6 @@ AS_IF([test "x$pvshim" = "xy"], [ AX_FIND_HEADER([INCLUDE_ENDIAN_H], [endian.h sys/endian.h]) +AC_CHECK_FUNCS([pipe2]) + AC_OUTPUT() diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 11a766c508..c8845b69e2 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -190,13 +190,27 @@ static bool set_cloexec(int fd) return fcntl(fd, flags | FD_CLOEXEC) >= 0; } +static int pipe_cloexec(int fds[2]) +{ +#if HAVE_PIPE2 + return pipe2(fds, O_CLOEXEC); +#else + if (pipe(fds) < 0) + return -1; + /* Best effort to set CLOEXEC. Racy. */ + set_cloexec(fds[0]); + set_cloexec(fds[1]); + return 0; +#endif +} + int xs_fileno(struct xs_handle *h) { char c = 0; mutex_lock(&h->watch_mutex); - if ((h->watch_pipe[0] == -1) && (pipe(h->watch_pipe) != -1)) { + if ((h->watch_pipe[0] == -1) && (pipe_cloexec(h->watch_pipe) != -1)) { /* Kick things off if the watch list is already non-empty. */ if (!XEN_TAILQ_EMPTY(&h->watch_list)) while (write(h->watch_pipe[1], &c, 1) != 1) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 02 10:11:07 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 02 Jul 2024 10:11:07 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752220.1160381 (Exim 4.92) (envelope-from ) id 1sOaTY-0005Ay-86; Tue, 02 Jul 2024 10:11:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752220.1160381; Tue, 02 Jul 2024 10:11:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaTY-0005Ao-5J; Tue, 02 Jul 2024 10:11:04 +0000 Received: by outflank-mailman (input) for mailman id 752220; Tue, 02 Jul 2024 10:11:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaTX-0005Ai-CJ for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:11:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaTX-0004LN-AB for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:11:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOaTX-0007oT-7s for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:11:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Wj32+orE+6DFgu83b0M/WWS7Vri9okokNrc84W0IvGk=; b=RYYFOiUWU9nB7o6h7H36wXaHID XcbwMUWM7dyRWJKuJcg5zj1Ee4AjTCwrV5wOehet68ayfZ4i4+Sxtu6sxttxbRm0De8H+lvXjzxKc 1Hb+UY0e+8lXB3lkDOpN98br6Gt9zUYSSuwWUJtGEXM1kz5T8VghFmEozG2dIo0Mz+Wc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] cmdline: document and enforce "extra_guest_irqs" upper bounds Message-Id: Date: Tue, 02 Jul 2024 10:11:03 +0000 commit 17f6d398f76597f8009ec0530842fb8705ece7ba Author: Jan Beulich AuthorDate: Tue Jul 2 12:00:27 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 2 12:00:27 2024 +0200 cmdline: document and enforce "extra_guest_irqs" upper bounds PHYSDEVOP_pirq_eoi_gmfn_v accepting just a single GFN implies that no more than 32k pIRQ-s can be used by a domain on x86. Document this upper bound. To also enforce the limit, (ab)use both arch_hwdom_irqs() (changing its parameter type) and setup_system_domains(). This is primarily to avoid exposing the two static variables or introducing yet further arch hooks. While touching arch_hwdom_irqs() also mark it hwdom-init. Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- docs/misc/xen-command-line.pandoc | 3 ++- xen/arch/x86/io_apic.c | 16 +++++++++------- xen/common/domain.c | 20 +++++++++++++++++++- xen/include/xen/irq.h | 3 ++- 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index 1dea7431fa..cd9a7164f4 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -1175,7 +1175,8 @@ common for all domUs, while the optional second number (preceded by a comma) is for dom0. Changing the setting for domU has no impact on dom0 and vice versa. For example to change dom0 without changing domU, use `extra_guest_irqs=,512`. The default value for Dom0 and an eventual separate -hardware domain is architecture dependent. +hardware domain is architecture dependent. The upper limit for both values on +x86 is such that the resulting total number of IRQs can't be higher than 32768. Note that specifying zero as domU value means zero, while for dom0 it means to use the default. diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index d73108558e..adcc9b2ff3 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2660,18 +2660,20 @@ void __init ioapic_init(void) nr_irqs_gsi, nr_irqs - nr_irqs_gsi); } -unsigned int arch_hwdom_irqs(domid_t domid) +unsigned int __hwdom_init arch_hwdom_irqs(const struct domain *d) { unsigned int n = fls(num_present_cpus()); + /* Bounded by the domain pirq EOI bitmap gfn. */ + const unsigned int max_irqs = PAGE_SIZE * BITS_PER_BYTE; - if ( !domid ) - n = min(n, dom0_max_vcpus()); - n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, nr_irqs); + if ( is_system_domain(d) ) + return max_irqs; - /* Bounded by the domain pirq eoi bitmap gfn. */ - n = min_t(unsigned int, n, PAGE_SIZE * BITS_PER_BYTE); + if ( !d->domain_id ) + n = min(n, dom0_max_vcpus()); + n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, min(nr_irqs, max_irqs)); - printk("Dom%d has maximum %u PIRQs\n", domid, n); + printk("%pd has maximum %u PIRQs\n", d, n); return n; } diff --git a/xen/common/domain.c b/xen/common/domain.c index 67cadb7c3f..23a73d953c 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -695,7 +695,7 @@ struct domain *domain_create(domid_t domid, d->nr_pirqs = nr_static_irqs + extra_domU_irqs; else d->nr_pirqs = extra_hwdom_irqs ? nr_static_irqs + extra_hwdom_irqs - : arch_hwdom_irqs(domid); + : arch_hwdom_irqs(d); d->nr_pirqs = min(d->nr_pirqs, nr_irqs); radix_tree_init(&d->pirq_tree); @@ -829,6 +829,24 @@ void __init setup_system_domains(void) if ( IS_ERR(dom_xen) ) panic("Failed to create d[XEN]: %ld\n", PTR_ERR(dom_xen)); +#ifdef CONFIG_HAS_PIRQ + /* Bound-check values passed via "extra_guest_irqs=". */ + { + unsigned int n = max(arch_hwdom_irqs(dom_xen), nr_static_irqs); + + if ( extra_hwdom_irqs > n - nr_static_irqs ) + { + extra_hwdom_irqs = n - nr_static_irqs; + printk(XENLOG_WARNING "hwdom IRQs bounded to %u\n", n); + } + if ( extra_domU_irqs > max(32U, n - nr_static_irqs) ) + { + extra_domU_irqs = n - nr_static_irqs; + printk(XENLOG_WARNING "domU IRQs bounded to %u\n", n); + } + } +#endif + /* * Initialise our DOMID_IO domain. * This domain owns I/O pages that are within the range of the page_info diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index ee45d19af8..95034c0d6b 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -202,8 +202,9 @@ extern struct irq_desc *pirq_spin_lock_irq_desc( unsigned int set_desc_affinity(struct irq_desc *desc, const cpumask_t *mask); +/* When passed a system domain, this returns the maximum permissible value. */ #ifndef arch_hwdom_irqs -unsigned int arch_hwdom_irqs(domid_t domid); +unsigned int arch_hwdom_irqs(const struct domain *d); #endif #ifndef arch_evtchn_bind_pirq -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 02 10:11:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 02 Jul 2024 10:11:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752224.1160394 (Exim 4.92) (envelope-from ) id 1sOaTi-0005TX-LV; Tue, 02 Jul 2024 10:11:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752224.1160394; Tue, 02 Jul 2024 10:11:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaTi-0005TP-IS; Tue, 02 Jul 2024 10:11:14 +0000 Received: by outflank-mailman (input) for mailman id 752224; Tue, 02 Jul 2024 10:11:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaTh-0005Sj-Dy for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:11:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaTh-0004Lk-D9 for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:11:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOaTh-0007pM-CL for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:11:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=aBOQHAgNHY1G6pSTkVYgVpYYTJjD89lPTbNwJO1LOZc=; b=1GHSuYHboc4EpGCg9dTq/M8gU1 /OjHlgSA7b0K+8nJjuQgLx/0CS8hy8CsPmJy68KdXIHQhy3bQ+ud8MaN2v1CEzEmuNTf38+k+zelV u+6ROhrnaRLQ77aXcgNikkL1uUoJAQ/ttjItt3opOlouJRIxrSY2sDMhfrXWPtM+qYIE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/entry: don't clear DF when raising #UD for lack of syscall handler Message-Id: Date: Tue, 02 Jul 2024 10:11:13 +0000 commit d2fe9ab3048d503869ec81bc49db07e55a4a2386 Author: Jan Beulich AuthorDate: Tue Jul 2 12:01:21 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 2 12:01:21 2024 +0200 x86/entry: don't clear DF when raising #UD for lack of syscall handler While doing so is intentional when invoking the actual callback, to mimic a hard-coded SYCALL_MASK / FMASK MSR, the same should not be done when no handler is available and hence #UD is raised. Fixes: ca6fcf4321b3 ("x86/pv: Inject #UD for missing SYSCALL callbacks") Reported-by: Andrew Cooper Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Release-Acked-By: Oleksii Kurochko --- xen/arch/x86/x86_64/entry.S | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index df015589ce..b8482de8ee 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -38,6 +38,14 @@ FUNC_LOCAL(switch_to_kernel) setc %cl leal (,%rcx,TBF_INTERRUPT),%ecx + /* + * The PV ABI hardcodes the (guest-inaccessible and virtual) + * SYSCALL_MASK MSR such that DF (and nothing else) would be cleared. + * Note that the equivalent of IF (VGCF_syscall_disables_events) is + * dealt with separately above. + */ + mov $~X86_EFLAGS_DF, %esi + test %rax, %rax UNLIKELY_START(z, syscall_no_callback) /* TB_eip == 0 => #UD */ mov VCPU_trap_ctxt(%rbx), %rdi @@ -47,12 +55,14 @@ UNLIKELY_START(z, syscall_no_callback) /* TB_eip == 0 => #UD */ testb $4, X86_EXC_UD * TRAPINFO_sizeof + TRAPINFO_flags(%rdi) setnz %cl lea TBF_EXCEPTION(, %rcx, TBF_INTERRUPT), %ecx + or $~0, %esi /* Don't clear DF */ UNLIKELY_END(syscall_no_callback) movq %rax,TRAPBOUNCE_eip(%rdx) movb %cl,TRAPBOUNCE_flags(%rdx) call create_bounce_frame - andl $~X86_EFLAGS_DF,UREGS_eflags(%rsp) + /* Conditionally clear DF */ + and %esi, UREGS_eflags(%rsp) /* %rbx: struct vcpu */ test_all_events: ASSERT_NOT_IN_ATOMIC -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 02 10:11:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 02 Jul 2024 10:11:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752227.1160400 (Exim 4.92) (envelope-from ) id 1sOaTs-0005dV-NJ; Tue, 02 Jul 2024 10:11:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752227.1160400; Tue, 02 Jul 2024 10:11: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 1sOaTs-0005ct-Jt; Tue, 02 Jul 2024 10:11:24 +0000 Received: by outflank-mailman (input) for mailman id 752227; Tue, 02 Jul 2024 10:11:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaTr-0005cI-H0 for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:11:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOaTr-0004Ly-GE for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:11:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOaTr-0007rp-FD for xen-changelog@lists.xenproject.org; Tue, 02 Jul 2024 10:11:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=7hZYBMuH+9TxAChw/d0F2jWqHxMj+pTNvQBuj13CsLk=; b=wl4GNMExg+D7JMCHOydwEEETZr BuM1eD1dQI0q67HAWMnGkeICwATuLeE0DxDRjaRu7tIqPgjAiDBwYcA4zebCrDnbqwd9YFr6eLTWi wZXkyAw8NN2Faxfe1gfx3CS/rX1XhL5KWxGT3aIbImZWmItBGMsYDcMhkQ3tSDOI8Ve4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen: avoid UB in guest handle field accessors Message-Id: Date: Tue, 02 Jul 2024 10:11:23 +0000 commit 08daa72cdcb660c2f0aef52ee76a3704e2dd1b5b Author: Jan Beulich AuthorDate: Tue Jul 2 12:01:59 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 2 12:01:59 2024 +0200 xen: avoid UB in guest handle field accessors Much like noted in 43d5c5d5f70b ("xen: avoid UB in guest handle arithmetic"), address calculations involved in accessing a struct field can overflow, too. Cast respective pointers to "unsigned long" and convert type checking accordingly. Remaining arithmetic is, despite there possibly being mathematical overflow, okay as per the C99 spec: "A computation involving unsigned operands can never overflow, because a result that cannot be represented by the resulting unsigned integer type is reduced modulo the number that is one greater than the largest value that can be represented by the resulting type." The overflow that we need to guard against is checked for in array_access_ok(). While there add the missing (see {,__}copy_to_guest_offset()) is-not- const checks to {,__}copy_field_to_guest(). Typically, but not always, no change to generated code; code generation (register allocation) is different for at least common/grant_table.c. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper Release-Acked-by: Oleksii Kurochko --- xen/include/xen/guest_access.h | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/xen/include/xen/guest_access.h b/xen/include/xen/guest_access.h index 2e0971c487..6489924db6 100644 --- a/xen/include/xen/guest_access.h +++ b/xen/include/xen/guest_access.h @@ -95,16 +95,23 @@ /* Copy sub-field of a structure to guest context via a guest handle. */ #define copy_field_to_guest(hnd, ptr, field) ({ \ const typeof(&(ptr)->field) _s = &(ptr)->field; \ - void *_d = &(hnd).p->field; \ - (void)(&(hnd).p->field == _s); \ - raw_copy_to_guest(_d, _s, sizeof(*_s)); \ + unsigned long d_ = (unsigned long)(hnd).p; \ + /* Check that the handle is not for a const type */ \ + void *__maybe_unused _t = (hnd).p; \ + (void)((typeof_field(typeof(*(hnd).p), field) *)NULL == _s); \ + raw_copy_to_guest((void *)(d_ + offsetof(typeof(*(hnd).p), field)), \ + _s, sizeof(*_s)); \ }) /* Copy sub-field of a structure from guest context via a guest handle. */ #define copy_field_from_guest(ptr, hnd, field) ({ \ - const typeof(&(ptr)->field) _s = &(hnd).p->field; \ + unsigned long s_ = (unsigned long)(hnd).p; \ typeof(&(ptr)->field) _d = &(ptr)->field; \ - raw_copy_from_guest(_d, _s, sizeof(*_d)); \ + (void)((typeof_field(typeof(*(hnd).p), field) *)NULL == _d); \ + raw_copy_from_guest(_d, \ + (const void *)(s_ + \ + offsetof(typeof(*(hnd).p), field)), \ + sizeof(*_d)); \ }) #define copy_to_guest(hnd, ptr, nr) \ @@ -149,15 +156,22 @@ #define __copy_field_to_guest(hnd, ptr, field) ({ \ const typeof(&(ptr)->field) _s = &(ptr)->field; \ - void *_d = &(hnd).p->field; \ - (void)(&(hnd).p->field == _s); \ - __raw_copy_to_guest(_d, _s, sizeof(*_s)); \ + unsigned long d_ = (unsigned long)(hnd).p; \ + /* Check that the handle is not for a const type */ \ + void *__maybe_unused _t = (hnd).p; \ + (void)((typeof_field(typeof(*(hnd).p), field) *)NULL == _s); \ + __raw_copy_to_guest((void *)(d_ + offsetof(typeof(*(hnd).p), field)), \ + _s, sizeof(*_s)); \ }) #define __copy_field_from_guest(ptr, hnd, field) ({ \ - const typeof(&(ptr)->field) _s = &(hnd).p->field; \ + unsigned long s_ = (unsigned long)(hnd).p; \ typeof(&(ptr)->field) _d = &(ptr)->field; \ - __raw_copy_from_guest(_d, _s, sizeof(*_d)); \ + (void)((typeof_field(typeof(*(hnd).p), field) *)NULL == _d); \ + __raw_copy_from_guest(_d, \ + (const void *)(s_ + \ + offsetof(typeof(*(hnd).p), field)), \ + sizeof(*_d)); \ }) #define __copy_to_guest(hnd, ptr, nr) \ -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 03 05:44:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 03 Jul 2024 05:44:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752725.1160916 (Exim 4.92) (envelope-from ) id 1sOsmh-0005yb-9s; Wed, 03 Jul 2024 05:44:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752725.1160916; Wed, 03 Jul 2024 05:44:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsmh-0005yT-7E; Wed, 03 Jul 2024 05:44:03 +0000 Received: by outflank-mailman (input) for mailman id 752725; Wed, 03 Jul 2024 05:44:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsmg-0005yM-EQ for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsmg-0004ln-DZ for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOsmg-000232-Ca for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Wd8ttSVzJJMpOcR509o17fKA8fVwmYa8rgOr3//vtdo=; b=yfVx7ImMJUrBx7/WSRoAk0iyWe PjvFY9vNsTYSoFOfGMt3Q+p+bSyfAGZNFrzADtQHzP1eWDIKBpKW9vioa6kDcVXkdpDRRmwiHOWlF K74BGyzyGUWv6gKaBQwhwWVwzc0H30c0z1Kl+nKPBF3aVU53B5jpdyml643MY0j8k6m8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] pirq_cleanup_check() leaks Message-Id: Date: Wed, 03 Jul 2024 05:44:02 +0000 commit daa90dfea9175c07f13d1a2d901857b2dd14d080 Author: Jan Beulich AuthorDate: Tue Jul 2 08:35:56 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 2 08:35:56 2024 +0200 pirq_cleanup_check() leaks Its original introduction had two issues: For one the "common" part of the checks (carried out in the macro) was inverted. And then after removal from the radix tree the structure wasn't scheduled for freeing. (All structures still left in the radix tree would be freed upon domain destruction, though.) For the freeing to be safe even if it didn't use RCU (i.e. to avoid use- after-free), re-arrange checks/operations in evtchn_close(), such that the pointer wouldn't be used anymore after calling pirq_cleanup_check() (noting that unmap_domain_pirq_emuirq() itself calls the function in the success case). Fixes: c24536b636f2 ("replace d->nr_pirqs sized arrays with radix tree") Fixes: 79858fee307c ("xen: fix hvm_domain_use_pirq's behavior") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Release-Acked-By: Oleksii Kurochko --- xen/arch/x86/irq.c | 1 + xen/common/event_channel.c | 11 ++++++++--- xen/include/xen/irq.h | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 9a611c79e0..017a94e311 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1400,6 +1400,7 @@ void (pirq_cleanup_check)(struct pirq *pirq, struct domain *d) if ( radix_tree_delete(&d->pirq_tree, pirq->pirq) != pirq ) BUG(); + free_pirq_struct(pirq); } /* Flush all ready EOIs from the top of this CPU's pending-EOI stack. */ diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index a67feff989..aac7d4b93f 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -710,9 +710,14 @@ int evtchn_close(struct domain *d1, int port1, bool guest) if ( !is_hvm_domain(d1) ) pirq_guest_unbind(d1, pirq); pirq->evtchn = 0; - pirq_cleanup_check(pirq, d1); - if ( is_hvm_domain(d1) && domain_pirq_to_irq(d1, pirq->pirq) > 0 ) - unmap_domain_pirq_emuirq(d1, pirq->pirq); + if ( !is_hvm_domain(d1) || + domain_pirq_to_irq(d1, pirq->pirq) <= 0 || + unmap_domain_pirq_emuirq(d1, pirq->pirq) < 0 ) + /* + * The successful path of unmap_domain_pirq_emuirq() will have + * called pirq_cleanup_check() already. + */ + pirq_cleanup_check(pirq, d1); } unlink_pirq_port(chn1, d1->vcpu[chn1->notify_vcpu_id]); break; diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index 17211f3399..ee45d19af8 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -186,7 +186,7 @@ extern struct pirq *pirq_get_info(struct domain *d, int pirq); void pirq_cleanup_check(struct pirq *pirq, struct domain *d); #define pirq_cleanup_check(pirq, d) \ - ((pirq)->evtchn ? pirq_cleanup_check(pirq, d) : (void)0) + (!(pirq)->evtchn ? pirq_cleanup_check(pirq, d) : (void)0) extern void pirq_guest_eoi(struct pirq *pirq); extern void desc_guest_eoi(struct irq_desc *desc, struct pirq *pirq); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 03 05:44:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 03 Jul 2024 05:44:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752726.1160920 (Exim 4.92) (envelope-from ) id 1sOsmr-00060h-BB; Wed, 03 Jul 2024 05:44:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752726.1160920; Wed, 03 Jul 2024 05:44:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsmr-00060Z-8d; Wed, 03 Jul 2024 05:44:13 +0000 Received: by outflank-mailman (input) for mailman id 752726; Wed, 03 Jul 2024 05:44:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsmq-00060P-HZ for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsmq-0004nQ-Gb for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOsmq-00023v-Fj for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=VdyJuB+1kvzRaiBJ7OLawgzC37NBHNZ1eHsvhbNTUyU=; b=POq5YyxaeQ5q1Y/HKFDJkZJvRj +5Ul4yKNC0akmriOCj4ef4MtyeetwzvvZJMRRrpmUrrHU+Rp4AZGfQ7Bu4x8VSMz8mZSDESI/pnk0 /wsvvjzArkfwG23InfnHz4WstFQOQ5RPvW9kkM4ttOzhMSZbrqU9c2l15ai66+4OqBtM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] xen/common: fix build issue for common/trace.c Message-Id: Date: Wed, 03 Jul 2024 05:44:12 +0000 commit 9ec74bdb2582dc5b0517e05a3650d24745889c2b Author: Oleksii Kurochko AuthorDate: Tue Jul 2 08:36:47 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 2 08:36:47 2024 +0200 xen/common: fix build issue for common/trace.c During Gitlab CI randconfig job for RISC-V failed witn an error: common/trace.c:57:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__read_mostly' 57 | static u32 data_size __read_mostly; Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich Acked-by: George Dunlap Release-Acked-by: Oleksii Kurochko --- xen/common/trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/common/trace.c b/xen/common/trace.c index c9c555094b..c33f115b6c 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 03 05:44:23 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 03 Jul 2024 05:44:23 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752727.1160923 (Exim 4.92) (envelope-from ) id 1sOsn1-00063k-Ca; Wed, 03 Jul 2024 05:44:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752727.1160923; Wed, 03 Jul 2024 05:44:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsn1-00063d-9z; Wed, 03 Jul 2024 05:44:23 +0000 Received: by outflank-mailman (input) for mailman id 752727; Wed, 03 Jul 2024 05:44:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsn0-00063T-Kx for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsn0-0004nX-K9 for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOsn0-00025D-Is for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=oXWywo/qqcDxSApmxErSWnfnxE9WAJgcZQi9gtSnBBI=; b=l67P/BXth3idcwpeL7XWuPXOQ1 rYftFkLzGnP/6xbCfY9qi4Qi2fxfqwoYXJBRfznxwVKSnvHSa8ofr79/h1qLfERVTS/RUYzC5N5j+ SAeKWG3ELiT6yjyzpesGQv7Ag+5D4/VZAa5dbKIGft7gX3WmxEaoNWsDs4MWs9/ygbZg=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment() Message-Id: Date: Wed, 03 Jul 2024 05:44:22 +0000 commit 4c3a618b0adaa0cd59e0fa0898bb60978b8b3a5f Author: Andrew Cooper AuthorDate: Thu Jun 27 13:22:14 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 2 10:50:18 2024 +0100 tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment() xc_dom_alloc_segment() is passed a size in bytes, calculates a size in pages from it, then fills in the new segment information with a bytes value re-calculated from the number of pages. This causes the module information given to the guest (MB, or PVH) to have incorrect sizes; specifically, sizes rounded up to the next page. This in turn is problematic for Xen. When Xen finds a gzipped module, it peeks at the end metadata to judge the decompressed size, which is a -4 backreference from the reported end of the module. Fill in seg->vend using the correct number of bytes. Fixes: ea7c8a3d0e82 ("libxc: reorganize domain builder guest memory allocator") Signed-off-by: Andrew Cooper Acked-by: Anthony PERARD Release-Acked-by: Oleksii Kurochko --- tools/libs/guest/xg_dom_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/guest/xg_dom_core.c b/tools/libs/guest/xg_dom_core.c index c4f4e7f3e2..f5521d528b 100644 --- a/tools/libs/guest/xg_dom_core.c +++ b/tools/libs/guest/xg_dom_core.c @@ -601,7 +601,7 @@ int xc_dom_alloc_segment(struct xc_dom_image *dom, memset(ptr, 0, pages * page_size); seg->vstart = start; - seg->vend = dom->virt_alloc_end; + seg->vend = start + size; DOMPRINTF("%-20s: %-12s : 0x%" PRIx64 " -> 0x%" PRIx64 " (pfn 0x%" PRIpfn " + 0x%" PRIpfn " pages)", -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 03 05:44:33 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 03 Jul 2024 05:44:33 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752728.1160927 (Exim 4.92) (envelope-from ) id 1sOsnB-000672-E3; Wed, 03 Jul 2024 05:44:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752728.1160927; Wed, 03 Jul 2024 05:44:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnB-00066u-BV; Wed, 03 Jul 2024 05:44:33 +0000 Received: by outflank-mailman (input) for mailman id 752728; Wed, 03 Jul 2024 05:44:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnA-00066l-P0 for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnA-0004ne-O9 for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOsnA-000265-MT for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=rsWe0shgs9IIB7A+y0yuf398/Rf8lNNJaNcdWlcHlZY=; b=6oQKCOWSo3+D+DuYZ+xloX+cuh WogkAIM4OLJh48dHmVzsWzdHXqZK9l0VLKNjabMvSwuVxBpJ0BbXEu7e0R9d1dFFIqro05vjsTAQI CvIWQHWvI39WBRKqgVfLsAbJ05kwdr3hkJERo18BkyfSh1nkXmY3eA6NZQM2N1TvjCts=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/libxs: Fix CLOEXEC handling in get_dev() Message-Id: Date: Wed, 03 Jul 2024 05:44:32 +0000 commit bf7c1464706adfa903f1e7d59383d042c3a88e39 Author: Andrew Cooper AuthorDate: Fri Jun 28 14:10:12 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 2 10:51:06 2024 +0100 tools/libxs: Fix CLOEXEC handling in get_dev() Move the O_CLOEXEC compatibility outside of an #ifdef USE_PTHREAD block. Introduce set_cloexec() to wrap fcntl() setting FD_CLOEXEC. It will be reused for other CLOEXEC fixes too. Use set_cloexec() when O_CLOEXEC isn't available as a best-effort fallback. Fixes: f4f2f3402b2f ("tools/libxs: Open /dev/xen/xenbus fds as O_CLOEXEC") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD --- tools/libs/store/xs.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 1498515073..037e79d98b 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -40,6 +40,10 @@ #include #include +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + struct xs_stored_msg { XEN_TAILQ_ENTRY(struct xs_stored_msg) list; struct xsd_sockmsg hdr; @@ -54,10 +58,6 @@ struct xs_stored_msg { #include #endif -#ifndef O_CLOEXEC -#define O_CLOEXEC 0 -#endif - struct xs_handle { /* Communications channel to xenstore daemon. */ int fd; @@ -176,6 +176,16 @@ static bool setnonblock(int fd, int nonblock) { return true; } +static bool set_cloexec(int fd) +{ + int flags = fcntl(fd, F_GETFL); + + if (flags < 0) + return false; + + return fcntl(fd, flags | FD_CLOEXEC) >= 0; +} + int xs_fileno(struct xs_handle *h) { char c = 0; @@ -230,8 +240,24 @@ error: static int get_dev(const char *connect_to) { - /* We cannot open read-only because requests are writes */ - return open(connect_to, O_RDWR | O_CLOEXEC); + int fd, saved_errno; + + fd = open(connect_to, O_RDWR | O_CLOEXEC); + if (fd < 0) + return -1; + + /* Compat for non-O_CLOEXEC environments. Racy. */ + if (!O_CLOEXEC && !set_cloexec(fd)) + goto error; + + return fd; + +error: + saved_errno = errno; + close(fd); + errno = saved_errno; + + return -1; } static int all_restrict_cb(Xentoolcore__Active_Handle *ah, domid_t domid) { -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 03 05:44:44 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 03 Jul 2024 05:44:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752729.1160932 (Exim 4.92) (envelope-from ) id 1sOsnM-0006AT-Fc; Wed, 03 Jul 2024 05:44:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752729.1160932; Wed, 03 Jul 2024 05:44:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnM-0006AL-Cv; Wed, 03 Jul 2024 05:44:44 +0000 Received: by outflank-mailman (input) for mailman id 752729; Wed, 03 Jul 2024 05:44:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnK-00069x-Sc for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnK-0004np-Ro for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOsnK-00027D-QS for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=iy3w8Lvzw9PPksmp+X4OSKsoQpsW3JrUnxIca5GSdj0=; b=2+LxcmIC30Uw66mfE1qPxlAHy3 XvB0F5FyZTHfIYFE2jTbGB7dpUsrJsjZgQ+wdzA78GAM6H8Utco+EGDdT+NkjJbYBh7oBeFxMQmrk 3k3mvWEuh3V0OsScmFAp012A5/zC7UqHaTop3vOhWLR00dwW/3p4VAN2FmnNsE/5e7os=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/libxs: Fix CLOEXEC handling in get_socket() Message-Id: Date: Wed, 03 Jul 2024 05:44:42 +0000 commit 1957dd6aff931877fc22699d8f2d4be8728014ba Author: Andrew Cooper AuthorDate: Fri Jun 28 11:24:14 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 2 10:51:11 2024 +0100 tools/libxs: Fix CLOEXEC handling in get_socket() get_socket() opens a socket, then uses fcntl() to set CLOEXEC. This is racy with exec(). Open the socket with SOCK_CLOEXEC. Use the same compatibility strategy as O_CLOEXEC on ancient versions of Linux. Reported-by: Frediano Ziglio Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD --- tools/libs/store/xs.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 037e79d98b..11a766c508 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -44,6 +44,10 @@ #define O_CLOEXEC 0 #endif +#ifndef SOCK_CLOEXEC +#define SOCK_CLOEXEC 0 +#endif + struct xs_stored_msg { XEN_TAILQ_ENTRY(struct xs_stored_msg) list; struct xsd_sockmsg hdr; @@ -207,16 +211,14 @@ int xs_fileno(struct xs_handle *h) static int get_socket(const char *connect_to) { struct sockaddr_un addr; - int sock, saved_errno, flags; + int sock, saved_errno; - sock = socket(PF_UNIX, SOCK_STREAM, 0); + sock = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); if (sock < 0) return -1; - if ((flags = fcntl(sock, F_GETFD)) < 0) - goto error; - flags |= FD_CLOEXEC; - if (fcntl(sock, F_SETFD, flags) < 0) + /* Compat for non-SOCK_CLOEXEC environments. Racy. */ + if (!SOCK_CLOEXEC && !set_cloexec(sock)) goto error; addr.sun_family = AF_UNIX; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 03 05:44:54 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 03 Jul 2024 05:44:54 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752730.1160936 (Exim 4.92) (envelope-from ) id 1sOsnW-0006DO-HB; Wed, 03 Jul 2024 05:44:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752730.1160936; Wed, 03 Jul 2024 05:44:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnW-0006DF-ET; Wed, 03 Jul 2024 05:44:54 +0000 Received: by outflank-mailman (input) for mailman id 752730; Wed, 03 Jul 2024 05:44:53 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnU-0006Cw-WA for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:52 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnU-0004oG-VH for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:52 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOsnU-00027q-UP for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:44:52 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=2wpX5eSopuhtYKin0lPsidPx/EkRC+g0JuuaYgya84k=; b=57qMlmNd9J92bTgUywt2o2JD+5 l3c29LWsptKXKzr5OJGccuciDq3UGlhVyvK2qr8GV9s6XVFkTnUUERcljxKdx+o0zQNCSheiwqbEW nqlTQqtnEHMGMCBhOoKuIgK03gSAq1PPP+8aBFZHgz9Zlo3lwRGf5XwmV8dU8wuKCAMo=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/libxs: Fix CLOEXEC handling in xs_fileno() Message-Id: Date: Wed, 03 Jul 2024 05:44:52 +0000 commit a2ff677852f0ce05fa335e8e5682bf2ae0c916ee Author: Andrew Cooper AuthorDate: Fri Jun 28 14:04:30 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 2 10:52:59 2024 +0100 tools/libxs: Fix CLOEXEC handling in xs_fileno() xs_fileno() opens a pipe on first use to communicate between the watch thread and the main thread. Nothing ever sets CLOEXEC on the file descriptors. Check for the availability of the pipe2() function with configure. Despite starting life as Linux-only, FreeBSD and NetBSD have gained it. When pipe2() isn't available, try our best with pipe() and set_cloexec(). Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD --- tools/config.h.in | 3 +++ tools/configure | 12 ++++++++++++ tools/configure.ac | 2 ++ tools/libs/store/xs.c | 16 +++++++++++++++- 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/tools/config.h.in b/tools/config.h.in index 0bb2fe08a1..50ad60fcb0 100644 --- a/tools/config.h.in +++ b/tools/config.h.in @@ -39,6 +39,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `pipe2' function. */ +#undef HAVE_PIPE2 + /* pygrub enabled */ #undef HAVE_PYGRUB diff --git a/tools/configure b/tools/configure index 459bfb5652..a6b43bfc60 100755 --- a/tools/configure +++ b/tools/configure @@ -9751,6 +9751,18 @@ if test "$ax_found" = "0"; then : fi +for ac_func in pipe2 +do : + ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +if test "x$ac_cv_func_pipe2" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PIPE2 1 +_ACEOF + +fi +done + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/tools/configure.ac b/tools/configure.ac index 851887080c..ac0fdc4314 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -543,4 +543,6 @@ AS_IF([test "x$pvshim" = "xy"], [ AX_FIND_HEADER([INCLUDE_ENDIAN_H], [endian.h sys/endian.h]) +AC_CHECK_FUNCS([pipe2]) + AC_OUTPUT() diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 11a766c508..c8845b69e2 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -190,13 +190,27 @@ static bool set_cloexec(int fd) return fcntl(fd, flags | FD_CLOEXEC) >= 0; } +static int pipe_cloexec(int fds[2]) +{ +#if HAVE_PIPE2 + return pipe2(fds, O_CLOEXEC); +#else + if (pipe(fds) < 0) + return -1; + /* Best effort to set CLOEXEC. Racy. */ + set_cloexec(fds[0]); + set_cloexec(fds[1]); + return 0; +#endif +} + int xs_fileno(struct xs_handle *h) { char c = 0; mutex_lock(&h->watch_mutex); - if ((h->watch_pipe[0] == -1) && (pipe(h->watch_pipe) != -1)) { + if ((h->watch_pipe[0] == -1) && (pipe_cloexec(h->watch_pipe) != -1)) { /* Kick things off if the watch list is already non-empty. */ if (!XEN_TAILQ_EMPTY(&h->watch_list)) while (write(h->watch_pipe[1], &c, 1) != 1) -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 03 05:45:04 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 03 Jul 2024 05:45:04 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752732.1160940 (Exim 4.92) (envelope-from ) id 1sOsng-0006GB-IU; Wed, 03 Jul 2024 05:45:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752732.1160940; Wed, 03 Jul 2024 05:45:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsng-0006G3-Fx; Wed, 03 Jul 2024 05:45:04 +0000 Received: by outflank-mailman (input) for mailman id 752732; Wed, 03 Jul 2024 05:45:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnf-0006Fr-4H for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:45:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnf-0004oo-3U for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:45:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOsnf-00028e-1X for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:45:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=o+s+ILZjMXI2OKWhYoBAAtFbM6S4QYr1TbVIXgKM3qE=; b=BwtbYOPB/Urjlnbix0a3hm3Aa6 nA36fx1mIApOzddpH1nzv4v3ZfQKXLnK78u1YJdMUxoUn5+SDRkkGkWV9H9Dh49z3cnfk/x2EdQ7B kXzU23TKTaDhVApI259dnZvBn9Gcyqwxbka0Dw9l5qXHSdhbb3aaivcMP9TGk1LtswNI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] cmdline: document and enforce "extra_guest_irqs" upper bounds Message-Id: Date: Wed, 03 Jul 2024 05:45:03 +0000 commit 17f6d398f76597f8009ec0530842fb8705ece7ba Author: Jan Beulich AuthorDate: Tue Jul 2 12:00:27 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 2 12:00:27 2024 +0200 cmdline: document and enforce "extra_guest_irqs" upper bounds PHYSDEVOP_pirq_eoi_gmfn_v accepting just a single GFN implies that no more than 32k pIRQ-s can be used by a domain on x86. Document this upper bound. To also enforce the limit, (ab)use both arch_hwdom_irqs() (changing its parameter type) and setup_system_domains(). This is primarily to avoid exposing the two static variables or introducing yet further arch hooks. While touching arch_hwdom_irqs() also mark it hwdom-init. Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- docs/misc/xen-command-line.pandoc | 3 ++- xen/arch/x86/io_apic.c | 16 +++++++++------- xen/common/domain.c | 20 +++++++++++++++++++- xen/include/xen/irq.h | 3 ++- 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index 1dea7431fa..cd9a7164f4 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -1175,7 +1175,8 @@ common for all domUs, while the optional second number (preceded by a comma) is for dom0. Changing the setting for domU has no impact on dom0 and vice versa. For example to change dom0 without changing domU, use `extra_guest_irqs=,512`. The default value for Dom0 and an eventual separate -hardware domain is architecture dependent. +hardware domain is architecture dependent. The upper limit for both values on +x86 is such that the resulting total number of IRQs can't be higher than 32768. Note that specifying zero as domU value means zero, while for dom0 it means to use the default. diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index d73108558e..adcc9b2ff3 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2660,18 +2660,20 @@ void __init ioapic_init(void) nr_irqs_gsi, nr_irqs - nr_irqs_gsi); } -unsigned int arch_hwdom_irqs(domid_t domid) +unsigned int __hwdom_init arch_hwdom_irqs(const struct domain *d) { unsigned int n = fls(num_present_cpus()); + /* Bounded by the domain pirq EOI bitmap gfn. */ + const unsigned int max_irqs = PAGE_SIZE * BITS_PER_BYTE; - if ( !domid ) - n = min(n, dom0_max_vcpus()); - n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, nr_irqs); + if ( is_system_domain(d) ) + return max_irqs; - /* Bounded by the domain pirq eoi bitmap gfn. */ - n = min_t(unsigned int, n, PAGE_SIZE * BITS_PER_BYTE); + if ( !d->domain_id ) + n = min(n, dom0_max_vcpus()); + n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, min(nr_irqs, max_irqs)); - printk("Dom%d has maximum %u PIRQs\n", domid, n); + printk("%pd has maximum %u PIRQs\n", d, n); return n; } diff --git a/xen/common/domain.c b/xen/common/domain.c index 67cadb7c3f..23a73d953c 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -695,7 +695,7 @@ struct domain *domain_create(domid_t domid, d->nr_pirqs = nr_static_irqs + extra_domU_irqs; else d->nr_pirqs = extra_hwdom_irqs ? nr_static_irqs + extra_hwdom_irqs - : arch_hwdom_irqs(domid); + : arch_hwdom_irqs(d); d->nr_pirqs = min(d->nr_pirqs, nr_irqs); radix_tree_init(&d->pirq_tree); @@ -829,6 +829,24 @@ void __init setup_system_domains(void) if ( IS_ERR(dom_xen) ) panic("Failed to create d[XEN]: %ld\n", PTR_ERR(dom_xen)); +#ifdef CONFIG_HAS_PIRQ + /* Bound-check values passed via "extra_guest_irqs=". */ + { + unsigned int n = max(arch_hwdom_irqs(dom_xen), nr_static_irqs); + + if ( extra_hwdom_irqs > n - nr_static_irqs ) + { + extra_hwdom_irqs = n - nr_static_irqs; + printk(XENLOG_WARNING "hwdom IRQs bounded to %u\n", n); + } + if ( extra_domU_irqs > max(32U, n - nr_static_irqs) ) + { + extra_domU_irqs = n - nr_static_irqs; + printk(XENLOG_WARNING "domU IRQs bounded to %u\n", n); + } + } +#endif + /* * Initialise our DOMID_IO domain. * This domain owns I/O pages that are within the range of the page_info diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index ee45d19af8..95034c0d6b 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -202,8 +202,9 @@ extern struct irq_desc *pirq_spin_lock_irq_desc( unsigned int set_desc_affinity(struct irq_desc *desc, const cpumask_t *mask); +/* When passed a system domain, this returns the maximum permissible value. */ #ifndef arch_hwdom_irqs -unsigned int arch_hwdom_irqs(domid_t domid); +unsigned int arch_hwdom_irqs(const struct domain *d); #endif #ifndef arch_evtchn_bind_pirq -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 03 05:45:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 03 Jul 2024 05:45:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752733.1160943 (Exim 4.92) (envelope-from ) id 1sOsnq-0006Jb-LC; Wed, 03 Jul 2024 05:45:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752733.1160943; Wed, 03 Jul 2024 05:45:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnq-0006JU-Ii; Wed, 03 Jul 2024 05:45:14 +0000 Received: by outflank-mailman (input) for mailman id 752733; Wed, 03 Jul 2024 05:45:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnp-0006JI-75 for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:45:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnp-0004ov-6H for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:45:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOsnp-00029P-5h for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:45:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=ma7gGlBEnVEYS4Aoz9qmgjZNDaQdiK+eCtR7f3DY2ls=; b=dIK003EvSYgfv4BTIWN8TlNov+ 6Wt8wuGNM47BXJn8iehbTUGQiooQJDn8v/Uotcbl+3T2KSaQz1MZ7Nf/vkB1G1a3LFzcUXHkxTMPH VilUYJUnqO8wSalDPTC8czLK2NZDr68UPAzqtrhWo3amkmau0yZHID0kY4hjovP1liDM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/entry: don't clear DF when raising #UD for lack of syscall handler Message-Id: Date: Wed, 03 Jul 2024 05:45:13 +0000 commit d2fe9ab3048d503869ec81bc49db07e55a4a2386 Author: Jan Beulich AuthorDate: Tue Jul 2 12:01:21 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 2 12:01:21 2024 +0200 x86/entry: don't clear DF when raising #UD for lack of syscall handler While doing so is intentional when invoking the actual callback, to mimic a hard-coded SYCALL_MASK / FMASK MSR, the same should not be done when no handler is available and hence #UD is raised. Fixes: ca6fcf4321b3 ("x86/pv: Inject #UD for missing SYSCALL callbacks") Reported-by: Andrew Cooper Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper Release-Acked-By: Oleksii Kurochko --- xen/arch/x86/x86_64/entry.S | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index df015589ce..b8482de8ee 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -38,6 +38,14 @@ FUNC_LOCAL(switch_to_kernel) setc %cl leal (,%rcx,TBF_INTERRUPT),%ecx + /* + * The PV ABI hardcodes the (guest-inaccessible and virtual) + * SYSCALL_MASK MSR such that DF (and nothing else) would be cleared. + * Note that the equivalent of IF (VGCF_syscall_disables_events) is + * dealt with separately above. + */ + mov $~X86_EFLAGS_DF, %esi + test %rax, %rax UNLIKELY_START(z, syscall_no_callback) /* TB_eip == 0 => #UD */ mov VCPU_trap_ctxt(%rbx), %rdi @@ -47,12 +55,14 @@ UNLIKELY_START(z, syscall_no_callback) /* TB_eip == 0 => #UD */ testb $4, X86_EXC_UD * TRAPINFO_sizeof + TRAPINFO_flags(%rdi) setnz %cl lea TBF_EXCEPTION(, %rcx, TBF_INTERRUPT), %ecx + or $~0, %esi /* Don't clear DF */ UNLIKELY_END(syscall_no_callback) movq %rax,TRAPBOUNCE_eip(%rdx) movb %cl,TRAPBOUNCE_flags(%rdx) call create_bounce_frame - andl $~X86_EFLAGS_DF,UREGS_eflags(%rsp) + /* Conditionally clear DF */ + and %esi, UREGS_eflags(%rsp) /* %rbx: struct vcpu */ test_all_events: ASSERT_NOT_IN_ATOMIC -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 03 05:45:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 03 Jul 2024 05:45:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752734.1160948 (Exim 4.92) (envelope-from ) id 1sOso0-0006MO-Mo; Wed, 03 Jul 2024 05:45:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752734.1160948; Wed, 03 Jul 2024 05:45: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 1sOso0-0006MG-KD; Wed, 03 Jul 2024 05:45:24 +0000 Received: by outflank-mailman (input) for mailman id 752734; Wed, 03 Jul 2024 05:45:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnz-0006M5-A1 for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:45:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOsnz-0004p2-9B for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:45:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOsnz-0002A6-8V for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 05:45:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=XdJxsUGBebIegYTKPTPyIq5EtchSp3E5/I4/yT9y2Cs=; b=xsWw9PCDnNpQIiEFacm3wMwMH4 4tTDzaLuBD0U5OSoxTCdn2/CpGBEHKLMcObwmZAcKI6Q8hTOrvNCc2clK+4+/U+FqefugTIlx/yZi MU9hdC4uwXAvWdibxzasbChfJPPY2j0nP6adBJx+ema43XtJm74V+2BNvh7vTJrXtk0I=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] xen: avoid UB in guest handle field accessors Message-Id: Date: Wed, 03 Jul 2024 05:45:23 +0000 commit 08daa72cdcb660c2f0aef52ee76a3704e2dd1b5b Author: Jan Beulich AuthorDate: Tue Jul 2 12:01:59 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 2 12:01:59 2024 +0200 xen: avoid UB in guest handle field accessors Much like noted in 43d5c5d5f70b ("xen: avoid UB in guest handle arithmetic"), address calculations involved in accessing a struct field can overflow, too. Cast respective pointers to "unsigned long" and convert type checking accordingly. Remaining arithmetic is, despite there possibly being mathematical overflow, okay as per the C99 spec: "A computation involving unsigned operands can never overflow, because a result that cannot be represented by the resulting unsigned integer type is reduced modulo the number that is one greater than the largest value that can be represented by the resulting type." The overflow that we need to guard against is checked for in array_access_ok(). While there add the missing (see {,__}copy_to_guest_offset()) is-not- const checks to {,__}copy_field_to_guest(). Typically, but not always, no change to generated code; code generation (register allocation) is different for at least common/grant_table.c. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper Release-Acked-by: Oleksii Kurochko --- xen/include/xen/guest_access.h | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/xen/include/xen/guest_access.h b/xen/include/xen/guest_access.h index 2e0971c487..6489924db6 100644 --- a/xen/include/xen/guest_access.h +++ b/xen/include/xen/guest_access.h @@ -95,16 +95,23 @@ /* Copy sub-field of a structure to guest context via a guest handle. */ #define copy_field_to_guest(hnd, ptr, field) ({ \ const typeof(&(ptr)->field) _s = &(ptr)->field; \ - void *_d = &(hnd).p->field; \ - (void)(&(hnd).p->field == _s); \ - raw_copy_to_guest(_d, _s, sizeof(*_s)); \ + unsigned long d_ = (unsigned long)(hnd).p; \ + /* Check that the handle is not for a const type */ \ + void *__maybe_unused _t = (hnd).p; \ + (void)((typeof_field(typeof(*(hnd).p), field) *)NULL == _s); \ + raw_copy_to_guest((void *)(d_ + offsetof(typeof(*(hnd).p), field)), \ + _s, sizeof(*_s)); \ }) /* Copy sub-field of a structure from guest context via a guest handle. */ #define copy_field_from_guest(ptr, hnd, field) ({ \ - const typeof(&(ptr)->field) _s = &(hnd).p->field; \ + unsigned long s_ = (unsigned long)(hnd).p; \ typeof(&(ptr)->field) _d = &(ptr)->field; \ - raw_copy_from_guest(_d, _s, sizeof(*_d)); \ + (void)((typeof_field(typeof(*(hnd).p), field) *)NULL == _d); \ + raw_copy_from_guest(_d, \ + (const void *)(s_ + \ + offsetof(typeof(*(hnd).p), field)), \ + sizeof(*_d)); \ }) #define copy_to_guest(hnd, ptr, nr) \ @@ -149,15 +156,22 @@ #define __copy_field_to_guest(hnd, ptr, field) ({ \ const typeof(&(ptr)->field) _s = &(ptr)->field; \ - void *_d = &(hnd).p->field; \ - (void)(&(hnd).p->field == _s); \ - __raw_copy_to_guest(_d, _s, sizeof(*_s)); \ + unsigned long d_ = (unsigned long)(hnd).p; \ + /* Check that the handle is not for a const type */ \ + void *__maybe_unused _t = (hnd).p; \ + (void)((typeof_field(typeof(*(hnd).p), field) *)NULL == _s); \ + __raw_copy_to_guest((void *)(d_ + offsetof(typeof(*(hnd).p), field)), \ + _s, sizeof(*_s)); \ }) #define __copy_field_from_guest(ptr, hnd, field) ({ \ - const typeof(&(ptr)->field) _s = &(hnd).p->field; \ + unsigned long s_ = (unsigned long)(hnd).p; \ typeof(&(ptr)->field) _d = &(ptr)->field; \ - __raw_copy_from_guest(_d, _s, sizeof(*_d)); \ + (void)((typeof_field(typeof(*(hnd).p), field) *)NULL == _d); \ + __raw_copy_from_guest(_d, \ + (const void *)(s_ + \ + offsetof(typeof(*(hnd).p), field)), \ + sizeof(*_d)); \ }) #define __copy_to_guest(hnd, ptr, nr) \ -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 03 12:11:12 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 03 Jul 2024 12:11:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752991.1161232 (Exim 4.92) (envelope-from ) id 1sOypF-0005sZ-22; Wed, 03 Jul 2024 12:11:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752991.1161232; Wed, 03 Jul 2024 12:11:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOypE-0005sS-VW; Wed, 03 Jul 2024 12:11:04 +0000 Received: by outflank-mailman (input) for mailman id 752991; Wed, 03 Jul 2024 12:11:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOypD-0005sM-SR for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 12:11:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOypD-0003wo-P7 for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 12:11:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOypD-0007ub-O2 for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 12:11:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=YWcTNQjrFYwjoq7B/BRM+BduMseWSWnydpATq3U7klw=; b=hLzaXQFUj+Nz8Im0FPsmw+ZH44 jdZfVrkaj0ky5ZnDLZfz4MQ0szcQ8IDMlLqu5kH/Onr5ULfN+CUcvsXUFZhoFGRgsTk76nQ+1SUds ay90TF6UCheeFr1OfCxD0jo+h3/BvjLL1u71J2Hdr+M5KGgKvjcOeUKBYJHu1DKdYaYQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] amend 'cmdline: document and enforce "extra_guest_irqs" upper bounds' Message-Id: Date: Wed, 03 Jul 2024 12:11:03 +0000 commit 1f56accba33ffea0abf7d1c6384710823d10cbd6 Author: Jan Beulich AuthorDate: Wed Jul 3 14:03:27 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 3 14:03:27 2024 +0200 amend 'cmdline: document and enforce "extra_guest_irqs" upper bounds' Address late review comments for what is now commit 17f6d398f765: - bound max_irqs right away against nr_irqs - introduce a #define for a constant used twice Requested-by: Roger Pau Monné Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- xen/arch/x86/io_apic.c | 7 ++++--- xen/common/domain.c | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index adcc9b2ff3..d2b29143d1 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2663,15 +2663,16 @@ void __init ioapic_init(void) unsigned int __hwdom_init arch_hwdom_irqs(const struct domain *d) { unsigned int n = fls(num_present_cpus()); - /* Bounded by the domain pirq EOI bitmap gfn. */ - const unsigned int max_irqs = PAGE_SIZE * BITS_PER_BYTE; + /* Bounding by the domain pirq EOI bitmap capacity. */ + const unsigned int max_irqs = min_t(unsigned int, nr_irqs, + PAGE_SIZE * BITS_PER_BYTE); if ( is_system_domain(d) ) return max_irqs; if ( !d->domain_id ) n = min(n, dom0_max_vcpus()); - n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, min(nr_irqs, max_irqs)); + n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, max_irqs); printk("%pd has maximum %u PIRQs\n", d, n); diff --git a/xen/common/domain.c b/xen/common/domain.c index 23a73d953c..fb262dcec9 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -353,7 +353,8 @@ static int late_hwdom_init(struct domain *d) #ifdef CONFIG_HAS_PIRQ static unsigned int __read_mostly extra_hwdom_irqs; -static unsigned int __read_mostly extra_domU_irqs = 32; +#define DEFAULT_EXTRA_DOMU_IRQS 32U +static unsigned int __read_mostly extra_domU_irqs = DEFAULT_EXTRA_DOMU_IRQS; static int __init cf_check parse_extra_guest_irqs(const char *s) { @@ -839,7 +840,8 @@ void __init setup_system_domains(void) extra_hwdom_irqs = n - nr_static_irqs; printk(XENLOG_WARNING "hwdom IRQs bounded to %u\n", n); } - if ( extra_domU_irqs > max(32U, n - nr_static_irqs) ) + if ( extra_domU_irqs > + max(DEFAULT_EXTRA_DOMU_IRQS, n - nr_static_irqs) ) { extra_domU_irqs = n - nr_static_irqs; printk(XENLOG_WARNING "domU IRQs bounded to %u\n", n); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 03 12:11:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 03 Jul 2024 12:11:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.752992.1161236 (Exim 4.92) (envelope-from ) id 1sOypP-0005uP-3Z; Wed, 03 Jul 2024 12:11:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 752992.1161236; Wed, 03 Jul 2024 12:11:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOypP-0005uH-0d; Wed, 03 Jul 2024 12:11:15 +0000 Received: by outflank-mailman (input) for mailman id 752992; Wed, 03 Jul 2024 12:11:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOypN-0005u7-Tf for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 12:11:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sOypN-0003wz-SV for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 12:11:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sOypN-0007vS-RT for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 12:11:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=L4c2Inn9rpvcjiGqKVMw11fG9y6V8HIgyEvyMDviVSM=; b=BhO8CfQ/jAxgC/Oay4XYl1dQy7 d2c1KMs5CVu+rLPsLsvhpfrXgHcuBiXk4T9wv2N8zmpRdtouPNkFGM7wUYW//f5pcnj9GW9R6jE0W ZRn/2nmndQtgqJGbvYZFSBoE+CuYWRMdapdFR/c4JmtQmizawYqUES6gNT3rsZnPIn2Q=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] cmdline: "extra_guest_irqs" is inapplicable to PVH Message-Id: Date: Wed, 03 Jul 2024 12:11:13 +0000 commit fb76e08a8f7a61dfbc07d0f335f1623bca650d7f Author: Jan Beulich AuthorDate: Wed Jul 3 14:04:15 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 3 14:04:15 2024 +0200 cmdline: "extra_guest_irqs" is inapplicable to PVH PVH in particular has no (externally visible) notion of pIRQ-s. Mention that in the description of the respective command line option and have arch_hwdom_irqs() also reflect this (thus suppressing the log message there as well, as being pretty meaningless in this case anyway). Suggested-by: Roger Pau Monné Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- docs/misc/xen-command-line.pandoc | 3 ++- xen/arch/x86/io_apic.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index cd9a7164f4..98a4521155 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -1178,7 +1178,8 @@ versa. For example to change dom0 without changing domU, use hardware domain is architecture dependent. The upper limit for both values on x86 is such that the resulting total number of IRQs can't be higher than 32768. Note that specifying zero as domU value means zero, while for dom0 it means -to use the default. +to use the default. Note further that the Dom0 setting has no useful meaning +for the PVH case; use of the option may have an adverse effect there, though. ### ext_regions (Arm) > `= ` diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index d2b29143d1..d2a313c4ac 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2670,6 +2670,10 @@ unsigned int __hwdom_init arch_hwdom_irqs(const struct domain *d) if ( is_system_domain(d) ) return max_irqs; + /* PVH (generally: HVM) can't use PHYSDEVOP_pirq_eoi_gmfn_v{1,2}. */ + if ( is_hvm_domain(d) ) + return nr_irqs; + if ( !d->domain_id ) n = min(n, dom0_max_vcpus()); n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, max_irqs); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 03 13:44:10 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 03 Jul 2024 13:44:10 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753058.1161321 (Exim 4.92) (envelope-from ) id 1sP0HE-0005lM-3J; Wed, 03 Jul 2024 13:44:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753058.1161321; Wed, 03 Jul 2024 13:44:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sP0HD-0005lE-VU; Wed, 03 Jul 2024 13:44:03 +0000 Received: by outflank-mailman (input) for mailman id 753058; Wed, 03 Jul 2024 13:44:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sP0HD-0005l8-JS for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 13:44:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sP0HD-0005QW-Fh for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 13:44:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sP0HD-0006KC-Dx for xen-changelog@lists.xenproject.org; Wed, 03 Jul 2024 13:44:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=TBR0rA3eeMkg/34CipL2ZSvVtL2VOda4Nf4w1mQhr+A=; b=JMQ9GNxC31LrFIX8LX7Jdum0z2 daio2GQIpXE+bPRtoqxe7CTsj1ZiyOyFIKKRiKDE2OS0Abz5/xteUhDtQxKtGSA5DfkQ+xBmSnaeq vBZtP/+z7S+eseut2A6E0cPFj9u9yBo/DmQ4Tj3+zx1l2R4qUliESiRZbCngXGj/5ddA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen: Fix XEN_EXTRAVERSION after 4.19-rc1 Message-Id: Date: Wed, 03 Jul 2024 13:44:03 +0000 commit 63c66274d9934e0df7f4e3725c868ff2251b705f Author: Andrew Cooper AuthorDate: Tue Jul 2 14:34:54 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 3 14:38:31 2024 +0100 xen: Fix XEN_EXTRAVERSION after 4.19-rc1 Currently, the banner reports: __ __ _ _ _ ___ ___ \ \/ /___ _ __ | || | / |/ _ \ / _ \ _ __ ___ \ // _ \ '_ \ | || |_ | | (_) | | | |__| '__/ __| / \ __/ | | | |__ _|| |\__, | |_| |__| | | (__ /_/\_\___|_| |_| |_|(_)_| /_/ \___/ |_| \___| and xl reports: # xl info xen_version 4.190-rc Drop the 0, which is in line with how we annotate RCs elsewhere. Fixes: 4a73eb4c205d ("Update Xen version to 4.19-rc") Signed-off-by: Andrew Cooper Acked-by: Jan Beulich Release-Acked-By: Oleksii Kurochko --- xen/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/Makefile b/xen/Makefile index 58ce6e468e..e9fd19536f 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -6,7 +6,7 @@ this-makefile := $(call lastword,$(MAKEFILE_LIST)) # All other places this is stored (eg. compile.h) should be autogenerated. export XEN_VERSION = 4 export XEN_SUBVERSION = 19 -export XEN_EXTRAVERSION ?= 0-rc$(XEN_VENDORVERSION) +export XEN_EXTRAVERSION ?= -rc$(XEN_VENDORVERSION) export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) -include xen-version -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 07:44:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 07:44:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753552.1161728 (Exim 4.92) (envelope-from ) id 1sPH8N-0002k3-L5; Thu, 04 Jul 2024 07:44:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753552.1161728; Thu, 04 Jul 2024 07:44:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH8N-0002jv-IN; Thu, 04 Jul 2024 07:44:03 +0000 Received: by outflank-mailman (input) for mailman id 753552; Thu, 04 Jul 2024 07:44:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH8M-0002jp-C8 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH8M-0004EL-8R for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPH8M-0006yL-6j for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=+Vn5pxxa0CQ60Y1oFk5j6Ol5PqsTpJVFd+7mCss+xHA=; b=rhuZF2yAjc6JKsOhjkcf0cIUWA exPKmF5/QRE8VlP+Xe9RubRVG+q31TvEg9yrDUqZc4jAZ/fgLcqAp3efoHzmPwj/k1ZqfsnElRMaJ +I2EDlEl7tJ0LAAEAb47SXhftVQ/a91VjnM00GBRDKD05hPcWnfsB+RfGWRNUU1NuEnQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] amend 'cmdline: document and enforce "extra_guest_irqs" upper bounds' Message-Id: Date: Thu, 04 Jul 2024 07:44:02 +0000 commit 1f56accba33ffea0abf7d1c6384710823d10cbd6 Author: Jan Beulich AuthorDate: Wed Jul 3 14:03:27 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 3 14:03:27 2024 +0200 amend 'cmdline: document and enforce "extra_guest_irqs" upper bounds' Address late review comments for what is now commit 17f6d398f765: - bound max_irqs right away against nr_irqs - introduce a #define for a constant used twice Requested-by: Roger Pau Monné Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- xen/arch/x86/io_apic.c | 7 ++++--- xen/common/domain.c | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index adcc9b2ff3..d2b29143d1 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2663,15 +2663,16 @@ void __init ioapic_init(void) unsigned int __hwdom_init arch_hwdom_irqs(const struct domain *d) { unsigned int n = fls(num_present_cpus()); - /* Bounded by the domain pirq EOI bitmap gfn. */ - const unsigned int max_irqs = PAGE_SIZE * BITS_PER_BYTE; + /* Bounding by the domain pirq EOI bitmap capacity. */ + const unsigned int max_irqs = min_t(unsigned int, nr_irqs, + PAGE_SIZE * BITS_PER_BYTE); if ( is_system_domain(d) ) return max_irqs; if ( !d->domain_id ) n = min(n, dom0_max_vcpus()); - n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, min(nr_irqs, max_irqs)); + n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, max_irqs); printk("%pd has maximum %u PIRQs\n", d, n); diff --git a/xen/common/domain.c b/xen/common/domain.c index 23a73d953c..fb262dcec9 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -353,7 +353,8 @@ static int late_hwdom_init(struct domain *d) #ifdef CONFIG_HAS_PIRQ static unsigned int __read_mostly extra_hwdom_irqs; -static unsigned int __read_mostly extra_domU_irqs = 32; +#define DEFAULT_EXTRA_DOMU_IRQS 32U +static unsigned int __read_mostly extra_domU_irqs = DEFAULT_EXTRA_DOMU_IRQS; static int __init cf_check parse_extra_guest_irqs(const char *s) { @@ -839,7 +840,8 @@ void __init setup_system_domains(void) extra_hwdom_irqs = n - nr_static_irqs; printk(XENLOG_WARNING "hwdom IRQs bounded to %u\n", n); } - if ( extra_domU_irqs > max(32U, n - nr_static_irqs) ) + if ( extra_domU_irqs > + max(DEFAULT_EXTRA_DOMU_IRQS, n - nr_static_irqs) ) { extra_domU_irqs = n - nr_static_irqs; printk(XENLOG_WARNING "domU IRQs bounded to %u\n", n); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 07:44:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 07:44:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753553.1161732 (Exim 4.92) (envelope-from ) id 1sPH8X-0002lR-ML; Thu, 04 Jul 2024 07:44:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753553.1161732; Thu, 04 Jul 2024 07:44:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH8X-0002lJ-Jo; Thu, 04 Jul 2024 07:44:13 +0000 Received: by outflank-mailman (input) for mailman id 753553; Thu, 04 Jul 2024 07:44:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH8W-0002l9-Cp for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH8W-0004GG-C8 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPH8W-0006z6-B0 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=ioavhnkYRIsJOL6nR55PEm+kmr8n619zYCTidqiMvl0=; b=ovEDdXnJq5ZZqL6L+ykt/R/Sho Gv+g5JtGUGlUlTMql0LekyW1a6xBrii+LuDJiuux6jIHh4O4msoXh8U+/VQ//Aly6IWOlI0XKEj39 hwpQq9H4ooZf8eHA94IYLRe0K2VWP/okTAdzWe9O0Vi3m0lWorz8AoSijE8ZacWrK8RM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] cmdline: "extra_guest_irqs" is inapplicable to PVH Message-Id: Date: Thu, 04 Jul 2024 07:44:12 +0000 commit fb76e08a8f7a61dfbc07d0f335f1623bca650d7f Author: Jan Beulich AuthorDate: Wed Jul 3 14:04:15 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 3 14:04:15 2024 +0200 cmdline: "extra_guest_irqs" is inapplicable to PVH PVH in particular has no (externally visible) notion of pIRQ-s. Mention that in the description of the respective command line option and have arch_hwdom_irqs() also reflect this (thus suppressing the log message there as well, as being pretty meaningless in this case anyway). Suggested-by: Roger Pau Monné Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- docs/misc/xen-command-line.pandoc | 3 ++- xen/arch/x86/io_apic.c | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index cd9a7164f4..98a4521155 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -1178,7 +1178,8 @@ versa. For example to change dom0 without changing domU, use hardware domain is architecture dependent. The upper limit for both values on x86 is such that the resulting total number of IRQs can't be higher than 32768. Note that specifying zero as domU value means zero, while for dom0 it means -to use the default. +to use the default. Note further that the Dom0 setting has no useful meaning +for the PVH case; use of the option may have an adverse effect there, though. ### ext_regions (Arm) > `= ` diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index d2b29143d1..d2a313c4ac 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2670,6 +2670,10 @@ unsigned int __hwdom_init arch_hwdom_irqs(const struct domain *d) if ( is_system_domain(d) ) return max_irqs; + /* PVH (generally: HVM) can't use PHYSDEVOP_pirq_eoi_gmfn_v{1,2}. */ + if ( is_hvm_domain(d) ) + return nr_irqs; + if ( !d->domain_id ) n = min(n, dom0_max_vcpus()); n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, max_irqs); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 07:44:23 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 07:44:23 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753554.1161736 (Exim 4.92) (envelope-from ) id 1sPH8h-0002oP-O4; Thu, 04 Jul 2024 07:44:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753554.1161736; Thu, 04 Jul 2024 07:44:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH8h-0002oH-LF; Thu, 04 Jul 2024 07:44:23 +0000 Received: by outflank-mailman (input) for mailman id 753554; Thu, 04 Jul 2024 07:44:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH8g-0002nu-Gr for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH8g-0004GY-Fo for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPH8g-0006zd-EE for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=wRbiu0AnxqLK1S9Vpj2Yjos2WE+/JFUSugrx78yD1m8=; b=GCK4o3oFCpo4cRIQweJQddfQ9Y Vngqc5IhS7H2XNFNfRO5ixZF0GSQMUiIr0YJKe+4tsWePo2j/IbEVbke5DcBEk+GCR1Oz3/hfeO26 Px76uSHutx7bbaohWk8gt6DNd6tu1xKFyWABY7m5Wh9KvkufgBUhDHROXhzGCX9ziu/o=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] xen: Fix XEN_EXTRAVERSION after 4.19-rc1 Message-Id: Date: Thu, 04 Jul 2024 07:44:22 +0000 commit 63c66274d9934e0df7f4e3725c868ff2251b705f Author: Andrew Cooper AuthorDate: Tue Jul 2 14:34:54 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 3 14:38:31 2024 +0100 xen: Fix XEN_EXTRAVERSION after 4.19-rc1 Currently, the banner reports: __ __ _ _ _ ___ ___ \ \/ /___ _ __ | || | / |/ _ \ / _ \ _ __ ___ \ // _ \ '_ \ | || |_ | | (_) | | | |__| '__/ __| / \ __/ | | | |__ _|| |\__, | |_| |__| | | (__ /_/\_\___|_| |_| |_|(_)_| /_/ \___/ |_| \___| and xl reports: # xl info xen_version 4.190-rc Drop the 0, which is in line with how we annotate RCs elsewhere. Fixes: 4a73eb4c205d ("Update Xen version to 4.19-rc") Signed-off-by: Andrew Cooper Acked-by: Jan Beulich Release-Acked-By: Oleksii Kurochko --- xen/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/Makefile b/xen/Makefile index 58ce6e468e..e9fd19536f 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -6,7 +6,7 @@ this-makefile := $(call lastword,$(MAKEFILE_LIST)) # All other places this is stored (eg. compile.h) should be autogenerated. export XEN_VERSION = 4 export XEN_SUBVERSION = 19 -export XEN_EXTRAVERSION ?= 0-rc$(XEN_VENDORVERSION) +export XEN_EXTRAVERSION ?= -rc$(XEN_VENDORVERSION) export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) -include xen-version -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 07:44:36 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 07:44:36 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753558.1161750 (Exim 4.92) (envelope-from ) id 1sPH8u-00038B-1M; Thu, 04 Jul 2024 07:44:36 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753558.1161750; Thu, 04 Jul 2024 07:44:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH8t-000380-Uq; Thu, 04 Jul 2024 07:44:35 +0000 Received: by outflank-mailman (input) for mailman id 753558; Thu, 04 Jul 2024 07:44:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH8s-00037c-M7 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH8s-0004Gx-Kh for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPH8s-00079j-Jc for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=hKuQ6J1qxXT83WNHuUjTBejgx1V1i77v2bloDQP5WaQ=; b=a3WYmFlatY8jMchAPLPYlThZDD X2IJ/U0DRYcSihW8MeDpZPcMGEYWX9iLSTSK5apoOhdugHK6/3JLW+VpRinatJkLdmh3rGtOaYnFM e3c8RVS3iOMGYgbLuSZHWkb32J1OM2q5wsrc5z3f24mSmR1DJ7BeIH9Z/olXJ+33Baqo=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/riscv: use .insn with operands to support the older gas Message-Id: Date: Thu, 04 Jul 2024 07:44:34 +0000 commit a771e0259457eb9373ae97f54436957ffa09a47d Author: Oleksii Kurochko AuthorDate: Thu Jul 4 09:30:46 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 09:30:46 2024 +0200 xen/riscv: use .insn with operands to support the older gas Support for specifying "raw" insns was added only in 2.38. To support older version it would be better switch to .insn with operands. The following compilation error occurs: ./arch/riscv/include/asm/processor.h: Assembler messages: ./arch/riscv/include/asm/processor.h:70: Error: unrecognized opcode `0x0100000F' In case of the following Binutils: $ riscv64-linux-gnu-as --version GNU assembler (GNU Binutils for Debian) 2.35.2 Suggested-by: Andrew Cooper Suggested-by: Jan Beulich Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich Release-Acked-By: Oleksii Kurochko --- xen/arch/riscv/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/riscv/include/asm/processor.h b/xen/arch/riscv/include/asm/processor.h index 6846151717..3ae164c265 100644 --- a/xen/arch/riscv/include/asm/processor.h +++ b/xen/arch/riscv/include/asm/processor.h @@ -67,7 +67,7 @@ static inline void cpu_relax(void) __asm__ __volatile__ ( "pause" ); #else /* Encoding of the pause instruction */ - __asm__ __volatile__ ( ".insn 0x0100000F" ); + __asm__ __volatile__ ( ".insn r MISC_MEM, 0, 0, x0, x0, x16" ); #endif barrier(); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 07:44:46 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 07:44:46 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753559.1161755 (Exim 4.92) (envelope-from ) id 1sPH94-0003Fb-3o; Thu, 04 Jul 2024 07:44:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753559.1161755; Thu, 04 Jul 2024 07:44:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH93-0003FT-WF; Thu, 04 Jul 2024 07:44:46 +0000 Received: by outflank-mailman (input) for mailman id 753559; Thu, 04 Jul 2024 07:44:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH92-0003Ew-OY for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPH92-0004HA-Np for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:44 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPH92-0007AN-Ml for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 07:44:44 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=81jimXnm5ww5pBdxA4GfXkaUHy9mbD6wYxsX2KVIn7k=; b=fbeP6u2jqMdPiVAf6h/gbH+DGm tG30Zku/LKsXjd89iFw/rnNsNS9h/VHu13P8DvWWKWks2nrUvvFgHv8HXVUO0It8cwqiXlZIzQcgp ifqd/4LJbxx3LuxmUEenQ2c5RxqUzSjmEBMF9DRWDWh6YpKfTpBEPjJON+o/QmI74CJk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/vmap: Document the vmap header Message-Id: Date: Thu, 04 Jul 2024 07:44:44 +0000 commit 7e3701b6ce0347c8b906967e223fa846f23e71d4 Author: Alejandro Vallejo AuthorDate: Thu Jul 4 09:31:35 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 09:31:35 2024 +0200 xen/vmap: Document the vmap header In it's current form it's rather cryptic for uninitiated, so this patch documents everything in there to make it more palatable. No functional change. Signed-off-by: Alejandro Vallejo Acked-by: Jan Beulich Release-Acked-by: Oleksii Kurochko --- xen/include/xen/vmap.h | 102 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/xen/include/xen/vmap.h b/xen/include/xen/vmap.h index 0c16baa85f..fdae37e950 100644 --- a/xen/include/xen/vmap.h +++ b/xen/include/xen/vmap.h @@ -1,34 +1,133 @@ +/* + * Interface to map physical memory onto contiguous virtual memory areas. + * + * Two ranges of linear address space are reserved for this purpose: A general + * purpose area (VMAP_DEFAULT) and a livepatch-specific area (VMAP_XEN). The + * latter is used when loading livepatches and the former for everything else. + */ #if !defined(__XEN_VMAP_H__) && defined(VMAP_VIRT_START) #define __XEN_VMAP_H__ #include #include +/* Identifiers for the linear ranges tracked by vmap */ enum vmap_region { + /* + * Region used for general purpose RW mappings. Mapping/allocating memory + * here can induce extra allocations for the supporting page tables. + */ VMAP_DEFAULT, + /* + * Region used for loading livepatches. Can't use VMAP_DEFAULT because it + * must live close to the running Xen image. The caller also ensures all + * page tables are already in place with adequate PTE flags. + */ VMAP_XEN, + /* Sentinel value for bounds checking */ VMAP_REGION_NR, }; +/* + * Runtime initialiser for each vmap region type + * + * Must only be called once per vmap region type. + * + * @param type Designation of the region to initialise. + * @param start Start address of the `type` region. + * @param end End address (not inclusive) of the `type` region + */ void vm_init_type(enum vmap_region type, void *start, void *end); +/* + * Maps a set of physical ranges onto a single virtual range + * + * `mfn` is an array of `nr` physical ranges, each of which is `granularity` + * pages wide. `type` defines which vmap region to use for the mapping and + * `flags` is the PTE flags the page table leaves are meant to have. + * + * Typically used via the vmap() and vmap_contig() helpers. + * + * @param mfn Array of mfns + * @param granularity Number of contiguous pages each mfn represents + * @param nr Number of mfns in the `mfn` array + * @param align Alignment of the virtual area to map + * @param flags PTE flags for the leaves of the PT tree. + * @param type Which region to create the mappings on + * @return Pointer to the mapped area on success; NULL otherwise. + */ void *__vmap(const mfn_t *mfn, unsigned int granularity, unsigned int nr, unsigned int align, unsigned int flags, enum vmap_region type); + +/* + * Map an array of pages contiguously into the VMAP_DEFAULT vmap region + * + * @param[in] mfn Pointer to the base of an array of mfns + * @param[in] nr Number of mfns in the array + * @return Pointer to the mapped area on success; NULL otherwise. + */ void *vmap(const mfn_t *mfn, unsigned int nr); + +/* + * Maps physically contiguous pages onto the VMAP_DEFAULT vmap region + * + * @param mfn Base mfn of the physical region + * @param nr Number of mfns in the physical region + * @return Pointer to the mapped area on success; NULL otherwise. + */ void *vmap_contig(mfn_t mfn, unsigned int nr); + +/* + * Unmaps a range of virtually contiguous memory from one of the vmap regions + * + * The system remembers internally how wide the mapping is and unmaps it all. + * It also can determine the vmap region type from the `va`. + * + * @param va Virtual base address of the range to unmap + */ void vunmap(const void *va); +/* + * Allocate `size` octets of possibly non-contiguous physical memory and map + * them contiguously in the VMAP_DEFAULT vmap region + * + * @param size Pointer to the base of an array of mfns + * @return Pointer to the mapped area on success; NULL otherwise. + */ void *vmalloc(size_t size); + +/* Same as vmalloc(), but for the VMAP_XEN vmap region. */ void *vmalloc_xen(size_t size); +/* Same as vmalloc(), but set the contents to zero before returning */ void *vzalloc(size_t size); + +/* + * Unmap and free memory from vmalloc(), vmalloc_xen() or vzalloc() + * + * The system remembers internally how wide the allocation is and + * unmaps/frees it all. + * + * @param va Virtual base address of the range to free and unmap + */ void vfree(void *va); +/* + * Analogous to vmap_contig(), but for IO memory + * + * Unlike vmap_contig(), it ensures architecturally correct cacheability + * settings are set for the mapped IO memory. + * + * @param pa Physical base address of the MMIO region. + * @param len Length of the MMIO region in octets. + * @return Pointer to the mapped area on success; NULL otherwise. + */ void __iomem *ioremap(paddr_t pa, size_t len); /* Return the number of pages in the mapping starting at address 'va' */ unsigned int vmap_size(const void *va); +/* Analogous to vunmap(), but for IO memory mapped via ioremap() */ static inline void iounmap(void __iomem *va) { unsigned long addr = (unsigned long)(void __force *)va; @@ -36,7 +135,10 @@ static inline void iounmap(void __iomem *va) vunmap((void *)(addr & PAGE_MASK)); } +/* Pointer to 1 octet past the end of the VMAP_DEFAULT virtual area */ void *arch_vmap_virt_end(void); + +/* Initialises the VMAP_DEFAULT virtual range */ static inline void vm_init(void) { vm_init_type(VMAP_DEFAULT, (void *)VMAP_VIRT_START, arch_vmap_virt_end()); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 10:55:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 10:55:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753699.1161890 (Exim 4.92) (envelope-from ) id 1sPK7F-0000A6-Oy; Thu, 04 Jul 2024 10:55:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753699.1161890; Thu, 04 Jul 2024 10:55:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPK7F-00009v-MM; Thu, 04 Jul 2024 10:55:05 +0000 Received: by outflank-mailman (input) for mailman id 753699; Thu, 04 Jul 2024 10:55:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPK7E-00009o-9P for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 10:55:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPK7E-00006A-6i for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 10:55:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPK7E-0004d6-3u for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 10:55:04 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=JCRf6OYGgSzSIysh1j3sRW82n1yYz9+CnCx0POP++jY=; b=pZl4ql2IpgFvbM2+GRw0nqWyoj nYPXA6kPGm0TteMDO3ScWHq030MJxqmmpTYZJIl6crZIvTOY+qCeyjDCZHqln8oooUt0Fc312M+3j z2CYyobxbxRWAr32EQYYXijrREEEIVm6UdqsXjS50/yhQNo3jLLCjzi/1CnPN3mQ+tWs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/xs-clients: Fix `make clean` rule Message-Id: Date: Thu, 04 Jul 2024 10:55:04 +0000 commit 5d8c784783f45ead96cf78fc40f2c10ee91a5396 Author: Andrew Cooper AuthorDate: Wed Jul 3 23:01:11 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 4 11:32:55 2024 +0100 tools/xs-clients: Fix `make clean` rule Prior to the split, "the clients" used tools/xenstored/Makefile.common whose clean rule includes *.o whereas after the split, the removal of *.o was lost by virtule of not including Makefile.common any more. This is the bug behind the following build error: make[2]: Entering directory '/local/xen.git/tools/xs-clients' gcc xenstore_client.o (snip) /usr/bin/ld: xenstore_client.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status make[2]: *** [Makefile:35: xenstore] Error 1 which was caused by `make clean` not properly cleaning the tree as I was swapping between various build containers. Switch to a plain single-colon clean rule. Fixes: 5c293058b130 ("tools/xenstore: move xenstored sources into dedicated directory") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Release-Acked-by: Oleksii Kurochko --- tools/xs-clients/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/xs-clients/Makefile b/tools/xs-clients/Makefile index 4e78d365e0..5415c44192 100644 --- a/tools/xs-clients/Makefile +++ b/tools/xs-clients/Makefile @@ -38,8 +38,8 @@ xenstore-control: xenstore_control.o $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(APPEND_LDFLAGS) .PHONY: clean -clean:: - $(RM) $(TARGETS) $(DEPS_RM) +clean: + $(RM) *.o $(TARGETS) $(DEPS_RM) .PHONY: distclean distclean: clean -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 10:55:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 10:55:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753700.1161894 (Exim 4.92) (envelope-from ) id 1sPK7P-0000CB-QU; Thu, 04 Jul 2024 10:55:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753700.1161894; Thu, 04 Jul 2024 10:55:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPK7P-0000C3-Ns; Thu, 04 Jul 2024 10:55:15 +0000 Received: by outflank-mailman (input) for mailman id 753700; Thu, 04 Jul 2024 10:55:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPK7O-0000Bp-CL for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 10:55:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPK7O-00006g-9n for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 10:55:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPK7O-0004dd-8r for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 10:55:14 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=z7v1X5uzXKlDFKGdl8SkxoMOqB+3Q8wPrfCnM0wS9wY=; b=aXPvjLHs/jdfuI0O+a5qK8qvli H06xD98dQTCIHXKYSf0BxzHzUB35DylzNCxn6i5HdiAKntRJGV55Fqxi/M/8LiwXzsaEfOBtLfLqf kREcwa+9gTVF2C6NtA/jVDxfNI0H0i8thDDFrXIHC3wLiitmyb2dK5fMiLGxr/bn4aZk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] build/mkheader: Remove C-isms from the code Message-Id: Date: Thu, 04 Jul 2024 10:55:14 +0000 commit 31618bf80ece39510bf2f998e4c60ce9e05ee6bd Author: Andrew Cooper AuthorDate: Wed Jul 3 21:59:34 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 4 11:43:30 2024 +0100 build/mkheader: Remove C-isms from the code This was clearly written by a C programmer, rather than a python programmer. Drop all the useless semi-colons. The very final line of the script simply references f.close, rather than calling the function. Switch to using a with: statement, as python does care about unclosed files if you enable enough warnings. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-by: Oleksii Kurochko --- tools/include/xen-foreign/mkheader.py | 104 +++++++++++++++++----------------- 1 file changed, 51 insertions(+), 53 deletions(-) diff --git a/tools/include/xen-foreign/mkheader.py b/tools/include/xen-foreign/mkheader.py index 081b57f842..3a33df4984 100644 --- a/tools/include/xen-foreign/mkheader.py +++ b/tools/include/xen-foreign/mkheader.py @@ -2,21 +2,21 @@ from __future__ import print_function -import sys, re; -from structs import unions, structs, defines; +import sys, re +from structs import unions, structs, defines # command line arguments -arch = sys.argv[1]; -outfile = sys.argv[2]; -infiles = sys.argv[3:]; +arch = sys.argv[1] +outfile = sys.argv[2] +infiles = sys.argv[3:] ########################################################################### # configuration #2: architecture information -inttypes = {}; -header = {}; -footer = {}; +inttypes = {} +header = {} +footer = {} #arm inttypes["arm32"] = [ @@ -35,7 +35,7 @@ header["arm32"] = """ # define __DECL_REG(n64, n32) uint64_t n64 # define __align8__ FIXME #endif -"""; +""" footer["arm32"] = """ #undef __DECL_REG """ @@ -56,7 +56,7 @@ header["arm64"] = """ # define __DECL_REG(n64, n32) uint64_t n64 # define __align8__ FIXME #endif -"""; +""" footer["arm64"] = """ #undef __DECL_REG """ @@ -73,12 +73,12 @@ header["x86_32"] = """ #define __DECL_REG_LO16(name) uint32_t e ## name #define __i386___X86_32 1 #pragma pack(4) -"""; +""" footer["x86_32"] = """ #undef __DECL_REG_LO8 #undef __DECL_REG_LO16 #pragma pack() -"""; +""" # x86_64 inttypes["x86_64"] = [ @@ -100,7 +100,7 @@ header["x86_64"] = """ #define __DECL_REG_LO16 __DECL_REG #define __DECL_REG_HI __DECL_REG #define __x86_64___X86_64 1 -"""; +""" footer["x86_64"] = """ #undef __DECL_REG #undef __DECL_REG_LOHI @@ -112,12 +112,12 @@ footer["x86_64"] = """ ########################################################################### # main -input = ""; -output = ""; -fileid = re.sub("[-.]", "_", "__FOREIGN_%s__" % outfile.upper()); +input = "" +output = "" +fileid = re.sub("[-.]", "_", "__FOREIGN_%s__" % outfile.upper()) for name in infiles: - f = open(name, "r"); + f = open(name, "r") # Sanity check the licence of the input file(s) line = f.readline() @@ -126,8 +126,8 @@ for name in infiles: (sys.argv[0], name, line.strip()), file=sys.stderr) exit(1) - input += f.read(); - f.close(); + input += f.read() + f.close() # replace path in "infiles" by path in '/usr/include' to avoid exposing the # build directory path in the generated headers. @@ -151,83 +151,81 @@ output += """/* SPDX-License-Identifier: MIT */ """ % (arch, headers_name_list, sys.argv[0], fileid, fileid) if arch in header: - output += header[arch]; - output += "\n"; + output += header[arch] + output += "\n" defined = {} # add defines to output for line in re.findall("#define[^\n]+", input): for define in defines: - regex = "#define\s+%s\\b" % define; - match = re.search(regex, line); + regex = "#define\s+%s\\b" % define + match = re.search(regex, line) if None == match: - continue; + continue defined[define] = 1 if define.upper()[0] == define[0]: - replace = define + "_" + arch.upper(); + replace = define + "_" + arch.upper() else: - replace = define + "_" + arch; - regex = "\\b%s\\b" % define; - output += re.sub(regex, replace, line) + "\n"; -output += "\n"; + replace = define + "_" + arch + regex = "\\b%s\\b" % define + output += re.sub(regex, replace, line) + "\n" +output += "\n" # delete defines, comments, empty lines -input = re.sub("#define[^\n]+\n", "", input); +input = re.sub("#define[^\n]+\n", "", input) input = re.compile("/\*(.*?)\*/", re.S).sub("", input) -input = re.compile("\n\s*\n", re.S).sub("\n", input); +input = re.compile("\n\s*\n", re.S).sub("\n", input) # add unions to output for union in unions: - regex = "union\s+%s\s*\{(.*?)\n\};" % union; + regex = "union\s+%s\s*\{(.*?)\n\};" % union match = re.search(regex, input, re.S) if None == match: - output += "#define %s_has_no_%s 1\n" % (arch, union); + output += "#define %s_has_no_%s 1\n" % (arch, union) else: - output += "union %s_%s {%s\n};\n" % (union, arch, match.group(1)); - output += "\n"; + output += "union %s_%s {%s\n};\n" % (union, arch, match.group(1)) + output += "\n" # add structs to output for struct in structs: - regex = "(?:#ifdef ([A-Z_]+))?\nstruct\s+%s\s*\{(.*?)\n\};" % struct; + regex = "(?:#ifdef ([A-Z_]+))?\nstruct\s+%s\s*\{(.*?)\n\};" % struct match = re.search(regex, input, re.S) if None == match or \ (match.group(1) is not None and match.group(1) not in defined): - output += "#define %s_has_no_%s 1\n" % (arch, struct); + output += "#define %s_has_no_%s 1\n" % (arch, struct) else: - output += "struct %s_%s {%s\n};\n" % (struct, arch, match.group(2)); - output += "typedef struct %s_%s %s_%s_t;\n" % (struct, arch, struct, arch); - output += "\n"; + output += "struct %s_%s {%s\n};\n" % (struct, arch, match.group(2)) + output += "typedef struct %s_%s %s_%s_t;\n" % (struct, arch, struct, arch) + output += "\n" # add footer if arch in footer: - output += footer[arch]; - output += "\n"; -output += "#endif /* %s */\n" % fileid; + output += footer[arch] + output += "\n" +output += "#endif /* %s */\n" % fileid # replace: defines for define in defines: if define.upper()[0] == define[0]: - replace = define + "_" + arch.upper(); + replace = define + "_" + arch.upper() else: - replace = define + "_" + arch; - output = re.sub("\\b%s\\b" % define, replace, output); + replace = define + "_" + arch + output = re.sub("\\b%s\\b" % define, replace, output) # replace: unions for union in unions: - output = re.sub("\\b(union\s+%s)\\b" % union, "\\1_%s" % arch, output); + output = re.sub("\\b(union\s+%s)\\b" % union, "\\1_%s" % arch, output) # replace: structs + struct typedefs for struct in structs: - output = re.sub("\\b(struct\s+%s)\\b" % struct, "\\1_%s" % arch, output); - output = re.sub("\\b(%s)_t\\b" % struct, "\\1_%s_t" % arch, output); + output = re.sub("\\b(struct\s+%s)\\b" % struct, "\\1_%s" % arch, output) + output = re.sub("\\b(%s)_t\\b" % struct, "\\1_%s_t" % arch, output) # replace: integer types for old, new in inttypes[arch]: output = re.sub("\\b%s\\b" % old, new, output) # print results -f = open(outfile, "w"); -f.write(output); -f.close; - +with open(outfile, "w") as f: + f.write(output) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 10:55:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 10:55:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753701.1161899 (Exim 4.92) (envelope-from ) id 1sPK7Z-0000F8-S6; Thu, 04 Jul 2024 10:55:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753701.1161899; Thu, 04 Jul 2024 10:55:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPK7Z-0000F0-PM; Thu, 04 Jul 2024 10:55:25 +0000 Received: by outflank-mailman (input) for mailman id 753701; Thu, 04 Jul 2024 10:55:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPK7Y-0000Ej-Dh for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 10:55:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPK7Y-00006v-Cx for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 10:55:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPK7Y-0004e5-C0 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 10:55:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=5/n61rG+RBnTy8o5lL7RPeZB35Nbdr+kNC8hY7/7DXE=; b=YnvsxFD0DXlaqLEOkRKllv2dup KWGc1oqDP5HTA869nsamflthrArEdT5+cy3knkY8Dft9FL+eztfKw3iN121CtIMy+yF7qwrgPk6Us mSB2ieiE4GWtbcnuad14u5MHFFmLF9V5sO9IkvwhPpE3DPkVD2+lYL/6mfOmAJHo8hTA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] build/mkheader: Fix Syntax/DeprecationWarnings Message-Id: Date: Thu, 04 Jul 2024 10:55:24 +0000 commit 56b77d7db03775b0abcfb23476f0abecb51f1de7 Author: Andrew Cooper AuthorDate: Wed Jul 3 21:57:19 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 4 11:43:33 2024 +0100 build/mkheader: Fix Syntax/DeprecationWarnings With Python 3.11, the following is emitted during a build: tools/include/xen-foreign/mkheader.py:162: DeprecationWarning: invalid escape sequence '\s' regex = "#define\s+%s\\b" % define; tools/include/xen-foreign/mkheader.py:177: DeprecationWarning: invalid escape sequence '\*' input = re.compile("/\*(.*?)\*/", re.S).sub("", input) tools/include/xen-foreign/mkheader.py:178: DeprecationWarning: invalid escape sequence '\s' input = re.compile("\n\s*\n", re.S).sub("\n", input); tools/include/xen-foreign/mkheader.py:182: DeprecationWarning: invalid escape sequence '\s' regex = "union\s+%s\s*\{(.*?)\n\};" % union; tools/include/xen-foreign/mkheader.py:192: DeprecationWarning: invalid escape sequence '\s' regex = "(?:#ifdef ([A-Z_]+))?\nstruct\s+%s\s*\{(.*?)\n\};" % struct; tools/include/xen-foreign/mkheader.py:218: DeprecationWarning: invalid escape sequence '\s' output = re.sub("\\b(union\s+%s)\\b" % union, "\\1_%s" % arch, output); tools/include/xen-foreign/mkheader.py:222: DeprecationWarning: invalid escape sequence '\s' output = re.sub("\\b(struct\s+%s)\\b" % struct, "\\1_%s" % arch, output); Python regexes should use raw strings. Convert all regexes, and drop escaped backslashes. Note that regular escape sequences are interpreted normally when parsing a regex, so \n even in a raw-string regex is a newline. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-by: Oleksii Kurochko --- tools/include/xen-foreign/mkheader.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/include/xen-foreign/mkheader.py b/tools/include/xen-foreign/mkheader.py index 3a33df4984..128b0f3014 100644 --- a/tools/include/xen-foreign/mkheader.py +++ b/tools/include/xen-foreign/mkheader.py @@ -159,7 +159,7 @@ defined = {} # add defines to output for line in re.findall("#define[^\n]+", input): for define in defines: - regex = "#define\s+%s\\b" % define + regex = r"#define\s+%s\b" % define match = re.search(regex, line) if None == match: continue @@ -168,18 +168,18 @@ for line in re.findall("#define[^\n]+", input): replace = define + "_" + arch.upper() else: replace = define + "_" + arch - regex = "\\b%s\\b" % define + regex = r"\b%s\b" % define output += re.sub(regex, replace, line) + "\n" output += "\n" # delete defines, comments, empty lines input = re.sub("#define[^\n]+\n", "", input) -input = re.compile("/\*(.*?)\*/", re.S).sub("", input) -input = re.compile("\n\s*\n", re.S).sub("\n", input) +input = re.compile(r"/\*(.*?)\*/", re.S).sub("", input) +input = re.compile(r"\n\s*\n", re.S).sub("\n", input) # add unions to output for union in unions: - regex = "union\s+%s\s*\{(.*?)\n\};" % union + regex = r"union\s+%s\s*\{(.*?)\n\};" % union match = re.search(regex, input, re.S) if None == match: output += "#define %s_has_no_%s 1\n" % (arch, union) @@ -189,7 +189,7 @@ for union in unions: # add structs to output for struct in structs: - regex = "(?:#ifdef ([A-Z_]+))?\nstruct\s+%s\s*\{(.*?)\n\};" % struct + regex = r"(?:#ifdef ([A-Z_]+))?\nstruct\s+%s\s*\{(.*?)\n\};" % struct match = re.search(regex, input, re.S) if None == match or \ (match.group(1) is not None and match.group(1) not in defined): @@ -211,20 +211,20 @@ for define in defines: replace = define + "_" + arch.upper() else: replace = define + "_" + arch - output = re.sub("\\b%s\\b" % define, replace, output) + output = re.sub(r"\b%s\b" % define, replace, output) # replace: unions for union in unions: - output = re.sub("\\b(union\s+%s)\\b" % union, "\\1_%s" % arch, output) + output = re.sub(r"\b(union\s+%s)\b" % union, r"\1_%s" % arch, output) # replace: structs + struct typedefs for struct in structs: - output = re.sub("\\b(struct\s+%s)\\b" % struct, "\\1_%s" % arch, output) - output = re.sub("\\b(%s)_t\\b" % struct, "\\1_%s_t" % arch, output) + output = re.sub(r"\b(struct\s+%s)\b" % struct, r"\1_%s" % arch, output) + output = re.sub(r"\b(%s)_t\b" % struct, r"\1_%s_t" % arch, output) # replace: integer types for old, new in inttypes[arch]: - output = re.sub("\\b%s\\b" % old, new, output) + output = re.sub(r"\b%s\b" % old, new, output) # print results with open(outfile, "w") as f: -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:22:12 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:22:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753762.1161953 (Exim 4.92) (envelope-from ) id 1sPLTR-0000vJ-6S; Thu, 04 Jul 2024 12:22:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753762.1161953; Thu, 04 Jul 2024 12:22:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLTR-0000vB-3N; Thu, 04 Jul 2024 12:22:05 +0000 Received: by outflank-mailman (input) for mailman id 753762; Thu, 04 Jul 2024 12:22:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLTQ-0000v5-Ea for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLTQ-0001gU-AE for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLTQ-0003Wq-7L for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:04 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=dCypi5Y85LXDM0cl1TYh8um+Mn+lgZpXvpGFwGbn/yA=; b=uQzOcq7AdmeVFJbeDhL0iPb/ZL jYPAx/5xL73i4HZWiwMpF0U/kFjlvyY7y3ExXR922/g2AOaNuL/qRg/esndgNdcEkUKdPAkNmdlIF rq5nmaxHe0SZiGfRcP2vUlh+7zZErYKDFrtvvxjP/ZrFKHxuoaDkB25SeTfO70BVzKcI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] x86: re-run exception-from-stub recovery selftests with CET-SS enabled Message-Id: Date: Thu, 04 Jul 2024 12:22:04 +0000 commit 5ac3cbbf83e1f955aeaf5d0f503099f5249b5c25 Author: Jan Beulich AuthorDate: Thu Jul 4 14:06:19 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:06:19 2024 +0200 x86: re-run exception-from-stub recovery selftests with CET-SS enabled On the BSP, shadow stacks are enabled only relatively late in the booting process. They in particular aren't active yet when initcalls are run. Keep the testing there, but invoke that testing a 2nd time when shadow stacks are active, to make sure we won't regress that case after addressing XSA-451. While touching this code, switch the guard from NDEBUG to CONFIG_DEBUG, such that IS_ENABLED() can validly be used at the new call site. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper master commit: cfe3ad67127b86e1b1c06993b86422673a51b050 master date: 2024-02-27 13:49:52 +0100 --- xen/arch/x86/extable.c | 8 +++++--- xen/arch/x86/include/asm/setup.h | 2 ++ xen/arch/x86/setup.c | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/extable.c b/xen/arch/x86/extable.c index 8ffcd346d7..12cc9935d8 100644 --- a/xen/arch/x86/extable.c +++ b/xen/arch/x86/extable.c @@ -128,10 +128,11 @@ search_exception_table(const struct cpu_user_regs *regs, unsigned long *stub_ra) return 0; } -#ifndef NDEBUG +#ifdef CONFIG_DEBUG +#include #include -static int __init cf_check stub_selftest(void) +int __init cf_check stub_selftest(void) { static const struct { uint8_t opc[8]; @@ -155,7 +156,8 @@ static int __init cf_check stub_selftest(void) unsigned int i; bool fail = false; - printk("Running stub recovery selftests...\n"); + printk("%s stub recovery selftests...\n", + system_state < SYS_STATE_active ? "Running" : "Re-running"); for ( i = 0; i < ARRAY_SIZE(tests); ++i ) { diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/setup.h index 9a460e4db8..14d15048eb 100644 --- a/xen/arch/x86/include/asm/setup.h +++ b/xen/arch/x86/include/asm/setup.h @@ -38,6 +38,8 @@ void *bootstrap_map(const module_t *mod); int xen_in_range(unsigned long mfn); +int cf_check stub_selftest(void); + extern uint8_t kbd_shift_flags; #ifdef NDEBUG diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 25017b5d96..f2592c3dc9 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -738,6 +738,10 @@ static void noreturn init_done(void) system_state = SYS_STATE_active; + /* Re-run stub recovery self-tests with CET-SS active. */ + if ( IS_ENABLED(CONFIG_DEBUG) && cpu_has_xen_shstk ) + stub_selftest(); + domain_unpause_by_systemcontroller(dom0); /* MUST be done prior to removing .init data. */ -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:22:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:22:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753763.1161957 (Exim 4.92) (envelope-from ) id 1sPLTb-0000xI-7T; Thu, 04 Jul 2024 12:22:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753763.1161957; Thu, 04 Jul 2024 12:22:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLTb-0000x9-4n; Thu, 04 Jul 2024 12:22:15 +0000 Received: by outflank-mailman (input) for mailman id 753763; Thu, 04 Jul 2024 12:22:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLTa-0000wy-EG for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLTa-0001hZ-DQ for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLTa-0003Y4-CQ for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:14 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=lrl1M0o6Fx8TesFdum3aaHvNS33cfNTH/O10xDu5x5c=; b=Cht6ia9IIZTeBijZ3UnRqK3m2G uEaKzxU7HQcdGZUpRMQQhsV+3Uiv9lksGTX5dZpYTUdLSo/OP4DA2dgAB1NaK8Ramh59ASwkvyn6B SPC4hBKAqkxiV7jGqcS8CPN/68/ej1JBBPoNl1eXGxyacZav2u+1wO5KyeLr38NckROE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] tools/tests: don't let test-xenstore write nodes exceeding default size Message-Id: Date: Thu, 04 Jul 2024 12:22:14 +0000 commit 0ebfa35965257343ba3d8377be91ad8512a9c749 Author: Juergen Gross AuthorDate: Thu Jul 4 14:06:54 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:06:54 2024 +0200 tools/tests: don't let test-xenstore write nodes exceeding default size Today test-xenstore will write nodes with 3000 bytes node data. This size is exceeding the default quota for the allowed node size. While working in dom0 with C-xenstored, OCAML-xenstored does not like that. Use a size of 2000 instead, which is lower than the allowed default node size of 2048. Fixes: 3afc5e4a5b75 ("tools/tests: add xenstore testing framework") Signed-off-by: Juergen Gross Acked-by: Andrew Cooper master commit: 642005e310483c490b0725fab4672f2b77fdf2ba master date: 2024-05-02 18:15:31 +0100 --- tools/tests/xenstore/test-xenstore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tests/xenstore/test-xenstore.c b/tools/tests/xenstore/test-xenstore.c index d491dac53b..73a7011d21 100644 --- a/tools/tests/xenstore/test-xenstore.c +++ b/tools/tests/xenstore/test-xenstore.c @@ -408,9 +408,9 @@ static int test_ta3_deinit(uintptr_t par) #define TEST(s, f, p, l) { s, f ## _init, f, f ## _deinit, (uintptr_t)(p), l } struct test tests[] = { TEST("read 1", test_read, 1, "Read node with 1 byte data"), -TEST("read 3000", test_read, 3000, "Read node with 3000 bytes data"), +TEST("read 2000", test_read, 2000, "Read node with 2000 bytes data"), TEST("write 1", test_write, 1, "Write node with 1 byte data"), -TEST("write 3000", test_write, 3000, "Write node with 3000 bytes data"), +TEST("write 2000", test_write, 2000, "Write node with 2000 bytes data"), TEST("dir", test_dir, 0, "List directory"), TEST("rm node", test_rm, 0, "Remove single node"), TEST("rm dir", test_rm, WRITE_BUFFERS_N, "Remove node with sub-nodes"), -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:22:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:22:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753764.1161960 (Exim 4.92) (envelope-from ) id 1sPLTl-00010H-8e; Thu, 04 Jul 2024 12:22:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753764.1161960; Thu, 04 Jul 2024 12:22:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLTl-00010A-6D; Thu, 04 Jul 2024 12:22:25 +0000 Received: by outflank-mailman (input) for mailman id 753764; Thu, 04 Jul 2024 12:22:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLTk-0000zr-H5 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLTk-0001hx-GN for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLTk-0003Ys-FZ for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=ZfgLxDXni8J0ors6tV6M0YWY+OvsVcA668ylA3JwS+s=; b=cWm8csekfJyaHABqIdI08/5Cv4 arFkznFLQlBKTtRg1VJKlBlrAp/DeQOnnBa/JPthK728mVsggBSVRR3sAuv8P7H9uz0bSUL09a5w1 cPF4eXhUXcEcAbPHLcsJuPRJZFbJRz3vZ6cX7PcubSeGIPseLTano85/G9PpKZuoDOvA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] tools/tests: let test-xenstore exit with non-0 status in case of error Message-Id: Date: Thu, 04 Jul 2024 12:22:24 +0000 commit 22f623622cc60571be9cccc323a1d17749683667 Author: Juergen Gross AuthorDate: Thu Jul 4 14:07:12 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:07:12 2024 +0200 tools/tests: let test-xenstore exit with non-0 status in case of error In case a test is failing in test-xenstore, let the tool exit with an exit status other than 0. Fix a typo in an error message. Reported-by: Andrew Cooper Fixes: 3afc5e4a5b75 ("tools/tests: add xenstore testing framework") Signed-off-by: Juergen Gross master commit: 2d4ba205591ba64f31149ae31051678159ee9e11 master date: 2024-05-02 18:15:46 +0100 --- tools/tests/xenstore/test-xenstore.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/tests/xenstore/test-xenstore.c b/tools/tests/xenstore/test-xenstore.c index 73a7011d21..7a9bd9afb3 100644 --- a/tools/tests/xenstore/test-xenstore.c +++ b/tools/tests/xenstore/test-xenstore.c @@ -506,14 +506,14 @@ int main(int argc, char *argv[]) stop = time(NULL) + randtime; srandom((unsigned int)stop); - while ( time(NULL) < stop ) + while ( time(NULL) < stop && !ret ) { t = random() % ARRAY_SIZE(tests); ret = call_test(tests + t, iters, true); } } else - for ( t = 0; t < ARRAY_SIZE(tests); t++ ) + for ( t = 0; t < ARRAY_SIZE(tests) && !ret; t++ ) { if ( !test || !strcmp(test, tests[t].name) ) ret = call_test(tests + t, iters, false); @@ -525,10 +525,10 @@ int main(int argc, char *argv[]) xs_close(xsh); if ( ta_loops ) - printf("Exhaustive transaction retries (%d) occurrred %d times.\n", + printf("Exhaustive transaction retries (%d) occurred %d times.\n", MAX_TA_LOOPS, ta_loops); - return 0; + return ret ? 3 : 0; } /* -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:22:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:22:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753765.1161965 (Exim 4.92) (envelope-from ) id 1sPLTv-00013d-AM; Thu, 04 Jul 2024 12:22:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753765.1161965; Thu, 04 Jul 2024 12:22:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLTv-00013S-7k; Thu, 04 Jul 2024 12:22:35 +0000 Received: by outflank-mailman (input) for mailman id 753765; Thu, 04 Jul 2024 12:22:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLTu-00013L-Kp for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLTu-0001iF-JN for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLTu-0003Zk-IS for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=cfQjC0zLXu5FAm7tZbnghiB9uHm9dHPW42HQ4WGc5Gw=; b=K5JL5JTCrGplLFFMqvraX+YgRz aBpaaR9zlAZq06xTmRYA4mIMOG+dxXS1rwAnAlj5Gq33TwpdIMNG5E2cmeRnItIDc5DBiGKKsz+Je tmiqofKNWuhqTO2EHXeZRRC3YOWTifPEOEYdL2Xoal0A32jMqBG1obtq6vnMPSesCL8A=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] LICENSES: Add MIT-0 (MIT No Attribution) Message-Id: Date: Thu, 04 Jul 2024 12:22:34 +0000 commit 75b4f9474a1aa33a6f9e0986b51c390f9b38ae5a Author: Andrew Cooper AuthorDate: Thu Jul 4 14:08:11 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:08:11 2024 +0200 LICENSES: Add MIT-0 (MIT No Attribution) We are about to import code licensed under MIT-0. It's compatible for us to use, so identify it as a permitted license. Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini Acked-by: Christian Lindig master commit: 219cdff3fb7b4a03ab14869584f111e0f623b330 master date: 2024-05-23 15:04:40 +0100 --- LICENSES/MIT-0 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/LICENSES/MIT-0 b/LICENSES/MIT-0 new file mode 100644 index 0000000000..70fb90ee34 --- /dev/null +++ b/LICENSES/MIT-0 @@ -0,0 +1,31 @@ +Valid-License-Identifier: MIT-0 + +SPDX-URL: https://spdx.org/licenses/MIT-0.html + +Usage-Guide: + + To use the MIT-0 License put the following SPDX tag/value pair into a + comment according to the placement guidelines in the licensing rules + documentation: + SPDX-License-Identifier: MIT-0 + +License-Text: + +MIT No Attribution + +Copyright + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:22:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:22:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753766.1161970 (Exim 4.92) (envelope-from ) id 1sPLU5-00018B-Bu; Thu, 04 Jul 2024 12:22:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753766.1161970; Thu, 04 Jul 2024 12:22:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLU5-00017z-97; Thu, 04 Jul 2024 12:22:45 +0000 Received: by outflank-mailman (input) for mailman id 753766; Thu, 04 Jul 2024 12:22:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLU4-00017q-N4 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLU4-0001jG-MO for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:44 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLU4-0003aV-LU for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:44 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=663Q/DtGsKLXMHuD2uhQk7JJDBTJhC2ng6PEfQPHDKo=; b=6+kBHn1mPmGRZQ0+PANP6GcX+u JFh1inPRfrYUe1OLVhqrOIo63JZ9RhlOVIr8bvDRzO2PMGM0o7yka8ELfffrBMiXPwrCo84uX5JT1 TiKIrnCuGwbUtPdHVSzwEh7fsgQd66NHMy4h0s5D4hDcselpuIhCzFODHaEOl2EH4nKo=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] tools: Import stand-alone sd_notify() implementation from systemd Message-Id: Date: Thu, 04 Jul 2024 12:22:44 +0000 commit 1743102a92479834c8e17b20697129e05b7c8313 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:10:10 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:10:10 2024 +0200 tools: Import stand-alone sd_notify() implementation from systemd ... in order to avoid linking against the whole of libsystemd. Only minimal changes to the upstream copy, to function as a drop-in replacement for sd_notify() and as a header-only library. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Christian Lindig master commit: 78510f3a1522f2856330ffa429e0e35f8aab4277 master date: 2024-05-23 15:04:40 +0100 master commit: 78510f3a1522f2856330ffa429e0e35f8aab4277 master date: 2024-05-23 15:04:40 +0100 --- tools/include/xen-sd-notify.h | 98 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/tools/include/xen-sd-notify.h b/tools/include/xen-sd-notify.h new file mode 100644 index 0000000000..28c9b20f15 --- /dev/null +++ b/tools/include/xen-sd-notify.h @@ -0,0 +1,98 @@ +/* SPDX-License-Identifier: MIT-0 */ + +/* + * Implement the systemd notify protocol without external dependencies. + * Supports both readiness notification on startup and on reloading, + * according to the protocol defined at: + * https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html + * This protocol is guaranteed to be stable as per: + * https://systemd.io/PORTABILITY_AND_STABILITY/ + * + * Differences from the upstream copy: + * - Rename/rework as a drop-in replacement for systemd/sd-daemon.h + * - Only take the subset Xen cares about + * - Respect -Wdeclaration-after-statement + */ + +#ifndef XEN_SD_NOTIFY +#define XEN_SD_NOTIFY + +#include +#include +#include +#include +#include +#include + +static inline void xen_sd_closep(int *fd) { + if (!fd || *fd < 0) + return; + + close(*fd); + *fd = -1; +} + +static inline int xen_sd_notify(const char *message) { + union sockaddr_union { + struct sockaddr sa; + struct sockaddr_un sun; + } socket_addr = { + .sun.sun_family = AF_UNIX, + }; + size_t path_length, message_length; + ssize_t written; + const char *socket_path; + int __attribute__((cleanup(xen_sd_closep))) fd = -1; + + /* Verify the argument first */ + if (!message) + return -EINVAL; + + message_length = strlen(message); + if (message_length == 0) + return -EINVAL; + + /* If the variable is not set, the protocol is a noop */ + socket_path = getenv("NOTIFY_SOCKET"); + if (!socket_path) + return 0; /* Not set? Nothing to do */ + + /* Only AF_UNIX is supported, with path or abstract sockets */ + if (socket_path[0] != '/' && socket_path[0] != '@') + return -EAFNOSUPPORT; + + path_length = strlen(socket_path); + /* Ensure there is room for NUL byte */ + if (path_length >= sizeof(socket_addr.sun.sun_path)) + return -E2BIG; + + memcpy(socket_addr.sun.sun_path, socket_path, path_length); + + /* Support for abstract socket */ + if (socket_addr.sun.sun_path[0] == '@') + socket_addr.sun.sun_path[0] = 0; + + fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0); + if (fd < 0) + return -errno; + + if (connect(fd, &socket_addr.sa, offsetof(struct sockaddr_un, sun_path) + path_length) != 0) + return -errno; + + written = write(fd, message, message_length); + if (written != (ssize_t) message_length) + return written < 0 ? -errno : -EPROTO; + + return 1; /* Notified! */ +} + +static inline int sd_notify(int unset_environment, const char *message) { + int r = xen_sd_notify(message); + + if (unset_environment) + unsetenv("NOTIFY_SOCKET"); + + return r; +} + +#endif /* XEN_SD_NOTIFY */ -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:22:56 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:22:56 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753767.1161973 (Exim 4.92) (envelope-from ) id 1sPLUG-0001BO-D7; Thu, 04 Jul 2024 12:22:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753767.1161973; Thu, 04 Jul 2024 12:22:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUG-0001BE-AW; Thu, 04 Jul 2024 12:22:56 +0000 Received: by outflank-mailman (input) for mailman id 753767; Thu, 04 Jul 2024 12:22:54 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUE-0001Ax-Qq for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:54 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUE-0001kC-PP for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:54 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLUE-0003bM-Of for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:22:54 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=jndgcO4iBf11R6WKEQHMfuHcq2AWLII/kkzqmeWFfV0=; b=S63zix4oxseISqfVjXoOb8Dqr0 hRcGrhpUyPTcQGb5KZi8v2FDijZjzd/rjyauDit+y5ypv6jWX6DU3jjfeqZzfxdF1RFYCWu6Ic/et 2vICXDyzMW+GjwbIpumllDsvnZnIZ6cj+iyMxD2lSJYdcfz+EYvlbqnWX3O3edgBPcXw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] tools/{c,o}xenstored: Don't link against libsystemd Message-Id: Date: Thu, 04 Jul 2024 12:22:54 +0000 commit 77cf215157d267a7776f3c4ec32e89064dcd84cd Author: Andrew Cooper AuthorDate: Thu Jul 4 14:10:29 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:10:29 2024 +0200 tools/{c,o}xenstored: Don't link against libsystemd Use the local freestanding wrapper instead. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Christian Lindig master commit: caf864482689a5dd6a945759b6372bb260d49665 master date: 2024-05-23 15:04:40 +0100 --- tools/ocaml/xenstored/Makefile | 3 +-- tools/ocaml/xenstored/systemd_stubs.c | 2 +- tools/xenstored/Makefile | 5 ----- tools/xenstored/core.c | 4 ++-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile index e8aaecf2e6..fa45305d8c 100644 --- a/tools/ocaml/xenstored/Makefile +++ b/tools/ocaml/xenstored/Makefile @@ -4,8 +4,7 @@ include $(OCAML_TOPLEVEL)/common.make # Include configure output (config.h) CFLAGS += -include $(XEN_ROOT)/tools/config.h -CFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_CFLAGS) -LDFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_LIBS) +CFLAGS-$(CONFIG_SYSTEMD) += $(CFLAGS_xeninclude) CFLAGS += $(CFLAGS-y) CFLAGS += $(APPEND_CFLAGS) diff --git a/tools/ocaml/xenstored/systemd_stubs.c b/tools/ocaml/xenstored/systemd_stubs.c index f4c875075a..7dbbdd35bf 100644 --- a/tools/ocaml/xenstored/systemd_stubs.c +++ b/tools/ocaml/xenstored/systemd_stubs.c @@ -25,7 +25,7 @@ #if defined(HAVE_SYSTEMD) -#include +#include CAMLprim value ocaml_sd_notify_ready(value ignore) { diff --git a/tools/xenstored/Makefile b/tools/xenstored/Makefile index e0897ed1ba..09adfe1d50 100644 --- a/tools/xenstored/Makefile +++ b/tools/xenstored/Makefile @@ -9,11 +9,6 @@ xenstored: LDLIBS += $(LDLIBS_libxenctrl) xenstored: LDLIBS += -lrt xenstored: LDLIBS += $(SOCKET_LIBS) -ifeq ($(CONFIG_SYSTEMD),y) -$(XENSTORED_OBJS-y): CFLAGS += $(SYSTEMD_CFLAGS) -xenstored: LDLIBS += $(SYSTEMD_LIBS) -endif - TARGETS := xenstored .PHONY: all diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c index edd07711db..dfe98e7bfc 100644 --- a/tools/xenstored/core.c +++ b/tools/xenstored/core.c @@ -61,7 +61,7 @@ #endif #if defined(XEN_SYSTEMD_ENABLED) -#include +#include #endif extern xenevtchn_handle *xce_handle; /* in domain.c */ @@ -3000,7 +3000,7 @@ int main(int argc, char *argv[]) #if defined(XEN_SYSTEMD_ENABLED) if (!live_update) { sd_notify(1, "READY=1"); - fprintf(stderr, SD_NOTICE "xenstored is ready\n"); + fprintf(stderr, "xenstored is ready\n"); } #endif -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:23:06 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:23:06 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753768.1161976 (Exim 4.92) (envelope-from ) id 1sPLUQ-0001EJ-Et; Thu, 04 Jul 2024 12:23:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753768.1161976; Thu, 04 Jul 2024 12:23:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUQ-0001EC-Bw; Thu, 04 Jul 2024 12:23:06 +0000 Received: by outflank-mailman (input) for mailman id 753768; Thu, 04 Jul 2024 12:23:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUO-0001Dw-Ta for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUO-0001lQ-Sv for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLUO-0003cP-S1 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:04 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=QjObjz6U450KHUJNzQ8pypsEw1FGHS4ZgtNgEMlX4gE=; b=UwjnfI0ulY0svPo/YTIKdBTsHm 1x4letu/bHc6CrX0j7tdZju0ok6vDhGSQ8AT5ok6a81lbhihRNaZTdRDihTS5oX+Q5pRbf5UPgz25 DdH3xTrrpsqsBnqPGdmrC7vnm8lRjoeAuw1w7xjMs6EfqsQLvNQb6EoK1L7H39wVx12E=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] tools: Drop libsystemd as a dependency Message-Id: Date: Thu, 04 Jul 2024 12:23:04 +0000 commit 7967bd358e93ed83e01813a8d0dfd68aa67f5780 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:10:40 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:10:40 2024 +0200 tools: Drop libsystemd as a dependency There are no more users, and we want to disuade people from introducing new users just for sd_notify() and friends. Drop the dependency. We still want the overall --with{,out}-systemd to gate the generation of the service/unit/mount/etc files. Rerun autogen.sh, and mark the dependency as removed in the build containers. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Christian Lindig tools: (Actually) drop libsystemd as a dependency When reinstating some of systemd.m4 between v1 and v2, I reintroduced a little too much. While {c,o}xenstored are indeed no longer linked against libsystemd, ./configure still looks for it. Drop this too. Fixes: ae26101f6bfc ("tools: Drop libsystemd as a dependency") Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné master commit: ae26101f6bfc8185adcdb9165d469bdc467780db master date: 2024-05-23 15:04:40 +0100 master commit: 6ef4fa1e7fe78c1dae07b451292b07facfce4902 master date: 2024-05-30 12:15:25 +0100 --- CHANGELOG.md | 7 +- config/Tools.mk.in | 2 - m4/systemd.m4 | 17 -- tools/configure | 485 +---------------------------------------------------- 4 files changed, 7 insertions(+), 504 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa54d59df1..ceca12eb5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,12 @@ Notable changes to Xen will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [4.18.2](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.18.2) +## [4.18.3](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.18.3) + +### Changed + - When building with Systemd support (./configure --enable-systemd), remove + libsystemd as a build dependency. Systemd Notify support is retained, now + using a standalone library implementation. ## [4.18.1](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.18.1) diff --git a/config/Tools.mk.in b/config/Tools.mk.in index b54ab21f96..50fbef841f 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -52,8 +52,6 @@ CONFIG_PYGRUB := @pygrub@ CONFIG_LIBFSIMAGE := @libfsimage@ CONFIG_SYSTEMD := @systemd@ -SYSTEMD_CFLAGS := @SYSTEMD_CFLAGS@ -SYSTEMD_LIBS := @SYSTEMD_LIBS@ XEN_SYSTEMD_DIR := @SYSTEMD_DIR@ XEN_SYSTEMD_MODULES_LOAD := @SYSTEMD_MODULES_LOAD@ CONFIG_9PFS := @ninepfs@ diff --git a/m4/systemd.m4 b/m4/systemd.m4 index 112dc11b5e..ab12ea313d 100644 --- a/m4/systemd.m4 +++ b/m4/systemd.m4 @@ -41,15 +41,6 @@ AC_DEFUN([AX_ALLOW_SYSTEMD_OPTS], [ ]) AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ - PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon],, - [PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209])] - ) - dnl pkg-config older than 0.24 does not set these for - dnl PKG_CHECK_MODULES() worth also noting is that as of version 208 - dnl of systemd pkg-config --cflags currently yields no extra flags yet. - AC_SUBST([SYSTEMD_CFLAGS]) - AC_SUBST([SYSTEMD_LIBS]) - AS_IF([test "x$SYSTEMD_DIR" = x], [ dnl In order to use the line below we need to fix upstream systemd dnl to properly ${prefix} for child variables in @@ -95,13 +86,6 @@ AC_DEFUN([AX_CHECK_SYSTEMD], [ ],[systemd=n]) ]) -AC_DEFUN([AX_CHECK_SYSTEMD_ENABLE_AVAILABLE], [ - PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon], [systemd="y"],[ - PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], - [systemd="y"],[systemd="n"]) - ]) -]) - dnl Enables systemd by default and requires a --disable-systemd option flag dnl to configure if you want to disable. AC_DEFUN([AX_ENABLE_SYSTEMD], [ @@ -121,6 +105,5 @@ dnl to have systemd build libraries it will be enabled. You can always force dnl disable with --disable-systemd AC_DEFUN([AX_AVAILABLE_SYSTEMD], [ AX_ALLOW_SYSTEMD_OPTS() - AX_CHECK_SYSTEMD_ENABLE_AVAILABLE() AX_CHECK_SYSTEMD() ]) diff --git a/tools/configure b/tools/configure index 38c0808d3a..7bb935d23b 100755 --- a/tools/configure +++ b/tools/configure @@ -626,8 +626,6 @@ ac_subst_vars='LTLIBOBJS LIBOBJS pvshim ninepfs -SYSTEMD_LIBS -SYSTEMD_CFLAGS SYSTEMD_MODULES_LOAD SYSTEMD_DIR systemd @@ -864,9 +862,7 @@ pixman_LIBS libzstd_CFLAGS libzstd_LIBS LIBNL3_CFLAGS -LIBNL3_LIBS -SYSTEMD_CFLAGS -SYSTEMD_LIBS' +LIBNL3_LIBS' # Initialize some variables set by options. @@ -1621,10 +1617,6 @@ Some influential environment variables: LIBNL3_CFLAGS C compiler flags for LIBNL3, overriding pkg-config LIBNL3_LIBS linker flags for LIBNL3, overriding pkg-config - SYSTEMD_CFLAGS - C compiler flags for SYSTEMD, overriding pkg-config - SYSTEMD_LIBS - linker flags for SYSTEMD, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -3889,8 +3881,6 @@ esac - - @@ -9540,223 +9530,6 @@ fi - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - systemd="n" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - systemd="n" -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - systemd="y" -fi - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - systemd="n" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - systemd="n" -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - systemd="y" -fi - -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - systemd="y" -fi - - if test "x$enable_systemd" != "xno"; then : if test "x$systemd" = "xy" ; then : @@ -9766,262 +9539,6 @@ $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h systemd=y - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libsystemd >= 209) were not met: - -$SYSTEMD_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libsystemd >= 209) were not met: - -$SYSTEMD_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - - - if test "x$SYSTEMD_DIR" = x; then : SYSTEMD_DIR="\$(prefix)/lib/systemd/system/" -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:23:16 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:23:16 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753769.1161981 (Exim 4.92) (envelope-from ) id 1sPLUa-0001Hh-Hq; Thu, 04 Jul 2024 12:23:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753769.1161981; Thu, 04 Jul 2024 12:23:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUa-0001HZ-FK; Thu, 04 Jul 2024 12:23:16 +0000 Received: by outflank-mailman (input) for mailman id 753769; Thu, 04 Jul 2024 12:23:15 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUZ-0001HN-0N for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:15 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUY-0001mg-Vs for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLUY-0003dd-V9 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:14 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=zEKhvXIDbK15oXBrg+/Fo3PBS9WnJo0QK8f8fgQzsEE=; b=ssO13EvkBZNA2GeJlhtz/xuU6i wxPSP8V0ti3kOZ1wbrMYLZCbN3IXurdlD0ZZQazJuAIj7IM91fp9YPWeRsfDDR2ucKDopRL9tVB0s Y67zVyZUDzHkamuFV17du7ozHTD029qXg1SdyoqqxTfE8VSxbjkdlq+1Dq3idClqJIK4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] x86/ioapic: Fix signed shifts in io_apic.c Message-Id: Date: Thu, 04 Jul 2024 12:23:14 +0000 commit 0dc5fbee17cd2bcb1aa6a1cf420dd80381587de8 Author: Matthew Barnes AuthorDate: Thu Jul 4 14:11:03 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:11:03 2024 +0200 x86/ioapic: Fix signed shifts in io_apic.c There exists bitshifts in the IOAPIC code where signed integers are shifted to the left by up to 31 bits, which is undefined behaviour. This patch fixes this by changing the integers from signed to unsigned. Signed-off-by: Matthew Barnes Reviewed-by: Jan Beulich Reviewed-by: Andrew Cooper master commit: c5746b021e573184fb92b601a0e93a295485054e master date: 2024-06-21 15:09:26 +0100 --- xen/arch/x86/io_apic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 0ef61fb2f1..c5342789e8 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1692,7 +1692,8 @@ static void cf_check mask_and_ack_level_ioapic_irq(struct irq_desc *desc) !io_apic_level_ack_pending(desc->irq)) move_masked_irq(desc); - if ( !(v & (1 << (i & 0x1f))) ) { + if ( !(v & (1U << (i & 0x1f))) ) + { spin_lock(&ioapic_lock); __edge_IO_APIC_irq(desc->irq); __level_IO_APIC_irq(desc->irq); @@ -1756,7 +1757,8 @@ static void cf_check end_level_ioapic_irq_new(struct irq_desc *desc, u8 vector) !io_apic_level_ack_pending(desc->irq) ) move_native_irq(desc); - if (!(v & (1 << (i & 0x1f)))) { + if ( !(v & (1U << (i & 0x1f))) ) + { spin_lock(&ioapic_lock); __mask_IO_APIC_irq(desc->irq); __edge_IO_APIC_irq(desc->irq); -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:23:26 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:23:26 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753770.1161985 (Exim 4.92) (envelope-from ) id 1sPLUk-0001Ky-Jb; Thu, 04 Jul 2024 12:23:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753770.1161985; Thu, 04 Jul 2024 12:23:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUk-0001Ko-Gj; Thu, 04 Jul 2024 12:23:26 +0000 Received: by outflank-mailman (input) for mailman id 753770; Thu, 04 Jul 2024 12:23:25 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUj-0001KZ-39 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:25 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUj-0001mv-2W for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:25 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLUj-0003eK-1j for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:25 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=koRCijxXswGiUVXVAPk+xjd5uM2jw/K5FnKGPgoRtwA=; b=3KdYfGaqJF0pOtpKd0BZ2A6cNQ sf3JM3BwtNafuFMT5WzMiUKngVgy0+w+Tr18tCq4c/WjRNd4B0M1wyS23Q97DMcTLzNQfwKb6Yu80 5p5t1jOmB0o6c60W6734JDtoPtCxDZPj+7BdvYw4gajgOnn8lcio4ExLnz7Ov2pmtybk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] tools/xl: Open xldevd.log with O_CLOEXEC Message-Id: Date: Thu, 04 Jul 2024 12:23:25 +0000 commit 2b3bf02c4f5e44d7d7bd3636530c9ebc837dea87 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:11:36 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:11:36 2024 +0200 tools/xl: Open xldevd.log with O_CLOEXEC `xl devd` has been observed leaking /var/log/xldevd.log into children. Note this is specifically safe; dup2() leaves O_CLOEXEC disabled on newfd, so after setting up stdout/stderr, it's only the logfile fd which will close on exec(). Link: https://github.com/QubesOS/qubes-issues/issues/8292 Reported-by: Demi Marie Obenour Signed-off-by: Andrew Cooper Reviewed-by: Marek Marczykowski-Górecki Reviewed-by: Demi Marie Obenour Acked-by: Anthony PERARD master commit: ba52b3b624e4a1a976908552364eba924ca45430 master date: 2024-06-24 16:22:59 +0100 --- tools/xl/xl_utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/xl/xl_utils.c b/tools/xl/xl_utils.c index 17489d1829..b0d23b2cdb 100644 --- a/tools/xl/xl_utils.c +++ b/tools/xl/xl_utils.c @@ -27,6 +27,10 @@ #include "xl.h" #include "xl_utils.h" +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + void dolog(const char *file, int line, const char *func, const char *fmt, ...) { va_list ap; @@ -270,7 +274,7 @@ int do_daemonize(const char *name, const char *pidfile) exit(-1); } - CHK_SYSCALL(logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND, 0644)); + CHK_SYSCALL(logfile = open(fullname, O_WRONLY | O_CREAT | O_APPEND | O_CLOEXEC, 0644)); free(fullname); assert(logfile >= 3); -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:23:36 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:23:36 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753771.1161989 (Exim 4.92) (envelope-from ) id 1sPLUu-0001Ny-Ku; Thu, 04 Jul 2024 12:23:36 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753771.1161989; Thu, 04 Jul 2024 12:23:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUu-0001Nr-I8; Thu, 04 Jul 2024 12:23:36 +0000 Received: by outflank-mailman (input) for mailman id 753771; Thu, 04 Jul 2024 12:23:35 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUt-0001Nd-88 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:35 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLUt-0001n6-5h for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:35 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLUt-0003fD-4o for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:35 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=ob/bQSiltn5oSwXhK1gUuGCUC1AH0KCMdoZ+2OwIM/E=; b=AWqjC8gduUYD8DaAVeEz+EMCs1 5ydJUAKgbe28xf9D58tMevVORtOCIcW92MEx/vFLS5iNyRvWQ9Uo5gPGiLs1RkWZwAdibzOOYjafa WOmw1pqjbNGo2v1FbGwCBFBuAytXRw6KC/TCYiQPB2RfsRhUwOMawr2/K9su9lvZ5Iac=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] pirq_cleanup_check() leaks Message-Id: Date: Thu, 04 Jul 2024 12:23:35 +0000 commit c9f50d2c5f29b630603e2b95f29e5b6e416a6187 Author: Jan Beulich AuthorDate: Thu Jul 4 14:11:57 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:11:57 2024 +0200 pirq_cleanup_check() leaks Its original introduction had two issues: For one the "common" part of the checks (carried out in the macro) was inverted. And then after removal from the radix tree the structure wasn't scheduled for freeing. (All structures still left in the radix tree would be freed upon domain destruction, though.) For the freeing to be safe even if it didn't use RCU (i.e. to avoid use- after-free), re-arrange checks/operations in evtchn_close(), such that the pointer wouldn't be used anymore after calling pirq_cleanup_check() (noting that unmap_domain_pirq_emuirq() itself calls the function in the success case). Fixes: c24536b636f2 ("replace d->nr_pirqs sized arrays with radix tree") Fixes: 79858fee307c ("xen: fix hvm_domain_use_pirq's behavior") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: daa90dfea9175c07f13d1a2d901857b2dd14d080 master date: 2024-07-02 08:35:56 +0200 --- xen/arch/x86/irq.c | 1 + xen/common/event_channel.c | 11 ++++++++--- xen/include/xen/irq.h | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 290f8d26e7..00be3b88e8 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1413,6 +1413,7 @@ void (pirq_cleanup_check)(struct pirq *pirq, struct domain *d) if ( radix_tree_delete(&d->pirq_tree, pirq->pirq) != pirq ) BUG(); + free_pirq_struct(pirq); } /* Flush all ready EOIs from the top of this CPU's pending-EOI stack. */ diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index 66f924a7b0..b1a6215c37 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -705,11 +705,16 @@ int evtchn_close(struct domain *d1, int port1, bool guest) if ( !is_hvm_domain(d1) ) pirq_guest_unbind(d1, pirq); pirq->evtchn = 0; - pirq_cleanup_check(pirq, d1); #ifdef CONFIG_X86 - if ( is_hvm_domain(d1) && domain_pirq_to_irq(d1, pirq->pirq) > 0 ) - unmap_domain_pirq_emuirq(d1, pirq->pirq); + if ( !is_hvm_domain(d1) || + domain_pirq_to_irq(d1, pirq->pirq) <= 0 || + unmap_domain_pirq_emuirq(d1, pirq->pirq) < 0 ) + /* + * The successful path of unmap_domain_pirq_emuirq() will have + * called pirq_cleanup_check() already. + */ #endif + pirq_cleanup_check(pirq, d1); } unlink_pirq_port(chn1, d1->vcpu[chn1->notify_vcpu_id]); break; diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index 65083135e1..5dcd2d8f0c 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -180,7 +180,7 @@ extern struct pirq *pirq_get_info(struct domain *d, int pirq); void pirq_cleanup_check(struct pirq *pirq, struct domain *d); #define pirq_cleanup_check(pirq, d) \ - ((pirq)->evtchn ? pirq_cleanup_check(pirq, d) : (void)0) + (!(pirq)->evtchn ? pirq_cleanup_check(pirq, d) : (void)0) extern void pirq_guest_eoi(struct pirq *pirq); extern void desc_guest_eoi(struct irq_desc *desc, struct pirq *pirq); -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:23:46 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:23:46 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753772.1161992 (Exim 4.92) (envelope-from ) id 1sPLV4-0001RR-MJ; Thu, 04 Jul 2024 12:23:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753772.1161992; Thu, 04 Jul 2024 12:23:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLV4-0001RK-Jn; Thu, 04 Jul 2024 12:23:46 +0000 Received: by outflank-mailman (input) for mailman id 753772; Thu, 04 Jul 2024 12:23:45 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLV3-0001Qh-9R for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:45 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLV3-0001nG-8g for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:45 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLV3-0003gG-7r for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:45 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=BxKc/1vE3PUMrw8k4zRJct7xVUgC7j4C+MiyG2IrOtg=; b=FVnvufZa35RgPe5A8zS+nPRjXO huKEkNlZXnFJaULFnUMmbXqdM65iTgwGGw5HWvANH5xA1Ct5ikgMWrWRgMeyn+vNKSuRDFuq3j+GW QEyDCo47oi4WXdmO2U6s9YfPA1e5xbkvKlrgA0bBUZFW42VUgJB48mEUF6XdKBTIGpHw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment() Message-Id: Date: Thu, 04 Jul 2024 12:23:45 +0000 commit 8e51c8f1d45fad242a315fa17ba3582c02e66840 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:12:31 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:12:31 2024 +0200 tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment() xc_dom_alloc_segment() is passed a size in bytes, calculates a size in pages from it, then fills in the new segment information with a bytes value re-calculated from the number of pages. This causes the module information given to the guest (MB, or PVH) to have incorrect sizes; specifically, sizes rounded up to the next page. This in turn is problematic for Xen. When Xen finds a gzipped module, it peeks at the end metadata to judge the decompressed size, which is a -4 backreference from the reported end of the module. Fill in seg->vend using the correct number of bytes. Fixes: ea7c8a3d0e82 ("libxc: reorganize domain builder guest memory allocator") Signed-off-by: Andrew Cooper Acked-by: Anthony PERARD master commit: 4c3a618b0adaa0cd59e0fa0898bb60978b8b3a5f master date: 2024-07-02 10:50:18 +0100 --- tools/libs/guest/xg_dom_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/guest/xg_dom_core.c b/tools/libs/guest/xg_dom_core.c index c4f4e7f3e2..f5521d528b 100644 --- a/tools/libs/guest/xg_dom_core.c +++ b/tools/libs/guest/xg_dom_core.c @@ -601,7 +601,7 @@ int xc_dom_alloc_segment(struct xc_dom_image *dom, memset(ptr, 0, pages * page_size); seg->vstart = start; - seg->vend = dom->virt_alloc_end; + seg->vend = start + size; DOMPRINTF("%-20s: %-12s : 0x%" PRIx64 " -> 0x%" PRIx64 " (pfn 0x%" PRIpfn " + 0x%" PRIpfn " pages)", -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:23:56 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:23:56 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753773.1161998 (Exim 4.92) (envelope-from ) id 1sPLVE-0001UI-OS; Thu, 04 Jul 2024 12:23:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753773.1161998; Thu, 04 Jul 2024 12:23:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVE-0001UA-LD; Thu, 04 Jul 2024 12:23:56 +0000 Received: by outflank-mailman (input) for mailman id 753773; Thu, 04 Jul 2024 12:23:55 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVD-0001Tw-CV for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:55 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVD-0001nQ-Bh for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:55 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLVD-0003gt-As for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:23:55 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=WDLfN8AnkHhMBeMACJx9qpgB7QeaMf9OMVVqW8tL8Aw=; b=poGbzlxn9+86GJorrTc8YmjWah +eLciYLGRY/hl57hjZLCGbKGfLa1e6FI0COvpxmmN704DNvE7bT4TL9fCYrz+ldM/y2mY8cn6YUyd 18E/A00LxuJRGicNUvtDqszxkkQ104iguKYCxsFhBwZJeT1rEVCsfFB2El/uMGblyp9M=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] tools/libxs: Fix CLOEXEC handling in get_dev() Message-Id: Date: Thu, 04 Jul 2024 12:23:55 +0000 commit d1b3bbb46402af77089906a97c413c14ed1740d2 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:13:10 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:13:10 2024 +0200 tools/libxs: Fix CLOEXEC handling in get_dev() Move the O_CLOEXEC compatibility outside of an #ifdef USE_PTHREAD block. Introduce set_cloexec() to wrap fcntl() setting FD_CLOEXEC. It will be reused for other CLOEXEC fixes too. Use set_cloexec() when O_CLOEXEC isn't available as a best-effort fallback. Fixes: f4f2f3402b2f ("tools/libxs: Open /dev/xen/xenbus fds as O_CLOEXEC") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD master commit: bf7c1464706adfa903f1e7d59383d042c3a88e39 master date: 2024-07-02 10:51:06 +0100 --- tools/libs/store/xs.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 1498515073..037e79d98b 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -40,6 +40,10 @@ #include #include +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + struct xs_stored_msg { XEN_TAILQ_ENTRY(struct xs_stored_msg) list; struct xsd_sockmsg hdr; @@ -54,10 +58,6 @@ struct xs_stored_msg { #include #endif -#ifndef O_CLOEXEC -#define O_CLOEXEC 0 -#endif - struct xs_handle { /* Communications channel to xenstore daemon. */ int fd; @@ -176,6 +176,16 @@ static bool setnonblock(int fd, int nonblock) { return true; } +static bool set_cloexec(int fd) +{ + int flags = fcntl(fd, F_GETFL); + + if (flags < 0) + return false; + + return fcntl(fd, flags | FD_CLOEXEC) >= 0; +} + int xs_fileno(struct xs_handle *h) { char c = 0; @@ -230,8 +240,24 @@ error: static int get_dev(const char *connect_to) { - /* We cannot open read-only because requests are writes */ - return open(connect_to, O_RDWR | O_CLOEXEC); + int fd, saved_errno; + + fd = open(connect_to, O_RDWR | O_CLOEXEC); + if (fd < 0) + return -1; + + /* Compat for non-O_CLOEXEC environments. Racy. */ + if (!O_CLOEXEC && !set_cloexec(fd)) + goto error; + + return fd; + +error: + saved_errno = errno; + close(fd); + errno = saved_errno; + + return -1; } static int all_restrict_cb(Xentoolcore__Active_Handle *ah, domid_t domid) { -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:24:06 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:24:06 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753774.1162001 (Exim 4.92) (envelope-from ) id 1sPLVO-0001X1-Pc; Thu, 04 Jul 2024 12:24:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753774.1162001; Thu, 04 Jul 2024 12:24:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVO-0001Wt-Mf; Thu, 04 Jul 2024 12:24:06 +0000 Received: by outflank-mailman (input) for mailman id 753774; Thu, 04 Jul 2024 12:24:05 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVN-0001Wc-FD for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:05 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVN-0001nm-Ea for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:05 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLVN-0003iC-Do for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:05 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=MwCmr/yBwf8nJ+SuPI3J0f/e0kccGjmdRzXhqRI/ht0=; b=IUAv3FJQE/XKuDUu86/FKdVkaq 6DcU2izBwz2vZ8+1veqTKziUN8TFnp4sIXzH+HcXXZmv/t4H1tEAjxnQT6NJwgfsVp/F2/Y8rFLND t4039z92W7NZa1jGLWTmTmZkhRkdT+mDZ+0mwhuyr0jfshe5DdrrziiO0eicGZpyn3g4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] tools/libxs: Fix CLOEXEC handling in get_socket() Message-Id: Date: Thu, 04 Jul 2024 12:24:05 +0000 commit d689bb4d2cd3ccdb0067b0ca953cccbc5ab375ae Author: Andrew Cooper AuthorDate: Thu Jul 4 14:13:18 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:13:18 2024 +0200 tools/libxs: Fix CLOEXEC handling in get_socket() get_socket() opens a socket, then uses fcntl() to set CLOEXEC. This is racy with exec(). Open the socket with SOCK_CLOEXEC. Use the same compatibility strategy as O_CLOEXEC on ancient versions of Linux. Reported-by: Frediano Ziglio Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD master commit: 1957dd6aff931877fc22699d8f2d4be8728014ba master date: 2024-07-02 10:51:11 +0100 --- tools/libs/store/xs.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 037e79d98b..11a766c508 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -44,6 +44,10 @@ #define O_CLOEXEC 0 #endif +#ifndef SOCK_CLOEXEC +#define SOCK_CLOEXEC 0 +#endif + struct xs_stored_msg { XEN_TAILQ_ENTRY(struct xs_stored_msg) list; struct xsd_sockmsg hdr; @@ -207,16 +211,14 @@ int xs_fileno(struct xs_handle *h) static int get_socket(const char *connect_to) { struct sockaddr_un addr; - int sock, saved_errno, flags; + int sock, saved_errno; - sock = socket(PF_UNIX, SOCK_STREAM, 0); + sock = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); if (sock < 0) return -1; - if ((flags = fcntl(sock, F_GETFD)) < 0) - goto error; - flags |= FD_CLOEXEC; - if (fcntl(sock, F_SETFD, flags) < 0) + /* Compat for non-SOCK_CLOEXEC environments. Racy. */ + if (!SOCK_CLOEXEC && !set_cloexec(sock)) goto error; addr.sun_family = AF_UNIX; -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:24:16 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:24:16 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753775.1162004 (Exim 4.92) (envelope-from ) id 1sPLVY-0001a5-R5; Thu, 04 Jul 2024 12:24:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753775.1162004; Thu, 04 Jul 2024 12:24:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVY-0001Zy-OP; Thu, 04 Jul 2024 12:24:16 +0000 Received: by outflank-mailman (input) for mailman id 753775; Thu, 04 Jul 2024 12:24:15 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVX-0001Zc-IU for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:15 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVX-0001pl-Ht for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:15 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLVX-0003j4-HA for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:15 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=W9alK88Fro/4GUaOX1JV27Xy7nV4MvrH5pwbIye+ccg=; b=pvumhVPF1N4jzSECJOC+OmNhU2 QXzhF1M9vsqkqXLGqaDI7XOYjsMnAgHjCHrj1OMjlgmLev2M64UrXrZbQL/YoiKOBW33PemtryRmz w3ioYcF3ytTRQHrm3xc3qvfqBXzfg2tVCbEt0KM84aaadWGp3OO3krB0RJjEtUwF2Css=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] tools/libxs: Fix CLOEXEC handling in xs_fileno() Message-Id: Date: Thu, 04 Jul 2024 12:24:15 +0000 commit 26b8ff1861a870e01456b31bf999f25df5538ebf Author: Andrew Cooper AuthorDate: Thu Jul 4 14:13:30 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:13:30 2024 +0200 tools/libxs: Fix CLOEXEC handling in xs_fileno() xs_fileno() opens a pipe on first use to communicate between the watch thread and the main thread. Nothing ever sets CLOEXEC on the file descriptors. Check for the availability of the pipe2() function with configure. Despite starting life as Linux-only, FreeBSD and NetBSD have gained it. When pipe2() isn't available, try our best with pipe() and set_cloexec(). Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD master commit: a2ff677852f0ce05fa335e8e5682bf2ae0c916ee master date: 2024-07-02 10:52:59 +0100 --- tools/config.h.in | 3 +++ tools/configure | 12 ++++++++++++ tools/configure.ac | 2 ++ tools/libs/store/xs.c | 16 +++++++++++++++- 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/tools/config.h.in b/tools/config.h.in index 0bb2fe08a1..50ad60fcb0 100644 --- a/tools/config.h.in +++ b/tools/config.h.in @@ -39,6 +39,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `pipe2' function. */ +#undef HAVE_PIPE2 + /* pygrub enabled */ #undef HAVE_PYGRUB diff --git a/tools/configure b/tools/configure index 7bb935d23b..e35112b5c5 100755 --- a/tools/configure +++ b/tools/configure @@ -9751,6 +9751,18 @@ if test "$ax_found" = "0"; then : fi +for ac_func in pipe2 +do : + ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +if test "x$ac_cv_func_pipe2" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PIPE2 1 +_ACEOF + +fi +done + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/tools/configure.ac b/tools/configure.ac index 618ef8c63f..53ac20af1e 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -543,4 +543,6 @@ AS_IF([test "x$pvshim" = "xy"], [ AX_FIND_HEADER([INCLUDE_ENDIAN_H], [endian.h sys/endian.h]) +AC_CHECK_FUNCS([pipe2]) + AC_OUTPUT() diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 11a766c508..c8845b69e2 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -190,13 +190,27 @@ static bool set_cloexec(int fd) return fcntl(fd, flags | FD_CLOEXEC) >= 0; } +static int pipe_cloexec(int fds[2]) +{ +#if HAVE_PIPE2 + return pipe2(fds, O_CLOEXEC); +#else + if (pipe(fds) < 0) + return -1; + /* Best effort to set CLOEXEC. Racy. */ + set_cloexec(fds[0]); + set_cloexec(fds[1]); + return 0; +#endif +} + int xs_fileno(struct xs_handle *h) { char c = 0; mutex_lock(&h->watch_mutex); - if ((h->watch_pipe[0] == -1) && (pipe(h->watch_pipe) != -1)) { + if ((h->watch_pipe[0] == -1) && (pipe_cloexec(h->watch_pipe) != -1)) { /* Kick things off if the watch list is already non-empty. */ if (!XEN_TAILQ_EMPTY(&h->watch_list)) while (write(h->watch_pipe[1], &c, 1) != 1) -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:24:26 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:24:26 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753776.1162009 (Exim 4.92) (envelope-from ) id 1sPLVi-0001eA-UA; Thu, 04 Jul 2024 12:24:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753776.1162009; Thu, 04 Jul 2024 12:24:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVi-0001e0-RU; Thu, 04 Jul 2024 12:24:26 +0000 Received: by outflank-mailman (input) for mailman id 753776; Thu, 04 Jul 2024 12:24:25 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVh-0001dg-Le for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:25 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVh-0001pw-L2 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:25 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLVh-0003jg-KH for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:25 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=AiSDUbc7Ahqfn6ip6IgMRTvjBGNFas/tXTG8BQETxkk=; b=wayObxAqex0HrhVjYuw+E85a2d wJKLSZgPuGVdtJJIeK2lj4R7dknvcszl/wwtHf/cYeuSEf1PMlBlac0B5U8wngwi3nTBqIffXWE4D KGZ/kR5na3XWjCueEqS9yCrpGRQA9TAcEYPw5PL9ebi4wYch9JjV/2GB033FejfgJF/I=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] cmdline: document and enforce "extra_guest_irqs" upper bounds Message-Id: Date: Thu, 04 Jul 2024 12:24:25 +0000 commit 30c695ddaf067cbe7a98037474e7910109238807 Author: Jan Beulich AuthorDate: Thu Jul 4 14:14:16 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:14:16 2024 +0200 cmdline: document and enforce "extra_guest_irqs" upper bounds PHYSDEVOP_pirq_eoi_gmfn_v accepting just a single GFN implies that no more than 32k pIRQ-s can be used by a domain on x86. Document this upper bound. To also enforce the limit, (ab)use both arch_hwdom_irqs() (changing its parameter type) and setup_system_domains(). This is primarily to avoid exposing the two static variables or introducing yet further arch hooks. While touching arch_hwdom_irqs() also mark it hwdom-init. Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné amend 'cmdline: document and enforce "extra_guest_irqs" upper bounds' Address late review comments for what is now commit 17f6d398f765: - bound max_irqs right away against nr_irqs - introduce a #define for a constant used twice Requested-by: Roger Pau Monné Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: 17f6d398f76597f8009ec0530842fb8705ece7ba master date: 2024-07-02 12:00:27 +0200 master commit: 1f56accba33ffea0abf7d1c6384710823d10cbd6 master date: 2024-07-03 14:03:27 +0200 --- docs/misc/xen-command-line.pandoc | 3 ++- xen/arch/x86/io_apic.c | 17 ++++++++++------- xen/common/domain.c | 24 ++++++++++++++++++++++-- xen/include/xen/irq.h | 3 ++- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index 10a09bbf23..d857bd0f89 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -1175,7 +1175,8 @@ common for all domUs, while the optional second number (preceded by a comma) is for dom0. Changing the setting for domU has no impact on dom0 and vice versa. For example to change dom0 without changing domU, use `extra_guest_irqs=,512`. The default value for Dom0 and an eventual separate -hardware domain is architecture dependent. +hardware domain is architecture dependent. The upper limit for both values on +x86 is such that the resulting total number of IRQs can't be higher than 32768. Note that specifying zero as domU value means zero, while for dom0 it means to use the default. diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index c5342789e8..f7591fd091 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2664,18 +2664,21 @@ void __init ioapic_init(void) nr_irqs_gsi, nr_irqs - nr_irqs_gsi); } -unsigned int arch_hwdom_irqs(domid_t domid) +unsigned int __hwdom_init arch_hwdom_irqs(const struct domain *d) { unsigned int n = fls(num_present_cpus()); + /* Bounding by the domain pirq EOI bitmap capacity. */ + const unsigned int max_irqs = min_t(unsigned int, nr_irqs, + PAGE_SIZE * BITS_PER_BYTE); - if ( !domid ) - n = min(n, dom0_max_vcpus()); - n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, nr_irqs); + if ( is_system_domain(d) ) + return max_irqs; - /* Bounded by the domain pirq eoi bitmap gfn. */ - n = min_t(unsigned int, n, PAGE_SIZE * BITS_PER_BYTE); + if ( !d->domain_id ) + n = min(n, dom0_max_vcpus()); + n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, max_irqs); - printk("Dom%d has maximum %u PIRQs\n", domid, n); + printk("%pd has maximum %u PIRQs\n", d, n); return n; } diff --git a/xen/common/domain.c b/xen/common/domain.c index 003f4ab125..62832a5860 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -351,7 +351,8 @@ static int late_hwdom_init(struct domain *d) } static unsigned int __read_mostly extra_hwdom_irqs; -static unsigned int __read_mostly extra_domU_irqs = 32; +#define DEFAULT_EXTRA_DOMU_IRQS 32U +static unsigned int __read_mostly extra_domU_irqs = DEFAULT_EXTRA_DOMU_IRQS; static int __init cf_check parse_extra_guest_irqs(const char *s) { @@ -688,7 +689,7 @@ struct domain *domain_create(domid_t domid, d->nr_pirqs = nr_static_irqs + extra_domU_irqs; else d->nr_pirqs = extra_hwdom_irqs ? nr_static_irqs + extra_hwdom_irqs - : arch_hwdom_irqs(domid); + : arch_hwdom_irqs(d); d->nr_pirqs = min(d->nr_pirqs, nr_irqs); radix_tree_init(&d->pirq_tree); @@ -812,6 +813,25 @@ void __init setup_system_domains(void) if ( IS_ERR(dom_xen) ) panic("Failed to create d[XEN]: %ld\n", PTR_ERR(dom_xen)); +#ifdef CONFIG_HAS_PIRQ + /* Bound-check values passed via "extra_guest_irqs=". */ + { + unsigned int n = max(arch_hwdom_irqs(dom_xen), nr_static_irqs); + + if ( extra_hwdom_irqs > n - nr_static_irqs ) + { + extra_hwdom_irqs = n - nr_static_irqs; + printk(XENLOG_WARNING "hwdom IRQs bounded to %u\n", n); + } + if ( extra_domU_irqs > + max(DEFAULT_EXTRA_DOMU_IRQS, n - nr_static_irqs) ) + { + extra_domU_irqs = n - nr_static_irqs; + printk(XENLOG_WARNING "domU IRQs bounded to %u\n", n); + } + } +#endif + /* * Initialise our DOMID_IO domain. * This domain owns I/O pages that are within the range of the page_info diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index 5dcd2d8f0c..bef170bcb6 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -196,8 +196,9 @@ extern struct irq_desc *pirq_spin_lock_irq_desc( unsigned int set_desc_affinity(struct irq_desc *desc, const cpumask_t *mask); +/* When passed a system domain, this returns the maximum permissible value. */ #ifndef arch_hwdom_irqs -unsigned int arch_hwdom_irqs(domid_t domid); +unsigned int arch_hwdom_irqs(const struct domain *d); #endif #ifndef arch_evtchn_bind_pirq -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:24:37 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:24:37 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753777.1162013 (Exim 4.92) (envelope-from ) id 1sPLVs-0001h0-WF; Thu, 04 Jul 2024 12:24:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753777.1162013; Thu, 04 Jul 2024 12:24:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVs-0001gs-Sz; Thu, 04 Jul 2024 12:24:36 +0000 Received: by outflank-mailman (input) for mailman id 753777; Thu, 04 Jul 2024 12:24:35 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVr-0001ge-OT for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:35 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLVr-0001q5-Nq for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:35 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLVr-0003k7-NB for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:35 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=OejsOcJvrhVd3sGWyiCtwP+ld08gPf09uDavJ5woQHk=; b=CxlypqOhg46n642qzQoV8xcGed Wh68gIMC/KE3EL1HjMwXy/13Vrpw1iWe3a3eu2cBPtS0kiesTX88NaGjNAutjczj//TfcrK3Cp9S5 JgJ1CVEJgfA1e9334V02janawJogcug40tnYtpmd74GmddQEbhq7PdKVJqv83y1At6r0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] x86/entry: don't clear DF when raising #UD for lack of syscall handler Message-Id: Date: Thu, 04 Jul 2024 12:24:35 +0000 commit 7e636b8a16412d4f0d94b2b24d7ebcd2c749afff Author: Jan Beulich AuthorDate: Thu Jul 4 14:14:49 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:14:49 2024 +0200 x86/entry: don't clear DF when raising #UD for lack of syscall handler While doing so is intentional when invoking the actual callback, to mimic a hard-coded SYCALL_MASK / FMASK MSR, the same should not be done when no handler is available and hence #UD is raised. Fixes: ca6fcf4321b3 ("x86/pv: Inject #UD for missing SYSCALL callbacks") Reported-by: Andrew Cooper Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper master commit: d2fe9ab3048d503869ec81bc49db07e55a4a2386 master date: 2024-07-02 12:01:21 +0200 --- xen/arch/x86/x86_64/entry.S | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index 054fcb225f..d3def49ea3 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -38,6 +38,14 @@ switch_to_kernel: setc %cl leal (,%rcx,TBF_INTERRUPT),%ecx + /* + * The PV ABI hardcodes the (guest-inaccessible and virtual) + * SYSCALL_MASK MSR such that DF (and nothing else) would be cleared. + * Note that the equivalent of IF (VGCF_syscall_disables_events) is + * dealt with separately above. + */ + mov $~X86_EFLAGS_DF, %esi + test %rax, %rax UNLIKELY_START(z, syscall_no_callback) /* TB_eip == 0 => #UD */ mov VCPU_trap_ctxt(%rbx), %rdi @@ -47,12 +55,14 @@ UNLIKELY_START(z, syscall_no_callback) /* TB_eip == 0 => #UD */ testb $4, X86_EXC_UD * TRAPINFO_sizeof + TRAPINFO_flags(%rdi) setnz %cl lea TBF_EXCEPTION(, %rcx, TBF_INTERRUPT), %ecx + or $~0, %esi /* Don't clear DF */ UNLIKELY_END(syscall_no_callback) movq %rax,TRAPBOUNCE_eip(%rdx) movb %cl,TRAPBOUNCE_flags(%rdx) call create_bounce_frame - andl $~X86_EFLAGS_DF,UREGS_eflags(%rsp) + /* Conditionally clear DF */ + and %esi, UREGS_eflags(%rsp) /* %rbx: struct vcpu */ test_all_events: ASSERT_NOT_IN_ATOMIC -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:24:48 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:24:48 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753778.1162017 (Exim 4.92) (envelope-from ) id 1sPLW4-0001kP-0n; Thu, 04 Jul 2024 12:24:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753778.1162017; Thu, 04 Jul 2024 12:24:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLW3-0001kI-UP; Thu, 04 Jul 2024 12:24:47 +0000 Received: by outflank-mailman (input) for mailman id 753778; Thu, 04 Jul 2024 12:24:46 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLW2-0001jt-8P for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:46 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLW2-0001qC-7l for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:46 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLW2-0003mg-6y for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:46 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=DkKsXcppLdopby0HRfgqMEsHaSzWMsaUWG16hWyaPSA=; b=XFKrKIurx00GaOi/Ji/TVY4LGM pa1eqeRiMLr8SckBkJeHWzko7YmolDiBFh6RfCMRmXNljBsv33G7CfSf32mqBpewg1bMFz6PWesmj HiCi0304AG1qOR9nchAwyYPTzN/uvw3NjYRAWgf7pAoju2un9s14Hg18EZ8G4O8h4m58=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] x86: re-run exception-from-stub recovery selftests with CET-SS enabled Message-Id: Date: Thu, 04 Jul 2024 12:24:46 +0000 commit 79f83106f92777bc21ca57bccde45af29308b813 Author: Jan Beulich AuthorDate: Thu Jul 4 14:17:03 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:17:03 2024 +0200 x86: re-run exception-from-stub recovery selftests with CET-SS enabled On the BSP, shadow stacks are enabled only relatively late in the booting process. They in particular aren't active yet when initcalls are run. Keep the testing there, but invoke that testing a 2nd time when shadow stacks are active, to make sure we won't regress that case after addressing XSA-451. While touching this code, switch the guard from NDEBUG to CONFIG_DEBUG, such that IS_ENABLED() can validly be used at the new call site. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper master commit: cfe3ad67127b86e1b1c06993b86422673a51b050 master date: 2024-02-27 13:49:52 +0100 --- xen/arch/x86/extable.c | 8 +++++--- xen/arch/x86/include/asm/setup.h | 2 ++ xen/arch/x86/setup.c | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/extable.c b/xen/arch/x86/extable.c index dd9583f2a5..f05c16def6 100644 --- a/xen/arch/x86/extable.c +++ b/xen/arch/x86/extable.c @@ -128,10 +128,11 @@ search_exception_table(const struct cpu_user_regs *regs, unsigned long *stub_ra) return 0; } -#ifndef NDEBUG +#ifdef CONFIG_DEBUG +#include #include -static int __init cf_check stub_selftest(void) +int __init cf_check stub_selftest(void) { static const struct { uint8_t opc[8]; @@ -155,7 +156,8 @@ static int __init cf_check stub_selftest(void) unsigned int i; bool fail = false; - printk("Running stub recovery selftests...\n"); + printk("%s stub recovery selftests...\n", + system_state < SYS_STATE_active ? "Running" : "Re-running"); for ( i = 0; i < ARRAY_SIZE(tests); ++i ) { diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/setup.h index 21037b7f31..a870c61b3f 100644 --- a/xen/arch/x86/include/asm/setup.h +++ b/xen/arch/x86/include/asm/setup.h @@ -48,6 +48,8 @@ int xen_in_range(unsigned long mfn); void microcode_grab_module( unsigned long *, const multiboot_info_t *); +int cf_check stub_selftest(void); + extern uint8_t kbd_shift_flags; #ifdef NDEBUG diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index d47f156711..2d2eb791e4 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -622,6 +622,10 @@ static void noreturn init_done(void) system_state = SYS_STATE_active; + /* Re-run stub recovery self-tests with CET-SS active. */ + if ( IS_ENABLED(CONFIG_DEBUG) && cpu_has_xen_shstk ) + stub_selftest(); + domain_unpause_by_systemcontroller(dom0); /* MUST be done prior to removing .init data. */ -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:24:58 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:24:58 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753779.1162023 (Exim 4.92) (envelope-from ) id 1sPLWE-0001nC-3D; Thu, 04 Jul 2024 12:24:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753779.1162023; Thu, 04 Jul 2024 12:24:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWD-0001n3-WC; Thu, 04 Jul 2024 12:24:57 +0000 Received: by outflank-mailman (input) for mailman id 753779; Thu, 04 Jul 2024 12:24:56 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWC-0001mn-Bv for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:56 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWC-0001qK-BF for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:56 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLWC-0003oN-AN for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:24:56 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=JZn1gU6s7N3fptIyK1qMOMmQvb+65AKuTz+aEbgTVcc=; b=pW/0Em9x1CxXaleam0sij33uSq r73VAcLSbsFZVsqI9gqY1fbXnP2v4aNe6iyjMXhfoLRoHG/u9NeCuB5iQBqUznVd2O6d73I8I7a1j PWFzb2QnXU/A498Rk7NukSOdi0jTMdo9/Tyfg7cX0V3cPJgKPd26f6a2VO7i+3YTi99I=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] tools/tests: don't let test-xenstore write nodes exceeding default size Message-Id: Date: Thu, 04 Jul 2024 12:24:56 +0000 commit 8cea82aac02adb5776ddd7034c66d6a276c726ab Author: Juergen Gross AuthorDate: Thu Jul 4 14:17:48 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:17:48 2024 +0200 tools/tests: don't let test-xenstore write nodes exceeding default size Today test-xenstore will write nodes with 3000 bytes node data. This size is exceeding the default quota for the allowed node size. While working in dom0 with C-xenstored, OCAML-xenstored does not like that. Use a size of 2000 instead, which is lower than the allowed default node size of 2048. Fixes: 3afc5e4a5b75 ("tools/tests: add xenstore testing framework") Signed-off-by: Juergen Gross Acked-by: Andrew Cooper master commit: 642005e310483c490b0725fab4672f2b77fdf2ba master date: 2024-05-02 18:15:31 +0100 --- tools/tests/xenstore/test-xenstore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tests/xenstore/test-xenstore.c b/tools/tests/xenstore/test-xenstore.c index d3574b3fa2..0e2a83ba5d 100644 --- a/tools/tests/xenstore/test-xenstore.c +++ b/tools/tests/xenstore/test-xenstore.c @@ -408,9 +408,9 @@ static int test_ta3_deinit(uintptr_t par) #define TEST(s, f, p, l) { s, f ## _init, f, f ## _deinit, (uintptr_t)(p), l } struct test tests[] = { TEST("read 1", test_read, 1, "Read node with 1 byte data"), -TEST("read 3000", test_read, 3000, "Read node with 3000 bytes data"), +TEST("read 2000", test_read, 2000, "Read node with 2000 bytes data"), TEST("write 1", test_write, 1, "Write node with 1 byte data"), -TEST("write 3000", test_write, 3000, "Write node with 3000 bytes data"), +TEST("write 2000", test_write, 2000, "Write node with 2000 bytes data"), TEST("dir", test_dir, 0, "List directory"), TEST("rm node", test_rm, 0, "Remove single node"), TEST("rm dir", test_rm, WRITE_BUFFERS_N, "Remove node with sub-nodes"), -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:25:08 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:25:08 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753780.1162025 (Exim 4.92) (envelope-from ) id 1sPLWO-0001qM-47; Thu, 04 Jul 2024 12:25:08 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753780.1162025; Thu, 04 Jul 2024 12:25:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWO-0001qD-1H; Thu, 04 Jul 2024 12:25:08 +0000 Received: by outflank-mailman (input) for mailman id 753780; Thu, 04 Jul 2024 12:25:06 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWM-0001ps-Eu for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:06 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWM-0001ql-EK for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:06 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLWM-0003qp-Dc for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:06 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=/wDB0daXrDTPVJP6yR1Xhd3Lj+k5Gv2RPJ/qrS9ZcKY=; b=B+uwP2M2sGSB/UhYQZYINAUw3W ib2lTT7oZa4yXUGbc+nApg1E9Cfs6F3qgpQ1+7PlAK6PWXB1qq/AugCgswSHt4Zwqlhq+coIQTDDM sy3lPfSGYynL+t2vlDTFlWgouchVNYvpehcK887moHE9gA7w3Fdqu+AFjPIuaA1C0UVQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] tools/tests: let test-xenstore exit with non-0 status in case of error Message-Id: Date: Thu, 04 Jul 2024 12:25:06 +0000 commit 16bc1d8becdb5e998b5fc857e2b1ce01f174327d Author: Juergen Gross AuthorDate: Thu Jul 4 14:18:05 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:18:05 2024 +0200 tools/tests: let test-xenstore exit with non-0 status in case of error In case a test is failing in test-xenstore, let the tool exit with an exit status other than 0. Fix a typo in an error message. Reported-by: Andrew Cooper Fixes: 3afc5e4a5b75 ("tools/tests: add xenstore testing framework") Signed-off-by: Juergen Gross master commit: 2d4ba205591ba64f31149ae31051678159ee9e11 master date: 2024-05-02 18:15:46 +0100 --- tools/tests/xenstore/test-xenstore.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/tests/xenstore/test-xenstore.c b/tools/tests/xenstore/test-xenstore.c index 0e2a83ba5d..23fe3f0c28 100644 --- a/tools/tests/xenstore/test-xenstore.c +++ b/tools/tests/xenstore/test-xenstore.c @@ -506,14 +506,14 @@ int main(int argc, char *argv[]) stop = time(NULL) + randtime; srandom((unsigned int)stop); - while ( time(NULL) < stop ) + while ( time(NULL) < stop && !ret ) { t = random() % ARRAY_SIZE(tests); ret = call_test(tests + t, iters, true); } } else - for ( t = 0; t < ARRAY_SIZE(tests); t++ ) + for ( t = 0; t < ARRAY_SIZE(tests) && !ret; t++ ) { if ( !test || !strcmp(test, tests[t].name) ) ret = call_test(tests + t, iters, false); @@ -525,10 +525,10 @@ int main(int argc, char *argv[]) xs_close(xsh); if ( ta_loops ) - printf("Exhaustive transaction retries (%d) occurrred %d times.\n", + printf("Exhaustive transaction retries (%d) occurred %d times.\n", MAX_TA_LOOPS, ta_loops); - return 0; + return ret ? 3 : 0; } /* -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:25:18 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:25:18 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753781.1162028 (Exim 4.92) (envelope-from ) id 1sPLWY-0001tj-5e; Thu, 04 Jul 2024 12:25:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753781.1162028; Thu, 04 Jul 2024 12:25:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWY-0001tb-2g; Thu, 04 Jul 2024 12:25:18 +0000 Received: by outflank-mailman (input) for mailman id 753781; Thu, 04 Jul 2024 12:25:16 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWW-0001tN-Hi for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:16 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWW-0001rF-H2 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:16 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLWW-0003rT-GR for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:16 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=LqGyqA3WeiUsQ0aNyPc5luMcoCDr3JI8pP1FbEqlmys=; b=BYegfD7IyzIgN7242k7dghN7Tv syjUo0/CIs+rzKqvlUZIhi1IkXpLWH9c4jWYxVg/Sv6k7a6A3H4337X/xNAgG4dPng6hzCbmzjnDm Nu/+JECOgVAUkku/PKNQfT5ZBPw8XCGqhWsuYt2Ir3zEB4E1FI4UIr0TbiIt/upQGdmk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] LICENSES: Add MIT-0 (MIT No Attribution) Message-Id: Date: Thu, 04 Jul 2024 12:25:16 +0000 commit 0433bae1ead9c8c21ba34c40fd85efa2347bba47 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:19:00 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:19:00 2024 +0200 LICENSES: Add MIT-0 (MIT No Attribution) We are about to import code licensed under MIT-0. It's compatible for us to use, so identify it as a permitted license. Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini Acked-by: Christian Lindig master commit: 219cdff3fb7b4a03ab14869584f111e0f623b330 master date: 2024-05-23 15:04:40 +0100 --- LICENSES/MIT-0 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/LICENSES/MIT-0 b/LICENSES/MIT-0 new file mode 100644 index 0000000000..70fb90ee34 --- /dev/null +++ b/LICENSES/MIT-0 @@ -0,0 +1,31 @@ +Valid-License-Identifier: MIT-0 + +SPDX-URL: https://spdx.org/licenses/MIT-0.html + +Usage-Guide: + + To use the MIT-0 License put the following SPDX tag/value pair into a + comment according to the placement guidelines in the licensing rules + documentation: + SPDX-License-Identifier: MIT-0 + +License-Text: + +MIT No Attribution + +Copyright + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:25:28 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:25:28 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753782.1162032 (Exim 4.92) (envelope-from ) id 1sPLWi-0001xQ-8M; Thu, 04 Jul 2024 12:25:28 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753782.1162032; Thu, 04 Jul 2024 12:25:28 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWi-0001xK-5p; Thu, 04 Jul 2024 12:25:28 +0000 Received: by outflank-mailman (input) for mailman id 753782; Thu, 04 Jul 2024 12:25:26 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWg-0001wz-KX for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:26 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWg-0001rP-Ju for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:26 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLWg-0003sN-JD for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:26 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=nghfG13PT8xP0MLqoJla+Gn7V73iSRfizZFJrCAFy7E=; b=jVvAeeu/l7hK2k+CjxR+k5iMaJ VGUM3IlOFlhXBrIw0rJqWgfpShhY3UF1ejpBZUs0D+GfQXNTqkSmj8/96XGBoMQkkIzFX6DhF+UrN zlgDYQc6nXih2KOTw9f5Jymu0djkhK16NUBv3YC8K3GLBsMsSAKiIQsx3pexuigvWGjQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] tools: Import stand-alone sd_notify() implementation from systemd Message-Id: Date: Thu, 04 Jul 2024 12:25:26 +0000 commit ac48584cfcf2e88985266b49b290339be5f63916 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:19:12 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:19:12 2024 +0200 tools: Import stand-alone sd_notify() implementation from systemd ... in order to avoid linking against the whole of libsystemd. Only minimal changes to the upstream copy, to function as a drop-in replacement for sd_notify() and as a header-only library. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Christian Lindig master commit: 78510f3a1522f2856330ffa429e0e35f8aab4277 master date: 2024-05-23 15:04:40 +0100 --- tools/include/xen-sd-notify.h | 98 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/tools/include/xen-sd-notify.h b/tools/include/xen-sd-notify.h new file mode 100644 index 0000000000..28c9b20f15 --- /dev/null +++ b/tools/include/xen-sd-notify.h @@ -0,0 +1,98 @@ +/* SPDX-License-Identifier: MIT-0 */ + +/* + * Implement the systemd notify protocol without external dependencies. + * Supports both readiness notification on startup and on reloading, + * according to the protocol defined at: + * https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html + * This protocol is guaranteed to be stable as per: + * https://systemd.io/PORTABILITY_AND_STABILITY/ + * + * Differences from the upstream copy: + * - Rename/rework as a drop-in replacement for systemd/sd-daemon.h + * - Only take the subset Xen cares about + * - Respect -Wdeclaration-after-statement + */ + +#ifndef XEN_SD_NOTIFY +#define XEN_SD_NOTIFY + +#include +#include +#include +#include +#include +#include + +static inline void xen_sd_closep(int *fd) { + if (!fd || *fd < 0) + return; + + close(*fd); + *fd = -1; +} + +static inline int xen_sd_notify(const char *message) { + union sockaddr_union { + struct sockaddr sa; + struct sockaddr_un sun; + } socket_addr = { + .sun.sun_family = AF_UNIX, + }; + size_t path_length, message_length; + ssize_t written; + const char *socket_path; + int __attribute__((cleanup(xen_sd_closep))) fd = -1; + + /* Verify the argument first */ + if (!message) + return -EINVAL; + + message_length = strlen(message); + if (message_length == 0) + return -EINVAL; + + /* If the variable is not set, the protocol is a noop */ + socket_path = getenv("NOTIFY_SOCKET"); + if (!socket_path) + return 0; /* Not set? Nothing to do */ + + /* Only AF_UNIX is supported, with path or abstract sockets */ + if (socket_path[0] != '/' && socket_path[0] != '@') + return -EAFNOSUPPORT; + + path_length = strlen(socket_path); + /* Ensure there is room for NUL byte */ + if (path_length >= sizeof(socket_addr.sun.sun_path)) + return -E2BIG; + + memcpy(socket_addr.sun.sun_path, socket_path, path_length); + + /* Support for abstract socket */ + if (socket_addr.sun.sun_path[0] == '@') + socket_addr.sun.sun_path[0] = 0; + + fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0); + if (fd < 0) + return -errno; + + if (connect(fd, &socket_addr.sa, offsetof(struct sockaddr_un, sun_path) + path_length) != 0) + return -errno; + + written = write(fd, message, message_length); + if (written != (ssize_t) message_length) + return written < 0 ? -errno : -EPROTO; + + return 1; /* Notified! */ +} + +static inline int sd_notify(int unset_environment, const char *message) { + int r = xen_sd_notify(message); + + if (unset_environment) + unsetenv("NOTIFY_SOCKET"); + + return r; +} + +#endif /* XEN_SD_NOTIFY */ -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:25:38 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:25:38 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753783.1162037 (Exim 4.92) (envelope-from ) id 1sPLWs-00020O-A5; Thu, 04 Jul 2024 12:25:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753783.1162037; Thu, 04 Jul 2024 12:25:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWs-00020F-7K; Thu, 04 Jul 2024 12:25:38 +0000 Received: by outflank-mailman (input) for mailman id 753783; Thu, 04 Jul 2024 12:25:36 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWq-0001zx-Ny for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:36 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLWq-0001rY-NM for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:36 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLWq-0003tT-Mb for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:36 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=P1/g9/e8FVz91ByYNIvjmxmEIV0f7Nm3BNLBKJiEx7w=; b=YFkD0KLbaVfPA3ow8SIdhhQ9Nc jsGiN/LA24NbBBhGaosbWuQhiRAzVW1mFKpEvyx7op7blTZCmS3VoduQB3W8HlAYHiCqIpyqpePPH m+NCG+tXSSWaFswHd4FZk6Cx+dEYsC0zLkkcVLYfJ8z5SR1MXArHIySJUxfg/n4JvIfY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] tools/{c,o}xenstored: Don't link against libsystemd Message-Id: Date: Thu, 04 Jul 2024 12:25:36 +0000 commit cf0342d86f56faff64e0701833049ed457c0721e Author: Andrew Cooper AuthorDate: Thu Jul 4 14:19:25 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:19:25 2024 +0200 tools/{c,o}xenstored: Don't link against libsystemd Use the local freestanding wrapper instead. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Christian Lindig master commit: caf864482689a5dd6a945759b6372bb260d49665 master date: 2024-05-23 15:04:40 +0100 --- tools/ocaml/xenstored/Makefile | 3 +-- tools/ocaml/xenstored/systemd_stubs.c | 2 +- tools/xenstore/Makefile | 5 ----- tools/xenstore/xenstored_core.c | 4 ++-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile index 6f7333926e..48b47448f2 100644 --- a/tools/ocaml/xenstored/Makefile +++ b/tools/ocaml/xenstored/Makefile @@ -4,8 +4,7 @@ include $(OCAML_TOPLEVEL)/common.make # Include configure output (config.h) CFLAGS += -include $(XEN_ROOT)/tools/config.h -CFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_CFLAGS) -LDFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_LIBS) +CFLAGS-$(CONFIG_SYSTEMD) += $(CFLAGS_xeninclude) CFLAGS += $(CFLAGS-y) CFLAGS += $(APPEND_CFLAGS) diff --git a/tools/ocaml/xenstored/systemd_stubs.c b/tools/ocaml/xenstored/systemd_stubs.c index f4c875075a..7dbbdd35bf 100644 --- a/tools/ocaml/xenstored/systemd_stubs.c +++ b/tools/ocaml/xenstored/systemd_stubs.c @@ -25,7 +25,7 @@ #if defined(HAVE_SYSTEMD) -#include +#include CAMLprim value ocaml_sd_notify_ready(value ignore) { diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile index ce7a68178f..f41d04304f 100644 --- a/tools/xenstore/Makefile +++ b/tools/xenstore/Makefile @@ -9,11 +9,6 @@ xenstored: LDLIBS += $(LDLIBS_libxenctrl) xenstored: LDLIBS += -lrt xenstored: LDLIBS += $(SOCKET_LIBS) -ifeq ($(CONFIG_SYSTEMD),y) -$(XENSTORED_OBJS-y): CFLAGS += $(SYSTEMD_CFLAGS) -xenstored: LDLIBS += $(SYSTEMD_LIBS) -endif - xenstore: LDLIBS += $(LDLIBS_libxenstore) xenstore: LDLIBS += $(LDLIBS_libxentoolcore) xenstore: LDLIBS += $(SOCKET_LIBS) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index 09b5d0656f..3b3a9f563a 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -61,7 +61,7 @@ #endif #if defined(XEN_SYSTEMD_ENABLED) -#include +#include #endif extern xenevtchn_handle *xce_handle; /* in xenstored_domain.c */ @@ -2888,7 +2888,7 @@ int main(int argc, char *argv[]) #if defined(XEN_SYSTEMD_ENABLED) if (!live_update) { sd_notify(1, "READY=1"); - fprintf(stderr, SD_NOTICE "xenstored is ready\n"); + fprintf(stderr, "xenstored is ready\n"); } #endif -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:25:48 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:25:48 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753784.1162041 (Exim 4.92) (envelope-from ) id 1sPLX2-00023o-C0; Thu, 04 Jul 2024 12:25:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753784.1162041; Thu, 04 Jul 2024 12:25:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLX2-00023h-8y; Thu, 04 Jul 2024 12:25:48 +0000 Received: by outflank-mailman (input) for mailman id 753784; Thu, 04 Jul 2024 12:25:46 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLX0-00023M-S7 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:46 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLX0-0001rf-Qd for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:46 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLX0-0003u8-Pw for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:46 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Kgu5uu0zTF5z8VUzbL9YjIPrjBd4+JjVLOlixZMqjeY=; b=EEWNGzoR3jI/cOrPQp8/QAuYTU EFGtYQuq4UoazapZ/d4p3xj6xQfRh/+ssk0z4qC5WSVnS59NP0zxMxe535LIHzuJbrP9XVI6rJxLi 8sQCTtotZBOqDeOZ5WrGm1SSqt7OFjKDnCyd0e5lKTBPYTQV+E54SYN/Ur7rz1e63ubE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] tools: Drop libsystemd as a dependency Message-Id: Date: Thu, 04 Jul 2024 12:25:46 +0000 commit fd4a15b1f7a7d6bb6a1bd60fce548782ff39f4e1 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:19:35 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:19:35 2024 +0200 tools: Drop libsystemd as a dependency There are no more users, and we want to disuade people from introducing new users just for sd_notify() and friends. Drop the dependency. We still want the overall --with{,out}-systemd to gate the generation of the service/unit/mount/etc files. Rerun autogen.sh, and mark the dependency as removed in the build containers. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Christian Lindig tools: (Actually) drop libsystemd as a dependency When reinstating some of systemd.m4 between v1 and v2, I reintroduced a little too much. While {c,o}xenstored are indeed no longer linked against libsystemd, ./configure still looks for it. Drop this too. Fixes: ae26101f6bfc ("tools: Drop libsystemd as a dependency") Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné master commit: ae26101f6bfc8185adcdb9165d469bdc467780db master date: 2024-05-23 15:04:40 +0100 master commit: 6ef4fa1e7fe78c1dae07b451292b07facfce4902 master date: 2024-05-30 12:15:25 +0100 --- CHANGELOG.md | 7 +- config/Tools.mk.in | 2 - m4/systemd.m4 | 17 -- tools/configure | 485 +---------------------------------------------------- 4 files changed, 7 insertions(+), 504 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0018e17cb..75726fd9e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,12 @@ Notable changes to Xen will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [4.17.4](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.17.4) +## [4.17.5](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.17.5) + +### Changed + - When building with Systemd support (./configure --enable-systemd), remove + libsystemd as a build dependency. Systemd Notify support is retained, now + using a standalone library implementation. ## [4.17.3](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.17.3) diff --git a/config/Tools.mk.in b/config/Tools.mk.in index 204c79c967..28f07ce237 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -56,8 +56,6 @@ CONFIG_LIBNL := @libnl@ CONFIG_GOLANG := @golang@ CONFIG_SYSTEMD := @systemd@ -SYSTEMD_CFLAGS := @SYSTEMD_CFLAGS@ -SYSTEMD_LIBS := @SYSTEMD_LIBS@ XEN_SYSTEMD_DIR := @SYSTEMD_DIR@ XEN_SYSTEMD_MODULES_LOAD := @SYSTEMD_MODULES_LOAD@ CONFIG_9PFS := @ninepfs@ diff --git a/m4/systemd.m4 b/m4/systemd.m4 index 112dc11b5e..ab12ea313d 100644 --- a/m4/systemd.m4 +++ b/m4/systemd.m4 @@ -41,15 +41,6 @@ AC_DEFUN([AX_ALLOW_SYSTEMD_OPTS], [ ]) AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ - PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon],, - [PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209])] - ) - dnl pkg-config older than 0.24 does not set these for - dnl PKG_CHECK_MODULES() worth also noting is that as of version 208 - dnl of systemd pkg-config --cflags currently yields no extra flags yet. - AC_SUBST([SYSTEMD_CFLAGS]) - AC_SUBST([SYSTEMD_LIBS]) - AS_IF([test "x$SYSTEMD_DIR" = x], [ dnl In order to use the line below we need to fix upstream systemd dnl to properly ${prefix} for child variables in @@ -95,13 +86,6 @@ AC_DEFUN([AX_CHECK_SYSTEMD], [ ],[systemd=n]) ]) -AC_DEFUN([AX_CHECK_SYSTEMD_ENABLE_AVAILABLE], [ - PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon], [systemd="y"],[ - PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], - [systemd="y"],[systemd="n"]) - ]) -]) - dnl Enables systemd by default and requires a --disable-systemd option flag dnl to configure if you want to disable. AC_DEFUN([AX_ENABLE_SYSTEMD], [ @@ -121,6 +105,5 @@ dnl to have systemd build libraries it will be enabled. You can always force dnl disable with --disable-systemd AC_DEFUN([AX_AVAILABLE_SYSTEMD], [ AX_ALLOW_SYSTEMD_OPTS() - AX_CHECK_SYSTEMD_ENABLE_AVAILABLE() AX_CHECK_SYSTEMD() ]) diff --git a/tools/configure b/tools/configure index f1176d1c0f..6f0b0bb82b 100755 --- a/tools/configure +++ b/tools/configure @@ -626,8 +626,6 @@ ac_subst_vars='LTLIBOBJS LIBOBJS pvshim ninepfs -SYSTEMD_LIBS -SYSTEMD_CFLAGS SYSTEMD_MODULES_LOAD SYSTEMD_DIR systemd @@ -862,9 +860,7 @@ pixman_LIBS libzstd_CFLAGS libzstd_LIBS LIBNL3_CFLAGS -LIBNL3_LIBS -SYSTEMD_CFLAGS -SYSTEMD_LIBS' +LIBNL3_LIBS' # Initialize some variables set by options. @@ -1618,10 +1614,6 @@ Some influential environment variables: LIBNL3_CFLAGS C compiler flags for LIBNL3, overriding pkg-config LIBNL3_LIBS linker flags for LIBNL3, overriding pkg-config - SYSTEMD_CFLAGS - C compiler flags for SYSTEMD, overriding pkg-config - SYSTEMD_LIBS - linker flags for SYSTEMD, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -3886,8 +3878,6 @@ esac - - @@ -9488,223 +9478,6 @@ fi - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - systemd="n" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - systemd="n" -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - systemd="y" -fi - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - systemd="n" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - systemd="n" -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - systemd="y" -fi - -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - systemd="y" -fi - - if test "x$enable_systemd" != "xno"; then : if test "x$systemd" = "xy" ; then : @@ -9714,262 +9487,6 @@ $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h systemd=y - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libsystemd >= 209) were not met: - -$SYSTEMD_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libsystemd >= 209) were not met: - -$SYSTEMD_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - - - if test "x$SYSTEMD_DIR" = x; then : SYSTEMD_DIR="\$(prefix)/lib/systemd/system/" -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:25:57 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:25:57 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753785.1162046 (Exim 4.92) (envelope-from ) id 1sPLXB-00027A-Ek; Thu, 04 Jul 2024 12:25:57 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753785.1162046; Thu, 04 Jul 2024 12:25:57 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXB-000272-Bn; Thu, 04 Jul 2024 12:25:57 +0000 Received: by outflank-mailman (input) for mailman id 753785; Thu, 04 Jul 2024 12:25:56 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXA-00026t-UC for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:56 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXA-0001rt-TV for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:56 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLXA-0003uz-Sr for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:25:56 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=0wnnuKlBRqezlv8mgjO+pujKfAgnjdG9c44miUErSz0=; b=4hs3cA4uHY6TKQ/GZtKAojBqbI dX8h8EwazfxxV1yuRTtYoomIGzLryh8AiS7m8V28g6ae71GGIlJf9BhfkovAtK9HN1pgu7oAA//vp N1c3sSnHka8rEe2AZ3cU1GWdvTqF0vI5y6q2kxgvIqUDIZLuXxfyMWGlC/HyAG7PrDsM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] x86/ioapic: Fix signed shifts in io_apic.c Message-Id: Date: Thu, 04 Jul 2024 12:25:56 +0000 commit 5afa8fea8e64dfab24650400f168d212208a318c Author: Matthew Barnes AuthorDate: Thu Jul 4 14:19:57 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:19:57 2024 +0200 x86/ioapic: Fix signed shifts in io_apic.c There exists bitshifts in the IOAPIC code where signed integers are shifted to the left by up to 31 bits, which is undefined behaviour. This patch fixes this by changing the integers from signed to unsigned. Signed-off-by: Matthew Barnes Reviewed-by: Jan Beulich Reviewed-by: Andrew Cooper master commit: c5746b021e573184fb92b601a0e93a295485054e master date: 2024-06-21 15:09:26 +0100 --- xen/arch/x86/io_apic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index b3afef8933..e3e71c7a52 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1692,7 +1692,8 @@ static void cf_check mask_and_ack_level_ioapic_irq(struct irq_desc *desc) !io_apic_level_ack_pending(desc->irq)) move_masked_irq(desc); - if ( !(v & (1 << (i & 0x1f))) ) { + if ( !(v & (1U << (i & 0x1f))) ) + { spin_lock(&ioapic_lock); __edge_IO_APIC_irq(desc->irq); __level_IO_APIC_irq(desc->irq); @@ -1756,7 +1757,8 @@ static void cf_check end_level_ioapic_irq_new(struct irq_desc *desc, u8 vector) !io_apic_level_ack_pending(desc->irq) ) move_native_irq(desc); - if (!(v & (1 << (i & 0x1f)))) { + if ( !(v & (1U << (i & 0x1f))) ) + { spin_lock(&ioapic_lock); __mask_IO_APIC_irq(desc->irq); __edge_IO_APIC_irq(desc->irq); -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:26:07 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:26:07 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753786.1162049 (Exim 4.92) (envelope-from ) id 1sPLXL-0002A2-G5; Thu, 04 Jul 2024 12:26:07 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753786.1162049; Thu, 04 Jul 2024 12:26:07 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXL-00029u-DI; Thu, 04 Jul 2024 12:26:07 +0000 Received: by outflank-mailman (input) for mailman id 753786; Thu, 04 Jul 2024 12:26:07 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXL-00029m-0a for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:07 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXK-0001sP-WF for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:07 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLXK-0003wQ-Va for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:06 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=DVFruSbBOW9fgW5tY6lFJsfKWUFpWcH3pxV73znf6Mw=; b=bOLAy0Rqhq2qsIPn1WDxSZRoZH mbtNzWR2T7SyDdlrywT0Xj+3ZfG2pqVVNCM8sn+3+1uDB7BX/i/rd7zTPBEPyxlMu2cBq+zojoV9F NFzWQk9Ghs9glTppRpsKQv2+jhkAZsuaAaqR34yQIaQGqL3WDhpWhSFm6lmBvB7TCPPA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] tools/xl: Open xldevd.log with O_CLOEXEC Message-Id: Date: Thu, 04 Jul 2024 12:26:06 +0000 commit 8e522bfa4816a0b7dd40652bf620269ade6836f0 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:20:25 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:20:25 2024 +0200 tools/xl: Open xldevd.log with O_CLOEXEC `xl devd` has been observed leaking /var/log/xldevd.log into children. Note this is specifically safe; dup2() leaves O_CLOEXEC disabled on newfd, so after setting up stdout/stderr, it's only the logfile fd which will close on exec(). Link: https://github.com/QubesOS/qubes-issues/issues/8292 Reported-by: Demi Marie Obenour Signed-off-by: Andrew Cooper Reviewed-by: Marek Marczykowski-Górecki Reviewed-by: Demi Marie Obenour Acked-by: Anthony PERARD master commit: ba52b3b624e4a1a976908552364eba924ca45430 master date: 2024-06-24 16:22:59 +0100 --- tools/xl/xl_utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/xl/xl_utils.c b/tools/xl/xl_utils.c index 17489d1829..b0d23b2cdb 100644 --- a/tools/xl/xl_utils.c +++ b/tools/xl/xl_utils.c @@ -27,6 +27,10 @@ #include "xl.h" #include "xl_utils.h" +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + void dolog(const char *file, int line, const char *func, const char *fmt, ...) { va_list ap; @@ -270,7 +274,7 @@ int do_daemonize(const char *name, const char *pidfile) exit(-1); } - CHK_SYSCALL(logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND, 0644)); + CHK_SYSCALL(logfile = open(fullname, O_WRONLY | O_CREAT | O_APPEND | O_CLOEXEC, 0644)); free(fullname); assert(logfile >= 3); -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:26:17 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:26:17 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753787.1162053 (Exim 4.92) (envelope-from ) id 1sPLXV-0002Cw-HN; Thu, 04 Jul 2024 12:26:17 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753787.1162053; Thu, 04 Jul 2024 12:26:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXV-0002Co-Em; Thu, 04 Jul 2024 12:26:17 +0000 Received: by outflank-mailman (input) for mailman id 753787; Thu, 04 Jul 2024 12:26:17 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXV-0002Ch-3Z for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:17 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXV-0001su-2t for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:17 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLXV-0003xk-2E for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:17 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=FNjVk7iundTub9BkvLzLbynIQ3XRNEs8ewRABYCMTw0=; b=iSFCve21gAhzYtMzUcjci9eLVl X7GfEUp9/tcwsJksLFGJg+yOfC3wbafH4b0QhsHaLdzpx4p6Glecxy91XxiqCZSoDaCdnxkYO6gTf mXFrtmSvD/xOSlhaKpchXqvjXtv90k8Du9buA9fxnUqFg9XghL+knfeXsWckT0koubO8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] pirq_cleanup_check() leaks Message-Id: Date: Thu, 04 Jul 2024 12:26:17 +0000 commit fb9f9842938dbc095de8f6bdebd4bc2e3ef0f1e7 Author: Jan Beulich AuthorDate: Thu Jul 4 14:20:50 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:20:50 2024 +0200 pirq_cleanup_check() leaks Its original introduction had two issues: For one the "common" part of the checks (carried out in the macro) was inverted. And then after removal from the radix tree the structure wasn't scheduled for freeing. (All structures still left in the radix tree would be freed upon domain destruction, though.) For the freeing to be safe even if it didn't use RCU (i.e. to avoid use- after-free), re-arrange checks/operations in evtchn_close(), such that the pointer wouldn't be used anymore after calling pirq_cleanup_check() (noting that unmap_domain_pirq_emuirq() itself calls the function in the success case). Fixes: c24536b636f2 ("replace d->nr_pirqs sized arrays with radix tree") Fixes: 79858fee307c ("xen: fix hvm_domain_use_pirq's behavior") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: daa90dfea9175c07f13d1a2d901857b2dd14d080 master date: 2024-07-02 08:35:56 +0200 --- xen/arch/x86/irq.c | 1 + xen/common/event_channel.c | 11 ++++++++--- xen/include/xen/irq.h | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 11b2a213aa..827ed556d3 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1413,6 +1413,7 @@ void (pirq_cleanup_check)(struct pirq *pirq, struct domain *d) if ( radix_tree_delete(&d->pirq_tree, pirq->pirq) != pirq ) BUG(); + free_pirq_struct(pirq); } /* Flush all ready EOIs from the top of this CPU's pending-EOI stack. */ diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index dada9f15f5..7eb719f0de 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -680,11 +680,16 @@ int evtchn_close(struct domain *d1, int port1, bool guest) if ( !is_hvm_domain(d1) ) pirq_guest_unbind(d1, pirq); pirq->evtchn = 0; - pirq_cleanup_check(pirq, d1); #ifdef CONFIG_X86 - if ( is_hvm_domain(d1) && domain_pirq_to_irq(d1, pirq->pirq) > 0 ) - unmap_domain_pirq_emuirq(d1, pirq->pirq); + if ( !is_hvm_domain(d1) || + domain_pirq_to_irq(d1, pirq->pirq) <= 0 || + unmap_domain_pirq_emuirq(d1, pirq->pirq) < 0 ) + /* + * The successful path of unmap_domain_pirq_emuirq() will have + * called pirq_cleanup_check() already. + */ #endif + pirq_cleanup_check(pirq, d1); } unlink_pirq_port(chn1, d1->vcpu[chn1->notify_vcpu_id]); break; diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index c93ef31a9c..f69c9ec760 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -179,7 +179,7 @@ extern struct pirq *pirq_get_info(struct domain *, int pirq); void pirq_cleanup_check(struct pirq *, struct domain *); #define pirq_cleanup_check(pirq, d) \ - ((pirq)->evtchn ? pirq_cleanup_check(pirq, d) : (void)0) + (!(pirq)->evtchn ? pirq_cleanup_check(pirq, d) : (void)0) extern void pirq_guest_eoi(struct pirq *); extern void desc_guest_eoi(struct irq_desc *, struct pirq *); -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:26:27 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:26:27 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753788.1162057 (Exim 4.92) (envelope-from ) id 1sPLXf-0002G0-Iz; Thu, 04 Jul 2024 12:26:27 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753788.1162057; Thu, 04 Jul 2024 12:26:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXf-0002Fq-GD; Thu, 04 Jul 2024 12:26:27 +0000 Received: by outflank-mailman (input) for mailman id 753788; Thu, 04 Jul 2024 12:26:27 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXf-0002Fi-6P for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:27 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXf-0001t1-5j for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:27 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLXf-0003zE-51 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:27 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=mumC7UM6nBBD2D0QfyE9ayy/CfrmUJAL7yyb0bh+WRs=; b=QR81p0EQcsqzTSDtY0idWtrWah yENw32C3QI3e4i4CPRp8WVZil1282rZfHCGCwEzjh7cI9Fh5xHVB6nvL/TFibVOrbFL4FEWxZiZ/8 f1041D1kf9sKOJNZGsuSEB6JT/qxE61PPzBN/3fEgJaXkdEoKDPlvwlF99Aj0KXoC26o=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment() Message-Id: Date: Thu, 04 Jul 2024 12:26:27 +0000 commit 50216569eab172f483495ab3fdcf19417c2de0ad Author: Andrew Cooper AuthorDate: Thu Jul 4 14:21:46 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:21:46 2024 +0200 tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment() xc_dom_alloc_segment() is passed a size in bytes, calculates a size in pages from it, then fills in the new segment information with a bytes value re-calculated from the number of pages. This causes the module information given to the guest (MB, or PVH) to have incorrect sizes; specifically, sizes rounded up to the next page. This in turn is problematic for Xen. When Xen finds a gzipped module, it peeks at the end metadata to judge the decompressed size, which is a -4 backreference from the reported end of the module. Fill in seg->vend using the correct number of bytes. Fixes: ea7c8a3d0e82 ("libxc: reorganize domain builder guest memory allocator") Signed-off-by: Andrew Cooper Acked-by: Anthony PERARD master commit: 4c3a618b0adaa0cd59e0fa0898bb60978b8b3a5f master date: 2024-07-02 10:50:18 +0100 --- tools/libs/guest/xg_dom_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/guest/xg_dom_core.c b/tools/libs/guest/xg_dom_core.c index c4f4e7f3e2..f5521d528b 100644 --- a/tools/libs/guest/xg_dom_core.c +++ b/tools/libs/guest/xg_dom_core.c @@ -601,7 +601,7 @@ int xc_dom_alloc_segment(struct xc_dom_image *dom, memset(ptr, 0, pages * page_size); seg->vstart = start; - seg->vend = dom->virt_alloc_end; + seg->vend = start + size; DOMPRINTF("%-20s: %-12s : 0x%" PRIx64 " -> 0x%" PRIx64 " (pfn 0x%" PRIpfn " + 0x%" PRIpfn " pages)", -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:26:38 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:26:38 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753789.1162062 (Exim 4.92) (envelope-from ) id 1sPLXq-0002In-LM; Thu, 04 Jul 2024 12:26:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753789.1162062; Thu, 04 Jul 2024 12:26:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXq-0002Ie-He; Thu, 04 Jul 2024 12:26:38 +0000 Received: by outflank-mailman (input) for mailman id 753789; Thu, 04 Jul 2024 12:26:37 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXp-0002IL-97 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:37 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXp-0001t9-8W for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:37 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLXp-0003zl-7r for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:37 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=VzrDMkpi2m7gAh+svKXdHnpaqc2RSN2hxLg1nL2oYb0=; b=b/Ao89h5x5x5udJwUthb4x+Tuj +1iTOEQj+hLLH+aQDaccUiKL3UrFvcbNjt7zpmJ54OM2ECMwes2ImBRoFj/t7e4dhZdwvUq5NVwWl 14vgngduW4B0GPf/QRKAhr8N49+bh5scCEPQR2kcgDXqOppcHA6tvHEBf0Mbp00ikEx8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] tools/libxs: Fix CLOEXEC handling in get_dev() Message-Id: Date: Thu, 04 Jul 2024 12:26:37 +0000 commit 4baf3a31a53ae14a3ed8e57092e97f584359079f Author: Andrew Cooper AuthorDate: Thu Jul 4 14:21:55 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:21:55 2024 +0200 tools/libxs: Fix CLOEXEC handling in get_dev() Move the O_CLOEXEC compatibility outside of an #ifdef USE_PTHREAD block. Introduce set_cloexec() to wrap fcntl() setting FD_CLOEXEC. It will be reused for other CLOEXEC fixes too. Use set_cloexec() when O_CLOEXEC isn't available as a best-effort fallback. Fixes: f4f2f3402b2f ("tools/libxs: Open /dev/xen/xenbus fds as O_CLOEXEC") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD master commit: bf7c1464706adfa903f1e7d59383d042c3a88e39 master date: 2024-07-02 10:51:06 +0100 --- tools/libs/store/xs.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index b5933fb108..0abbcb13b4 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -40,6 +40,10 @@ #include +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + struct xs_stored_msg { struct list_head list; struct xsd_sockmsg hdr; @@ -54,10 +58,6 @@ struct xs_stored_msg { #include #endif -#ifndef O_CLOEXEC -#define O_CLOEXEC 0 -#endif - struct xs_handle { /* Communications channel to xenstore daemon. */ int fd; @@ -176,6 +176,16 @@ static bool setnonblock(int fd, int nonblock) { return true; } +static bool set_cloexec(int fd) +{ + int flags = fcntl(fd, F_GETFL); + + if (flags < 0) + return false; + + return fcntl(fd, flags | FD_CLOEXEC) >= 0; +} + int xs_fileno(struct xs_handle *h) { char c = 0; @@ -230,8 +240,24 @@ error: static int get_dev(const char *connect_to) { - /* We cannot open read-only because requests are writes */ - return open(connect_to, O_RDWR | O_CLOEXEC); + int fd, saved_errno; + + fd = open(connect_to, O_RDWR | O_CLOEXEC); + if (fd < 0) + return -1; + + /* Compat for non-O_CLOEXEC environments. Racy. */ + if (!O_CLOEXEC && !set_cloexec(fd)) + goto error; + + return fd; + +error: + saved_errno = errno; + close(fd); + errno = saved_errno; + + return -1; } static int all_restrict_cb(Xentoolcore__Active_Handle *ah, domid_t domid) { -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:26:48 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:26:48 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753790.1162066 (Exim 4.92) (envelope-from ) id 1sPLY0-0002MS-MP; Thu, 04 Jul 2024 12:26:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753790.1162066; Thu, 04 Jul 2024 12:26:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLY0-0002ML-JD; Thu, 04 Jul 2024 12:26:48 +0000 Received: by outflank-mailman (input) for mailman id 753790; Thu, 04 Jul 2024 12:26:47 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXz-0002M4-CO for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:47 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLXz-0001tO-Bl for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:47 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLXz-00040j-As for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:47 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=dgE34qQ1Lqa01S2rluZl8QsCdXaxjQ0afr7AZrG9wLA=; b=vqXdcwkbgGDCwg+QpqTLrAehRv 1oY7bczrsjHexvg081FQGvrdLxcocWPLXR1j78GwLM+F7swoelElpWmvxiP9cdYx5uh46bNGGKtRJ K1v/CbWxLAAu8SbyIsKzhyKU44TiwydpCl1GhecyKpQywNhqJM6rqAKaqyDigJmJliEE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] tools/libxs: Fix CLOEXEC handling in get_socket() Message-Id: Date: Thu, 04 Jul 2024 12:26:47 +0000 commit f121420f0de1f3acfc58d014b6f025f117fc9e05 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:22:05 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:22:05 2024 +0200 tools/libxs: Fix CLOEXEC handling in get_socket() get_socket() opens a socket, then uses fcntl() to set CLOEXEC. This is racy with exec(). Open the socket with SOCK_CLOEXEC. Use the same compatibility strategy as O_CLOEXEC on ancient versions of Linux. Reported-by: Frediano Ziglio Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD master commit: 1957dd6aff931877fc22699d8f2d4be8728014ba master date: 2024-07-02 10:51:11 +0100 --- tools/libs/store/xs.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 0abbcb13b4..26542f13dd 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -44,6 +44,10 @@ #define O_CLOEXEC 0 #endif +#ifndef SOCK_CLOEXEC +#define SOCK_CLOEXEC 0 +#endif + struct xs_stored_msg { struct list_head list; struct xsd_sockmsg hdr; @@ -207,16 +211,14 @@ int xs_fileno(struct xs_handle *h) static int get_socket(const char *connect_to) { struct sockaddr_un addr; - int sock, saved_errno, flags; + int sock, saved_errno; - sock = socket(PF_UNIX, SOCK_STREAM, 0); + sock = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); if (sock < 0) return -1; - if ((flags = fcntl(sock, F_GETFD)) < 0) - goto error; - flags |= FD_CLOEXEC; - if (fcntl(sock, F_SETFD, flags) < 0) + /* Compat for non-SOCK_CLOEXEC environments. Racy. */ + if (!SOCK_CLOEXEC && !set_cloexec(sock)) goto error; addr.sun_family = AF_UNIX; -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:26:58 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:26:58 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753791.1162069 (Exim 4.92) (envelope-from ) id 1sPLYA-0002PY-NZ; Thu, 04 Jul 2024 12:26:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753791.1162069; Thu, 04 Jul 2024 12:26:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLYA-0002PQ-Kf; Thu, 04 Jul 2024 12:26:58 +0000 Received: by outflank-mailman (input) for mailman id 753791; Thu, 04 Jul 2024 12:26:57 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLY9-0002PE-Fr for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:57 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLY9-0001te-FD for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:57 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLY9-00041S-EU for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:26:57 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Pq9otMmqtLVRk2sk7nj1avThL6TRKO0BNyWAOFbqfEU=; b=P/Cv+9khfyeqmQO3vINfMvP6kx l+L9P10RiuUZ8CMoXAlPfcDwtdiOkuRrI8645DHO4iaLZ4SqpPS+F5aYSe8Z8O/5AXmPYeljoIz1R zBBmB4iEez2zawQQcTA1B9FsDWyMMml3phANm2W04eWBKrmoRTYuCI/2dkco0SXVjjjw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] tools/libxs: Fix CLOEXEC handling in xs_fileno() Message-Id: Date: Thu, 04 Jul 2024 12:26:57 +0000 commit 750475017de246846a707470ebc88374f9bc9dc9 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:22:15 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:22:15 2024 +0200 tools/libxs: Fix CLOEXEC handling in xs_fileno() xs_fileno() opens a pipe on first use to communicate between the watch thread and the main thread. Nothing ever sets CLOEXEC on the file descriptors. Check for the availability of the pipe2() function with configure. Despite starting life as Linux-only, FreeBSD and NetBSD have gained it. When pipe2() isn't available, try our best with pipe() and set_cloexec(). Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD master commit: a2ff677852f0ce05fa335e8e5682bf2ae0c916ee master date: 2024-07-02 10:52:59 +0100 --- tools/config.h.in | 3 +++ tools/configure | 12 ++++++++++++ tools/configure.ac | 2 ++ tools/libs/store/xs.c | 16 +++++++++++++++- 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/tools/config.h.in b/tools/config.h.in index 3071cb3998..9d839f8af1 100644 --- a/tools/config.h.in +++ b/tools/config.h.in @@ -39,6 +39,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `pipe2' function. */ +#undef HAVE_PIPE2 + /* Qemu traditional enabled */ #undef HAVE_QEMU_TRADITIONAL diff --git a/tools/configure b/tools/configure index 6f0b0bb82b..402364f4c4 100755 --- a/tools/configure +++ b/tools/configure @@ -9699,6 +9699,18 @@ if test "$ax_found" = "0"; then : fi +for ac_func in pipe2 +do : + ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +if test "x$ac_cv_func_pipe2" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PIPE2 1 +_ACEOF + +fi +done + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/tools/configure.ac b/tools/configure.ac index 31bdef3d70..c1ea1e32ca 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -518,4 +518,6 @@ AS_IF([test "x$pvshim" = "xy"], [ AX_FIND_HEADER([INCLUDE_ENDIAN_H], [endian.h sys/endian.h]) +AC_CHECK_FUNCS([pipe2]) + AC_OUTPUT() diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 26542f13dd..3f723bff5a 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -190,13 +190,27 @@ static bool set_cloexec(int fd) return fcntl(fd, flags | FD_CLOEXEC) >= 0; } +static int pipe_cloexec(int fds[2]) +{ +#if HAVE_PIPE2 + return pipe2(fds, O_CLOEXEC); +#else + if (pipe(fds) < 0) + return -1; + /* Best effort to set CLOEXEC. Racy. */ + set_cloexec(fds[0]); + set_cloexec(fds[1]); + return 0; +#endif +} + int xs_fileno(struct xs_handle *h) { char c = 0; mutex_lock(&h->watch_mutex); - if ((h->watch_pipe[0] == -1) && (pipe(h->watch_pipe) != -1)) { + if ((h->watch_pipe[0] == -1) && (pipe_cloexec(h->watch_pipe) != -1)) { /* Kick things off if the watch list is already non-empty. */ if (!list_empty(&h->watch_list)) while (write(h->watch_pipe[1], &c, 1) != 1) -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:27:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:27:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753792.1162073 (Exim 4.92) (envelope-from ) id 1sPLYK-0002TE-QT; Thu, 04 Jul 2024 12:27:08 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753792.1162073; Thu, 04 Jul 2024 12:27:08 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLYK-0002T6-NW; Thu, 04 Jul 2024 12:27:08 +0000 Received: by outflank-mailman (input) for mailman id 753792; Thu, 04 Jul 2024 12:27:07 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLYJ-0002Sl-LQ for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:27:07 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLYJ-0001u1-ID for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:27:07 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLYJ-000424-Hd for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:27:07 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=XbDbZWhJ+n/LT+1YijfePUmDAkvH90pXnIBYpW9Mjhk=; b=iLcjZoCyD7k2XkHpqJrD50PfY8 0oejj2KzRCg55Q03s6nzdgjxPs1n6hzM4XLTvmf7zeBz/8lg7iyzRXJ3lAiSHshgI+Nmtk8Dr/Zcf 6cwKlcYWpQbdHBVBDDZdmQMUWHBoRtGxFNSxo5s7Cyx80qJ1hsNhKxJSwI3ozg1DITBY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] cmdline: document and enforce "extra_guest_irqs" upper bounds Message-Id: Date: Thu, 04 Jul 2024 12:27:07 +0000 commit a626bfbcbb532f5a22182fab0bfbd51597a6a666 Author: Jan Beulich AuthorDate: Thu Jul 4 14:22:54 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:22:54 2024 +0200 cmdline: document and enforce "extra_guest_irqs" upper bounds PHYSDEVOP_pirq_eoi_gmfn_v accepting just a single GFN implies that no more than 32k pIRQ-s can be used by a domain on x86. Document this upper bound. To also enforce the limit, (ab)use both arch_hwdom_irqs() (changing its parameter type) and setup_system_domains(). This is primarily to avoid exposing the two static variables or introducing yet further arch hooks. While touching arch_hwdom_irqs() also mark it hwdom-init. Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné amend 'cmdline: document and enforce "extra_guest_irqs" upper bounds' Address late review comments for what is now commit 17f6d398f765: - bound max_irqs right away against nr_irqs - introduce a #define for a constant used twice Requested-by: Roger Pau Monné Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: 17f6d398f76597f8009ec0530842fb8705ece7ba master date: 2024-07-02 12:00:27 +0200 master commit: 1f56accba33ffea0abf7d1c6384710823d10cbd6 master date: 2024-07-03 14:03:27 +0200 --- docs/misc/xen-command-line.pandoc | 3 ++- xen/arch/x86/io_apic.c | 17 ++++++++++------- xen/common/domain.c | 24 ++++++++++++++++++++++-- xen/include/xen/irq.h | 3 ++- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index fba5a8221b..ccb185a4f3 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -1141,7 +1141,8 @@ common for all domUs, while the optional second number (preceded by a comma) is for dom0. Changing the setting for domU has no impact on dom0 and vice versa. For example to change dom0 without changing domU, use `extra_guest_irqs=,512`. The default value for Dom0 and an eventual separate -hardware domain is architecture dependent. +hardware domain is architecture dependent. The upper limit for both values on +x86 is such that the resulting total number of IRQs can't be higher than 32768. Note that specifying zero as domU value means zero, while for dom0 it means to use the default. diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index e3e71c7a52..6f4b04878d 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2661,18 +2661,21 @@ void __init ioapic_init(void) nr_irqs_gsi, nr_irqs - nr_irqs_gsi); } -unsigned int arch_hwdom_irqs(domid_t domid) +unsigned int __hwdom_init arch_hwdom_irqs(const struct domain *d) { unsigned int n = fls(num_present_cpus()); + /* Bounding by the domain pirq EOI bitmap capacity. */ + const unsigned int max_irqs = min_t(unsigned int, nr_irqs, + PAGE_SIZE * BITS_PER_BYTE); - if ( !domid ) - n = min(n, dom0_max_vcpus()); - n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, nr_irqs); + if ( is_system_domain(d) ) + return max_irqs; - /* Bounded by the domain pirq eoi bitmap gfn. */ - n = min_t(unsigned int, n, PAGE_SIZE * BITS_PER_BYTE); + if ( !d->domain_id ) + n = min(n, dom0_max_vcpus()); + n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, max_irqs); - printk("Dom%d has maximum %u PIRQs\n", domid, n); + printk("%pd has maximum %u PIRQs\n", d, n); return n; } diff --git a/xen/common/domain.c b/xen/common/domain.c index 8f924d5cdd..13a1674ce4 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -351,7 +351,8 @@ static int late_hwdom_init(struct domain *d) } static unsigned int __read_mostly extra_hwdom_irqs; -static unsigned int __read_mostly extra_domU_irqs = 32; +#define DEFAULT_EXTRA_DOMU_IRQS 32U +static unsigned int __read_mostly extra_domU_irqs = DEFAULT_EXTRA_DOMU_IRQS; static int __init cf_check parse_extra_guest_irqs(const char *s) { @@ -659,7 +660,7 @@ struct domain *domain_create(domid_t domid, d->nr_pirqs = nr_static_irqs + extra_domU_irqs; else d->nr_pirqs = extra_hwdom_irqs ? nr_static_irqs + extra_hwdom_irqs - : arch_hwdom_irqs(domid); + : arch_hwdom_irqs(d); d->nr_pirqs = min(d->nr_pirqs, nr_irqs); radix_tree_init(&d->pirq_tree); @@ -783,6 +784,25 @@ void __init setup_system_domains(void) if ( IS_ERR(dom_xen) ) panic("Failed to create d[XEN]: %ld\n", PTR_ERR(dom_xen)); +#ifdef CONFIG_HAS_PIRQ + /* Bound-check values passed via "extra_guest_irqs=". */ + { + unsigned int n = max(arch_hwdom_irqs(dom_xen), nr_static_irqs); + + if ( extra_hwdom_irqs > n - nr_static_irqs ) + { + extra_hwdom_irqs = n - nr_static_irqs; + printk(XENLOG_WARNING "hwdom IRQs bounded to %u\n", n); + } + if ( extra_domU_irqs > + max(DEFAULT_EXTRA_DOMU_IRQS, n - nr_static_irqs) ) + { + extra_domU_irqs = n - nr_static_irqs; + printk(XENLOG_WARNING "domU IRQs bounded to %u\n", n); + } + } +#endif + /* * Initialise our DOMID_IO domain. * This domain owns I/O pages that are within the range of the page_info diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index f69c9ec760..1fcf5a6755 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -194,8 +194,9 @@ extern irq_desc_t *pirq_spin_lock_irq_desc( unsigned int set_desc_affinity(struct irq_desc *, const cpumask_t *); +/* When passed a system domain, this returns the maximum permissible value. */ #ifndef arch_hwdom_irqs -unsigned int arch_hwdom_irqs(domid_t); +unsigned int arch_hwdom_irqs(const struct domain *); #endif #ifndef arch_evtchn_bind_pirq -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 12:27:20 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 12:27:20 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753793.1162077 (Exim 4.92) (envelope-from ) id 1sPLYU-0002W7-Rg; Thu, 04 Jul 2024 12:27:18 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753793.1162077; Thu, 04 Jul 2024 12:27:18 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLYU-0002Vz-Ox; Thu, 04 Jul 2024 12:27:18 +0000 Received: by outflank-mailman (input) for mailman id 753793; Thu, 04 Jul 2024 12:27:17 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLYT-0002Vm-Lp for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:27:17 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPLYT-0001uT-L6 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:27:17 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPLYT-00042m-KM for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 12:27:17 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=1jetlRnhygI+7jw4Ac94N1cY+vA9qh4hSMmzllLByCI=; b=HdoAdoTZWSwOUdUIrKE8m2mpUC nspkTCJMmSKYGX4Yg0XqibUNtl9hmWsVlg88m/a/dAOEfUQF0srvXPVRpGKRLtQVYdC8HqDM+Wgj1 54QJ7quAJmMLVk//3Maa2ZHmzO/U0GH/hbAJFderjCmhyHgMjl5yRfoeMpnbMKDoNGHY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] x86/entry: don't clear DF when raising #UD for lack of syscall handler Message-Id: Date: Thu, 04 Jul 2024 12:27:17 +0000 commit b61a4baf35e912bddfe1b6da0093edcd474d918c Author: Jan Beulich AuthorDate: Thu Jul 4 14:23:30 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:23:30 2024 +0200 x86/entry: don't clear DF when raising #UD for lack of syscall handler While doing so is intentional when invoking the actual callback, to mimic a hard-coded SYCALL_MASK / FMASK MSR, the same should not be done when no handler is available and hence #UD is raised. Fixes: ca6fcf4321b3 ("x86/pv: Inject #UD for missing SYSCALL callbacks") Reported-by: Andrew Cooper Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper master commit: d2fe9ab3048d503869ec81bc49db07e55a4a2386 master date: 2024-07-02 12:01:21 +0200 --- xen/arch/x86/x86_64/entry.S | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index 1ecf900eee..7bb0cc708a 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -38,6 +38,14 @@ switch_to_kernel: setc %cl leal (,%rcx,TBF_INTERRUPT),%ecx + /* + * The PV ABI hardcodes the (guest-inaccessible and virtual) + * SYSCALL_MASK MSR such that DF (and nothing else) would be cleared. + * Note that the equivalent of IF (VGCF_syscall_disables_events) is + * dealt with separately above. + */ + mov $~X86_EFLAGS_DF, %esi + test %rax, %rax UNLIKELY_START(z, syscall_no_callback) /* TB_eip == 0 => #UD */ mov VCPU_trap_ctxt(%rbx), %rdi @@ -47,12 +55,14 @@ UNLIKELY_START(z, syscall_no_callback) /* TB_eip == 0 => #UD */ testb $4, X86_EXC_UD * TRAPINFO_sizeof + TRAPINFO_flags(%rdi) setnz %cl lea TBF_EXCEPTION(, %rcx, TBF_INTERRUPT), %ecx + or $~0, %esi /* Don't clear DF */ UNLIKELY_END(syscall_no_callback) movq %rax,TRAPBOUNCE_eip(%rdx) movb %cl,TRAPBOUNCE_flags(%rdx) call create_bounce_frame - andl $~X86_EFLAGS_DF,UREGS_eflags(%rsp) + /* Conditionally clear DF */ + and %esi, UREGS_eflags(%rsp) /* %rbx: struct vcpu */ test_all_events: ASSERT_NOT_IN_ATOMIC -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 15:11:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 15:11:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753888.1162161 (Exim 4.92) (envelope-from ) id 1sPO6z-0006N1-Hv; Thu, 04 Jul 2024 15:11:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753888.1162161; Thu, 04 Jul 2024 15:11:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPO6z-0006Mt-FA; Thu, 04 Jul 2024 15:11:05 +0000 Received: by outflank-mailman (input) for mailman id 753888; Thu, 04 Jul 2024 15:11:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPO6x-0006Mn-DT for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 15:11:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPO6x-0004mU-By for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 15:11:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPO6x-0008QE-97 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 15:11:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=zDqaOrHe1joLh5uFQvjcuP8ASNtP3UJX8Af8yh8knJ0=; b=h6nEBHxuha8ztzYdGahWT7i5Ij OojVTzhRJcVYoccAcidN8Dt/bGgpcT0BSIJl+bgo5mnaMBNHruY/cKNcdDNNcMmoKIAH3/eycRTKY suWePSCS8aPCvPr/ZZbk75iOHYRd/RntGI6f07nYxDhL6h6yBodDP9TM6SOBYp3x8J0c=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] evtchn: build fix for Arm Message-Id: Date: Thu, 04 Jul 2024 15:11:03 +0000 commit 45c5333935628e7c80de0bd5a9d9eff50b305b16 Author: Jan Beulich AuthorDate: Thu Jul 4 16:57:29 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 16:57:29 2024 +0200 evtchn: build fix for Arm When backporting daa90dfea917 ("pirq_cleanup_check() leaks") I neglected to pay attention to it depending on 13a7b0f9f747 ("restrict concept of pIRQ to x86"). That one doesn't want backporting imo, so use / adjust custom #ifdef-ary to address the immediate issue of pirq_cleanup_check() not being available on Arm. Signed-off-by: Jan Beulich --- xen/common/event_channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index b1a6215c37..e6ec556603 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -643,7 +643,9 @@ static int evtchn_bind_pirq(evtchn_bind_pirq_t *bind) if ( rc != 0 ) { info->evtchn = 0; +#ifdef CONFIG_X86 pirq_cleanup_check(info, d); +#endif goto out; } @@ -713,8 +715,8 @@ int evtchn_close(struct domain *d1, int port1, bool guest) * The successful path of unmap_domain_pirq_emuirq() will have * called pirq_cleanup_check() already. */ -#endif pirq_cleanup_check(pirq, d1); +#endif } unlink_pirq_port(chn1, d1->vcpu[chn1->notify_vcpu_id]); break; -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 15:11:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 15:11:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753889.1162164 (Exim 4.92) (envelope-from ) id 1sPO78-0006Oe-JA; Thu, 04 Jul 2024 15:11:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753889.1162164; Thu, 04 Jul 2024 15:11:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPO78-0006OW-Gd; Thu, 04 Jul 2024 15:11:14 +0000 Received: by outflank-mailman (input) for mailman id 753889; Thu, 04 Jul 2024 15:11:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPO77-0006OM-LC for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 15:11:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPO77-0004mh-KP for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 15:11:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPO77-0008Rp-JH for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 15:11:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=qMPoGDcOVfMZubswZOaGCUEkQ1BuVVx6WIezbGjPshU=; b=jFKMpGI8bJ7xH5x4rEfkLryFL0 027PRQUAlSafYBQpx4emgVxnUF2kf0OPPf50T8lD5HwMnwuD4hf1wM0t5qEr9Z0A1bK6+DvgHr1eY X5VhUFzvCL1xkspZxP+wFD2PY1xRPcpWA15jUgPPqVwesyeHCZSPO0Y7or/ZcLRdq814=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] evtchn: build fix for Arm Message-Id: Date: Thu, 04 Jul 2024 15:11:13 +0000 commit 43d5f8f079a53ee905b3d0ccff3b871cd54a853b Author: Jan Beulich AuthorDate: Thu Jul 4 16:59:03 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 16:59:03 2024 +0200 evtchn: build fix for Arm When backporting daa90dfea917 ("pirq_cleanup_check() leaks") I neglected to pay attention to it depending on 13a7b0f9f747 ("restrict concept of pIRQ to x86"). That one doesn't want backporting imo, so use / adjust custom #ifdef-ary to address the immediate issue of pirq_cleanup_check() not being available on Arm. Signed-off-by: Jan Beulich --- xen/common/event_channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index 7eb719f0de..7b59535ee3 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -618,7 +618,9 @@ static int evtchn_bind_pirq(evtchn_bind_pirq_t *bind) if ( rc != 0 ) { info->evtchn = 0; +#ifdef CONFIG_X86 pirq_cleanup_check(info, d); +#endif goto out; } @@ -688,8 +690,8 @@ int evtchn_close(struct domain *d1, int port1, bool guest) * The successful path of unmap_domain_pirq_emuirq() will have * called pirq_cleanup_check() already. */ -#endif pirq_cleanup_check(pirq, d1); +#endif } unlink_pirq_port(chn1, d1->vcpu[chn1->notify_vcpu_id]); break; -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 18:11:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 18:11:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753952.1162229 (Exim 4.92) (envelope-from ) id 1sPQv9-0005pW-QZ; Thu, 04 Jul 2024 18:11:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753952.1162229; Thu, 04 Jul 2024 18:11:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPQv9-0005pO-Nm; Thu, 04 Jul 2024 18:11:03 +0000 Received: by outflank-mailman (input) for mailman id 753952; Thu, 04 Jul 2024 18:11:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPQv9-0005pI-B9 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 18:11:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPQv9-0000OG-8Y for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 18:11:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPQv9-0001Wj-7S for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 18:11:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=yOILiV/0C8ohEC56oh33GqxkWD3j56Fsr90KoZ3iuN0=; b=KkbOOc8qCkA8rymviRFiCJBSrF c2Si29pTahfAIsnXmTHhGFHb4Apb4YKxfZ6z3aKqO6JKCtiM7Ll+Y+fmEhiHpt+xCDMpoGVxTIoGk pu1EP9bk9iF0cA5RDlhh5NdZb9wZErsPio7DRaUtqWzwlzFyMRDVFRoIQNNNy5bKhAXI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Formalise the use of heredocs Message-Id: Date: Thu, 04 Jul 2024 18:11:03 +0000 commit aa2b6e4d8447a3bb4a538bbae430d00efb77cd8e Author: Andrew Cooper AuthorDate: Tue Jul 2 14:34:36 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 4 19:07:32 2024 +0100 CI: Formalise the use of heredocs Commit b5739330d7f4 introduced the use of heredocs in the jessie/stretch dockerfiles. It turns out this was introduced by BuildKit in 2018 along with a standardisation of Dockerfile syntax, and has subsequently been adopted by the docker community. Annotate all dockerfiles with a statement of the syntax in use, and extend README.md details including how to activate BuildKit when it's available but off by default. This allows the containers to be rebuilt following commit a0e29b316363 ("CI: Drop glibc-i386 from the build containers"). Fixes: b5739330d7f4 ("automation: fix jessie/stretch images to use archive.debian.org apt repos") Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- automation/build/README.md | 10 +++++++++- automation/build/alpine/3.18-arm64v8.dockerfile | 1 + automation/build/alpine/3.18.dockerfile | 1 + automation/build/archlinux/current-riscv64.dockerfile | 1 + automation/build/archlinux/current.dockerfile | 1 + automation/build/centos/7.dockerfile | 1 + automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile | 1 + automation/build/debian/bookworm-arm64v8.dockerfile | 1 + automation/build/debian/bookworm-cppcheck.dockerfile | 1 + automation/build/debian/bookworm-i386.dockerfile | 1 + automation/build/debian/bookworm.dockerfile | 1 + automation/build/debian/bullseye-ppc64le.dockerfile | 1 + automation/build/debian/buster-gcc-ibt.dockerfile | 1 + automation/build/debian/jessie-i386.dockerfile | 1 + automation/build/debian/jessie.dockerfile | 1 + automation/build/debian/stretch-i386.dockerfile | 1 + automation/build/debian/stretch.dockerfile | 1 + automation/build/fedora/29.dockerfile | 1 + automation/build/suse/opensuse-leap.dockerfile | 1 + automation/build/suse/opensuse-tumbleweed.dockerfile | 1 + automation/build/ubuntu/bionic.dockerfile | 1 + automation/build/ubuntu/focal.dockerfile | 1 + automation/build/ubuntu/trusty.dockerfile | 1 + automation/build/ubuntu/xenial-xilinx.dockerfile | 1 + automation/build/ubuntu/xenial.dockerfile | 1 + automation/build/yocto/yocto.dockerfile.in | 2 ++ automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile | 1 + automation/tests-artifacts/alpine/3.18.dockerfile | 1 + automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile | 1 + automation/tests-artifacts/kernel/6.1.19.dockerfile | 1 + .../qemu-system-aarch64/6.0.0-arm64v8.dockerfile | 1 + .../tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile | 1 + 32 files changed, 41 insertions(+), 1 deletion(-) diff --git a/automation/build/README.md b/automation/build/README.md index 1c040533fd..12a2b4af18 100644 --- a/automation/build/README.md +++ b/automation/build/README.md @@ -81,7 +81,14 @@ Building a container There is a makefile to make this process easier. You should be able to run `make DISTRO/VERSION` to have Docker build the container -for you. If you define the `PUSH` environment variable when running the +for you. + +Xen's dockerfiles use heredocs, which depend on the standardised dockerfile +syntax introduced by [BuiltKit]. This should work by default starting with +docker 23.0, or podman/buildah v1.33. For older versions of docker, it can be +activated with `DOCKER_BUILDKIT=1` in the environment. + +If you define the `PUSH` environment variable when running the former `make` command, it will push the container to the [registry] if you have access to do so and have your Docker logged into the registry. @@ -101,6 +108,7 @@ env CONTAINER_NO_PULL=1 \ make -C automation/build suse/opensuse-tumbleweed PUSH=1 ``` +[BuildKit]: https://docs.docker.com/build/buildkit/ [registry]: https://gitlab.com/xen-project/xen/container_registry [registry help]: https://gitlab.com/help/user/project/container_registry diff --git a/automation/build/alpine/3.18-arm64v8.dockerfile b/automation/build/alpine/3.18-arm64v8.dockerfile index 91e9022024..19fe46f841 100644 --- a/automation/build/alpine/3.18-arm64v8.dockerfile +++ b/automation/build/alpine/3.18-arm64v8.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 alpine:3.18 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/alpine/3.18.dockerfile b/automation/build/alpine/3.18.dockerfile index 8d5dac05b0..263e9e90d8 100644 --- a/automation/build/alpine/3.18.dockerfile +++ b/automation/build/alpine/3.18.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 alpine:3.18 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/archlinux/current-riscv64.dockerfile b/automation/build/archlinux/current-riscv64.dockerfile index af75b5c720..f7770bf82a 100644 --- a/automation/build/archlinux/current-riscv64.dockerfile +++ b/automation/build/archlinux/current-riscv64.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 archlinux LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/archlinux/current.dockerfile b/automation/build/archlinux/current.dockerfile index d29f1358c2..8929e9b5f0 100644 --- a/automation/build/archlinux/current.dockerfile +++ b/automation/build/archlinux/current.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 archlinux:base-devel LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/centos/7.dockerfile b/automation/build/centos/7.dockerfile index 1cdc16fc05..657550f308 100644 --- a/automation/build/centos/7.dockerfile +++ b/automation/build/centos/7.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 centos:7 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile b/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile index a05ffeac04..95b3f04283 100644 --- a/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile +++ b/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/bookworm-arm64v8.dockerfile b/automation/build/debian/bookworm-arm64v8.dockerfile index 2c432aacb7..3ab426a082 100644 --- a/automation/build/debian/bookworm-arm64v8.dockerfile +++ b/automation/build/debian/bookworm-arm64v8.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/bookworm-cppcheck.dockerfile b/automation/build/debian/bookworm-cppcheck.dockerfile index 633268376d..fe4cd4a1aa 100644 --- a/automation/build/debian/bookworm-cppcheck.dockerfile +++ b/automation/build/debian/bookworm-cppcheck.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 debian:bookworm AS builder ENV DEBIAN_FRONTEND=noninteractive diff --git a/automation/build/debian/bookworm-i386.dockerfile b/automation/build/debian/bookworm-i386.dockerfile index 89a6503385..9a54bd7293 100644 --- a/automation/build/debian/bookworm-i386.dockerfile +++ b/automation/build/debian/bookworm-i386.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/i386 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/bookworm.dockerfile b/automation/build/debian/bookworm.dockerfile index d893218fc4..bef44dd753 100644 --- a/automation/build/debian/bookworm.dockerfile +++ b/automation/build/debian/bookworm.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/bullseye-ppc64le.dockerfile b/automation/build/debian/bullseye-ppc64le.dockerfile index 6fdfb6bc2b..e166d205f3 100644 --- a/automation/build/debian/bullseye-ppc64le.dockerfile +++ b/automation/build/debian/bullseye-ppc64le.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian:bullseye-slim LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/buster-gcc-ibt.dockerfile b/automation/build/debian/buster-gcc-ibt.dockerfile index 6a3e50ef6b..ed9367aafb 100644 --- a/automation/build/debian/buster-gcc-ibt.dockerfile +++ b/automation/build/debian/buster-gcc-ibt.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian:buster-slim AS builder ENV DEBIAN_FRONTEND=noninteractive diff --git a/automation/build/debian/jessie-i386.dockerfile b/automation/build/debian/jessie-i386.dockerfile index a8dec82bb2..f6eaa94ee5 100644 --- a/automation/build/debian/jessie-i386.dockerfile +++ b/automation/build/debian/jessie-i386.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/i386 debian/eol:jessie LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/jessie.dockerfile b/automation/build/debian/jessie.dockerfile index 308675cac1..a870e743fc 100644 --- a/automation/build/debian/jessie.dockerfile +++ b/automation/build/debian/jessie.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian/eol:jessie LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/stretch-i386.dockerfile b/automation/build/debian/stretch-i386.dockerfile index da93fed8ea..ad8db692aa 100644 --- a/automation/build/debian/stretch-i386.dockerfile +++ b/automation/build/debian/stretch-i386.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/i386 debian:stretch LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile index 59794ed467..4dfd40b542 100644 --- a/automation/build/debian/stretch.dockerfile +++ b/automation/build/debian/stretch.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian:stretch LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/fedora/29.dockerfile b/automation/build/fedora/29.dockerfile index f473ae13e7..08edf70838 100644 --- a/automation/build/fedora/29.dockerfile +++ b/automation/build/fedora/29.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 fedora:29 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/suse/opensuse-leap.dockerfile b/automation/build/suse/opensuse-leap.dockerfile index 3ef33458a0..28d3338812 100644 --- a/automation/build/suse/opensuse-leap.dockerfile +++ b/automation/build/suse/opensuse-leap.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 opensuse/leap LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/suse/opensuse-tumbleweed.dockerfile b/automation/build/suse/opensuse-tumbleweed.dockerfile index a793601c87..077fed2226 100644 --- a/automation/build/suse/opensuse-tumbleweed.dockerfile +++ b/automation/build/suse/opensuse-tumbleweed.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 opensuse/tumbleweed LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/ubuntu/bionic.dockerfile b/automation/build/ubuntu/bionic.dockerfile index 910d3c4b53..cc43fc4ade 100644 --- a/automation/build/ubuntu/bionic.dockerfile +++ b/automation/build/ubuntu/bionic.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 ubuntu:18.04 LABEL maintainer.name="The Xen Project " \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/ubuntu/focal.dockerfile b/automation/build/ubuntu/focal.dockerfile index 078abd56d5..cb8bb2f6fa 100644 --- a/automation/build/ubuntu/focal.dockerfile +++ b/automation/build/ubuntu/focal.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 ubuntu:20.04 LABEL maintainer.name="The Xen Project " \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/ubuntu/trusty.dockerfile b/automation/build/ubuntu/trusty.dockerfile index 8bd8c085a7..e2a1bda7c3 100644 --- a/automation/build/ubuntu/trusty.dockerfile +++ b/automation/build/ubuntu/trusty.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 ubuntu:14.04 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/ubuntu/xenial-xilinx.dockerfile b/automation/build/ubuntu/xenial-xilinx.dockerfile index 49f27b3229..f03d62e8bd 100644 --- a/automation/build/ubuntu/xenial-xilinx.dockerfile +++ b/automation/build/ubuntu/xenial-xilinx.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 ubuntu:16.04 LABEL maintainer.name="The Xen Project " \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/ubuntu/xenial.dockerfile b/automation/build/ubuntu/xenial.dockerfile index f6296d3292..168bc70ffa 100644 --- a/automation/build/ubuntu/xenial.dockerfile +++ b/automation/build/ubuntu/xenial.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 ubuntu:16.04 LABEL maintainer.name="The Xen Project " \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/yocto/yocto.dockerfile.in b/automation/build/yocto/yocto.dockerfile.in index b0892d4203..fbaa4e191c 100644 --- a/automation/build/yocto/yocto.dockerfile.in +++ b/automation/build/yocto/yocto.dockerfile.in @@ -1,3 +1,5 @@ +# syntax=docker/dockerfile:1 + # Docker file to create an environment to build yocto with virtualization # # Arguments that can be passed during image creation using --build-arg: diff --git a/automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile b/automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile index 0e5ae7f2b4..a4542f7039 100644 --- a/automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile +++ b/automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 alpine:3.18 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/tests-artifacts/alpine/3.18.dockerfile b/automation/tests-artifacts/alpine/3.18.dockerfile index 9cde6c9ad4..311a92889b 100644 --- a/automation/tests-artifacts/alpine/3.18.dockerfile +++ b/automation/tests-artifacts/alpine/3.18.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 alpine:3.18 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile b/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile index b0875ca0dd..22359c9066 100644 --- a/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile +++ b/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/tests-artifacts/kernel/6.1.19.dockerfile b/automation/tests-artifacts/kernel/6.1.19.dockerfile index 021bde26c7..5cf53d290c 100644 --- a/automation/tests-artifacts/kernel/6.1.19.dockerfile +++ b/automation/tests-artifacts/kernel/6.1.19.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dockerfile b/automation/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dockerfile index fb7b7b506e..e9f5576be7 100644 --- a/automation/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dockerfile +++ b/automation/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile b/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile index 65857147bf..e28d686492 100644 --- a/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile +++ b/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian:bullseye-slim LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 04 18:11:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 04 Jul 2024 18:11:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.753953.1162233 (Exim 4.92) (envelope-from ) id 1sPQvJ-0005s3-TL; Thu, 04 Jul 2024 18:11:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 753953.1162233; Thu, 04 Jul 2024 18:11:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPQvJ-0005rv-Ql; Thu, 04 Jul 2024 18:11:13 +0000 Received: by outflank-mailman (input) for mailman id 753953; Thu, 04 Jul 2024 18:11:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPQvJ-0005rp-Cr for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 18:11:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPQvJ-0000OV-C1 for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 18:11:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPQvJ-0001XT-Ai for xen-changelog@lists.xenproject.org; Thu, 04 Jul 2024 18:11:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=0DXMZk4J7cr3lzjvPNaS4kOuj94OdoLwGksggiYs4Ho=; b=7MiDfR0Bxie4yr+iNMdT0BzpmR ApDFpjMUVvD1+4ZgBafkANiyAr6yXNx9imQ9/lPhCQ/PmHeYzJELdvJWqJ9HfOEPNRGgIoCr1fUJI Qxi0WUCH8DY5RCT8KR2wk1zkWbGXSLKzOBp89e+haxFb9Zx4b/FiZ5jo3zyhIpfItg1k=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Adjust the usage of inline files Message-Id: Date: Thu, 04 Jul 2024 18:11:13 +0000 commit 7878756565427b310b0307c0aa3f6d682133e1d1 Author: Andrew Cooper AuthorDate: Wed Jul 3 14:08:29 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 4 19:07:35 2024 +0100 CI: Adjust the usage of inline files As per: https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/reference.md#here-documents For inline files, use COPY with a heredoc, rather than opencoding it through /bin/sh. No practical change. Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- automation/build/debian/jessie-i386.dockerfile | 2 +- automation/build/debian/jessie.dockerfile | 2 +- automation/build/debian/stretch-i386.dockerfile | 2 +- automation/build/debian/stretch.dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/automation/build/debian/jessie-i386.dockerfile b/automation/build/debian/jessie-i386.dockerfile index f6eaa94ee5..1eb7ff11c7 100644 --- a/automation/build/debian/jessie-i386.dockerfile +++ b/automation/build/debian/jessie-i386.dockerfile @@ -12,7 +12,7 @@ WORKDIR /build ENTRYPOINT ["linux32"] # replace repos in archive as release is EOL -RUN cat <<"END" > /etc/apt/sources.list +COPY <<"END" /etc/apt/sources.list deb http://archive.debian.org/debian/ jessie main contrib non-free deb http://archive.debian.org/debian/ jessie-backports main contrib non-free deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free diff --git a/automation/build/debian/jessie.dockerfile b/automation/build/debian/jessie.dockerfile index a870e743fc..4c0ffe66f8 100644 --- a/automation/build/debian/jessie.dockerfile +++ b/automation/build/debian/jessie.dockerfile @@ -10,7 +10,7 @@ RUN mkdir /build WORKDIR /build # replace repos in archive as release is EOL -RUN cat <<"END" > /etc/apt/sources.list +COPY <<"END" /etc/apt/sources.list deb http://archive.debian.org/debian/ jessie main contrib non-free deb http://archive.debian.org/debian/ jessie-backports main contrib non-free deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free diff --git a/automation/build/debian/stretch-i386.dockerfile b/automation/build/debian/stretch-i386.dockerfile index ad8db692aa..8ec9c3a246 100644 --- a/automation/build/debian/stretch-i386.dockerfile +++ b/automation/build/debian/stretch-i386.dockerfile @@ -12,7 +12,7 @@ WORKDIR /build ENTRYPOINT ["linux32"] # replace repos in archive as release is EOL -RUN cat <<"END" > /etc/apt/sources.list +COPY <<"END" /etc/apt/sources.list deb http://archive.debian.org/debian/ stretch main contrib non-free deb http://archive.debian.org/debian/ stretch-backports main contrib non-free deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile index 4dfd40b542..2db4552662 100644 --- a/automation/build/debian/stretch.dockerfile +++ b/automation/build/debian/stretch.dockerfile @@ -10,7 +10,7 @@ RUN mkdir /build WORKDIR /build # replace repos in archive as release is EOL -RUN cat <<"END" > /etc/apt/sources.list +COPY <<"END" /etc/apt/sources.list deb http://archive.debian.org/debian/ stretch main contrib non-free deb http://archive.debian.org/debian/ stretch-backports main contrib non-free deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:33:12 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:33:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754240.1162549 (Exim 4.92) (envelope-from ) id 1sPhBW-0000IW-Lv; Fri, 05 Jul 2024 11:33:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754240.1162549; Fri, 05 Jul 2024 11:33:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhBW-0000IA-IR; Fri, 05 Jul 2024 11:33:02 +0000 Received: by outflank-mailman (input) for mailman id 754240; Fri, 05 Jul 2024 11:33:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhBW-0000I2-6J for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhBW-00071h-2y for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhBW-0004iG-1Q for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=PF/V1uOMtb4reg4Gh0OTfwrIT8U443cZY3WsXR6uDbo=; b=DIkChFEu92mnILzwV2F0uhDL1t o9qEVGW+/nIs7WtOouv3AAUa3iHjXGZ1ok5piYtpbF/qyn3P7DRWkZ4F5WkauqXUqcXQOtXUvN5pM sKQvaYmHqdoj22fVfyswbfTT4rDPTdHcDGLl+x0ZMxZqY20kVOK9aSR5YXifDZFtIrM0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] x86: re-run exception-from-stub recovery selftests with CET-SS enabled Message-Id: Date: Fri, 05 Jul 2024 11:33:02 +0000 commit 5ac3cbbf83e1f955aeaf5d0f503099f5249b5c25 Author: Jan Beulich AuthorDate: Thu Jul 4 14:06:19 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:06:19 2024 +0200 x86: re-run exception-from-stub recovery selftests with CET-SS enabled On the BSP, shadow stacks are enabled only relatively late in the booting process. They in particular aren't active yet when initcalls are run. Keep the testing there, but invoke that testing a 2nd time when shadow stacks are active, to make sure we won't regress that case after addressing XSA-451. While touching this code, switch the guard from NDEBUG to CONFIG_DEBUG, such that IS_ENABLED() can validly be used at the new call site. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper master commit: cfe3ad67127b86e1b1c06993b86422673a51b050 master date: 2024-02-27 13:49:52 +0100 --- xen/arch/x86/extable.c | 8 +++++--- xen/arch/x86/include/asm/setup.h | 2 ++ xen/arch/x86/setup.c | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/extable.c b/xen/arch/x86/extable.c index 8ffcd346d7..12cc9935d8 100644 --- a/xen/arch/x86/extable.c +++ b/xen/arch/x86/extable.c @@ -128,10 +128,11 @@ search_exception_table(const struct cpu_user_regs *regs, unsigned long *stub_ra) return 0; } -#ifndef NDEBUG +#ifdef CONFIG_DEBUG +#include #include -static int __init cf_check stub_selftest(void) +int __init cf_check stub_selftest(void) { static const struct { uint8_t opc[8]; @@ -155,7 +156,8 @@ static int __init cf_check stub_selftest(void) unsigned int i; bool fail = false; - printk("Running stub recovery selftests...\n"); + printk("%s stub recovery selftests...\n", + system_state < SYS_STATE_active ? "Running" : "Re-running"); for ( i = 0; i < ARRAY_SIZE(tests); ++i ) { diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/setup.h index 9a460e4db8..14d15048eb 100644 --- a/xen/arch/x86/include/asm/setup.h +++ b/xen/arch/x86/include/asm/setup.h @@ -38,6 +38,8 @@ void *bootstrap_map(const module_t *mod); int xen_in_range(unsigned long mfn); +int cf_check stub_selftest(void); + extern uint8_t kbd_shift_flags; #ifdef NDEBUG diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 25017b5d96..f2592c3dc9 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -738,6 +738,10 @@ static void noreturn init_done(void) system_state = SYS_STATE_active; + /* Re-run stub recovery self-tests with CET-SS active. */ + if ( IS_ENABLED(CONFIG_DEBUG) && cpu_has_xen_shstk ) + stub_selftest(); + domain_unpause_by_systemcontroller(dom0); /* MUST be done prior to removing .init data. */ -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:33:12 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:33:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754241.1162552 (Exim 4.92) (envelope-from ) id 1sPhBg-0000KD-Ma; Fri, 05 Jul 2024 11:33:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754241.1162552; Fri, 05 Jul 2024 11:33:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhBg-0000K5-Js; Fri, 05 Jul 2024 11:33:12 +0000 Received: by outflank-mailman (input) for mailman id 754241; Fri, 05 Jul 2024 11:33:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhBg-0000Jp-7N for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhBg-00071l-6c for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhBg-0004iy-58 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=pX8/mCfFwdKK7aIyv3ncL2dp3J8xKMr3G3nfw88TqLk=; b=2FAuXQuhkz+1srZH7cP22vCF/o j8D9OBXij+bbNygSUCgud4ugyC1u53WRBHpzoEfEm0Ue378aMj96zxJ9qHw56oeFbuXJaTHB7H1yh 9Tzg37iuft7h51G65odpRpnn6liwjKY4dVg/+F5np9GXNNWAq3C+0Q2LT5TEIxw76LDw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] tools/tests: don't let test-xenstore write nodes exceeding default size Message-Id: Date: Fri, 05 Jul 2024 11:33:12 +0000 commit 0ebfa35965257343ba3d8377be91ad8512a9c749 Author: Juergen Gross AuthorDate: Thu Jul 4 14:06:54 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:06:54 2024 +0200 tools/tests: don't let test-xenstore write nodes exceeding default size Today test-xenstore will write nodes with 3000 bytes node data. This size is exceeding the default quota for the allowed node size. While working in dom0 with C-xenstored, OCAML-xenstored does not like that. Use a size of 2000 instead, which is lower than the allowed default node size of 2048. Fixes: 3afc5e4a5b75 ("tools/tests: add xenstore testing framework") Signed-off-by: Juergen Gross Acked-by: Andrew Cooper master commit: 642005e310483c490b0725fab4672f2b77fdf2ba master date: 2024-05-02 18:15:31 +0100 --- tools/tests/xenstore/test-xenstore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tests/xenstore/test-xenstore.c b/tools/tests/xenstore/test-xenstore.c index d491dac53b..73a7011d21 100644 --- a/tools/tests/xenstore/test-xenstore.c +++ b/tools/tests/xenstore/test-xenstore.c @@ -408,9 +408,9 @@ static int test_ta3_deinit(uintptr_t par) #define TEST(s, f, p, l) { s, f ## _init, f, f ## _deinit, (uintptr_t)(p), l } struct test tests[] = { TEST("read 1", test_read, 1, "Read node with 1 byte data"), -TEST("read 3000", test_read, 3000, "Read node with 3000 bytes data"), +TEST("read 2000", test_read, 2000, "Read node with 2000 bytes data"), TEST("write 1", test_write, 1, "Write node with 1 byte data"), -TEST("write 3000", test_write, 3000, "Write node with 3000 bytes data"), +TEST("write 2000", test_write, 2000, "Write node with 2000 bytes data"), TEST("dir", test_dir, 0, "List directory"), TEST("rm node", test_rm, 0, "Remove single node"), TEST("rm dir", test_rm, WRITE_BUFFERS_N, "Remove node with sub-nodes"), -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:33:22 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:33:22 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754242.1162556 (Exim 4.92) (envelope-from ) id 1sPhBq-0000ND-O9; Fri, 05 Jul 2024 11:33:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754242.1162556; Fri, 05 Jul 2024 11:33:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhBq-0000N6-LI; Fri, 05 Jul 2024 11:33:22 +0000 Received: by outflank-mailman (input) for mailman id 754242; Fri, 05 Jul 2024 11:33:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhBq-0000Ms-AH for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhBq-00071x-9a for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhBq-0004jg-8g for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=9m9pNTM/05u1V4ynUAygPQEnn6meDEwn8LsdJiTui/8=; b=EYh6LwfqNlbVlflQ1lj0enPiPy 2skHy8aTtXkcQsmND/TgLWyKRqHa0ZmK+BXwCGmLTmF5BkR4WLtRwk5b2i001LMvdyhgirUtqROFh D/e4wXraLys8fBTf3zjzn5ZihQSIE1aNV0todOxDIJnJXO3NFK8i4L9ov45s95gBk8ww=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] tools/tests: let test-xenstore exit with non-0 status in case of error Message-Id: Date: Fri, 05 Jul 2024 11:33:22 +0000 commit 22f623622cc60571be9cccc323a1d17749683667 Author: Juergen Gross AuthorDate: Thu Jul 4 14:07:12 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:07:12 2024 +0200 tools/tests: let test-xenstore exit with non-0 status in case of error In case a test is failing in test-xenstore, let the tool exit with an exit status other than 0. Fix a typo in an error message. Reported-by: Andrew Cooper Fixes: 3afc5e4a5b75 ("tools/tests: add xenstore testing framework") Signed-off-by: Juergen Gross master commit: 2d4ba205591ba64f31149ae31051678159ee9e11 master date: 2024-05-02 18:15:46 +0100 --- tools/tests/xenstore/test-xenstore.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/tests/xenstore/test-xenstore.c b/tools/tests/xenstore/test-xenstore.c index 73a7011d21..7a9bd9afb3 100644 --- a/tools/tests/xenstore/test-xenstore.c +++ b/tools/tests/xenstore/test-xenstore.c @@ -506,14 +506,14 @@ int main(int argc, char *argv[]) stop = time(NULL) + randtime; srandom((unsigned int)stop); - while ( time(NULL) < stop ) + while ( time(NULL) < stop && !ret ) { t = random() % ARRAY_SIZE(tests); ret = call_test(tests + t, iters, true); } } else - for ( t = 0; t < ARRAY_SIZE(tests); t++ ) + for ( t = 0; t < ARRAY_SIZE(tests) && !ret; t++ ) { if ( !test || !strcmp(test, tests[t].name) ) ret = call_test(tests + t, iters, false); @@ -525,10 +525,10 @@ int main(int argc, char *argv[]) xs_close(xsh); if ( ta_loops ) - printf("Exhaustive transaction retries (%d) occurrred %d times.\n", + printf("Exhaustive transaction retries (%d) occurred %d times.\n", MAX_TA_LOOPS, ta_loops); - return 0; + return ret ? 3 : 0; } /* -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:33:33 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:33:33 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754243.1162560 (Exim 4.92) (envelope-from ) id 1sPhC1-0000QK-PW; Fri, 05 Jul 2024 11:33:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754243.1162560; Fri, 05 Jul 2024 11:33:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhC1-0000QD-Mm; Fri, 05 Jul 2024 11:33:33 +0000 Received: by outflank-mailman (input) for mailman id 754243; Fri, 05 Jul 2024 11:33:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhC0-0000Pr-DT for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhC0-00072P-Ck for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhC0-0004kM-Bh for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=2iwiT+ye5I2JwHizTwSbA/lEIdSB27t4B31W5Co0adM=; b=va6ETWKaLxjDRmGNb2CcHUiGSv QY7zC+Q3aKAxlMC9R0uN6bNap8qklk9mOOJ+YylLQ+mzoRRq54Vh3MLmhN4EK2z5BXswqPYQjAmgo YIDi8L5noYI2RGAVnupI+/JJaS6nVk+nhxABkIIqBMMkgxBNuU+AfRC5t65+hvicRhec=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] LICENSES: Add MIT-0 (MIT No Attribution) Message-Id: Date: Fri, 05 Jul 2024 11:33:32 +0000 commit 75b4f9474a1aa33a6f9e0986b51c390f9b38ae5a Author: Andrew Cooper AuthorDate: Thu Jul 4 14:08:11 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:08:11 2024 +0200 LICENSES: Add MIT-0 (MIT No Attribution) We are about to import code licensed under MIT-0. It's compatible for us to use, so identify it as a permitted license. Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini Acked-by: Christian Lindig master commit: 219cdff3fb7b4a03ab14869584f111e0f623b330 master date: 2024-05-23 15:04:40 +0100 --- LICENSES/MIT-0 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/LICENSES/MIT-0 b/LICENSES/MIT-0 new file mode 100644 index 0000000000..70fb90ee34 --- /dev/null +++ b/LICENSES/MIT-0 @@ -0,0 +1,31 @@ +Valid-License-Identifier: MIT-0 + +SPDX-URL: https://spdx.org/licenses/MIT-0.html + +Usage-Guide: + + To use the MIT-0 License put the following SPDX tag/value pair into a + comment according to the placement guidelines in the licensing rules + documentation: + SPDX-License-Identifier: MIT-0 + +License-Text: + +MIT No Attribution + +Copyright + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:33:43 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:33:43 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754244.1162563 (Exim 4.92) (envelope-from ) id 1sPhCB-0000Sd-Qw; Fri, 05 Jul 2024 11:33:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754244.1162563; Fri, 05 Jul 2024 11:33:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCB-0000SV-OI; Fri, 05 Jul 2024 11:33:43 +0000 Received: by outflank-mailman (input) for mailman id 754244; Fri, 05 Jul 2024 11:33:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCA-0000SL-Gd for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCA-00072W-Ft for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhCA-0004l8-Ev for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=SjI7sPval4qDfpCZ8HDEbGdWC68kYpa3hlu6ws0hemA=; b=e4FDCX8uT4pjDLbC41E0D73OTO OPr1kMR4WpHTUgxDxBOrmXPRF5q2sUAnvgCmAXiz9AUWdUzer1zgIhuy50FSqjtp4CBk/fQxGZash 7M3ICE5Hmk6Dn8H7zduXZ8Nv8/IP5oo7ye2VUizwWk8HVMfjFGJmrWDw9ld3ys3WDecI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] tools: Import stand-alone sd_notify() implementation from systemd Message-Id: Date: Fri, 05 Jul 2024 11:33:42 +0000 commit 1743102a92479834c8e17b20697129e05b7c8313 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:10:10 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:10:10 2024 +0200 tools: Import stand-alone sd_notify() implementation from systemd ... in order to avoid linking against the whole of libsystemd. Only minimal changes to the upstream copy, to function as a drop-in replacement for sd_notify() and as a header-only library. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Christian Lindig master commit: 78510f3a1522f2856330ffa429e0e35f8aab4277 master date: 2024-05-23 15:04:40 +0100 master commit: 78510f3a1522f2856330ffa429e0e35f8aab4277 master date: 2024-05-23 15:04:40 +0100 --- tools/include/xen-sd-notify.h | 98 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/tools/include/xen-sd-notify.h b/tools/include/xen-sd-notify.h new file mode 100644 index 0000000000..28c9b20f15 --- /dev/null +++ b/tools/include/xen-sd-notify.h @@ -0,0 +1,98 @@ +/* SPDX-License-Identifier: MIT-0 */ + +/* + * Implement the systemd notify protocol without external dependencies. + * Supports both readiness notification on startup and on reloading, + * according to the protocol defined at: + * https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html + * This protocol is guaranteed to be stable as per: + * https://systemd.io/PORTABILITY_AND_STABILITY/ + * + * Differences from the upstream copy: + * - Rename/rework as a drop-in replacement for systemd/sd-daemon.h + * - Only take the subset Xen cares about + * - Respect -Wdeclaration-after-statement + */ + +#ifndef XEN_SD_NOTIFY +#define XEN_SD_NOTIFY + +#include +#include +#include +#include +#include +#include + +static inline void xen_sd_closep(int *fd) { + if (!fd || *fd < 0) + return; + + close(*fd); + *fd = -1; +} + +static inline int xen_sd_notify(const char *message) { + union sockaddr_union { + struct sockaddr sa; + struct sockaddr_un sun; + } socket_addr = { + .sun.sun_family = AF_UNIX, + }; + size_t path_length, message_length; + ssize_t written; + const char *socket_path; + int __attribute__((cleanup(xen_sd_closep))) fd = -1; + + /* Verify the argument first */ + if (!message) + return -EINVAL; + + message_length = strlen(message); + if (message_length == 0) + return -EINVAL; + + /* If the variable is not set, the protocol is a noop */ + socket_path = getenv("NOTIFY_SOCKET"); + if (!socket_path) + return 0; /* Not set? Nothing to do */ + + /* Only AF_UNIX is supported, with path or abstract sockets */ + if (socket_path[0] != '/' && socket_path[0] != '@') + return -EAFNOSUPPORT; + + path_length = strlen(socket_path); + /* Ensure there is room for NUL byte */ + if (path_length >= sizeof(socket_addr.sun.sun_path)) + return -E2BIG; + + memcpy(socket_addr.sun.sun_path, socket_path, path_length); + + /* Support for abstract socket */ + if (socket_addr.sun.sun_path[0] == '@') + socket_addr.sun.sun_path[0] = 0; + + fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0); + if (fd < 0) + return -errno; + + if (connect(fd, &socket_addr.sa, offsetof(struct sockaddr_un, sun_path) + path_length) != 0) + return -errno; + + written = write(fd, message, message_length); + if (written != (ssize_t) message_length) + return written < 0 ? -errno : -EPROTO; + + return 1; /* Notified! */ +} + +static inline int sd_notify(int unset_environment, const char *message) { + int r = xen_sd_notify(message); + + if (unset_environment) + unsetenv("NOTIFY_SOCKET"); + + return r; +} + +#endif /* XEN_SD_NOTIFY */ -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:33:53 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:33:53 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754245.1162568 (Exim 4.92) (envelope-from ) id 1sPhCL-0000VA-Sk; Fri, 05 Jul 2024 11:33:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754245.1162568; Fri, 05 Jul 2024 11:33:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCL-0000V2-Pq; Fri, 05 Jul 2024 11:33:53 +0000 Received: by outflank-mailman (input) for mailman id 754245; Fri, 05 Jul 2024 11:33:52 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCK-0000Us-KW for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:52 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCK-00072j-J6 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:52 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhCK-0004ld-IF for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:33:52 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=03FTlqpuxenyecKEf3DbSapTyxv0Q+Sq5oNqd0yDJQc=; b=zpaMGfmoFXB60ZivrsONon1G96 6H93hu+RXWBctsjVhOfqcMphfredYiOLYcVvVjA9ddykxo87R4hVoKoL+aam7pNM1N/UgeUJMCjdr Qr9G+4YWBfJqjUANIa/7CeUEBJWrwm6pFMIQL/kKEgWdBb0hS2eUVpClD4lGYgR2XuQ0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] tools/{c,o}xenstored: Don't link against libsystemd Message-Id: Date: Fri, 05 Jul 2024 11:33:52 +0000 commit 77cf215157d267a7776f3c4ec32e89064dcd84cd Author: Andrew Cooper AuthorDate: Thu Jul 4 14:10:29 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:10:29 2024 +0200 tools/{c,o}xenstored: Don't link against libsystemd Use the local freestanding wrapper instead. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Christian Lindig master commit: caf864482689a5dd6a945759b6372bb260d49665 master date: 2024-05-23 15:04:40 +0100 --- tools/ocaml/xenstored/Makefile | 3 +-- tools/ocaml/xenstored/systemd_stubs.c | 2 +- tools/xenstored/Makefile | 5 ----- tools/xenstored/core.c | 4 ++-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile index e8aaecf2e6..fa45305d8c 100644 --- a/tools/ocaml/xenstored/Makefile +++ b/tools/ocaml/xenstored/Makefile @@ -4,8 +4,7 @@ include $(OCAML_TOPLEVEL)/common.make # Include configure output (config.h) CFLAGS += -include $(XEN_ROOT)/tools/config.h -CFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_CFLAGS) -LDFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_LIBS) +CFLAGS-$(CONFIG_SYSTEMD) += $(CFLAGS_xeninclude) CFLAGS += $(CFLAGS-y) CFLAGS += $(APPEND_CFLAGS) diff --git a/tools/ocaml/xenstored/systemd_stubs.c b/tools/ocaml/xenstored/systemd_stubs.c index f4c875075a..7dbbdd35bf 100644 --- a/tools/ocaml/xenstored/systemd_stubs.c +++ b/tools/ocaml/xenstored/systemd_stubs.c @@ -25,7 +25,7 @@ #if defined(HAVE_SYSTEMD) -#include +#include CAMLprim value ocaml_sd_notify_ready(value ignore) { diff --git a/tools/xenstored/Makefile b/tools/xenstored/Makefile index e0897ed1ba..09adfe1d50 100644 --- a/tools/xenstored/Makefile +++ b/tools/xenstored/Makefile @@ -9,11 +9,6 @@ xenstored: LDLIBS += $(LDLIBS_libxenctrl) xenstored: LDLIBS += -lrt xenstored: LDLIBS += $(SOCKET_LIBS) -ifeq ($(CONFIG_SYSTEMD),y) -$(XENSTORED_OBJS-y): CFLAGS += $(SYSTEMD_CFLAGS) -xenstored: LDLIBS += $(SYSTEMD_LIBS) -endif - TARGETS := xenstored .PHONY: all diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c index edd07711db..dfe98e7bfc 100644 --- a/tools/xenstored/core.c +++ b/tools/xenstored/core.c @@ -61,7 +61,7 @@ #endif #if defined(XEN_SYSTEMD_ENABLED) -#include +#include #endif extern xenevtchn_handle *xce_handle; /* in domain.c */ @@ -3000,7 +3000,7 @@ int main(int argc, char *argv[]) #if defined(XEN_SYSTEMD_ENABLED) if (!live_update) { sd_notify(1, "READY=1"); - fprintf(stderr, SD_NOTICE "xenstored is ready\n"); + fprintf(stderr, "xenstored is ready\n"); } #endif -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:34:04 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:34:04 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754246.1162572 (Exim 4.92) (envelope-from ) id 1sPhCV-0000YJ-Ve; Fri, 05 Jul 2024 11:34:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754246.1162572; Fri, 05 Jul 2024 11:34:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCV-0000YC-Sj; Fri, 05 Jul 2024 11:34:03 +0000 Received: by outflank-mailman (input) for mailman id 754246; Fri, 05 Jul 2024 11:34:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCU-0000Y1-NL for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCU-000734-Mc for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhCU-0004ml-Le for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=m4KptzcpmfU470R1/1p7omNKq935BJOsXU1vukT2GxU=; b=Oq4zHE5PA9zW9kmIonJUOKOlb5 kFUU1SK2DICk3cgPDE8cNmAwopoGqEQOHmrYHev8B/xTBD19DudIBpbHZxy3OD72t0dXQSVIWQhpZ t9zsJ8CU+QQwt7rJz+C6CPTyPzlcaVQ97zUAKx2KLthfWAZpidUjFnwmEm8NKn9pfiaA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] tools: Drop libsystemd as a dependency Message-Id: Date: Fri, 05 Jul 2024 11:34:02 +0000 commit 7967bd358e93ed83e01813a8d0dfd68aa67f5780 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:10:40 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:10:40 2024 +0200 tools: Drop libsystemd as a dependency There are no more users, and we want to disuade people from introducing new users just for sd_notify() and friends. Drop the dependency. We still want the overall --with{,out}-systemd to gate the generation of the service/unit/mount/etc files. Rerun autogen.sh, and mark the dependency as removed in the build containers. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Christian Lindig tools: (Actually) drop libsystemd as a dependency When reinstating some of systemd.m4 between v1 and v2, I reintroduced a little too much. While {c,o}xenstored are indeed no longer linked against libsystemd, ./configure still looks for it. Drop this too. Fixes: ae26101f6bfc ("tools: Drop libsystemd as a dependency") Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné master commit: ae26101f6bfc8185adcdb9165d469bdc467780db master date: 2024-05-23 15:04:40 +0100 master commit: 6ef4fa1e7fe78c1dae07b451292b07facfce4902 master date: 2024-05-30 12:15:25 +0100 --- CHANGELOG.md | 7 +- config/Tools.mk.in | 2 - m4/systemd.m4 | 17 -- tools/configure | 485 +---------------------------------------------------- 4 files changed, 7 insertions(+), 504 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa54d59df1..ceca12eb5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,12 @@ Notable changes to Xen will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [4.18.2](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.18.2) +## [4.18.3](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.18.3) + +### Changed + - When building with Systemd support (./configure --enable-systemd), remove + libsystemd as a build dependency. Systemd Notify support is retained, now + using a standalone library implementation. ## [4.18.1](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.18.1) diff --git a/config/Tools.mk.in b/config/Tools.mk.in index b54ab21f96..50fbef841f 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -52,8 +52,6 @@ CONFIG_PYGRUB := @pygrub@ CONFIG_LIBFSIMAGE := @libfsimage@ CONFIG_SYSTEMD := @systemd@ -SYSTEMD_CFLAGS := @SYSTEMD_CFLAGS@ -SYSTEMD_LIBS := @SYSTEMD_LIBS@ XEN_SYSTEMD_DIR := @SYSTEMD_DIR@ XEN_SYSTEMD_MODULES_LOAD := @SYSTEMD_MODULES_LOAD@ CONFIG_9PFS := @ninepfs@ diff --git a/m4/systemd.m4 b/m4/systemd.m4 index 112dc11b5e..ab12ea313d 100644 --- a/m4/systemd.m4 +++ b/m4/systemd.m4 @@ -41,15 +41,6 @@ AC_DEFUN([AX_ALLOW_SYSTEMD_OPTS], [ ]) AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ - PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon],, - [PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209])] - ) - dnl pkg-config older than 0.24 does not set these for - dnl PKG_CHECK_MODULES() worth also noting is that as of version 208 - dnl of systemd pkg-config --cflags currently yields no extra flags yet. - AC_SUBST([SYSTEMD_CFLAGS]) - AC_SUBST([SYSTEMD_LIBS]) - AS_IF([test "x$SYSTEMD_DIR" = x], [ dnl In order to use the line below we need to fix upstream systemd dnl to properly ${prefix} for child variables in @@ -95,13 +86,6 @@ AC_DEFUN([AX_CHECK_SYSTEMD], [ ],[systemd=n]) ]) -AC_DEFUN([AX_CHECK_SYSTEMD_ENABLE_AVAILABLE], [ - PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon], [systemd="y"],[ - PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], - [systemd="y"],[systemd="n"]) - ]) -]) - dnl Enables systemd by default and requires a --disable-systemd option flag dnl to configure if you want to disable. AC_DEFUN([AX_ENABLE_SYSTEMD], [ @@ -121,6 +105,5 @@ dnl to have systemd build libraries it will be enabled. You can always force dnl disable with --disable-systemd AC_DEFUN([AX_AVAILABLE_SYSTEMD], [ AX_ALLOW_SYSTEMD_OPTS() - AX_CHECK_SYSTEMD_ENABLE_AVAILABLE() AX_CHECK_SYSTEMD() ]) diff --git a/tools/configure b/tools/configure index 38c0808d3a..7bb935d23b 100755 --- a/tools/configure +++ b/tools/configure @@ -626,8 +626,6 @@ ac_subst_vars='LTLIBOBJS LIBOBJS pvshim ninepfs -SYSTEMD_LIBS -SYSTEMD_CFLAGS SYSTEMD_MODULES_LOAD SYSTEMD_DIR systemd @@ -864,9 +862,7 @@ pixman_LIBS libzstd_CFLAGS libzstd_LIBS LIBNL3_CFLAGS -LIBNL3_LIBS -SYSTEMD_CFLAGS -SYSTEMD_LIBS' +LIBNL3_LIBS' # Initialize some variables set by options. @@ -1621,10 +1617,6 @@ Some influential environment variables: LIBNL3_CFLAGS C compiler flags for LIBNL3, overriding pkg-config LIBNL3_LIBS linker flags for LIBNL3, overriding pkg-config - SYSTEMD_CFLAGS - C compiler flags for SYSTEMD, overriding pkg-config - SYSTEMD_LIBS - linker flags for SYSTEMD, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -3889,8 +3881,6 @@ esac - - @@ -9540,223 +9530,6 @@ fi - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - systemd="n" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - systemd="n" -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - systemd="y" -fi - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - systemd="n" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - systemd="n" -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - systemd="y" -fi - -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - systemd="y" -fi - - if test "x$enable_systemd" != "xno"; then : if test "x$systemd" = "xy" ; then : @@ -9766,262 +9539,6 @@ $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h systemd=y - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libsystemd >= 209) were not met: - -$SYSTEMD_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libsystemd >= 209) were not met: - -$SYSTEMD_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - - - if test "x$SYSTEMD_DIR" = x; then : SYSTEMD_DIR="\$(prefix)/lib/systemd/system/" -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:34:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:34:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754247.1162576 (Exim 4.92) (envelope-from ) id 1sPhCg-0000aZ-0u; Fri, 05 Jul 2024 11:34:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754247.1162576; Fri, 05 Jul 2024 11:34:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCf-0000aR-UP; Fri, 05 Jul 2024 11:34:13 +0000 Received: by outflank-mailman (input) for mailman id 754247; Fri, 05 Jul 2024 11:34:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCe-0000aD-QD for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCe-00074i-PZ for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhCe-0004o4-Or for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=4ZypR4tmR28/9f0NDwtQJaLekFJGjPi4evlObY+uuZk=; b=vSdedKHWahUqOALruaU8+Ygu4c ntmBoottR9ww1wwTWEpMD30yagfq77roi86rQDH111pUYjovSzsOi0GMPQvjysrxAcXdKWtlkdVDk 7K0npUoBoLp/FaDpA69WbGMZ1rnAwBmooKKwGfG+otFoUxUOCz6BAelFIQE70dk48f8s=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] x86/ioapic: Fix signed shifts in io_apic.c Message-Id: Date: Fri, 05 Jul 2024 11:34:12 +0000 commit 0dc5fbee17cd2bcb1aa6a1cf420dd80381587de8 Author: Matthew Barnes AuthorDate: Thu Jul 4 14:11:03 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:11:03 2024 +0200 x86/ioapic: Fix signed shifts in io_apic.c There exists bitshifts in the IOAPIC code where signed integers are shifted to the left by up to 31 bits, which is undefined behaviour. This patch fixes this by changing the integers from signed to unsigned. Signed-off-by: Matthew Barnes Reviewed-by: Jan Beulich Reviewed-by: Andrew Cooper master commit: c5746b021e573184fb92b601a0e93a295485054e master date: 2024-06-21 15:09:26 +0100 --- xen/arch/x86/io_apic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 0ef61fb2f1..c5342789e8 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1692,7 +1692,8 @@ static void cf_check mask_and_ack_level_ioapic_irq(struct irq_desc *desc) !io_apic_level_ack_pending(desc->irq)) move_masked_irq(desc); - if ( !(v & (1 << (i & 0x1f))) ) { + if ( !(v & (1U << (i & 0x1f))) ) + { spin_lock(&ioapic_lock); __edge_IO_APIC_irq(desc->irq); __level_IO_APIC_irq(desc->irq); @@ -1756,7 +1757,8 @@ static void cf_check end_level_ioapic_irq_new(struct irq_desc *desc, u8 vector) !io_apic_level_ack_pending(desc->irq) ) move_native_irq(desc); - if (!(v & (1 << (i & 0x1f)))) { + if ( !(v & (1U << (i & 0x1f))) ) + { spin_lock(&ioapic_lock); __mask_IO_APIC_irq(desc->irq); __edge_IO_APIC_irq(desc->irq); -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:34:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:34:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754248.1162580 (Exim 4.92) (envelope-from ) id 1sPhCq-0000dn-2V; Fri, 05 Jul 2024 11:34:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754248.1162580; Fri, 05 Jul 2024 11:34: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 1sPhCp-0000df-Vq; Fri, 05 Jul 2024 11:34:23 +0000 Received: by outflank-mailman (input) for mailman id 754248; Fri, 05 Jul 2024 11:34:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCo-0000dS-TC for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCo-00074p-ST for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhCo-0004ou-Rf for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=0Dy5M2JjGDNHhr6JAIyj0/eFTwwwepzB0eGZjzyfMjQ=; b=jbrzyjLpHAwbiytW7PM4s1gu2Z KSAzM0WCJEUE/eIEfRUotYh7uFyUFQNMyTeuJ/GkRW8iwO9ntSoKLgWPC98AmmjovFQU8apvDxjPW y/VKj4Q9nN6vM273ss30HQ51hcwONWBWJAiFse3NvE/6Igr66mhj+UAlz1H/FTwpM6zc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] tools/xl: Open xldevd.log with O_CLOEXEC Message-Id: Date: Fri, 05 Jul 2024 11:34:22 +0000 commit 2b3bf02c4f5e44d7d7bd3636530c9ebc837dea87 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:11:36 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:11:36 2024 +0200 tools/xl: Open xldevd.log with O_CLOEXEC `xl devd` has been observed leaking /var/log/xldevd.log into children. Note this is specifically safe; dup2() leaves O_CLOEXEC disabled on newfd, so after setting up stdout/stderr, it's only the logfile fd which will close on exec(). Link: https://github.com/QubesOS/qubes-issues/issues/8292 Reported-by: Demi Marie Obenour Signed-off-by: Andrew Cooper Reviewed-by: Marek Marczykowski-Górecki Reviewed-by: Demi Marie Obenour Acked-by: Anthony PERARD master commit: ba52b3b624e4a1a976908552364eba924ca45430 master date: 2024-06-24 16:22:59 +0100 --- tools/xl/xl_utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/xl/xl_utils.c b/tools/xl/xl_utils.c index 17489d1829..b0d23b2cdb 100644 --- a/tools/xl/xl_utils.c +++ b/tools/xl/xl_utils.c @@ -27,6 +27,10 @@ #include "xl.h" #include "xl_utils.h" +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + void dolog(const char *file, int line, const char *func, const char *fmt, ...) { va_list ap; @@ -270,7 +274,7 @@ int do_daemonize(const char *name, const char *pidfile) exit(-1); } - CHK_SYSCALL(logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND, 0644)); + CHK_SYSCALL(logfile = open(fullname, O_WRONLY | O_CREAT | O_APPEND | O_CLOEXEC, 0644)); free(fullname); assert(logfile >= 3); -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:34:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:34:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754249.1162585 (Exim 4.92) (envelope-from ) id 1sPhD0-0000hH-5D; Fri, 05 Jul 2024 11:34:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754249.1162585; Fri, 05 Jul 2024 11:34:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhD0-0000h9-2C; Fri, 05 Jul 2024 11:34:34 +0000 Received: by outflank-mailman (input) for mailman id 754249; Fri, 05 Jul 2024 11:34:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCy-0000h1-W1 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhCy-00075C-VO for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhCy-0004pn-Uk for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=w0m/w2HNeBb4NR7cVBcqi52f/yXLVezDIOiFMYR+PE8=; b=wDXWQ70qhR+FIar0tHiHffSNSr xcQpWfyInuJLcBXjTcLEvZRuC9Q1nhaTBy4qldFXowKIuD1/8Ayke1MKN7RX0MQd5H+df1P3XvPMN mPPpZLV9DHu4PJSBm1mwC+UQuYrOHNFy2ditERI4FgLSl77claIkuW6F2KGFf1nQbMeQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] pirq_cleanup_check() leaks Message-Id: Date: Fri, 05 Jul 2024 11:34:32 +0000 commit c9f50d2c5f29b630603e2b95f29e5b6e416a6187 Author: Jan Beulich AuthorDate: Thu Jul 4 14:11:57 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:11:57 2024 +0200 pirq_cleanup_check() leaks Its original introduction had two issues: For one the "common" part of the checks (carried out in the macro) was inverted. And then after removal from the radix tree the structure wasn't scheduled for freeing. (All structures still left in the radix tree would be freed upon domain destruction, though.) For the freeing to be safe even if it didn't use RCU (i.e. to avoid use- after-free), re-arrange checks/operations in evtchn_close(), such that the pointer wouldn't be used anymore after calling pirq_cleanup_check() (noting that unmap_domain_pirq_emuirq() itself calls the function in the success case). Fixes: c24536b636f2 ("replace d->nr_pirqs sized arrays with radix tree") Fixes: 79858fee307c ("xen: fix hvm_domain_use_pirq's behavior") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: daa90dfea9175c07f13d1a2d901857b2dd14d080 master date: 2024-07-02 08:35:56 +0200 --- xen/arch/x86/irq.c | 1 + xen/common/event_channel.c | 11 ++++++++--- xen/include/xen/irq.h | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 290f8d26e7..00be3b88e8 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1413,6 +1413,7 @@ void (pirq_cleanup_check)(struct pirq *pirq, struct domain *d) if ( radix_tree_delete(&d->pirq_tree, pirq->pirq) != pirq ) BUG(); + free_pirq_struct(pirq); } /* Flush all ready EOIs from the top of this CPU's pending-EOI stack. */ diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index 66f924a7b0..b1a6215c37 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -705,11 +705,16 @@ int evtchn_close(struct domain *d1, int port1, bool guest) if ( !is_hvm_domain(d1) ) pirq_guest_unbind(d1, pirq); pirq->evtchn = 0; - pirq_cleanup_check(pirq, d1); #ifdef CONFIG_X86 - if ( is_hvm_domain(d1) && domain_pirq_to_irq(d1, pirq->pirq) > 0 ) - unmap_domain_pirq_emuirq(d1, pirq->pirq); + if ( !is_hvm_domain(d1) || + domain_pirq_to_irq(d1, pirq->pirq) <= 0 || + unmap_domain_pirq_emuirq(d1, pirq->pirq) < 0 ) + /* + * The successful path of unmap_domain_pirq_emuirq() will have + * called pirq_cleanup_check() already. + */ #endif + pirq_cleanup_check(pirq, d1); } unlink_pirq_port(chn1, d1->vcpu[chn1->notify_vcpu_id]); break; diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index 65083135e1..5dcd2d8f0c 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -180,7 +180,7 @@ extern struct pirq *pirq_get_info(struct domain *d, int pirq); void pirq_cleanup_check(struct pirq *pirq, struct domain *d); #define pirq_cleanup_check(pirq, d) \ - ((pirq)->evtchn ? pirq_cleanup_check(pirq, d) : (void)0) + (!(pirq)->evtchn ? pirq_cleanup_check(pirq, d) : (void)0) extern void pirq_guest_eoi(struct pirq *pirq); extern void desc_guest_eoi(struct irq_desc *desc, struct pirq *pirq); -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:34:44 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:34:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754250.1162588 (Exim 4.92) (envelope-from ) id 1sPhDA-0000k0-6H; Fri, 05 Jul 2024 11:34:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754250.1162588; Fri, 05 Jul 2024 11:34:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDA-0000js-3c; Fri, 05 Jul 2024 11:34:44 +0000 Received: by outflank-mailman (input) for mailman id 754250; Fri, 05 Jul 2024 11:34:43 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhD9-0000jg-2v for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:43 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhD9-00075L-2H for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:43 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhD9-0004qc-1O for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:43 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=fqrb+BDbxkMsU/gb08S9hV4ngGmQIelg6934Xj6Ylgg=; b=Si3BBnPn4CljT8rLPZ90RB4by3 qeo/NNYxSjx4RX9Q6IMO81zJ4lgstfSH7m5CqlF2nFLja7nwkrYlC6nhC5Q8JoLnx4+fkOmLs+FP7 xAdX/SURteNvJbUAdWeKA1PKQ0uFkB0nuovJygrBQm/LKh9W/vhNM3XBrDQfoDyba1G0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment() Message-Id: Date: Fri, 05 Jul 2024 11:34:43 +0000 commit 8e51c8f1d45fad242a315fa17ba3582c02e66840 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:12:31 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:12:31 2024 +0200 tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment() xc_dom_alloc_segment() is passed a size in bytes, calculates a size in pages from it, then fills in the new segment information with a bytes value re-calculated from the number of pages. This causes the module information given to the guest (MB, or PVH) to have incorrect sizes; specifically, sizes rounded up to the next page. This in turn is problematic for Xen. When Xen finds a gzipped module, it peeks at the end metadata to judge the decompressed size, which is a -4 backreference from the reported end of the module. Fill in seg->vend using the correct number of bytes. Fixes: ea7c8a3d0e82 ("libxc: reorganize domain builder guest memory allocator") Signed-off-by: Andrew Cooper Acked-by: Anthony PERARD master commit: 4c3a618b0adaa0cd59e0fa0898bb60978b8b3a5f master date: 2024-07-02 10:50:18 +0100 --- tools/libs/guest/xg_dom_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/guest/xg_dom_core.c b/tools/libs/guest/xg_dom_core.c index c4f4e7f3e2..f5521d528b 100644 --- a/tools/libs/guest/xg_dom_core.c +++ b/tools/libs/guest/xg_dom_core.c @@ -601,7 +601,7 @@ int xc_dom_alloc_segment(struct xc_dom_image *dom, memset(ptr, 0, pages * page_size); seg->vstart = start; - seg->vend = dom->virt_alloc_end; + seg->vend = start + size; DOMPRINTF("%-20s: %-12s : 0x%" PRIx64 " -> 0x%" PRIx64 " (pfn 0x%" PRIpfn " + 0x%" PRIpfn " pages)", -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:34:54 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:34:54 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754251.1162592 (Exim 4.92) (envelope-from ) id 1sPhDK-0000ml-82; Fri, 05 Jul 2024 11:34:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754251.1162592; Fri, 05 Jul 2024 11:34:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDK-0000md-52; Fri, 05 Jul 2024 11:34:54 +0000 Received: by outflank-mailman (input) for mailman id 754251; Fri, 05 Jul 2024 11:34:53 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDJ-0000mO-5x for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:53 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDJ-00075T-5J for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:53 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhDJ-0004sA-4R for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:34:53 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=1tsI6qkCa+XfwLrZe4zzTLVaLehLepDei7mEIAly2aI=; b=wekzI9XEgjOSOCWLkwU4c5/9rl xtM1KaMa+y/MMq1x9BJBEkXdOgUwWU7ydvkAkzz2Ob1faIKPp4zB/VhhpugSzhmn2HJH/79vFNWVX z/mbEGZrGsHPNFoxLe3vKDVj/g1zO6kodmakopicwXPk7h+YXqyxqg+bJNzUR5+K5hJ4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] tools/libxs: Fix CLOEXEC handling in get_dev() Message-Id: Date: Fri, 05 Jul 2024 11:34:53 +0000 commit d1b3bbb46402af77089906a97c413c14ed1740d2 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:13:10 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:13:10 2024 +0200 tools/libxs: Fix CLOEXEC handling in get_dev() Move the O_CLOEXEC compatibility outside of an #ifdef USE_PTHREAD block. Introduce set_cloexec() to wrap fcntl() setting FD_CLOEXEC. It will be reused for other CLOEXEC fixes too. Use set_cloexec() when O_CLOEXEC isn't available as a best-effort fallback. Fixes: f4f2f3402b2f ("tools/libxs: Open /dev/xen/xenbus fds as O_CLOEXEC") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD master commit: bf7c1464706adfa903f1e7d59383d042c3a88e39 master date: 2024-07-02 10:51:06 +0100 --- tools/libs/store/xs.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 1498515073..037e79d98b 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -40,6 +40,10 @@ #include #include +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + struct xs_stored_msg { XEN_TAILQ_ENTRY(struct xs_stored_msg) list; struct xsd_sockmsg hdr; @@ -54,10 +58,6 @@ struct xs_stored_msg { #include #endif -#ifndef O_CLOEXEC -#define O_CLOEXEC 0 -#endif - struct xs_handle { /* Communications channel to xenstore daemon. */ int fd; @@ -176,6 +176,16 @@ static bool setnonblock(int fd, int nonblock) { return true; } +static bool set_cloexec(int fd) +{ + int flags = fcntl(fd, F_GETFL); + + if (flags < 0) + return false; + + return fcntl(fd, flags | FD_CLOEXEC) >= 0; +} + int xs_fileno(struct xs_handle *h) { char c = 0; @@ -230,8 +240,24 @@ error: static int get_dev(const char *connect_to) { - /* We cannot open read-only because requests are writes */ - return open(connect_to, O_RDWR | O_CLOEXEC); + int fd, saved_errno; + + fd = open(connect_to, O_RDWR | O_CLOEXEC); + if (fd < 0) + return -1; + + /* Compat for non-O_CLOEXEC environments. Racy. */ + if (!O_CLOEXEC && !set_cloexec(fd)) + goto error; + + return fd; + +error: + saved_errno = errno; + close(fd); + errno = saved_errno; + + return -1; } static int all_restrict_cb(Xentoolcore__Active_Handle *ah, domid_t domid) { -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:35:04 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:35:04 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754252.1162596 (Exim 4.92) (envelope-from ) id 1sPhDU-0000ph-9I; Fri, 05 Jul 2024 11:35:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754252.1162596; Fri, 05 Jul 2024 11:35:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDU-0000pW-6Q; Fri, 05 Jul 2024 11:35:04 +0000 Received: by outflank-mailman (input) for mailman id 754252; Fri, 05 Jul 2024 11:35:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDT-0000pO-8l for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDT-00075o-87 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhDT-0004tY-7R for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Ea28bWKeMjaa41hh5ZOkWYF2u+5GLF5s+n+3j6Y27uU=; b=BmT7y8bdX2PlfrcKJaP2LNcR1c DrYjNjF3j/u5tgvlBuq7XXouoeT0UJdMTYuTvnCMevWkBNvSpElItmOwQ7YarVdSim8T1mjkNpv8X njRK/ai8oE4W7f1oVwzOpZcwoxPh6Iv4nHV4LJAuXJSFbDuKk648B6NPyxLHL40lhL8I=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] tools/libxs: Fix CLOEXEC handling in get_socket() Message-Id: Date: Fri, 05 Jul 2024 11:35:03 +0000 commit d689bb4d2cd3ccdb0067b0ca953cccbc5ab375ae Author: Andrew Cooper AuthorDate: Thu Jul 4 14:13:18 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:13:18 2024 +0200 tools/libxs: Fix CLOEXEC handling in get_socket() get_socket() opens a socket, then uses fcntl() to set CLOEXEC. This is racy with exec(). Open the socket with SOCK_CLOEXEC. Use the same compatibility strategy as O_CLOEXEC on ancient versions of Linux. Reported-by: Frediano Ziglio Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD master commit: 1957dd6aff931877fc22699d8f2d4be8728014ba master date: 2024-07-02 10:51:11 +0100 --- tools/libs/store/xs.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 037e79d98b..11a766c508 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -44,6 +44,10 @@ #define O_CLOEXEC 0 #endif +#ifndef SOCK_CLOEXEC +#define SOCK_CLOEXEC 0 +#endif + struct xs_stored_msg { XEN_TAILQ_ENTRY(struct xs_stored_msg) list; struct xsd_sockmsg hdr; @@ -207,16 +211,14 @@ int xs_fileno(struct xs_handle *h) static int get_socket(const char *connect_to) { struct sockaddr_un addr; - int sock, saved_errno, flags; + int sock, saved_errno; - sock = socket(PF_UNIX, SOCK_STREAM, 0); + sock = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); if (sock < 0) return -1; - if ((flags = fcntl(sock, F_GETFD)) < 0) - goto error; - flags |= FD_CLOEXEC; - if (fcntl(sock, F_SETFD, flags) < 0) + /* Compat for non-SOCK_CLOEXEC environments. Racy. */ + if (!SOCK_CLOEXEC && !set_cloexec(sock)) goto error; addr.sun_family = AF_UNIX; -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:35:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:35:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754253.1162599 (Exim 4.92) (envelope-from ) id 1sPhDe-0000sA-AS; Fri, 05 Jul 2024 11:35:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754253.1162599; Fri, 05 Jul 2024 11:35:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDe-0000s3-7x; Fri, 05 Jul 2024 11:35:14 +0000 Received: by outflank-mailman (input) for mailman id 754253; Fri, 05 Jul 2024 11:35:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDd-0000rx-CB for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDd-00075v-BX for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhDd-0004uY-Ao for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=pxhDLQdbKpqQx8jL2BgtfcufTCvXUCA4v/1AFW4H7DQ=; b=kTN/nuu4F+kiOYkszFMuAHbtmV eoEr7JSwpDld2UR8XXcn7+4J+XX45qWw4byMVUnxeDpdNcturvLH0yDbnl6eVnRf0QrooQQD9480A bgW8pAfH2vRxre54CfoW7CGy6q/pdraKvmfXiofvn4/vOhXzm5VHaPy0gOi/Xz+Dwa/g=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] tools/libxs: Fix CLOEXEC handling in xs_fileno() Message-Id: Date: Fri, 05 Jul 2024 11:35:13 +0000 commit 26b8ff1861a870e01456b31bf999f25df5538ebf Author: Andrew Cooper AuthorDate: Thu Jul 4 14:13:30 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:13:30 2024 +0200 tools/libxs: Fix CLOEXEC handling in xs_fileno() xs_fileno() opens a pipe on first use to communicate between the watch thread and the main thread. Nothing ever sets CLOEXEC on the file descriptors. Check for the availability of the pipe2() function with configure. Despite starting life as Linux-only, FreeBSD and NetBSD have gained it. When pipe2() isn't available, try our best with pipe() and set_cloexec(). Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD master commit: a2ff677852f0ce05fa335e8e5682bf2ae0c916ee master date: 2024-07-02 10:52:59 +0100 --- tools/config.h.in | 3 +++ tools/configure | 12 ++++++++++++ tools/configure.ac | 2 ++ tools/libs/store/xs.c | 16 +++++++++++++++- 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/tools/config.h.in b/tools/config.h.in index 0bb2fe08a1..50ad60fcb0 100644 --- a/tools/config.h.in +++ b/tools/config.h.in @@ -39,6 +39,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `pipe2' function. */ +#undef HAVE_PIPE2 + /* pygrub enabled */ #undef HAVE_PYGRUB diff --git a/tools/configure b/tools/configure index 7bb935d23b..e35112b5c5 100755 --- a/tools/configure +++ b/tools/configure @@ -9751,6 +9751,18 @@ if test "$ax_found" = "0"; then : fi +for ac_func in pipe2 +do : + ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +if test "x$ac_cv_func_pipe2" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PIPE2 1 +_ACEOF + +fi +done + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/tools/configure.ac b/tools/configure.ac index 618ef8c63f..53ac20af1e 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -543,4 +543,6 @@ AS_IF([test "x$pvshim" = "xy"], [ AX_FIND_HEADER([INCLUDE_ENDIAN_H], [endian.h sys/endian.h]) +AC_CHECK_FUNCS([pipe2]) + AC_OUTPUT() diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 11a766c508..c8845b69e2 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -190,13 +190,27 @@ static bool set_cloexec(int fd) return fcntl(fd, flags | FD_CLOEXEC) >= 0; } +static int pipe_cloexec(int fds[2]) +{ +#if HAVE_PIPE2 + return pipe2(fds, O_CLOEXEC); +#else + if (pipe(fds) < 0) + return -1; + /* Best effort to set CLOEXEC. Racy. */ + set_cloexec(fds[0]); + set_cloexec(fds[1]); + return 0; +#endif +} + int xs_fileno(struct xs_handle *h) { char c = 0; mutex_lock(&h->watch_mutex); - if ((h->watch_pipe[0] == -1) && (pipe(h->watch_pipe) != -1)) { + if ((h->watch_pipe[0] == -1) && (pipe_cloexec(h->watch_pipe) != -1)) { /* Kick things off if the watch list is already non-empty. */ if (!XEN_TAILQ_EMPTY(&h->watch_list)) while (write(h->watch_pipe[1], &c, 1) != 1) -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:35:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:35:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754254.1162605 (Exim 4.92) (envelope-from ) id 1sPhDo-0000ux-D3; Fri, 05 Jul 2024 11:35:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754254.1162605; Fri, 05 Jul 2024 11:35: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 1sPhDo-0000up-9W; Fri, 05 Jul 2024 11:35:24 +0000 Received: by outflank-mailman (input) for mailman id 754254; Fri, 05 Jul 2024 11:35:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDn-0000uj-Fj for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDn-000763-F0 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhDn-0004vb-E7 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Wq8nnsqJAGpxyAqlQvNhhS22K1xto7HgNhJgVDzgGAI=; b=HhpJLDiUlAgkRFMqefphj+9Pkk xKW1X2kHWV+s6ARPt+UeV/VNpsgi5nxa32eGFlogpll8LzeCuGMYlEPGxWhhHtknizp8oN817SoDC mXmGxcYsSND1iihlDyRiBfGGQpUwKSnGDJDpQE970PdQA56QZLatPaeLrgqN6gc0ZTYE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] cmdline: document and enforce "extra_guest_irqs" upper bounds Message-Id: Date: Fri, 05 Jul 2024 11:35:23 +0000 commit 30c695ddaf067cbe7a98037474e7910109238807 Author: Jan Beulich AuthorDate: Thu Jul 4 14:14:16 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:14:16 2024 +0200 cmdline: document and enforce "extra_guest_irqs" upper bounds PHYSDEVOP_pirq_eoi_gmfn_v accepting just a single GFN implies that no more than 32k pIRQ-s can be used by a domain on x86. Document this upper bound. To also enforce the limit, (ab)use both arch_hwdom_irqs() (changing its parameter type) and setup_system_domains(). This is primarily to avoid exposing the two static variables or introducing yet further arch hooks. While touching arch_hwdom_irqs() also mark it hwdom-init. Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné amend 'cmdline: document and enforce "extra_guest_irqs" upper bounds' Address late review comments for what is now commit 17f6d398f765: - bound max_irqs right away against nr_irqs - introduce a #define for a constant used twice Requested-by: Roger Pau Monné Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: 17f6d398f76597f8009ec0530842fb8705ece7ba master date: 2024-07-02 12:00:27 +0200 master commit: 1f56accba33ffea0abf7d1c6384710823d10cbd6 master date: 2024-07-03 14:03:27 +0200 --- docs/misc/xen-command-line.pandoc | 3 ++- xen/arch/x86/io_apic.c | 17 ++++++++++------- xen/common/domain.c | 24 ++++++++++++++++++++++-- xen/include/xen/irq.h | 3 ++- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index 10a09bbf23..d857bd0f89 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -1175,7 +1175,8 @@ common for all domUs, while the optional second number (preceded by a comma) is for dom0. Changing the setting for domU has no impact on dom0 and vice versa. For example to change dom0 without changing domU, use `extra_guest_irqs=,512`. The default value for Dom0 and an eventual separate -hardware domain is architecture dependent. +hardware domain is architecture dependent. The upper limit for both values on +x86 is such that the resulting total number of IRQs can't be higher than 32768. Note that specifying zero as domU value means zero, while for dom0 it means to use the default. diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index c5342789e8..f7591fd091 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2664,18 +2664,21 @@ void __init ioapic_init(void) nr_irqs_gsi, nr_irqs - nr_irqs_gsi); } -unsigned int arch_hwdom_irqs(domid_t domid) +unsigned int __hwdom_init arch_hwdom_irqs(const struct domain *d) { unsigned int n = fls(num_present_cpus()); + /* Bounding by the domain pirq EOI bitmap capacity. */ + const unsigned int max_irqs = min_t(unsigned int, nr_irqs, + PAGE_SIZE * BITS_PER_BYTE); - if ( !domid ) - n = min(n, dom0_max_vcpus()); - n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, nr_irqs); + if ( is_system_domain(d) ) + return max_irqs; - /* Bounded by the domain pirq eoi bitmap gfn. */ - n = min_t(unsigned int, n, PAGE_SIZE * BITS_PER_BYTE); + if ( !d->domain_id ) + n = min(n, dom0_max_vcpus()); + n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, max_irqs); - printk("Dom%d has maximum %u PIRQs\n", domid, n); + printk("%pd has maximum %u PIRQs\n", d, n); return n; } diff --git a/xen/common/domain.c b/xen/common/domain.c index 003f4ab125..62832a5860 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -351,7 +351,8 @@ static int late_hwdom_init(struct domain *d) } static unsigned int __read_mostly extra_hwdom_irqs; -static unsigned int __read_mostly extra_domU_irqs = 32; +#define DEFAULT_EXTRA_DOMU_IRQS 32U +static unsigned int __read_mostly extra_domU_irqs = DEFAULT_EXTRA_DOMU_IRQS; static int __init cf_check parse_extra_guest_irqs(const char *s) { @@ -688,7 +689,7 @@ struct domain *domain_create(domid_t domid, d->nr_pirqs = nr_static_irqs + extra_domU_irqs; else d->nr_pirqs = extra_hwdom_irqs ? nr_static_irqs + extra_hwdom_irqs - : arch_hwdom_irqs(domid); + : arch_hwdom_irqs(d); d->nr_pirqs = min(d->nr_pirqs, nr_irqs); radix_tree_init(&d->pirq_tree); @@ -812,6 +813,25 @@ void __init setup_system_domains(void) if ( IS_ERR(dom_xen) ) panic("Failed to create d[XEN]: %ld\n", PTR_ERR(dom_xen)); +#ifdef CONFIG_HAS_PIRQ + /* Bound-check values passed via "extra_guest_irqs=". */ + { + unsigned int n = max(arch_hwdom_irqs(dom_xen), nr_static_irqs); + + if ( extra_hwdom_irqs > n - nr_static_irqs ) + { + extra_hwdom_irqs = n - nr_static_irqs; + printk(XENLOG_WARNING "hwdom IRQs bounded to %u\n", n); + } + if ( extra_domU_irqs > + max(DEFAULT_EXTRA_DOMU_IRQS, n - nr_static_irqs) ) + { + extra_domU_irqs = n - nr_static_irqs; + printk(XENLOG_WARNING "domU IRQs bounded to %u\n", n); + } + } +#endif + /* * Initialise our DOMID_IO domain. * This domain owns I/O pages that are within the range of the page_info diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index 5dcd2d8f0c..bef170bcb6 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -196,8 +196,9 @@ extern struct irq_desc *pirq_spin_lock_irq_desc( unsigned int set_desc_affinity(struct irq_desc *desc, const cpumask_t *mask); +/* When passed a system domain, this returns the maximum permissible value. */ #ifndef arch_hwdom_irqs -unsigned int arch_hwdom_irqs(domid_t domid); +unsigned int arch_hwdom_irqs(const struct domain *d); #endif #ifndef arch_evtchn_bind_pirq -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:35:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:35:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754255.1162608 (Exim 4.92) (envelope-from ) id 1sPhDy-0000yB-FP; Fri, 05 Jul 2024 11:35:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754255.1162608; Fri, 05 Jul 2024 11:35:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDy-0000y3-Cj; Fri, 05 Jul 2024 11:35:34 +0000 Received: by outflank-mailman (input) for mailman id 754255; Fri, 05 Jul 2024 11:35:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDx-0000xv-IZ for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhDx-00076T-Hw for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhDx-0004we-H9 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=crz5DTxMIv+c500GPCURvVfDGIpj7yHu5cYSDb7h3BI=; b=CDbUYfqkFFb3PDX/6PMrjVuO0q 0i9IpIUpNvqI5jnlmWORHh9Yyn6hoElbjJd+5afr6UC3hnaz5qZDuO38oXtI/F3/LE/4k8QC/0MZo 1d1vykQvKXcHrwCyyj27O8lMxjdPxUdMB5s9lBDpP4icjhDSw6eQLYOUtedIL07zTUEY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] x86/entry: don't clear DF when raising #UD for lack of syscall handler Message-Id: Date: Fri, 05 Jul 2024 11:35:33 +0000 commit 7e636b8a16412d4f0d94b2b24d7ebcd2c749afff Author: Jan Beulich AuthorDate: Thu Jul 4 14:14:49 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:14:49 2024 +0200 x86/entry: don't clear DF when raising #UD for lack of syscall handler While doing so is intentional when invoking the actual callback, to mimic a hard-coded SYCALL_MASK / FMASK MSR, the same should not be done when no handler is available and hence #UD is raised. Fixes: ca6fcf4321b3 ("x86/pv: Inject #UD for missing SYSCALL callbacks") Reported-by: Andrew Cooper Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper master commit: d2fe9ab3048d503869ec81bc49db07e55a4a2386 master date: 2024-07-02 12:01:21 +0200 --- xen/arch/x86/x86_64/entry.S | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index 054fcb225f..d3def49ea3 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -38,6 +38,14 @@ switch_to_kernel: setc %cl leal (,%rcx,TBF_INTERRUPT),%ecx + /* + * The PV ABI hardcodes the (guest-inaccessible and virtual) + * SYSCALL_MASK MSR such that DF (and nothing else) would be cleared. + * Note that the equivalent of IF (VGCF_syscall_disables_events) is + * dealt with separately above. + */ + mov $~X86_EFLAGS_DF, %esi + test %rax, %rax UNLIKELY_START(z, syscall_no_callback) /* TB_eip == 0 => #UD */ mov VCPU_trap_ctxt(%rbx), %rdi @@ -47,12 +55,14 @@ UNLIKELY_START(z, syscall_no_callback) /* TB_eip == 0 => #UD */ testb $4, X86_EXC_UD * TRAPINFO_sizeof + TRAPINFO_flags(%rdi) setnz %cl lea TBF_EXCEPTION(, %rcx, TBF_INTERRUPT), %ecx + or $~0, %esi /* Don't clear DF */ UNLIKELY_END(syscall_no_callback) movq %rax,TRAPBOUNCE_eip(%rdx) movb %cl,TRAPBOUNCE_flags(%rdx) call create_bounce_frame - andl $~X86_EFLAGS_DF,UREGS_eflags(%rsp) + /* Conditionally clear DF */ + and %esi, UREGS_eflags(%rsp) /* %rbx: struct vcpu */ test_all_events: ASSERT_NOT_IN_ATOMIC -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 11:35:44 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 11:35:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754256.1162611 (Exim 4.92) (envelope-from ) id 1sPhE8-00010t-Gp; Fri, 05 Jul 2024 11:35:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754256.1162611; Fri, 05 Jul 2024 11:35:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhE8-00010l-EG; Fri, 05 Jul 2024 11:35:44 +0000 Received: by outflank-mailman (input) for mailman id 754256; Fri, 05 Jul 2024 11:35:43 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhE7-00010c-LN for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:43 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPhE7-00076a-Kl for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:43 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPhE7-0004xl-K4 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 11:35:43 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=0t9G7U1mHRPjhlK3ROzQZLK4xBq5P1kz0Uc0zChkZjY=; b=Ykkmu22EoTlN2VZM2xzC/92zH0 4YLPoLZz5PxTaS/tqpX3vKt6OAgFDfw/FrEEAb2VZmbtHdRrUy7YLIdWDAd6Sp8iXbgeTEiTE6ye5 E50Afuuc9k3b+O97NBVQfPAdx74YZIaXoQ1Xr1zjJsOe3c4R+wuJ4DOSQw7rhWcegm8Q=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] evtchn: build fix for Arm Message-Id: Date: Fri, 05 Jul 2024 11:35:43 +0000 commit 45c5333935628e7c80de0bd5a9d9eff50b305b16 Author: Jan Beulich AuthorDate: Thu Jul 4 16:57:29 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 16:57:29 2024 +0200 evtchn: build fix for Arm When backporting daa90dfea917 ("pirq_cleanup_check() leaks") I neglected to pay attention to it depending on 13a7b0f9f747 ("restrict concept of pIRQ to x86"). That one doesn't want backporting imo, so use / adjust custom #ifdef-ary to address the immediate issue of pirq_cleanup_check() not being available on Arm. Signed-off-by: Jan Beulich --- xen/common/event_channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index b1a6215c37..e6ec556603 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -643,7 +643,9 @@ static int evtchn_bind_pirq(evtchn_bind_pirq_t *bind) if ( rc != 0 ) { info->evtchn = 0; +#ifdef CONFIG_X86 pirq_cleanup_check(info, d); +#endif goto out; } @@ -713,8 +715,8 @@ int evtchn_close(struct domain *d1, int port1, bool guest) * The successful path of unmap_domain_pirq_emuirq() will have * called pirq_cleanup_check() already. */ -#endif pirq_cleanup_check(pirq, d1); +#endif } unlink_pirq_port(chn1, d1->vcpu[chn1->notify_vcpu_id]); break; -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:44:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:44:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754319.1162671 (Exim 4.92) (envelope-from ) id 1sPkAX-0000Eh-J6; Fri, 05 Jul 2024 14:44:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754319.1162671; Fri, 05 Jul 2024 14:44:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkAX-0000Ea-Ge; Fri, 05 Jul 2024 14:44:13 +0000 Received: by outflank-mailman (input) for mailman id 754319; Fri, 05 Jul 2024 14:44:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkAW-0000EQ-En for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkAW-0002Hk-E1 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkAW-0002z4-Cz for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=uVsaaLvHq9d/FF7RfLckK471XOnl4FpRpfoSuElA/0s=; b=YJNx9FTuloo3ZYtgD0NIcggcUh nYI2+VWuXB67/RiMoHSY1XQbIR5PdfxIO+oLJS/mWu2FcV5bh1g17msF+9rnZbmruzV1gjV455roy Eyhwb/B4B1ER7UgHN2yQu8nIkuJHv+VG1onPnCu+ZsVQHpIYOjQUqI/+KkfPXJQiUziU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] tools/tests: don't let test-xenstore write nodes exceeding default size Message-Id: Date: Fri, 05 Jul 2024 14:44:12 +0000 commit 8cea82aac02adb5776ddd7034c66d6a276c726ab Author: Juergen Gross AuthorDate: Thu Jul 4 14:17:48 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:17:48 2024 +0200 tools/tests: don't let test-xenstore write nodes exceeding default size Today test-xenstore will write nodes with 3000 bytes node data. This size is exceeding the default quota for the allowed node size. While working in dom0 with C-xenstored, OCAML-xenstored does not like that. Use a size of 2000 instead, which is lower than the allowed default node size of 2048. Fixes: 3afc5e4a5b75 ("tools/tests: add xenstore testing framework") Signed-off-by: Juergen Gross Acked-by: Andrew Cooper master commit: 642005e310483c490b0725fab4672f2b77fdf2ba master date: 2024-05-02 18:15:31 +0100 --- tools/tests/xenstore/test-xenstore.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/tests/xenstore/test-xenstore.c b/tools/tests/xenstore/test-xenstore.c index d3574b3fa2..0e2a83ba5d 100644 --- a/tools/tests/xenstore/test-xenstore.c +++ b/tools/tests/xenstore/test-xenstore.c @@ -408,9 +408,9 @@ static int test_ta3_deinit(uintptr_t par) #define TEST(s, f, p, l) { s, f ## _init, f, f ## _deinit, (uintptr_t)(p), l } struct test tests[] = { TEST("read 1", test_read, 1, "Read node with 1 byte data"), -TEST("read 3000", test_read, 3000, "Read node with 3000 bytes data"), +TEST("read 2000", test_read, 2000, "Read node with 2000 bytes data"), TEST("write 1", test_write, 1, "Write node with 1 byte data"), -TEST("write 3000", test_write, 3000, "Write node with 3000 bytes data"), +TEST("write 2000", test_write, 2000, "Write node with 2000 bytes data"), TEST("dir", test_dir, 0, "List directory"), TEST("rm node", test_rm, 0, "Remove single node"), TEST("rm dir", test_rm, WRITE_BUFFERS_N, "Remove node with sub-nodes"), -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:44:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:44:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754318.1162667 (Exim 4.92) (envelope-from ) id 1sPkAO-0000CI-Hh; Fri, 05 Jul 2024 14:44:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754318.1162667; Fri, 05 Jul 2024 14:44:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkAO-0000CB-F8; Fri, 05 Jul 2024 14:44:04 +0000 Received: by outflank-mailman (input) for mailman id 754318; Fri, 05 Jul 2024 14:44:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkAM-0000Bm-EZ for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkAM-0002GB-Ao for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkAM-0002yF-9r for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=6V6KC7o67mhMgybqna8+7LKhEyRKdtqCGgAHd6GzcsE=; b=M4zq2ic+J4zUge+5kaPL/sgxQ4 OgPoMbYP0bX53a9pzCjo7a3YduU/ZgkuTEZtgUQnGw9XcXsrRkbZ3POu22pIHPqH0ivx8jDBPlSk6 hlx3vD1jX5jCqqoe2J/fIB/DZAeOsarWllDLZ0BjdENBNtJkJkvFZeLgfQ9U842a2kg4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] x86: re-run exception-from-stub recovery selftests with CET-SS enabled Message-Id: Date: Fri, 05 Jul 2024 14:44:02 +0000 commit 79f83106f92777bc21ca57bccde45af29308b813 Author: Jan Beulich AuthorDate: Thu Jul 4 14:17:03 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:17:03 2024 +0200 x86: re-run exception-from-stub recovery selftests with CET-SS enabled On the BSP, shadow stacks are enabled only relatively late in the booting process. They in particular aren't active yet when initcalls are run. Keep the testing there, but invoke that testing a 2nd time when shadow stacks are active, to make sure we won't regress that case after addressing XSA-451. While touching this code, switch the guard from NDEBUG to CONFIG_DEBUG, such that IS_ENABLED() can validly be used at the new call site. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper master commit: cfe3ad67127b86e1b1c06993b86422673a51b050 master date: 2024-02-27 13:49:52 +0100 --- xen/arch/x86/extable.c | 8 +++++--- xen/arch/x86/include/asm/setup.h | 2 ++ xen/arch/x86/setup.c | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/extable.c b/xen/arch/x86/extable.c index dd9583f2a5..f05c16def6 100644 --- a/xen/arch/x86/extable.c +++ b/xen/arch/x86/extable.c @@ -128,10 +128,11 @@ search_exception_table(const struct cpu_user_regs *regs, unsigned long *stub_ra) return 0; } -#ifndef NDEBUG +#ifdef CONFIG_DEBUG +#include #include -static int __init cf_check stub_selftest(void) +int __init cf_check stub_selftest(void) { static const struct { uint8_t opc[8]; @@ -155,7 +156,8 @@ static int __init cf_check stub_selftest(void) unsigned int i; bool fail = false; - printk("Running stub recovery selftests...\n"); + printk("%s stub recovery selftests...\n", + system_state < SYS_STATE_active ? "Running" : "Re-running"); for ( i = 0; i < ARRAY_SIZE(tests); ++i ) { diff --git a/xen/arch/x86/include/asm/setup.h b/xen/arch/x86/include/asm/setup.h index 21037b7f31..a870c61b3f 100644 --- a/xen/arch/x86/include/asm/setup.h +++ b/xen/arch/x86/include/asm/setup.h @@ -48,6 +48,8 @@ int xen_in_range(unsigned long mfn); void microcode_grab_module( unsigned long *, const multiboot_info_t *); +int cf_check stub_selftest(void); + extern uint8_t kbd_shift_flags; #ifdef NDEBUG diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index d47f156711..2d2eb791e4 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -622,6 +622,10 @@ static void noreturn init_done(void) system_state = SYS_STATE_active; + /* Re-run stub recovery self-tests with CET-SS active. */ + if ( IS_ENABLED(CONFIG_DEBUG) && cpu_has_xen_shstk ) + stub_selftest(); + domain_unpause_by_systemcontroller(dom0); /* MUST be done prior to removing .init data. */ -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:44:23 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:44:23 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754320.1162676 (Exim 4.92) (envelope-from ) id 1sPkAh-0000I7-Kk; Fri, 05 Jul 2024 14:44:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754320.1162676; Fri, 05 Jul 2024 14:44:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkAh-0000Hx-I8; Fri, 05 Jul 2024 14:44:23 +0000 Received: by outflank-mailman (input) for mailman id 754320; Fri, 05 Jul 2024 14:44:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkAg-0000Hj-IV for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkAg-0002Hx-H1 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkAg-00030K-GB for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=fVvTexBZli1KlOeNtV9Zv89+xTPzJr91nY45IJTLeGE=; b=Zis25+3QiITrJR44X08nvD2oi2 R1HHaJSFnc3nVRAIkWLo1Pm4Wma3apl84Yb5sNK8D550kBZ8JgmlJCruM/iVv0GJT9/C/n6CkQBWL l8/bKqdplahNt0wDL+lEcyFLYY4v8lJUupT1E2aZ00Ohe0oDfGw93BJQ1OG5a0LdUbUI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] tools/tests: let test-xenstore exit with non-0 status in case of error Message-Id: Date: Fri, 05 Jul 2024 14:44:22 +0000 commit 16bc1d8becdb5e998b5fc857e2b1ce01f174327d Author: Juergen Gross AuthorDate: Thu Jul 4 14:18:05 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:18:05 2024 +0200 tools/tests: let test-xenstore exit with non-0 status in case of error In case a test is failing in test-xenstore, let the tool exit with an exit status other than 0. Fix a typo in an error message. Reported-by: Andrew Cooper Fixes: 3afc5e4a5b75 ("tools/tests: add xenstore testing framework") Signed-off-by: Juergen Gross master commit: 2d4ba205591ba64f31149ae31051678159ee9e11 master date: 2024-05-02 18:15:46 +0100 --- tools/tests/xenstore/test-xenstore.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/tests/xenstore/test-xenstore.c b/tools/tests/xenstore/test-xenstore.c index 0e2a83ba5d..23fe3f0c28 100644 --- a/tools/tests/xenstore/test-xenstore.c +++ b/tools/tests/xenstore/test-xenstore.c @@ -506,14 +506,14 @@ int main(int argc, char *argv[]) stop = time(NULL) + randtime; srandom((unsigned int)stop); - while ( time(NULL) < stop ) + while ( time(NULL) < stop && !ret ) { t = random() % ARRAY_SIZE(tests); ret = call_test(tests + t, iters, true); } } else - for ( t = 0; t < ARRAY_SIZE(tests); t++ ) + for ( t = 0; t < ARRAY_SIZE(tests) && !ret; t++ ) { if ( !test || !strcmp(test, tests[t].name) ) ret = call_test(tests + t, iters, false); @@ -525,10 +525,10 @@ int main(int argc, char *argv[]) xs_close(xsh); if ( ta_loops ) - printf("Exhaustive transaction retries (%d) occurrred %d times.\n", + printf("Exhaustive transaction retries (%d) occurred %d times.\n", MAX_TA_LOOPS, ta_loops); - return 0; + return ret ? 3 : 0; } /* -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:44:33 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:44:33 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754321.1162680 (Exim 4.92) (envelope-from ) id 1sPkAr-0000L4-MB; Fri, 05 Jul 2024 14:44:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754321.1162680; Fri, 05 Jul 2024 14:44:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkAr-0000Kx-Ja; Fri, 05 Jul 2024 14:44:33 +0000 Received: by outflank-mailman (input) for mailman id 754321; Fri, 05 Jul 2024 14:44:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkAq-0000Kr-Kx for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkAq-0002IL-KD for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkAq-00031G-JE for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=7xBa6O7NOHiVo51qr/Iu51bzAnOLU5t/TXNez/wVtgo=; b=KRTk+vc9dF+2d8y4/Bmuv1PnTv UCb2G+gjTn4NLIkzO57Ep90207NvZHf52Sr9LtPn7yIycfmKgg6SzKnD2e0X59xQZX5OkClDRejtw 04P7hCiDSWgB8MqEZsditaIUCRwWgs9yFQI3tt1dZVhOGNn30qWgObskFow0TZNo9fYs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] LICENSES: Add MIT-0 (MIT No Attribution) Message-Id: Date: Fri, 05 Jul 2024 14:44:32 +0000 commit 0433bae1ead9c8c21ba34c40fd85efa2347bba47 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:19:00 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:19:00 2024 +0200 LICENSES: Add MIT-0 (MIT No Attribution) We are about to import code licensed under MIT-0. It's compatible for us to use, so identify it as a permitted license. Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini Acked-by: Christian Lindig master commit: 219cdff3fb7b4a03ab14869584f111e0f623b330 master date: 2024-05-23 15:04:40 +0100 --- LICENSES/MIT-0 | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/LICENSES/MIT-0 b/LICENSES/MIT-0 new file mode 100644 index 0000000000..70fb90ee34 --- /dev/null +++ b/LICENSES/MIT-0 @@ -0,0 +1,31 @@ +Valid-License-Identifier: MIT-0 + +SPDX-URL: https://spdx.org/licenses/MIT-0.html + +Usage-Guide: + + To use the MIT-0 License put the following SPDX tag/value pair into a + comment according to the placement guidelines in the licensing rules + documentation: + SPDX-License-Identifier: MIT-0 + +License-Text: + +MIT No Attribution + +Copyright + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:44:43 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:44:43 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754322.1162684 (Exim 4.92) (envelope-from ) id 1sPkB1-0000Nc-Nn; Fri, 05 Jul 2024 14:44:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754322.1162684; Fri, 05 Jul 2024 14:44:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkB1-0000NU-LF; Fri, 05 Jul 2024 14:44:43 +0000 Received: by outflank-mailman (input) for mailman id 754322; Fri, 05 Jul 2024 14:44:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkB0-0000NF-OU for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkB0-0002IU-Nh for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkB0-000323-MJ for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=vu4VSib9CnxinVlK/7fLgmjRpuuPyBlj1RBGf/j/0Xw=; b=kvUppfjpl/jIcwt/ZVjrappvcA 5UFEPTzAq0v+3v8l3avEv+IjwePpIHSw8XN8P34sD6Az2mFNSB9GgWocAQ0ltm2YcZelGSi4rW4uW +RTV4QwKnw4Szs1HtIThSPqhfLpwoIWmPRe2VtLkIq3Qghgck/vd0l7odyTNGlLl4sMk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] tools: Import stand-alone sd_notify() implementation from systemd Message-Id: Date: Fri, 05 Jul 2024 14:44:42 +0000 commit ac48584cfcf2e88985266b49b290339be5f63916 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:19:12 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:19:12 2024 +0200 tools: Import stand-alone sd_notify() implementation from systemd ... in order to avoid linking against the whole of libsystemd. Only minimal changes to the upstream copy, to function as a drop-in replacement for sd_notify() and as a header-only library. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Christian Lindig master commit: 78510f3a1522f2856330ffa429e0e35f8aab4277 master date: 2024-05-23 15:04:40 +0100 --- tools/include/xen-sd-notify.h | 98 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/tools/include/xen-sd-notify.h b/tools/include/xen-sd-notify.h new file mode 100644 index 0000000000..28c9b20f15 --- /dev/null +++ b/tools/include/xen-sd-notify.h @@ -0,0 +1,98 @@ +/* SPDX-License-Identifier: MIT-0 */ + +/* + * Implement the systemd notify protocol without external dependencies. + * Supports both readiness notification on startup and on reloading, + * according to the protocol defined at: + * https://www.freedesktop.org/software/systemd/man/latest/sd_notify.html + * This protocol is guaranteed to be stable as per: + * https://systemd.io/PORTABILITY_AND_STABILITY/ + * + * Differences from the upstream copy: + * - Rename/rework as a drop-in replacement for systemd/sd-daemon.h + * - Only take the subset Xen cares about + * - Respect -Wdeclaration-after-statement + */ + +#ifndef XEN_SD_NOTIFY +#define XEN_SD_NOTIFY + +#include +#include +#include +#include +#include +#include + +static inline void xen_sd_closep(int *fd) { + if (!fd || *fd < 0) + return; + + close(*fd); + *fd = -1; +} + +static inline int xen_sd_notify(const char *message) { + union sockaddr_union { + struct sockaddr sa; + struct sockaddr_un sun; + } socket_addr = { + .sun.sun_family = AF_UNIX, + }; + size_t path_length, message_length; + ssize_t written; + const char *socket_path; + int __attribute__((cleanup(xen_sd_closep))) fd = -1; + + /* Verify the argument first */ + if (!message) + return -EINVAL; + + message_length = strlen(message); + if (message_length == 0) + return -EINVAL; + + /* If the variable is not set, the protocol is a noop */ + socket_path = getenv("NOTIFY_SOCKET"); + if (!socket_path) + return 0; /* Not set? Nothing to do */ + + /* Only AF_UNIX is supported, with path or abstract sockets */ + if (socket_path[0] != '/' && socket_path[0] != '@') + return -EAFNOSUPPORT; + + path_length = strlen(socket_path); + /* Ensure there is room for NUL byte */ + if (path_length >= sizeof(socket_addr.sun.sun_path)) + return -E2BIG; + + memcpy(socket_addr.sun.sun_path, socket_path, path_length); + + /* Support for abstract socket */ + if (socket_addr.sun.sun_path[0] == '@') + socket_addr.sun.sun_path[0] = 0; + + fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0); + if (fd < 0) + return -errno; + + if (connect(fd, &socket_addr.sa, offsetof(struct sockaddr_un, sun_path) + path_length) != 0) + return -errno; + + written = write(fd, message, message_length); + if (written != (ssize_t) message_length) + return written < 0 ? -errno : -EPROTO; + + return 1; /* Notified! */ +} + +static inline int sd_notify(int unset_environment, const char *message) { + int r = xen_sd_notify(message); + + if (unset_environment) + unsetenv("NOTIFY_SOCKET"); + + return r; +} + +#endif /* XEN_SD_NOTIFY */ -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:44:53 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:44:53 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754323.1162688 (Exim 4.92) (envelope-from ) id 1sPkBB-0000QL-Pa; Fri, 05 Jul 2024 14:44:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754323.1162688; Fri, 05 Jul 2024 14:44:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBB-0000QD-Mm; Fri, 05 Jul 2024 14:44:53 +0000 Received: by outflank-mailman (input) for mailman id 754323; Fri, 05 Jul 2024 14:44:52 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBA-0000Q1-Rf for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:52 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBA-0002Ib-R0 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:52 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkBA-00032e-Q6 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:44:52 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=zI7wtWMKEKfcqWCovIgoXDudl29E9sb9EG1Mb8llhCQ=; b=Km8+rtGGeqZcPEJnZNhYqVDrYV qEV9Nu4HLS3NRhyW7ubqaB218fO7MvOrddnqC3rjlfnFsAKuJ2DD2gwWAil4Z0Ap41axktAF1yxTS iuQfqG9Z4x2aWiP+ZAyuXK0mRplvFmT/gf+U30qYxsuApZjTKHDgfFpB+RozCHZynssw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] tools/{c,o}xenstored: Don't link against libsystemd Message-Id: Date: Fri, 05 Jul 2024 14:44:52 +0000 commit cf0342d86f56faff64e0701833049ed457c0721e Author: Andrew Cooper AuthorDate: Thu Jul 4 14:19:25 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:19:25 2024 +0200 tools/{c,o}xenstored: Don't link against libsystemd Use the local freestanding wrapper instead. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Christian Lindig master commit: caf864482689a5dd6a945759b6372bb260d49665 master date: 2024-05-23 15:04:40 +0100 --- tools/ocaml/xenstored/Makefile | 3 +-- tools/ocaml/xenstored/systemd_stubs.c | 2 +- tools/xenstore/Makefile | 5 ----- tools/xenstore/xenstored_core.c | 4 ++-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/tools/ocaml/xenstored/Makefile b/tools/ocaml/xenstored/Makefile index 6f7333926e..48b47448f2 100644 --- a/tools/ocaml/xenstored/Makefile +++ b/tools/ocaml/xenstored/Makefile @@ -4,8 +4,7 @@ include $(OCAML_TOPLEVEL)/common.make # Include configure output (config.h) CFLAGS += -include $(XEN_ROOT)/tools/config.h -CFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_CFLAGS) -LDFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_LIBS) +CFLAGS-$(CONFIG_SYSTEMD) += $(CFLAGS_xeninclude) CFLAGS += $(CFLAGS-y) CFLAGS += $(APPEND_CFLAGS) diff --git a/tools/ocaml/xenstored/systemd_stubs.c b/tools/ocaml/xenstored/systemd_stubs.c index f4c875075a..7dbbdd35bf 100644 --- a/tools/ocaml/xenstored/systemd_stubs.c +++ b/tools/ocaml/xenstored/systemd_stubs.c @@ -25,7 +25,7 @@ #if defined(HAVE_SYSTEMD) -#include +#include CAMLprim value ocaml_sd_notify_ready(value ignore) { diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile index ce7a68178f..f41d04304f 100644 --- a/tools/xenstore/Makefile +++ b/tools/xenstore/Makefile @@ -9,11 +9,6 @@ xenstored: LDLIBS += $(LDLIBS_libxenctrl) xenstored: LDLIBS += -lrt xenstored: LDLIBS += $(SOCKET_LIBS) -ifeq ($(CONFIG_SYSTEMD),y) -$(XENSTORED_OBJS-y): CFLAGS += $(SYSTEMD_CFLAGS) -xenstored: LDLIBS += $(SYSTEMD_LIBS) -endif - xenstore: LDLIBS += $(LDLIBS_libxenstore) xenstore: LDLIBS += $(LDLIBS_libxentoolcore) xenstore: LDLIBS += $(SOCKET_LIBS) diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c index 09b5d0656f..3b3a9f563a 100644 --- a/tools/xenstore/xenstored_core.c +++ b/tools/xenstore/xenstored_core.c @@ -61,7 +61,7 @@ #endif #if defined(XEN_SYSTEMD_ENABLED) -#include +#include #endif extern xenevtchn_handle *xce_handle; /* in xenstored_domain.c */ @@ -2888,7 +2888,7 @@ int main(int argc, char *argv[]) #if defined(XEN_SYSTEMD_ENABLED) if (!live_update) { sd_notify(1, "READY=1"); - fprintf(stderr, SD_NOTICE "xenstored is ready\n"); + fprintf(stderr, "xenstored is ready\n"); } #endif -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:45:03 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:45:03 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754324.1162693 (Exim 4.92) (envelope-from ) id 1sPkBL-0000Tb-Rq; Fri, 05 Jul 2024 14:45:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754324.1162693; Fri, 05 Jul 2024 14:45:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBL-0000TT-OE; Fri, 05 Jul 2024 14:45:03 +0000 Received: by outflank-mailman (input) for mailman id 754324; Fri, 05 Jul 2024 14:45:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBK-0000T1-VK for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBK-0002J9-UV for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkBK-00035C-Te for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=EMReh1kK0ng6cebAgKlVuFkP1r89SQlmouPVtbjp+P0=; b=Q+Aw89zTpqmKhNrYDT5mkxQZ2U /J5TiQnBzIrbGsvAAbXYOGWQjxPWtlbB+Yc9E25sZ7ooW9GGeR/6cJ8VCqJ5OWaw8aLgl6vsJsSGL sRQjMlvNKWPH7K490UtXpHSHw3iIlb00n+SH4PvJ0i/jF3FtwVxafJ3d81Z1IOEJ12ns=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] tools: Drop libsystemd as a dependency Message-Id: Date: Fri, 05 Jul 2024 14:45:02 +0000 commit fd4a15b1f7a7d6bb6a1bd60fce548782ff39f4e1 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:19:35 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:19:35 2024 +0200 tools: Drop libsystemd as a dependency There are no more users, and we want to disuade people from introducing new users just for sd_notify() and friends. Drop the dependency. We still want the overall --with{,out}-systemd to gate the generation of the service/unit/mount/etc files. Rerun autogen.sh, and mark the dependency as removed in the build containers. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Christian Lindig tools: (Actually) drop libsystemd as a dependency When reinstating some of systemd.m4 between v1 and v2, I reintroduced a little too much. While {c,o}xenstored are indeed no longer linked against libsystemd, ./configure still looks for it. Drop this too. Fixes: ae26101f6bfc ("tools: Drop libsystemd as a dependency") Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné master commit: ae26101f6bfc8185adcdb9165d469bdc467780db master date: 2024-05-23 15:04:40 +0100 master commit: 6ef4fa1e7fe78c1dae07b451292b07facfce4902 master date: 2024-05-30 12:15:25 +0100 --- CHANGELOG.md | 7 +- config/Tools.mk.in | 2 - m4/systemd.m4 | 17 -- tools/configure | 485 +---------------------------------------------------- 4 files changed, 7 insertions(+), 504 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c0018e17cb..75726fd9e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,12 @@ Notable changes to Xen will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [4.17.4](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.17.4) +## [4.17.5](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.17.5) + +### Changed + - When building with Systemd support (./configure --enable-systemd), remove + libsystemd as a build dependency. Systemd Notify support is retained, now + using a standalone library implementation. ## [4.17.3](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.17.3) diff --git a/config/Tools.mk.in b/config/Tools.mk.in index 204c79c967..28f07ce237 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -56,8 +56,6 @@ CONFIG_LIBNL := @libnl@ CONFIG_GOLANG := @golang@ CONFIG_SYSTEMD := @systemd@ -SYSTEMD_CFLAGS := @SYSTEMD_CFLAGS@ -SYSTEMD_LIBS := @SYSTEMD_LIBS@ XEN_SYSTEMD_DIR := @SYSTEMD_DIR@ XEN_SYSTEMD_MODULES_LOAD := @SYSTEMD_MODULES_LOAD@ CONFIG_9PFS := @ninepfs@ diff --git a/m4/systemd.m4 b/m4/systemd.m4 index 112dc11b5e..ab12ea313d 100644 --- a/m4/systemd.m4 +++ b/m4/systemd.m4 @@ -41,15 +41,6 @@ AC_DEFUN([AX_ALLOW_SYSTEMD_OPTS], [ ]) AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [ - PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon],, - [PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209])] - ) - dnl pkg-config older than 0.24 does not set these for - dnl PKG_CHECK_MODULES() worth also noting is that as of version 208 - dnl of systemd pkg-config --cflags currently yields no extra flags yet. - AC_SUBST([SYSTEMD_CFLAGS]) - AC_SUBST([SYSTEMD_LIBS]) - AS_IF([test "x$SYSTEMD_DIR" = x], [ dnl In order to use the line below we need to fix upstream systemd dnl to properly ${prefix} for child variables in @@ -95,13 +86,6 @@ AC_DEFUN([AX_CHECK_SYSTEMD], [ ],[systemd=n]) ]) -AC_DEFUN([AX_CHECK_SYSTEMD_ENABLE_AVAILABLE], [ - PKG_CHECK_MODULES([SYSTEMD], [libsystemd-daemon], [systemd="y"],[ - PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 209], - [systemd="y"],[systemd="n"]) - ]) -]) - dnl Enables systemd by default and requires a --disable-systemd option flag dnl to configure if you want to disable. AC_DEFUN([AX_ENABLE_SYSTEMD], [ @@ -121,6 +105,5 @@ dnl to have systemd build libraries it will be enabled. You can always force dnl disable with --disable-systemd AC_DEFUN([AX_AVAILABLE_SYSTEMD], [ AX_ALLOW_SYSTEMD_OPTS() - AX_CHECK_SYSTEMD_ENABLE_AVAILABLE() AX_CHECK_SYSTEMD() ]) diff --git a/tools/configure b/tools/configure index f1176d1c0f..6f0b0bb82b 100755 --- a/tools/configure +++ b/tools/configure @@ -626,8 +626,6 @@ ac_subst_vars='LTLIBOBJS LIBOBJS pvshim ninepfs -SYSTEMD_LIBS -SYSTEMD_CFLAGS SYSTEMD_MODULES_LOAD SYSTEMD_DIR systemd @@ -862,9 +860,7 @@ pixman_LIBS libzstd_CFLAGS libzstd_LIBS LIBNL3_CFLAGS -LIBNL3_LIBS -SYSTEMD_CFLAGS -SYSTEMD_LIBS' +LIBNL3_LIBS' # Initialize some variables set by options. @@ -1618,10 +1614,6 @@ Some influential environment variables: LIBNL3_CFLAGS C compiler flags for LIBNL3, overriding pkg-config LIBNL3_LIBS linker flags for LIBNL3, overriding pkg-config - SYSTEMD_CFLAGS - C compiler flags for SYSTEMD, overriding pkg-config - SYSTEMD_LIBS - linker flags for SYSTEMD, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -3886,8 +3878,6 @@ esac - - @@ -9488,223 +9478,6 @@ fi - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - systemd="n" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - systemd="n" -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - systemd="y" -fi - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - systemd="n" -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - systemd="n" -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - systemd="y" -fi - -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - systemd="y" -fi - - if test "x$enable_systemd" != "xno"; then : if test "x$systemd" = "xy" ; then : @@ -9714,262 +9487,6 @@ $as_echo "#define HAVE_SYSTEMD 1" >>confdefs.h systemd=y - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd-daemon\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd-daemon") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd-daemon" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd-daemon" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libsystemd >= 209) were not met: - -$SYSTEMD_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYSTEMD" >&5 -$as_echo_n "checking for SYSTEMD... " >&6; } - -if test -n "$SYSTEMD_CFLAGS"; then - pkg_cv_SYSTEMD_CFLAGS="$SYSTEMD_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_CFLAGS=`$PKG_CONFIG --cflags "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$SYSTEMD_LIBS"; then - pkg_cv_SYSTEMD_LIBS="$SYSTEMD_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsystemd >= 209\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libsystemd >= 209") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_SYSTEMD_LIBS=`$PKG_CONFIG --libs "libsystemd >= 209" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - else - SYSTEMD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsystemd >= 209" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$SYSTEMD_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (libsystemd >= 209) were not met: - -$SYSTEMD_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details." "$LINENO" 5 -elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -Alternatively, you may set the environment variables SYSTEMD_CFLAGS -and SYSTEMD_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -else - SYSTEMD_CFLAGS=$pkg_cv_SYSTEMD_CFLAGS - SYSTEMD_LIBS=$pkg_cv_SYSTEMD_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - - - if test "x$SYSTEMD_DIR" = x; then : SYSTEMD_DIR="\$(prefix)/lib/systemd/system/" -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:45:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:45:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754325.1162696 (Exim 4.92) (envelope-from ) id 1sPkBV-0000WW-US; Fri, 05 Jul 2024 14:45:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754325.1162696; Fri, 05 Jul 2024 14:45:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBV-0000WO-S0; Fri, 05 Jul 2024 14:45:13 +0000 Received: by outflank-mailman (input) for mailman id 754325; Fri, 05 Jul 2024 14:45:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBV-0000WG-2z for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBV-0002JH-24 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkBV-00036I-0T for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=OSIbi/p+AJkzb2W/ifUqAkQG80wCsR8CGiuVwTs9ODA=; b=Kz2U+sW12J8Mz0CYKyDmNAPD/7 CI+n7zw6aJeuZbywyNgENlqQ1+ffpxXHr8EkRZZGHqh0N7fpVebwFd4hyChc9acGakdql/eKF58vJ CO4rfP9wrtatYyYTgCoS5YpMvJTuV4S6yNLxneDl+116I+rkQjiW2HAQaPIdyX/zP7Uk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] x86/ioapic: Fix signed shifts in io_apic.c Message-Id: Date: Fri, 05 Jul 2024 14:45:13 +0000 commit 5afa8fea8e64dfab24650400f168d212208a318c Author: Matthew Barnes AuthorDate: Thu Jul 4 14:19:57 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:19:57 2024 +0200 x86/ioapic: Fix signed shifts in io_apic.c There exists bitshifts in the IOAPIC code where signed integers are shifted to the left by up to 31 bits, which is undefined behaviour. This patch fixes this by changing the integers from signed to unsigned. Signed-off-by: Matthew Barnes Reviewed-by: Jan Beulich Reviewed-by: Andrew Cooper master commit: c5746b021e573184fb92b601a0e93a295485054e master date: 2024-06-21 15:09:26 +0100 --- xen/arch/x86/io_apic.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index b3afef8933..e3e71c7a52 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1692,7 +1692,8 @@ static void cf_check mask_and_ack_level_ioapic_irq(struct irq_desc *desc) !io_apic_level_ack_pending(desc->irq)) move_masked_irq(desc); - if ( !(v & (1 << (i & 0x1f))) ) { + if ( !(v & (1U << (i & 0x1f))) ) + { spin_lock(&ioapic_lock); __edge_IO_APIC_irq(desc->irq); __level_IO_APIC_irq(desc->irq); @@ -1756,7 +1757,8 @@ static void cf_check end_level_ioapic_irq_new(struct irq_desc *desc, u8 vector) !io_apic_level_ack_pending(desc->irq) ) move_native_irq(desc); - if (!(v & (1 << (i & 0x1f)))) { + if ( !(v & (1U << (i & 0x1f))) ) + { spin_lock(&ioapic_lock); __mask_IO_APIC_irq(desc->irq); __edge_IO_APIC_irq(desc->irq); -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:45:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:45:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754326.1162700 (Exim 4.92) (envelope-from ) id 1sPkBf-0000ZD-Vs; Fri, 05 Jul 2024 14:45:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754326.1162700; Fri, 05 Jul 2024 14:45:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBf-0000Z5-TP; Fri, 05 Jul 2024 14:45:23 +0000 Received: by outflank-mailman (input) for mailman id 754326; Fri, 05 Jul 2024 14:45:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBf-0000Yv-5w for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBf-0002JQ-5H for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkBf-00036r-49 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=hMZ4AuslifocxHNTVjgEoEtEQ/KaMQ/B89lt2xMnDW0=; b=NUNgjjIK7qXYiz9r5yOO5SAX9M ClQedx5PgDEU18jp3MxTVOOGgvT5I3XfZKlDTpUPDo6PKaHeM4cn5ZOgBKpWna0CgBa1aQ1AQknbr moiTHNTR6iZmjvA1LG+JinTPYxz7SisjJp51NyI4V79A+VTMzbhreWdR3E81UqkcAo4g=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] tools/xl: Open xldevd.log with O_CLOEXEC Message-Id: Date: Fri, 05 Jul 2024 14:45:23 +0000 commit 8e522bfa4816a0b7dd40652bf620269ade6836f0 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:20:25 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:20:25 2024 +0200 tools/xl: Open xldevd.log with O_CLOEXEC `xl devd` has been observed leaking /var/log/xldevd.log into children. Note this is specifically safe; dup2() leaves O_CLOEXEC disabled on newfd, so after setting up stdout/stderr, it's only the logfile fd which will close on exec(). Link: https://github.com/QubesOS/qubes-issues/issues/8292 Reported-by: Demi Marie Obenour Signed-off-by: Andrew Cooper Reviewed-by: Marek Marczykowski-Górecki Reviewed-by: Demi Marie Obenour Acked-by: Anthony PERARD master commit: ba52b3b624e4a1a976908552364eba924ca45430 master date: 2024-06-24 16:22:59 +0100 --- tools/xl/xl_utils.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/xl/xl_utils.c b/tools/xl/xl_utils.c index 17489d1829..b0d23b2cdb 100644 --- a/tools/xl/xl_utils.c +++ b/tools/xl/xl_utils.c @@ -27,6 +27,10 @@ #include "xl.h" #include "xl_utils.h" +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + void dolog(const char *file, int line, const char *func, const char *fmt, ...) { va_list ap; @@ -270,7 +274,7 @@ int do_daemonize(const char *name, const char *pidfile) exit(-1); } - CHK_SYSCALL(logfile = open(fullname, O_WRONLY|O_CREAT|O_APPEND, 0644)); + CHK_SYSCALL(logfile = open(fullname, O_WRONLY | O_CREAT | O_APPEND | O_CLOEXEC, 0644)); free(fullname); assert(logfile >= 3); -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:45:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:45:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754327.1162704 (Exim 4.92) (envelope-from ) id 1sPkBq-0000bn-17; Fri, 05 Jul 2024 14:45:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754327.1162704; Fri, 05 Jul 2024 14:45:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBp-0000bf-Uo; Fri, 05 Jul 2024 14:45:33 +0000 Received: by outflank-mailman (input) for mailman id 754327; Fri, 05 Jul 2024 14:45:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBp-0000bV-9C for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBp-0002Jq-8X for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkBp-00037g-7d for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=EvyGCtPhz4Bw8Gv+xqrQSxzkh4bh3AROJhP+wzmgkUA=; b=szDwZRycvKfI61izDshXTJyXqj sMbB8GkvKQKdOeGWSILxS9mosFwIoeUuYVppCHzq0akUnNupOB2nVeuQXIodUPv3S5G2mzTGLYQsD 0zHhB36QKD7yFNDB60EDHYOtPzEWq3yBd8H9reNcY3Ul8KmJA/U4l83dBFOVXub+5fq8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] pirq_cleanup_check() leaks Message-Id: Date: Fri, 05 Jul 2024 14:45:33 +0000 commit fb9f9842938dbc095de8f6bdebd4bc2e3ef0f1e7 Author: Jan Beulich AuthorDate: Thu Jul 4 14:20:50 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:20:50 2024 +0200 pirq_cleanup_check() leaks Its original introduction had two issues: For one the "common" part of the checks (carried out in the macro) was inverted. And then after removal from the radix tree the structure wasn't scheduled for freeing. (All structures still left in the radix tree would be freed upon domain destruction, though.) For the freeing to be safe even if it didn't use RCU (i.e. to avoid use- after-free), re-arrange checks/operations in evtchn_close(), such that the pointer wouldn't be used anymore after calling pirq_cleanup_check() (noting that unmap_domain_pirq_emuirq() itself calls the function in the success case). Fixes: c24536b636f2 ("replace d->nr_pirqs sized arrays with radix tree") Fixes: 79858fee307c ("xen: fix hvm_domain_use_pirq's behavior") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: daa90dfea9175c07f13d1a2d901857b2dd14d080 master date: 2024-07-02 08:35:56 +0200 --- xen/arch/x86/irq.c | 1 + xen/common/event_channel.c | 11 ++++++++--- xen/include/xen/irq.h | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 11b2a213aa..827ed556d3 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -1413,6 +1413,7 @@ void (pirq_cleanup_check)(struct pirq *pirq, struct domain *d) if ( radix_tree_delete(&d->pirq_tree, pirq->pirq) != pirq ) BUG(); + free_pirq_struct(pirq); } /* Flush all ready EOIs from the top of this CPU's pending-EOI stack. */ diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index dada9f15f5..7eb719f0de 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -680,11 +680,16 @@ int evtchn_close(struct domain *d1, int port1, bool guest) if ( !is_hvm_domain(d1) ) pirq_guest_unbind(d1, pirq); pirq->evtchn = 0; - pirq_cleanup_check(pirq, d1); #ifdef CONFIG_X86 - if ( is_hvm_domain(d1) && domain_pirq_to_irq(d1, pirq->pirq) > 0 ) - unmap_domain_pirq_emuirq(d1, pirq->pirq); + if ( !is_hvm_domain(d1) || + domain_pirq_to_irq(d1, pirq->pirq) <= 0 || + unmap_domain_pirq_emuirq(d1, pirq->pirq) < 0 ) + /* + * The successful path of unmap_domain_pirq_emuirq() will have + * called pirq_cleanup_check() already. + */ #endif + pirq_cleanup_check(pirq, d1); } unlink_pirq_port(chn1, d1->vcpu[chn1->notify_vcpu_id]); break; diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index c93ef31a9c..f69c9ec760 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -179,7 +179,7 @@ extern struct pirq *pirq_get_info(struct domain *, int pirq); void pirq_cleanup_check(struct pirq *, struct domain *); #define pirq_cleanup_check(pirq, d) \ - ((pirq)->evtchn ? pirq_cleanup_check(pirq, d) : (void)0) + (!(pirq)->evtchn ? pirq_cleanup_check(pirq, d) : (void)0) extern void pirq_guest_eoi(struct pirq *); extern void desc_guest_eoi(struct irq_desc *, struct pirq *); -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:45:44 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:45:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754328.1162707 (Exim 4.92) (envelope-from ) id 1sPkC0-0000eV-2n; Fri, 05 Jul 2024 14:45:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754328.1162707; Fri, 05 Jul 2024 14:45:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkC0-0000eN-03; Fri, 05 Jul 2024 14:45:44 +0000 Received: by outflank-mailman (input) for mailman id 754328; Fri, 05 Jul 2024 14:45:43 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBz-0000eH-C5 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:43 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkBz-0002Jy-BP for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:43 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkBz-00038L-Al for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:43 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=cipqqt7I9jUZZURguzEOK8zoSU7EKON+5iSoopSg284=; b=OywAVseNHYUQ6OYgDzSlcWKUSi +mI1eRWzSGDbO2CsvvuenO71XlbiqL9ltu4f+/HJselZ7NVoIZRnGkNZwjngrYSjjOg81B5hFImvC GSvhIpi9f0juhCyYuF3H9ICcq5SlxjNOlOZb2yGjvezWpRSBqDuDagOGXklzSEFRd5Zo=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment() Message-Id: Date: Fri, 05 Jul 2024 14:45:43 +0000 commit 50216569eab172f483495ab3fdcf19417c2de0ad Author: Andrew Cooper AuthorDate: Thu Jul 4 14:21:46 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:21:46 2024 +0200 tools/dombuilder: Correct the length calculation in xc_dom_alloc_segment() xc_dom_alloc_segment() is passed a size in bytes, calculates a size in pages from it, then fills in the new segment information with a bytes value re-calculated from the number of pages. This causes the module information given to the guest (MB, or PVH) to have incorrect sizes; specifically, sizes rounded up to the next page. This in turn is problematic for Xen. When Xen finds a gzipped module, it peeks at the end metadata to judge the decompressed size, which is a -4 backreference from the reported end of the module. Fill in seg->vend using the correct number of bytes. Fixes: ea7c8a3d0e82 ("libxc: reorganize domain builder guest memory allocator") Signed-off-by: Andrew Cooper Acked-by: Anthony PERARD master commit: 4c3a618b0adaa0cd59e0fa0898bb60978b8b3a5f master date: 2024-07-02 10:50:18 +0100 --- tools/libs/guest/xg_dom_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libs/guest/xg_dom_core.c b/tools/libs/guest/xg_dom_core.c index c4f4e7f3e2..f5521d528b 100644 --- a/tools/libs/guest/xg_dom_core.c +++ b/tools/libs/guest/xg_dom_core.c @@ -601,7 +601,7 @@ int xc_dom_alloc_segment(struct xc_dom_image *dom, memset(ptr, 0, pages * page_size); seg->vstart = start; - seg->vend = dom->virt_alloc_end; + seg->vend = start + size; DOMPRINTF("%-20s: %-12s : 0x%" PRIx64 " -> 0x%" PRIx64 " (pfn 0x%" PRIpfn " + 0x%" PRIpfn " pages)", -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:45:54 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:45:54 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754329.1162711 (Exim 4.92) (envelope-from ) id 1sPkCA-0000h6-3s; Fri, 05 Jul 2024 14:45:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754329.1162711; Fri, 05 Jul 2024 14:45:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCA-0000gz-1Q; Fri, 05 Jul 2024 14:45:54 +0000 Received: by outflank-mailman (input) for mailman id 754329; Fri, 05 Jul 2024 14:45:53 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkC9-0000gr-F5 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:53 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkC9-0002K7-ES for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:53 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkC9-000394-DX for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:45:53 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=2ciQJ8clQAR89WmOCi/XZC+8DoDwEj7ZVTz43ZgdDio=; b=gVakKqWJ/bcnGEY108pRZdsenk 3bOXw73XoWHeq0XnJ+3MtHJW5VkSvXTEDw/6/LMyg8REXGzM0GF/NfOw1FEv+qGco8kB1M1XPqGyD 9mMmfSvMCf7cJO990M4TYl1G66AbiVKa1aIOI+ivVT65/TayD4YVOFuguTVcagXqxjWY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] tools/libxs: Fix CLOEXEC handling in get_dev() Message-Id: Date: Fri, 05 Jul 2024 14:45:53 +0000 commit 4baf3a31a53ae14a3ed8e57092e97f584359079f Author: Andrew Cooper AuthorDate: Thu Jul 4 14:21:55 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:21:55 2024 +0200 tools/libxs: Fix CLOEXEC handling in get_dev() Move the O_CLOEXEC compatibility outside of an #ifdef USE_PTHREAD block. Introduce set_cloexec() to wrap fcntl() setting FD_CLOEXEC. It will be reused for other CLOEXEC fixes too. Use set_cloexec() when O_CLOEXEC isn't available as a best-effort fallback. Fixes: f4f2f3402b2f ("tools/libxs: Open /dev/xen/xenbus fds as O_CLOEXEC") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD master commit: bf7c1464706adfa903f1e7d59383d042c3a88e39 master date: 2024-07-02 10:51:06 +0100 --- tools/libs/store/xs.c | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index b5933fb108..0abbcb13b4 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -40,6 +40,10 @@ #include +#ifndef O_CLOEXEC +#define O_CLOEXEC 0 +#endif + struct xs_stored_msg { struct list_head list; struct xsd_sockmsg hdr; @@ -54,10 +58,6 @@ struct xs_stored_msg { #include #endif -#ifndef O_CLOEXEC -#define O_CLOEXEC 0 -#endif - struct xs_handle { /* Communications channel to xenstore daemon. */ int fd; @@ -176,6 +176,16 @@ static bool setnonblock(int fd, int nonblock) { return true; } +static bool set_cloexec(int fd) +{ + int flags = fcntl(fd, F_GETFL); + + if (flags < 0) + return false; + + return fcntl(fd, flags | FD_CLOEXEC) >= 0; +} + int xs_fileno(struct xs_handle *h) { char c = 0; @@ -230,8 +240,24 @@ error: static int get_dev(const char *connect_to) { - /* We cannot open read-only because requests are writes */ - return open(connect_to, O_RDWR | O_CLOEXEC); + int fd, saved_errno; + + fd = open(connect_to, O_RDWR | O_CLOEXEC); + if (fd < 0) + return -1; + + /* Compat for non-O_CLOEXEC environments. Racy. */ + if (!O_CLOEXEC && !set_cloexec(fd)) + goto error; + + return fd; + +error: + saved_errno = errno; + close(fd); + errno = saved_errno; + + return -1; } static int all_restrict_cb(Xentoolcore__Active_Handle *ah, domid_t domid) { -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:46:04 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:46:04 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754330.1162716 (Exim 4.92) (envelope-from ) id 1sPkCK-0000k8-5a; Fri, 05 Jul 2024 14:46:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754330.1162716; Fri, 05 Jul 2024 14:46:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCK-0000k0-2t; Fri, 05 Jul 2024 14:46:04 +0000 Received: by outflank-mailman (input) for mailman id 754330; Fri, 05 Jul 2024 14:46:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCJ-0000jr-II for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCJ-0002KT-HX for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkCJ-0003Ap-Gb for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=KpVKCdr5+pw4InVayycjsryHzY5RTrsLKtaF482gDZI=; b=mTwx1FTEUt5Ae78CPYRetfo1fd XaPSuTjQ8W6VlYlxnJCgiYvEU9MOIKqkbZqzGzfddiQ/HZrGj8Ixo5Qyvbwkx8hTZlXZ84QkBJJdo 6uy8OZZuphowE4Lps24iyY3ZifglrqZVDsfsXUiDxVMjMIJ5b+KQLwCrgRJCKkrV6rhk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] tools/libxs: Fix CLOEXEC handling in get_socket() Message-Id: Date: Fri, 05 Jul 2024 14:46:03 +0000 commit f121420f0de1f3acfc58d014b6f025f117fc9e05 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:22:05 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:22:05 2024 +0200 tools/libxs: Fix CLOEXEC handling in get_socket() get_socket() opens a socket, then uses fcntl() to set CLOEXEC. This is racy with exec(). Open the socket with SOCK_CLOEXEC. Use the same compatibility strategy as O_CLOEXEC on ancient versions of Linux. Reported-by: Frediano Ziglio Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD master commit: 1957dd6aff931877fc22699d8f2d4be8728014ba master date: 2024-07-02 10:51:11 +0100 --- tools/libs/store/xs.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 0abbcb13b4..26542f13dd 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -44,6 +44,10 @@ #define O_CLOEXEC 0 #endif +#ifndef SOCK_CLOEXEC +#define SOCK_CLOEXEC 0 +#endif + struct xs_stored_msg { struct list_head list; struct xsd_sockmsg hdr; @@ -207,16 +211,14 @@ int xs_fileno(struct xs_handle *h) static int get_socket(const char *connect_to) { struct sockaddr_un addr; - int sock, saved_errno, flags; + int sock, saved_errno; - sock = socket(PF_UNIX, SOCK_STREAM, 0); + sock = socket(PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC, 0); if (sock < 0) return -1; - if ((flags = fcntl(sock, F_GETFD)) < 0) - goto error; - flags |= FD_CLOEXEC; - if (fcntl(sock, F_SETFD, flags) < 0) + /* Compat for non-SOCK_CLOEXEC environments. Racy. */ + if (!SOCK_CLOEXEC && !set_cloexec(sock)) goto error; addr.sun_family = AF_UNIX; -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:46:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:46:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754331.1162720 (Exim 4.92) (envelope-from ) id 1sPkCV-0000mi-7S; Fri, 05 Jul 2024 14:46:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754331.1162720; Fri, 05 Jul 2024 14:46:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCV-0000ma-4K; Fri, 05 Jul 2024 14:46:15 +0000 Received: by outflank-mailman (input) for mailman id 754331; Fri, 05 Jul 2024 14:46:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCT-0000mP-Lj for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCT-0002Kh-L2 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkCT-0003KI-KF for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=b4rlkOoHGjF6IooorsW9HFozOdD02mmcS9k6ycflu+E=; b=1mfGfxBHG2tcCo0WD/AixumG/N sgzMjuA3B1hmmz70hFfSsP7tjPdaKJCOeDTxXt0fq234hSAE8iierC++6LMX7VznO8HSJthbLtrg8 gzxeh9XOTOvPpuhAjg7Wp0f1gHllGKpb2FONMbVzAfPnoeZAlxw9QolgOPFvkq8Sd/wg=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] tools/libxs: Fix CLOEXEC handling in xs_fileno() Message-Id: Date: Fri, 05 Jul 2024 14:46:13 +0000 commit 750475017de246846a707470ebc88374f9bc9dc9 Author: Andrew Cooper AuthorDate: Thu Jul 4 14:22:15 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:22:15 2024 +0200 tools/libxs: Fix CLOEXEC handling in xs_fileno() xs_fileno() opens a pipe on first use to communicate between the watch thread and the main thread. Nothing ever sets CLOEXEC on the file descriptors. Check for the availability of the pipe2() function with configure. Despite starting life as Linux-only, FreeBSD and NetBSD have gained it. When pipe2() isn't available, try our best with pipe() and set_cloexec(). Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Acked-by: Anthony PERARD master commit: a2ff677852f0ce05fa335e8e5682bf2ae0c916ee master date: 2024-07-02 10:52:59 +0100 --- tools/config.h.in | 3 +++ tools/configure | 12 ++++++++++++ tools/configure.ac | 2 ++ tools/libs/store/xs.c | 16 +++++++++++++++- 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/tools/config.h.in b/tools/config.h.in index 3071cb3998..9d839f8af1 100644 --- a/tools/config.h.in +++ b/tools/config.h.in @@ -39,6 +39,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `pipe2' function. */ +#undef HAVE_PIPE2 + /* Qemu traditional enabled */ #undef HAVE_QEMU_TRADITIONAL diff --git a/tools/configure b/tools/configure index 6f0b0bb82b..402364f4c4 100755 --- a/tools/configure +++ b/tools/configure @@ -9699,6 +9699,18 @@ if test "$ax_found" = "0"; then : fi +for ac_func in pipe2 +do : + ac_fn_c_check_func "$LINENO" "pipe2" "ac_cv_func_pipe2" +if test "x$ac_cv_func_pipe2" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_PIPE2 1 +_ACEOF + +fi +done + + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure diff --git a/tools/configure.ac b/tools/configure.ac index 31bdef3d70..c1ea1e32ca 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -518,4 +518,6 @@ AS_IF([test "x$pvshim" = "xy"], [ AX_FIND_HEADER([INCLUDE_ENDIAN_H], [endian.h sys/endian.h]) +AC_CHECK_FUNCS([pipe2]) + AC_OUTPUT() diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 26542f13dd..3f723bff5a 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -190,13 +190,27 @@ static bool set_cloexec(int fd) return fcntl(fd, flags | FD_CLOEXEC) >= 0; } +static int pipe_cloexec(int fds[2]) +{ +#if HAVE_PIPE2 + return pipe2(fds, O_CLOEXEC); +#else + if (pipe(fds) < 0) + return -1; + /* Best effort to set CLOEXEC. Racy. */ + set_cloexec(fds[0]); + set_cloexec(fds[1]); + return 0; +#endif +} + int xs_fileno(struct xs_handle *h) { char c = 0; mutex_lock(&h->watch_mutex); - if ((h->watch_pipe[0] == -1) && (pipe(h->watch_pipe) != -1)) { + if ((h->watch_pipe[0] == -1) && (pipe_cloexec(h->watch_pipe) != -1)) { /* Kick things off if the watch list is already non-empty. */ if (!list_empty(&h->watch_list)) while (write(h->watch_pipe[1], &c, 1) != 1) -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:46:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:46:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754332.1162723 (Exim 4.92) (envelope-from ) id 1sPkCf-0000pj-9a; Fri, 05 Jul 2024 14:46:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754332.1162723; Fri, 05 Jul 2024 14:46:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCf-0000pc-73; Fri, 05 Jul 2024 14:46:25 +0000 Received: by outflank-mailman (input) for mailman id 754332; Fri, 05 Jul 2024 14:46:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCd-0000pW-P2 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCd-0002Kl-OM for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkCd-0003Mb-NW for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=MhFA/6MNHwpORaKZxiZV0NhbThak/oYkWsQlsK74BGA=; b=50Ewp1kUmimuKG0xZyM/QAkFOe 8uc8Y6hHVEKIDlFSN6yUOPO841OgZPe7Mf+j2UsXe05a+OI+z+vx6HKZq3gCAJZeOTjbl7tvIQmQM Ho8CvWp5WBj1a3VB7rfpGT0jezZQc1prj7F2P8cnlfp+QC/htV4tcAIcQ1pV3IqmrkVI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] cmdline: document and enforce "extra_guest_irqs" upper bounds Message-Id: Date: Fri, 05 Jul 2024 14:46:23 +0000 commit a626bfbcbb532f5a22182fab0bfbd51597a6a666 Author: Jan Beulich AuthorDate: Thu Jul 4 14:22:54 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:22:54 2024 +0200 cmdline: document and enforce "extra_guest_irqs" upper bounds PHYSDEVOP_pirq_eoi_gmfn_v accepting just a single GFN implies that no more than 32k pIRQ-s can be used by a domain on x86. Document this upper bound. To also enforce the limit, (ab)use both arch_hwdom_irqs() (changing its parameter type) and setup_system_domains(). This is primarily to avoid exposing the two static variables or introducing yet further arch hooks. While touching arch_hwdom_irqs() also mark it hwdom-init. Signed-off-by: Jan Beulich Acked-by: Roger Pau Monné amend 'cmdline: document and enforce "extra_guest_irqs" upper bounds' Address late review comments for what is now commit 17f6d398f765: - bound max_irqs right away against nr_irqs - introduce a #define for a constant used twice Requested-by: Roger Pau Monné Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: 17f6d398f76597f8009ec0530842fb8705ece7ba master date: 2024-07-02 12:00:27 +0200 master commit: 1f56accba33ffea0abf7d1c6384710823d10cbd6 master date: 2024-07-03 14:03:27 +0200 --- docs/misc/xen-command-line.pandoc | 3 ++- xen/arch/x86/io_apic.c | 17 ++++++++++------- xen/common/domain.c | 24 ++++++++++++++++++++++-- xen/include/xen/irq.h | 3 ++- 4 files changed, 36 insertions(+), 11 deletions(-) diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc index fba5a8221b..ccb185a4f3 100644 --- a/docs/misc/xen-command-line.pandoc +++ b/docs/misc/xen-command-line.pandoc @@ -1141,7 +1141,8 @@ common for all domUs, while the optional second number (preceded by a comma) is for dom0. Changing the setting for domU has no impact on dom0 and vice versa. For example to change dom0 without changing domU, use `extra_guest_irqs=,512`. The default value for Dom0 and an eventual separate -hardware domain is architecture dependent. +hardware domain is architecture dependent. The upper limit for both values on +x86 is such that the resulting total number of IRQs can't be higher than 32768. Note that specifying zero as domU value means zero, while for dom0 it means to use the default. diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index e3e71c7a52..6f4b04878d 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2661,18 +2661,21 @@ void __init ioapic_init(void) nr_irqs_gsi, nr_irqs - nr_irqs_gsi); } -unsigned int arch_hwdom_irqs(domid_t domid) +unsigned int __hwdom_init arch_hwdom_irqs(const struct domain *d) { unsigned int n = fls(num_present_cpus()); + /* Bounding by the domain pirq EOI bitmap capacity. */ + const unsigned int max_irqs = min_t(unsigned int, nr_irqs, + PAGE_SIZE * BITS_PER_BYTE); - if ( !domid ) - n = min(n, dom0_max_vcpus()); - n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, nr_irqs); + if ( is_system_domain(d) ) + return max_irqs; - /* Bounded by the domain pirq eoi bitmap gfn. */ - n = min_t(unsigned int, n, PAGE_SIZE * BITS_PER_BYTE); + if ( !d->domain_id ) + n = min(n, dom0_max_vcpus()); + n = min(nr_irqs_gsi + n * NR_DYNAMIC_VECTORS, max_irqs); - printk("Dom%d has maximum %u PIRQs\n", domid, n); + printk("%pd has maximum %u PIRQs\n", d, n); return n; } diff --git a/xen/common/domain.c b/xen/common/domain.c index 8f924d5cdd..13a1674ce4 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -351,7 +351,8 @@ static int late_hwdom_init(struct domain *d) } static unsigned int __read_mostly extra_hwdom_irqs; -static unsigned int __read_mostly extra_domU_irqs = 32; +#define DEFAULT_EXTRA_DOMU_IRQS 32U +static unsigned int __read_mostly extra_domU_irqs = DEFAULT_EXTRA_DOMU_IRQS; static int __init cf_check parse_extra_guest_irqs(const char *s) { @@ -659,7 +660,7 @@ struct domain *domain_create(domid_t domid, d->nr_pirqs = nr_static_irqs + extra_domU_irqs; else d->nr_pirqs = extra_hwdom_irqs ? nr_static_irqs + extra_hwdom_irqs - : arch_hwdom_irqs(domid); + : arch_hwdom_irqs(d); d->nr_pirqs = min(d->nr_pirqs, nr_irqs); radix_tree_init(&d->pirq_tree); @@ -783,6 +784,25 @@ void __init setup_system_domains(void) if ( IS_ERR(dom_xen) ) panic("Failed to create d[XEN]: %ld\n", PTR_ERR(dom_xen)); +#ifdef CONFIG_HAS_PIRQ + /* Bound-check values passed via "extra_guest_irqs=". */ + { + unsigned int n = max(arch_hwdom_irqs(dom_xen), nr_static_irqs); + + if ( extra_hwdom_irqs > n - nr_static_irqs ) + { + extra_hwdom_irqs = n - nr_static_irqs; + printk(XENLOG_WARNING "hwdom IRQs bounded to %u\n", n); + } + if ( extra_domU_irqs > + max(DEFAULT_EXTRA_DOMU_IRQS, n - nr_static_irqs) ) + { + extra_domU_irqs = n - nr_static_irqs; + printk(XENLOG_WARNING "domU IRQs bounded to %u\n", n); + } + } +#endif + /* * Initialise our DOMID_IO domain. * This domain owns I/O pages that are within the range of the page_info diff --git a/xen/include/xen/irq.h b/xen/include/xen/irq.h index f69c9ec760..1fcf5a6755 100644 --- a/xen/include/xen/irq.h +++ b/xen/include/xen/irq.h @@ -194,8 +194,9 @@ extern irq_desc_t *pirq_spin_lock_irq_desc( unsigned int set_desc_affinity(struct irq_desc *, const cpumask_t *); +/* When passed a system domain, this returns the maximum permissible value. */ #ifndef arch_hwdom_irqs -unsigned int arch_hwdom_irqs(domid_t); +unsigned int arch_hwdom_irqs(const struct domain *); #endif #ifndef arch_evtchn_bind_pirq -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:46:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:46:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754333.1162728 (Exim 4.92) (envelope-from ) id 1sPkCp-0000sW-BJ; Fri, 05 Jul 2024 14:46:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754333.1162728; Fri, 05 Jul 2024 14:46:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCp-0000sK-8g; Fri, 05 Jul 2024 14:46:35 +0000 Received: by outflank-mailman (input) for mailman id 754333; Fri, 05 Jul 2024 14:46:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCn-0000s8-Sc for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCn-0002L7-Rx for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkCn-0003NX-QU for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=yDKLVTyqIr99oZzsFAcmsCoF76KBYnBpNJntWy3JYUY=; b=hvCX6YpSuKBPIVhyc+tU774uOs N6vxN8wf5JnIpjxUs5XfHexekryP1HIBRrhO9nvRCGGJAx4C+zT6fPFTczsf9A33ezTbWA4OzAheN AeZpUQY5thbC9W5w801on5BKsgNolfeXyr9tJL0J/fuJz1C3AqnYSJhx6hg0tcA3AYWM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] x86/entry: don't clear DF when raising #UD for lack of syscall handler Message-Id: Date: Fri, 05 Jul 2024 14:46:33 +0000 commit b61a4baf35e912bddfe1b6da0093edcd474d918c Author: Jan Beulich AuthorDate: Thu Jul 4 14:23:30 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 14:23:30 2024 +0200 x86/entry: don't clear DF when raising #UD for lack of syscall handler While doing so is intentional when invoking the actual callback, to mimic a hard-coded SYCALL_MASK / FMASK MSR, the same should not be done when no handler is available and hence #UD is raised. Fixes: ca6fcf4321b3 ("x86/pv: Inject #UD for missing SYSCALL callbacks") Reported-by: Andrew Cooper Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper master commit: d2fe9ab3048d503869ec81bc49db07e55a4a2386 master date: 2024-07-02 12:01:21 +0200 --- xen/arch/x86/x86_64/entry.S | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/x86_64/entry.S b/xen/arch/x86/x86_64/entry.S index 1ecf900eee..7bb0cc708a 100644 --- a/xen/arch/x86/x86_64/entry.S +++ b/xen/arch/x86/x86_64/entry.S @@ -38,6 +38,14 @@ switch_to_kernel: setc %cl leal (,%rcx,TBF_INTERRUPT),%ecx + /* + * The PV ABI hardcodes the (guest-inaccessible and virtual) + * SYSCALL_MASK MSR such that DF (and nothing else) would be cleared. + * Note that the equivalent of IF (VGCF_syscall_disables_events) is + * dealt with separately above. + */ + mov $~X86_EFLAGS_DF, %esi + test %rax, %rax UNLIKELY_START(z, syscall_no_callback) /* TB_eip == 0 => #UD */ mov VCPU_trap_ctxt(%rbx), %rdi @@ -47,12 +55,14 @@ UNLIKELY_START(z, syscall_no_callback) /* TB_eip == 0 => #UD */ testb $4, X86_EXC_UD * TRAPINFO_sizeof + TRAPINFO_flags(%rdi) setnz %cl lea TBF_EXCEPTION(, %rcx, TBF_INTERRUPT), %ecx + or $~0, %esi /* Don't clear DF */ UNLIKELY_END(syscall_no_callback) movq %rax,TRAPBOUNCE_eip(%rdx) movb %cl,TRAPBOUNCE_flags(%rdx) call create_bounce_frame - andl $~X86_EFLAGS_DF,UREGS_eflags(%rsp) + /* Conditionally clear DF */ + and %esi, UREGS_eflags(%rsp) /* %rbx: struct vcpu */ test_all_events: ASSERT_NOT_IN_ATOMIC -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:46:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:46:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754334.1162732 (Exim 4.92) (envelope-from ) id 1sPkCz-0000vQ-D8; Fri, 05 Jul 2024 14:46:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754334.1162732; Fri, 05 Jul 2024 14:46:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCz-0000vI-A2; Fri, 05 Jul 2024 14:46:45 +0000 Received: by outflank-mailman (input) for mailman id 754334; Fri, 05 Jul 2024 14:46:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCx-0000v3-VZ for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:43 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkCx-0002LF-Un for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:43 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkCx-0003OH-U6 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:46:43 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=uOQoACnbozMP0J1w++lYto3g3SxD0l/VfwHa5TcorFo=; b=q5rYQFRXEtxZDSCK0wTlJg2Gcn Fa52ohhHtJF0O4ZOXBMtzpHuGGNedJLnMmEJmfacjnVwJ8ZiJ1it3XwqQzMGmZ3gpIP619RCqUiZn 2iq3gOUvj+UnAEPhRks990D3bxHvBQKzOqvdDIJkPAxb+LC2ftwYBY0YrgVYoWP7Pwf0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] evtchn: build fix for Arm Message-Id: Date: Fri, 05 Jul 2024 14:46:43 +0000 commit 43d5f8f079a53ee905b3d0ccff3b871cd54a853b Author: Jan Beulich AuthorDate: Thu Jul 4 16:59:03 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 16:59:03 2024 +0200 evtchn: build fix for Arm When backporting daa90dfea917 ("pirq_cleanup_check() leaks") I neglected to pay attention to it depending on 13a7b0f9f747 ("restrict concept of pIRQ to x86"). That one doesn't want backporting imo, so use / adjust custom #ifdef-ary to address the immediate issue of pirq_cleanup_check() not being available on Arm. Signed-off-by: Jan Beulich --- xen/common/event_channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index 7eb719f0de..7b59535ee3 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -618,7 +618,9 @@ static int evtchn_bind_pirq(evtchn_bind_pirq_t *bind) if ( rc != 0 ) { info->evtchn = 0; +#ifdef CONFIG_X86 pirq_cleanup_check(info, d); +#endif goto out; } @@ -688,8 +690,8 @@ int evtchn_close(struct domain *d1, int port1, bool guest) * The successful path of unmap_domain_pirq_emuirq() will have * called pirq_cleanup_check() already. */ -#endif pirq_cleanup_check(pirq, d1); +#endif } unlink_pirq_port(chn1, d1->vcpu[chn1->notify_vcpu_id]); break; -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 14:55:06 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 14:55:06 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754339.1162745 (Exim 4.92) (envelope-from ) id 1sPkL2-0002Me-7F; Fri, 05 Jul 2024 14:55:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754339.1162745; Fri, 05 Jul 2024 14:55:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkL2-0002MT-4T; Fri, 05 Jul 2024 14:55:04 +0000 Received: by outflank-mailman (input) for mailman id 754339; Fri, 05 Jul 2024 14:55:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkL1-0002Lw-0T for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:55:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPkL0-0002Tm-Vu for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:55:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPkL0-0004My-Us for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 14:55:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=FIuFGzGCjFurVynY49x1CelRjYzkZalk6Ab+Z4ussck=; b=TW3TwPU/378mhwrcWTCn2wuDgu gmnGoXaUlT9hj+AMjlwCHrFWONRxDwz09Zh25lrsp7PFWt59kzimdvIE4xJmTdk4M+4URnjMUoAAg hfWwimKuy2/k/mfQj9clRepUNkynPBmH7GP5Cuq6y62aUokVhhaqTNhdecJ8y+ijpDOM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Rework the CentOS7 container Message-Id: Date: Fri, 05 Jul 2024 14:55:02 +0000 commit c2a66d0b58b9661037cfed6bf3f8122b3363ca38 Author: Andrew Cooper AuthorDate: Wed Jul 3 12:06:46 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 5 15:46:23 2024 +0100 CI: Rework the CentOS7 container CentOS 7 is fully End-of-life as of 2024-06-30, and the Yum repo configuration points at URLs which have become non-existent. First, start by using a heredoc RUN for legibility. It's important to use `set -e` to offset the fact that we're no longer chaining every command together with an &&. Also, because we're using a single RUN command to perform all RPM operations, we no longer need to work around the OverlayFS bug. Adjust the CentOS-*.repo files to point at vault.centos.org. This also involves swapping mirrorlist= for baseurl= in the yum config. Use a minor bashism to express the dependenices more coherently, and identify why we have certain dependencies. Some adjustments are: * We need bzip2-devel for the dombuilder. bzip2 needs retaining stubdom or `tar` fails to unpack the .bz2 archives. * {lzo,lz4,ztd}-devel are new optional dependency since the last time this package list was refreshed. * openssl-devel hasn't been a dependency since Xen 4.6. * We long ago ceased being able to build Qemu and SeaBIOS in this container, so drop their dependencies too. Signed-off-by: Andrew Cooper Acked-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- automation/build/centos/7.dockerfile | 101 +++++++++++++++++++++-------------- 1 file changed, 62 insertions(+), 39 deletions(-) diff --git a/automation/build/centos/7.dockerfile b/automation/build/centos/7.dockerfile index 657550f308..f41dda7320 100644 --- a/automation/build/centos/7.dockerfile +++ b/automation/build/centos/7.dockerfile @@ -6,44 +6,67 @@ LABEL maintainer.name="The Xen Project" \ RUN mkdir /build WORKDIR /build -# work around https://github.com/moby/moby/issues/10180 -# and add EPEL for dev86 -RUN rpm --rebuilddb && \ - yum -y install \ - yum-plugin-ovl \ - epel-release \ - && yum clean all && \ - rm -rf /var/cache/yum +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 18:22:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754471.1162903 (Exim 4.92) (envelope-from ) id 1sPnZL-0006T2-Su; Fri, 05 Jul 2024 18:22:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754471.1162903; Fri, 05 Jul 2024 18:22:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZL-0006Su-Q0; Fri, 05 Jul 2024 18:22:03 +0000 Received: by outflank-mailman (input) for mailman id 754471; Fri, 05 Jul 2024 18:22:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZK-0006So-2P for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZJ-0006YK-VK for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPnZJ-0000z2-Rt for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=JEbS8RdBevLBEwoVbm4lzLPYIWoWfWUSYYJWeJzT9ik=; b=uQDlwq+LjKDqQpr8w4bKqkv4y2 OVEvoBPKTDpGq23seb75dU9X7DTj36CPobxTL2W5gBWL/LdgoIhvryjfYOCaErBpWxRUXdSWD3j4G GAeSXWJYys89AZIortNOy9EgOWp2SxENqO6FEnbBWyf4XdhQUSAx5cy0GCfDvmoeRFTk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] xen/riscv: use .insn with operands to support the older gas Message-Id: Date: Fri, 05 Jul 2024 18:22:01 +0000 commit a771e0259457eb9373ae97f54436957ffa09a47d Author: Oleksii Kurochko AuthorDate: Thu Jul 4 09:30:46 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 09:30:46 2024 +0200 xen/riscv: use .insn with operands to support the older gas Support for specifying "raw" insns was added only in 2.38. To support older version it would be better switch to .insn with operands. The following compilation error occurs: ./arch/riscv/include/asm/processor.h: Assembler messages: ./arch/riscv/include/asm/processor.h:70: Error: unrecognized opcode `0x0100000F' In case of the following Binutils: $ riscv64-linux-gnu-as --version GNU assembler (GNU Binutils for Debian) 2.35.2 Suggested-by: Andrew Cooper Suggested-by: Jan Beulich Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich Release-Acked-By: Oleksii Kurochko --- xen/arch/riscv/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/riscv/include/asm/processor.h b/xen/arch/riscv/include/asm/processor.h index 6846151717..3ae164c265 100644 --- a/xen/arch/riscv/include/asm/processor.h +++ b/xen/arch/riscv/include/asm/processor.h @@ -67,7 +67,7 @@ static inline void cpu_relax(void) __asm__ __volatile__ ( "pause" ); #else /* Encoding of the pause instruction */ - __asm__ __volatile__ ( ".insn 0x0100000F" ); + __asm__ __volatile__ ( ".insn r MISC_MEM, 0, 0, x0, x0, x16" ); #endif barrier(); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 18:22:12 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 18:22:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754472.1162906 (Exim 4.92) (envelope-from ) id 1sPnZU-0006Uu-U1; Fri, 05 Jul 2024 18:22:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754472.1162906; Fri, 05 Jul 2024 18:22:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZU-0006Un-RL; Fri, 05 Jul 2024 18:22:12 +0000 Received: by outflank-mailman (input) for mailman id 754472; Fri, 05 Jul 2024 18:22:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZU-0006UV-49 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZU-0006YR-3O for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPnZU-0000zx-1F for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=O6vifcKyaldldHvHRWIKJe42dni5yVNUH2JoZiSrCCA=; b=ymRJhDLe8E7bu6PxWbmT2FgXJm HKOCYQiZjYbmOpmx6ArwjRl5VpHHGrxQbj1Uq5AmGImFk4lqkvcxI+mL8SFh3JI1LbiNS2RtcQb97 C13fHS5RuYWd1sDf1qd8s5OeQGwTKfAoyqPps7FhP39KDjKWtKcJRhrXt5E5DEdzEick=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] xen/vmap: Document the vmap header Message-Id: Date: Fri, 05 Jul 2024 18:22:12 +0000 commit 7e3701b6ce0347c8b906967e223fa846f23e71d4 Author: Alejandro Vallejo AuthorDate: Thu Jul 4 09:31:35 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 4 09:31:35 2024 +0200 xen/vmap: Document the vmap header In it's current form it's rather cryptic for uninitiated, so this patch documents everything in there to make it more palatable. No functional change. Signed-off-by: Alejandro Vallejo Acked-by: Jan Beulich Release-Acked-by: Oleksii Kurochko --- xen/include/xen/vmap.h | 102 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) diff --git a/xen/include/xen/vmap.h b/xen/include/xen/vmap.h index 0c16baa85f..fdae37e950 100644 --- a/xen/include/xen/vmap.h +++ b/xen/include/xen/vmap.h @@ -1,34 +1,133 @@ +/* + * Interface to map physical memory onto contiguous virtual memory areas. + * + * Two ranges of linear address space are reserved for this purpose: A general + * purpose area (VMAP_DEFAULT) and a livepatch-specific area (VMAP_XEN). The + * latter is used when loading livepatches and the former for everything else. + */ #if !defined(__XEN_VMAP_H__) && defined(VMAP_VIRT_START) #define __XEN_VMAP_H__ #include #include +/* Identifiers for the linear ranges tracked by vmap */ enum vmap_region { + /* + * Region used for general purpose RW mappings. Mapping/allocating memory + * here can induce extra allocations for the supporting page tables. + */ VMAP_DEFAULT, + /* + * Region used for loading livepatches. Can't use VMAP_DEFAULT because it + * must live close to the running Xen image. The caller also ensures all + * page tables are already in place with adequate PTE flags. + */ VMAP_XEN, + /* Sentinel value for bounds checking */ VMAP_REGION_NR, }; +/* + * Runtime initialiser for each vmap region type + * + * Must only be called once per vmap region type. + * + * @param type Designation of the region to initialise. + * @param start Start address of the `type` region. + * @param end End address (not inclusive) of the `type` region + */ void vm_init_type(enum vmap_region type, void *start, void *end); +/* + * Maps a set of physical ranges onto a single virtual range + * + * `mfn` is an array of `nr` physical ranges, each of which is `granularity` + * pages wide. `type` defines which vmap region to use for the mapping and + * `flags` is the PTE flags the page table leaves are meant to have. + * + * Typically used via the vmap() and vmap_contig() helpers. + * + * @param mfn Array of mfns + * @param granularity Number of contiguous pages each mfn represents + * @param nr Number of mfns in the `mfn` array + * @param align Alignment of the virtual area to map + * @param flags PTE flags for the leaves of the PT tree. + * @param type Which region to create the mappings on + * @return Pointer to the mapped area on success; NULL otherwise. + */ void *__vmap(const mfn_t *mfn, unsigned int granularity, unsigned int nr, unsigned int align, unsigned int flags, enum vmap_region type); + +/* + * Map an array of pages contiguously into the VMAP_DEFAULT vmap region + * + * @param[in] mfn Pointer to the base of an array of mfns + * @param[in] nr Number of mfns in the array + * @return Pointer to the mapped area on success; NULL otherwise. + */ void *vmap(const mfn_t *mfn, unsigned int nr); + +/* + * Maps physically contiguous pages onto the VMAP_DEFAULT vmap region + * + * @param mfn Base mfn of the physical region + * @param nr Number of mfns in the physical region + * @return Pointer to the mapped area on success; NULL otherwise. + */ void *vmap_contig(mfn_t mfn, unsigned int nr); + +/* + * Unmaps a range of virtually contiguous memory from one of the vmap regions + * + * The system remembers internally how wide the mapping is and unmaps it all. + * It also can determine the vmap region type from the `va`. + * + * @param va Virtual base address of the range to unmap + */ void vunmap(const void *va); +/* + * Allocate `size` octets of possibly non-contiguous physical memory and map + * them contiguously in the VMAP_DEFAULT vmap region + * + * @param size Pointer to the base of an array of mfns + * @return Pointer to the mapped area on success; NULL otherwise. + */ void *vmalloc(size_t size); + +/* Same as vmalloc(), but for the VMAP_XEN vmap region. */ void *vmalloc_xen(size_t size); +/* Same as vmalloc(), but set the contents to zero before returning */ void *vzalloc(size_t size); + +/* + * Unmap and free memory from vmalloc(), vmalloc_xen() or vzalloc() + * + * The system remembers internally how wide the allocation is and + * unmaps/frees it all. + * + * @param va Virtual base address of the range to free and unmap + */ void vfree(void *va); +/* + * Analogous to vmap_contig(), but for IO memory + * + * Unlike vmap_contig(), it ensures architecturally correct cacheability + * settings are set for the mapped IO memory. + * + * @param pa Physical base address of the MMIO region. + * @param len Length of the MMIO region in octets. + * @return Pointer to the mapped area on success; NULL otherwise. + */ void __iomem *ioremap(paddr_t pa, size_t len); /* Return the number of pages in the mapping starting at address 'va' */ unsigned int vmap_size(const void *va); +/* Analogous to vunmap(), but for IO memory mapped via ioremap() */ static inline void iounmap(void __iomem *va) { unsigned long addr = (unsigned long)(void __force *)va; @@ -36,7 +135,10 @@ static inline void iounmap(void __iomem *va) vunmap((void *)(addr & PAGE_MASK)); } +/* Pointer to 1 octet past the end of the VMAP_DEFAULT virtual area */ void *arch_vmap_virt_end(void); + +/* Initialises the VMAP_DEFAULT virtual range */ static inline void vm_init(void) { vm_init_type(VMAP_DEFAULT, (void *)VMAP_VIRT_START, arch_vmap_virt_end()); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 18:22:23 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 18:22:23 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754473.1162910 (Exim 4.92) (envelope-from ) id 1sPnZf-0006YQ-0j; Fri, 05 Jul 2024 18:22:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754473.1162910; Fri, 05 Jul 2024 18:22:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZe-0006YI-UK; Fri, 05 Jul 2024 18:22:22 +0000 Received: by outflank-mailman (input) for mailman id 754473; Fri, 05 Jul 2024 18:22:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZe-0006Y8-8H for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZe-0006Yd-7W for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPnZe-00010b-5W for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=wM3K93xyPiK+Zw7vwHNOlNuDQF+LJ+sELoiMsARh2M4=; b=j1LA0/dzZTDTXCIm7xrf/P+i90 GTGA6D5pEmfPhu5EfXuaELeyU6/xfouAPGDL4qR+FIRi/Kt8qZ796V+pq227drEx0vpFF/SXXI2Dy j0+bV6+EDz3wGKQI7u8f3VZ01YR5uA1wCv5nfK4y/jqTyCulkCSsw7zsp5A9CmMq1OHg=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/xs-clients: Fix `make clean` rule Message-Id: Date: Fri, 05 Jul 2024 18:22:22 +0000 commit 5d8c784783f45ead96cf78fc40f2c10ee91a5396 Author: Andrew Cooper AuthorDate: Wed Jul 3 23:01:11 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 4 11:32:55 2024 +0100 tools/xs-clients: Fix `make clean` rule Prior to the split, "the clients" used tools/xenstored/Makefile.common whose clean rule includes *.o whereas after the split, the removal of *.o was lost by virtule of not including Makefile.common any more. This is the bug behind the following build error: make[2]: Entering directory '/local/xen.git/tools/xs-clients' gcc xenstore_client.o (snip) /usr/bin/ld: xenstore_client.o: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE /usr/bin/ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status make[2]: *** [Makefile:35: xenstore] Error 1 which was caused by `make clean` not properly cleaning the tree as I was swapping between various build containers. Switch to a plain single-colon clean rule. Fixes: 5c293058b130 ("tools/xenstore: move xenstored sources into dedicated directory") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Release-Acked-by: Oleksii Kurochko --- tools/xs-clients/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/xs-clients/Makefile b/tools/xs-clients/Makefile index 4e78d365e0..5415c44192 100644 --- a/tools/xs-clients/Makefile +++ b/tools/xs-clients/Makefile @@ -38,8 +38,8 @@ xenstore-control: xenstore_control.o $(CC) $(LDFLAGS) $^ $(LDLIBS) -o $@ $(APPEND_LDFLAGS) .PHONY: clean -clean:: - $(RM) $(TARGETS) $(DEPS_RM) +clean: + $(RM) *.o $(TARGETS) $(DEPS_RM) .PHONY: distclean distclean: clean -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 18:22:33 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 18:22:33 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754474.1162915 (Exim 4.92) (envelope-from ) id 1sPnZp-0006bT-2X; Fri, 05 Jul 2024 18:22:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754474.1162915; Fri, 05 Jul 2024 18:22:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZo-0006bJ-W0; Fri, 05 Jul 2024 18:22:32 +0000 Received: by outflank-mailman (input) for mailman id 754474; Fri, 05 Jul 2024 18:22:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZo-0006b7-Bw for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZo-0006Yq-BL for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPnZo-00011G-9Z for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=GeLbL2Jk4Q5KIoQUb5rQwLA0ZflZBx4DRfCBQURb8gw=; b=LFEEvHPWDsqpAmaCNzay09bOKf N79RNBbWS5EAJM8TmkkMLkd3wRlO4i2CtzFVBmHkdNw86Qy7gBkc9MIijtBTmdvi7gnhlnSTw2rB2 7RYWG0arw4iRWyNXHztizf92z5MavZj88EUX1HLjXEhwBgmlVtx++rYmj1Hdt417U18U=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] build/mkheader: Remove C-isms from the code Message-Id: Date: Fri, 05 Jul 2024 18:22:32 +0000 commit 31618bf80ece39510bf2f998e4c60ce9e05ee6bd Author: Andrew Cooper AuthorDate: Wed Jul 3 21:59:34 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 4 11:43:30 2024 +0100 build/mkheader: Remove C-isms from the code This was clearly written by a C programmer, rather than a python programmer. Drop all the useless semi-colons. The very final line of the script simply references f.close, rather than calling the function. Switch to using a with: statement, as python does care about unclosed files if you enable enough warnings. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-by: Oleksii Kurochko --- tools/include/xen-foreign/mkheader.py | 104 +++++++++++++++++----------------- 1 file changed, 51 insertions(+), 53 deletions(-) diff --git a/tools/include/xen-foreign/mkheader.py b/tools/include/xen-foreign/mkheader.py index 081b57f842..3a33df4984 100644 --- a/tools/include/xen-foreign/mkheader.py +++ b/tools/include/xen-foreign/mkheader.py @@ -2,21 +2,21 @@ from __future__ import print_function -import sys, re; -from structs import unions, structs, defines; +import sys, re +from structs import unions, structs, defines # command line arguments -arch = sys.argv[1]; -outfile = sys.argv[2]; -infiles = sys.argv[3:]; +arch = sys.argv[1] +outfile = sys.argv[2] +infiles = sys.argv[3:] ########################################################################### # configuration #2: architecture information -inttypes = {}; -header = {}; -footer = {}; +inttypes = {} +header = {} +footer = {} #arm inttypes["arm32"] = [ @@ -35,7 +35,7 @@ header["arm32"] = """ # define __DECL_REG(n64, n32) uint64_t n64 # define __align8__ FIXME #endif -"""; +""" footer["arm32"] = """ #undef __DECL_REG """ @@ -56,7 +56,7 @@ header["arm64"] = """ # define __DECL_REG(n64, n32) uint64_t n64 # define __align8__ FIXME #endif -"""; +""" footer["arm64"] = """ #undef __DECL_REG """ @@ -73,12 +73,12 @@ header["x86_32"] = """ #define __DECL_REG_LO16(name) uint32_t e ## name #define __i386___X86_32 1 #pragma pack(4) -"""; +""" footer["x86_32"] = """ #undef __DECL_REG_LO8 #undef __DECL_REG_LO16 #pragma pack() -"""; +""" # x86_64 inttypes["x86_64"] = [ @@ -100,7 +100,7 @@ header["x86_64"] = """ #define __DECL_REG_LO16 __DECL_REG #define __DECL_REG_HI __DECL_REG #define __x86_64___X86_64 1 -"""; +""" footer["x86_64"] = """ #undef __DECL_REG #undef __DECL_REG_LOHI @@ -112,12 +112,12 @@ footer["x86_64"] = """ ########################################################################### # main -input = ""; -output = ""; -fileid = re.sub("[-.]", "_", "__FOREIGN_%s__" % outfile.upper()); +input = "" +output = "" +fileid = re.sub("[-.]", "_", "__FOREIGN_%s__" % outfile.upper()) for name in infiles: - f = open(name, "r"); + f = open(name, "r") # Sanity check the licence of the input file(s) line = f.readline() @@ -126,8 +126,8 @@ for name in infiles: (sys.argv[0], name, line.strip()), file=sys.stderr) exit(1) - input += f.read(); - f.close(); + input += f.read() + f.close() # replace path in "infiles" by path in '/usr/include' to avoid exposing the # build directory path in the generated headers. @@ -151,83 +151,81 @@ output += """/* SPDX-License-Identifier: MIT */ """ % (arch, headers_name_list, sys.argv[0], fileid, fileid) if arch in header: - output += header[arch]; - output += "\n"; + output += header[arch] + output += "\n" defined = {} # add defines to output for line in re.findall("#define[^\n]+", input): for define in defines: - regex = "#define\s+%s\\b" % define; - match = re.search(regex, line); + regex = "#define\s+%s\\b" % define + match = re.search(regex, line) if None == match: - continue; + continue defined[define] = 1 if define.upper()[0] == define[0]: - replace = define + "_" + arch.upper(); + replace = define + "_" + arch.upper() else: - replace = define + "_" + arch; - regex = "\\b%s\\b" % define; - output += re.sub(regex, replace, line) + "\n"; -output += "\n"; + replace = define + "_" + arch + regex = "\\b%s\\b" % define + output += re.sub(regex, replace, line) + "\n" +output += "\n" # delete defines, comments, empty lines -input = re.sub("#define[^\n]+\n", "", input); +input = re.sub("#define[^\n]+\n", "", input) input = re.compile("/\*(.*?)\*/", re.S).sub("", input) -input = re.compile("\n\s*\n", re.S).sub("\n", input); +input = re.compile("\n\s*\n", re.S).sub("\n", input) # add unions to output for union in unions: - regex = "union\s+%s\s*\{(.*?)\n\};" % union; + regex = "union\s+%s\s*\{(.*?)\n\};" % union match = re.search(regex, input, re.S) if None == match: - output += "#define %s_has_no_%s 1\n" % (arch, union); + output += "#define %s_has_no_%s 1\n" % (arch, union) else: - output += "union %s_%s {%s\n};\n" % (union, arch, match.group(1)); - output += "\n"; + output += "union %s_%s {%s\n};\n" % (union, arch, match.group(1)) + output += "\n" # add structs to output for struct in structs: - regex = "(?:#ifdef ([A-Z_]+))?\nstruct\s+%s\s*\{(.*?)\n\};" % struct; + regex = "(?:#ifdef ([A-Z_]+))?\nstruct\s+%s\s*\{(.*?)\n\};" % struct match = re.search(regex, input, re.S) if None == match or \ (match.group(1) is not None and match.group(1) not in defined): - output += "#define %s_has_no_%s 1\n" % (arch, struct); + output += "#define %s_has_no_%s 1\n" % (arch, struct) else: - output += "struct %s_%s {%s\n};\n" % (struct, arch, match.group(2)); - output += "typedef struct %s_%s %s_%s_t;\n" % (struct, arch, struct, arch); - output += "\n"; + output += "struct %s_%s {%s\n};\n" % (struct, arch, match.group(2)) + output += "typedef struct %s_%s %s_%s_t;\n" % (struct, arch, struct, arch) + output += "\n" # add footer if arch in footer: - output += footer[arch]; - output += "\n"; -output += "#endif /* %s */\n" % fileid; + output += footer[arch] + output += "\n" +output += "#endif /* %s */\n" % fileid # replace: defines for define in defines: if define.upper()[0] == define[0]: - replace = define + "_" + arch.upper(); + replace = define + "_" + arch.upper() else: - replace = define + "_" + arch; - output = re.sub("\\b%s\\b" % define, replace, output); + replace = define + "_" + arch + output = re.sub("\\b%s\\b" % define, replace, output) # replace: unions for union in unions: - output = re.sub("\\b(union\s+%s)\\b" % union, "\\1_%s" % arch, output); + output = re.sub("\\b(union\s+%s)\\b" % union, "\\1_%s" % arch, output) # replace: structs + struct typedefs for struct in structs: - output = re.sub("\\b(struct\s+%s)\\b" % struct, "\\1_%s" % arch, output); - output = re.sub("\\b(%s)_t\\b" % struct, "\\1_%s_t" % arch, output); + output = re.sub("\\b(struct\s+%s)\\b" % struct, "\\1_%s" % arch, output) + output = re.sub("\\b(%s)_t\\b" % struct, "\\1_%s_t" % arch, output) # replace: integer types for old, new in inttypes[arch]: output = re.sub("\\b%s\\b" % old, new, output) # print results -f = open(outfile, "w"); -f.write(output); -f.close; - +with open(outfile, "w") as f: + f.write(output) -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 18:22:43 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 18:22:43 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754475.1162920 (Exim 4.92) (envelope-from ) id 1sPnZz-0006fR-5E; Fri, 05 Jul 2024 18:22:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754475.1162920; Fri, 05 Jul 2024 18:22:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZz-0006fI-1B; Fri, 05 Jul 2024 18:22:43 +0000 Received: by outflank-mailman (input) for mailman id 754475; Fri, 05 Jul 2024 18:22:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZy-0006eX-G1 for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnZy-0006ZD-FC for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPnZy-00011p-DP for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=3cTdxFWMmGXL8sSSRnkQLR7pKGEbxZSqBTtHCFK1A04=; b=brlsctPJU08WweKz1ff9i2B6xz IPzihT3gneb0adF18X/0cr0tsrjmucY3tt7SJO4L/b3TACtsEQrAmYKMghTiRzd0m3IBYUZlTiOcF ManbJDDX3Rls+Vs6YIeSpxCkmaoRxSd1/PCR3bJcE8vFhBliZez+CyMpbFXY2DBW3AtI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] build/mkheader: Fix Syntax/DeprecationWarnings Message-Id: Date: Fri, 05 Jul 2024 18:22:42 +0000 commit 56b77d7db03775b0abcfb23476f0abecb51f1de7 Author: Andrew Cooper AuthorDate: Wed Jul 3 21:57:19 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 4 11:43:33 2024 +0100 build/mkheader: Fix Syntax/DeprecationWarnings With Python 3.11, the following is emitted during a build: tools/include/xen-foreign/mkheader.py:162: DeprecationWarning: invalid escape sequence '\s' regex = "#define\s+%s\\b" % define; tools/include/xen-foreign/mkheader.py:177: DeprecationWarning: invalid escape sequence '\*' input = re.compile("/\*(.*?)\*/", re.S).sub("", input) tools/include/xen-foreign/mkheader.py:178: DeprecationWarning: invalid escape sequence '\s' input = re.compile("\n\s*\n", re.S).sub("\n", input); tools/include/xen-foreign/mkheader.py:182: DeprecationWarning: invalid escape sequence '\s' regex = "union\s+%s\s*\{(.*?)\n\};" % union; tools/include/xen-foreign/mkheader.py:192: DeprecationWarning: invalid escape sequence '\s' regex = "(?:#ifdef ([A-Z_]+))?\nstruct\s+%s\s*\{(.*?)\n\};" % struct; tools/include/xen-foreign/mkheader.py:218: DeprecationWarning: invalid escape sequence '\s' output = re.sub("\\b(union\s+%s)\\b" % union, "\\1_%s" % arch, output); tools/include/xen-foreign/mkheader.py:222: DeprecationWarning: invalid escape sequence '\s' output = re.sub("\\b(struct\s+%s)\\b" % struct, "\\1_%s" % arch, output); Python regexes should use raw strings. Convert all regexes, and drop escaped backslashes. Note that regular escape sequences are interpreted normally when parsing a regex, so \n even in a raw-string regex is a newline. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-by: Oleksii Kurochko --- tools/include/xen-foreign/mkheader.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/include/xen-foreign/mkheader.py b/tools/include/xen-foreign/mkheader.py index 3a33df4984..128b0f3014 100644 --- a/tools/include/xen-foreign/mkheader.py +++ b/tools/include/xen-foreign/mkheader.py @@ -159,7 +159,7 @@ defined = {} # add defines to output for line in re.findall("#define[^\n]+", input): for define in defines: - regex = "#define\s+%s\\b" % define + regex = r"#define\s+%s\b" % define match = re.search(regex, line) if None == match: continue @@ -168,18 +168,18 @@ for line in re.findall("#define[^\n]+", input): replace = define + "_" + arch.upper() else: replace = define + "_" + arch - regex = "\\b%s\\b" % define + regex = r"\b%s\b" % define output += re.sub(regex, replace, line) + "\n" output += "\n" # delete defines, comments, empty lines input = re.sub("#define[^\n]+\n", "", input) -input = re.compile("/\*(.*?)\*/", re.S).sub("", input) -input = re.compile("\n\s*\n", re.S).sub("\n", input) +input = re.compile(r"/\*(.*?)\*/", re.S).sub("", input) +input = re.compile(r"\n\s*\n", re.S).sub("\n", input) # add unions to output for union in unions: - regex = "union\s+%s\s*\{(.*?)\n\};" % union + regex = r"union\s+%s\s*\{(.*?)\n\};" % union match = re.search(regex, input, re.S) if None == match: output += "#define %s_has_no_%s 1\n" % (arch, union) @@ -189,7 +189,7 @@ for union in unions: # add structs to output for struct in structs: - regex = "(?:#ifdef ([A-Z_]+))?\nstruct\s+%s\s*\{(.*?)\n\};" % struct + regex = r"(?:#ifdef ([A-Z_]+))?\nstruct\s+%s\s*\{(.*?)\n\};" % struct match = re.search(regex, input, re.S) if None == match or \ (match.group(1) is not None and match.group(1) not in defined): @@ -211,20 +211,20 @@ for define in defines: replace = define + "_" + arch.upper() else: replace = define + "_" + arch - output = re.sub("\\b%s\\b" % define, replace, output) + output = re.sub(r"\b%s\b" % define, replace, output) # replace: unions for union in unions: - output = re.sub("\\b(union\s+%s)\\b" % union, "\\1_%s" % arch, output) + output = re.sub(r"\b(union\s+%s)\b" % union, r"\1_%s" % arch, output) # replace: structs + struct typedefs for struct in structs: - output = re.sub("\\b(struct\s+%s)\\b" % struct, "\\1_%s" % arch, output) - output = re.sub("\\b(%s)_t\\b" % struct, "\\1_%s_t" % arch, output) + output = re.sub(r"\b(struct\s+%s)\b" % struct, r"\1_%s" % arch, output) + output = re.sub(r"\b(%s)_t\b" % struct, r"\1_%s_t" % arch, output) # replace: integer types for old, new in inttypes[arch]: - output = re.sub("\\b%s\\b" % old, new, output) + output = re.sub(r"\b%s\b" % old, new, output) # print results with open(outfile, "w") as f: -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 18:22:53 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 18:22:53 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754476.1162923 (Exim 4.92) (envelope-from ) id 1sPna9-0006iH-5U; Fri, 05 Jul 2024 18:22:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754476.1162923; Fri, 05 Jul 2024 18:22:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPna9-0006i7-2d; Fri, 05 Jul 2024 18:22:53 +0000 Received: by outflank-mailman (input) for mailman id 754476; Fri, 05 Jul 2024 18:22:52 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPna8-0006hz-Jc for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:52 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPna8-0006ZL-Ir for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:52 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPna8-00012U-Hu for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:22:52 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=BEKc6fc2uEjj2vh6Z8zcG8aEFw1BP8DKZglaz7Ebi9k=; b=PFaRfBVDjPh0ZAEoFX9X/NAfl3 +Gh0Vm0qiJ9jM4TvJcVs182voQrJxPnbUKfiNQ7JZBPnapw+1aK+wlpbW/g1DtJOLfXAUOhwIYBJ2 Mqlo4n7Veqo0BK+YEeyzVadcl5Bm4VitasNWV60nJHn46BvjBz8b1t1gQtPvSZVqloCc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Formalise the use of heredocs Message-Id: Date: Fri, 05 Jul 2024 18:22:52 +0000 commit aa2b6e4d8447a3bb4a538bbae430d00efb77cd8e Author: Andrew Cooper AuthorDate: Tue Jul 2 14:34:36 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 4 19:07:32 2024 +0100 CI: Formalise the use of heredocs Commit b5739330d7f4 introduced the use of heredocs in the jessie/stretch dockerfiles. It turns out this was introduced by BuildKit in 2018 along with a standardisation of Dockerfile syntax, and has subsequently been adopted by the docker community. Annotate all dockerfiles with a statement of the syntax in use, and extend README.md details including how to activate BuildKit when it's available but off by default. This allows the containers to be rebuilt following commit a0e29b316363 ("CI: Drop glibc-i386 from the build containers"). Fixes: b5739330d7f4 ("automation: fix jessie/stretch images to use archive.debian.org apt repos") Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- automation/build/README.md | 10 +++++++++- automation/build/alpine/3.18-arm64v8.dockerfile | 1 + automation/build/alpine/3.18.dockerfile | 1 + automation/build/archlinux/current-riscv64.dockerfile | 1 + automation/build/archlinux/current.dockerfile | 1 + automation/build/centos/7.dockerfile | 1 + automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile | 1 + automation/build/debian/bookworm-arm64v8.dockerfile | 1 + automation/build/debian/bookworm-cppcheck.dockerfile | 1 + automation/build/debian/bookworm-i386.dockerfile | 1 + automation/build/debian/bookworm.dockerfile | 1 + automation/build/debian/bullseye-ppc64le.dockerfile | 1 + automation/build/debian/buster-gcc-ibt.dockerfile | 1 + automation/build/debian/jessie-i386.dockerfile | 1 + automation/build/debian/jessie.dockerfile | 1 + automation/build/debian/stretch-i386.dockerfile | 1 + automation/build/debian/stretch.dockerfile | 1 + automation/build/fedora/29.dockerfile | 1 + automation/build/suse/opensuse-leap.dockerfile | 1 + automation/build/suse/opensuse-tumbleweed.dockerfile | 1 + automation/build/ubuntu/bionic.dockerfile | 1 + automation/build/ubuntu/focal.dockerfile | 1 + automation/build/ubuntu/trusty.dockerfile | 1 + automation/build/ubuntu/xenial-xilinx.dockerfile | 1 + automation/build/ubuntu/xenial.dockerfile | 1 + automation/build/yocto/yocto.dockerfile.in | 2 ++ automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile | 1 + automation/tests-artifacts/alpine/3.18.dockerfile | 1 + automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile | 1 + automation/tests-artifacts/kernel/6.1.19.dockerfile | 1 + .../qemu-system-aarch64/6.0.0-arm64v8.dockerfile | 1 + .../tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile | 1 + 32 files changed, 41 insertions(+), 1 deletion(-) diff --git a/automation/build/README.md b/automation/build/README.md index 1c040533fd..12a2b4af18 100644 --- a/automation/build/README.md +++ b/automation/build/README.md @@ -81,7 +81,14 @@ Building a container There is a makefile to make this process easier. You should be able to run `make DISTRO/VERSION` to have Docker build the container -for you. If you define the `PUSH` environment variable when running the +for you. + +Xen's dockerfiles use heredocs, which depend on the standardised dockerfile +syntax introduced by [BuiltKit]. This should work by default starting with +docker 23.0, or podman/buildah v1.33. For older versions of docker, it can be +activated with `DOCKER_BUILDKIT=1` in the environment. + +If you define the `PUSH` environment variable when running the former `make` command, it will push the container to the [registry] if you have access to do so and have your Docker logged into the registry. @@ -101,6 +108,7 @@ env CONTAINER_NO_PULL=1 \ make -C automation/build suse/opensuse-tumbleweed PUSH=1 ``` +[BuildKit]: https://docs.docker.com/build/buildkit/ [registry]: https://gitlab.com/xen-project/xen/container_registry [registry help]: https://gitlab.com/help/user/project/container_registry diff --git a/automation/build/alpine/3.18-arm64v8.dockerfile b/automation/build/alpine/3.18-arm64v8.dockerfile index 91e9022024..19fe46f841 100644 --- a/automation/build/alpine/3.18-arm64v8.dockerfile +++ b/automation/build/alpine/3.18-arm64v8.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 alpine:3.18 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/alpine/3.18.dockerfile b/automation/build/alpine/3.18.dockerfile index 8d5dac05b0..263e9e90d8 100644 --- a/automation/build/alpine/3.18.dockerfile +++ b/automation/build/alpine/3.18.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 alpine:3.18 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/archlinux/current-riscv64.dockerfile b/automation/build/archlinux/current-riscv64.dockerfile index af75b5c720..f7770bf82a 100644 --- a/automation/build/archlinux/current-riscv64.dockerfile +++ b/automation/build/archlinux/current-riscv64.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 archlinux LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/archlinux/current.dockerfile b/automation/build/archlinux/current.dockerfile index d29f1358c2..8929e9b5f0 100644 --- a/automation/build/archlinux/current.dockerfile +++ b/automation/build/archlinux/current.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 archlinux:base-devel LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/centos/7.dockerfile b/automation/build/centos/7.dockerfile index 1cdc16fc05..657550f308 100644 --- a/automation/build/centos/7.dockerfile +++ b/automation/build/centos/7.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 centos:7 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile b/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile index a05ffeac04..95b3f04283 100644 --- a/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile +++ b/automation/build/debian/bookworm-arm64v8-arm32-gcc.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/bookworm-arm64v8.dockerfile b/automation/build/debian/bookworm-arm64v8.dockerfile index 2c432aacb7..3ab426a082 100644 --- a/automation/build/debian/bookworm-arm64v8.dockerfile +++ b/automation/build/debian/bookworm-arm64v8.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/bookworm-cppcheck.dockerfile b/automation/build/debian/bookworm-cppcheck.dockerfile index 633268376d..fe4cd4a1aa 100644 --- a/automation/build/debian/bookworm-cppcheck.dockerfile +++ b/automation/build/debian/bookworm-cppcheck.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 debian:bookworm AS builder ENV DEBIAN_FRONTEND=noninteractive diff --git a/automation/build/debian/bookworm-i386.dockerfile b/automation/build/debian/bookworm-i386.dockerfile index 89a6503385..9a54bd7293 100644 --- a/automation/build/debian/bookworm-i386.dockerfile +++ b/automation/build/debian/bookworm-i386.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/i386 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/bookworm.dockerfile b/automation/build/debian/bookworm.dockerfile index d893218fc4..bef44dd753 100644 --- a/automation/build/debian/bookworm.dockerfile +++ b/automation/build/debian/bookworm.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/bullseye-ppc64le.dockerfile b/automation/build/debian/bullseye-ppc64le.dockerfile index 6fdfb6bc2b..e166d205f3 100644 --- a/automation/build/debian/bullseye-ppc64le.dockerfile +++ b/automation/build/debian/bullseye-ppc64le.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian:bullseye-slim LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/buster-gcc-ibt.dockerfile b/automation/build/debian/buster-gcc-ibt.dockerfile index 6a3e50ef6b..ed9367aafb 100644 --- a/automation/build/debian/buster-gcc-ibt.dockerfile +++ b/automation/build/debian/buster-gcc-ibt.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian:buster-slim AS builder ENV DEBIAN_FRONTEND=noninteractive diff --git a/automation/build/debian/jessie-i386.dockerfile b/automation/build/debian/jessie-i386.dockerfile index a8dec82bb2..f6eaa94ee5 100644 --- a/automation/build/debian/jessie-i386.dockerfile +++ b/automation/build/debian/jessie-i386.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/i386 debian/eol:jessie LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/jessie.dockerfile b/automation/build/debian/jessie.dockerfile index 308675cac1..a870e743fc 100644 --- a/automation/build/debian/jessie.dockerfile +++ b/automation/build/debian/jessie.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian/eol:jessie LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/stretch-i386.dockerfile b/automation/build/debian/stretch-i386.dockerfile index da93fed8ea..ad8db692aa 100644 --- a/automation/build/debian/stretch-i386.dockerfile +++ b/automation/build/debian/stretch-i386.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/i386 debian:stretch LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile index 59794ed467..4dfd40b542 100644 --- a/automation/build/debian/stretch.dockerfile +++ b/automation/build/debian/stretch.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian:stretch LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/fedora/29.dockerfile b/automation/build/fedora/29.dockerfile index f473ae13e7..08edf70838 100644 --- a/automation/build/fedora/29.dockerfile +++ b/automation/build/fedora/29.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 fedora:29 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/suse/opensuse-leap.dockerfile b/automation/build/suse/opensuse-leap.dockerfile index 3ef33458a0..28d3338812 100644 --- a/automation/build/suse/opensuse-leap.dockerfile +++ b/automation/build/suse/opensuse-leap.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 opensuse/leap LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/suse/opensuse-tumbleweed.dockerfile b/automation/build/suse/opensuse-tumbleweed.dockerfile index a793601c87..077fed2226 100644 --- a/automation/build/suse/opensuse-tumbleweed.dockerfile +++ b/automation/build/suse/opensuse-tumbleweed.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 opensuse/tumbleweed LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/ubuntu/bionic.dockerfile b/automation/build/ubuntu/bionic.dockerfile index 910d3c4b53..cc43fc4ade 100644 --- a/automation/build/ubuntu/bionic.dockerfile +++ b/automation/build/ubuntu/bionic.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 ubuntu:18.04 LABEL maintainer.name="The Xen Project " \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/ubuntu/focal.dockerfile b/automation/build/ubuntu/focal.dockerfile index 078abd56d5..cb8bb2f6fa 100644 --- a/automation/build/ubuntu/focal.dockerfile +++ b/automation/build/ubuntu/focal.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 ubuntu:20.04 LABEL maintainer.name="The Xen Project " \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/ubuntu/trusty.dockerfile b/automation/build/ubuntu/trusty.dockerfile index 8bd8c085a7..e2a1bda7c3 100644 --- a/automation/build/ubuntu/trusty.dockerfile +++ b/automation/build/ubuntu/trusty.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 ubuntu:14.04 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/ubuntu/xenial-xilinx.dockerfile b/automation/build/ubuntu/xenial-xilinx.dockerfile index 49f27b3229..f03d62e8bd 100644 --- a/automation/build/ubuntu/xenial-xilinx.dockerfile +++ b/automation/build/ubuntu/xenial-xilinx.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 ubuntu:16.04 LABEL maintainer.name="The Xen Project " \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/ubuntu/xenial.dockerfile b/automation/build/ubuntu/xenial.dockerfile index f6296d3292..168bc70ffa 100644 --- a/automation/build/ubuntu/xenial.dockerfile +++ b/automation/build/ubuntu/xenial.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 ubuntu:16.04 LABEL maintainer.name="The Xen Project " \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/build/yocto/yocto.dockerfile.in b/automation/build/yocto/yocto.dockerfile.in index b0892d4203..fbaa4e191c 100644 --- a/automation/build/yocto/yocto.dockerfile.in +++ b/automation/build/yocto/yocto.dockerfile.in @@ -1,3 +1,5 @@ +# syntax=docker/dockerfile:1 + # Docker file to create an environment to build yocto with virtualization # # Arguments that can be passed during image creation using --build-arg: diff --git a/automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile b/automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile index 0e5ae7f2b4..a4542f7039 100644 --- a/automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile +++ b/automation/tests-artifacts/alpine/3.18-arm64v8.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 alpine:3.18 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/tests-artifacts/alpine/3.18.dockerfile b/automation/tests-artifacts/alpine/3.18.dockerfile index 9cde6c9ad4..311a92889b 100644 --- a/automation/tests-artifacts/alpine/3.18.dockerfile +++ b/automation/tests-artifacts/alpine/3.18.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 alpine:3.18 LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile b/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile index b0875ca0dd..22359c9066 100644 --- a/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile +++ b/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/tests-artifacts/kernel/6.1.19.dockerfile b/automation/tests-artifacts/kernel/6.1.19.dockerfile index 021bde26c7..5cf53d290c 100644 --- a/automation/tests-artifacts/kernel/6.1.19.dockerfile +++ b/automation/tests-artifacts/kernel/6.1.19.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dockerfile b/automation/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dockerfile index fb7b7b506e..e9f5576be7 100644 --- a/automation/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dockerfile +++ b/automation/tests-artifacts/qemu-system-aarch64/6.0.0-arm64v8.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/arm64/v8 debian:bookworm LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" diff --git a/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile b/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile index 65857147bf..e28d686492 100644 --- a/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile +++ b/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile @@ -1,3 +1,4 @@ +# syntax=docker/dockerfile:1 FROM --platform=linux/amd64 debian:bullseye-slim LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 05 18:23:03 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 05 Jul 2024 18:23:03 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754477.1162927 (Exim 4.92) (envelope-from ) id 1sPnaJ-0006lK-8L; Fri, 05 Jul 2024 18:23:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754477.1162927; Fri, 05 Jul 2024 18:23:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnaJ-0006lC-5Z; Fri, 05 Jul 2024 18:23:03 +0000 Received: by outflank-mailman (input) for mailman id 754477; Fri, 05 Jul 2024 18:23:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnaI-0006l6-MT for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:23:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sPnaI-0006Zi-Lp for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:23:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sPnaI-00013I-Ky for xen-changelog@lists.xenproject.org; Fri, 05 Jul 2024 18:23:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=PE1XNufkTHYetfZv0VfmBKdxaRZN4jT0Sr9JwZeongg=; b=wHGVV4oA1LCpJQIzUUMPFKdjnL 7NC5uriRc76PhWo2gm/ff29y26Lb1bs+d1mvsggFsge61hJeSQbodf9WAsI+3mkNSuO0MMrC94djB vod6jX4joKmCRLpZTq1zfdTvWISoh2ZA/pvryPjM0RVAVXOkn55kErGZZN7V09ydAZw0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Adjust the usage of inline files Message-Id: Date: Fri, 05 Jul 2024 18:23:02 +0000 commit 7878756565427b310b0307c0aa3f6d682133e1d1 Author: Andrew Cooper AuthorDate: Wed Jul 3 14:08:29 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 4 19:07:35 2024 +0100 CI: Adjust the usage of inline files As per: https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/reference.md#here-documents For inline files, use COPY with a heredoc, rather than opencoding it through /bin/sh. No practical change. Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- automation/build/debian/jessie-i386.dockerfile | 2 +- automation/build/debian/jessie.dockerfile | 2 +- automation/build/debian/stretch-i386.dockerfile | 2 +- automation/build/debian/stretch.dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/automation/build/debian/jessie-i386.dockerfile b/automation/build/debian/jessie-i386.dockerfile index f6eaa94ee5..1eb7ff11c7 100644 --- a/automation/build/debian/jessie-i386.dockerfile +++ b/automation/build/debian/jessie-i386.dockerfile @@ -12,7 +12,7 @@ WORKDIR /build ENTRYPOINT ["linux32"] # replace repos in archive as release is EOL -RUN cat <<"END" > /etc/apt/sources.list +COPY <<"END" /etc/apt/sources.list deb http://archive.debian.org/debian/ jessie main contrib non-free deb http://archive.debian.org/debian/ jessie-backports main contrib non-free deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free diff --git a/automation/build/debian/jessie.dockerfile b/automation/build/debian/jessie.dockerfile index a870e743fc..4c0ffe66f8 100644 --- a/automation/build/debian/jessie.dockerfile +++ b/automation/build/debian/jessie.dockerfile @@ -10,7 +10,7 @@ RUN mkdir /build WORKDIR /build # replace repos in archive as release is EOL -RUN cat <<"END" > /etc/apt/sources.list +COPY <<"END" /etc/apt/sources.list deb http://archive.debian.org/debian/ jessie main contrib non-free deb http://archive.debian.org/debian/ jessie-backports main contrib non-free deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free diff --git a/automation/build/debian/stretch-i386.dockerfile b/automation/build/debian/stretch-i386.dockerfile index ad8db692aa..8ec9c3a246 100644 --- a/automation/build/debian/stretch-i386.dockerfile +++ b/automation/build/debian/stretch-i386.dockerfile @@ -12,7 +12,7 @@ WORKDIR /build ENTRYPOINT ["linux32"] # replace repos in archive as release is EOL -RUN cat <<"END" > /etc/apt/sources.list +COPY <<"END" /etc/apt/sources.list deb http://archive.debian.org/debian/ stretch main contrib non-free deb http://archive.debian.org/debian/ stretch-backports main contrib non-free deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile index 4dfd40b542..2db4552662 100644 --- a/automation/build/debian/stretch.dockerfile +++ b/automation/build/debian/stretch.dockerfile @@ -10,7 +10,7 @@ RUN mkdir /build WORKDIR /build # replace repos in archive as release is EOL -RUN cat <<"END" > /etc/apt/sources.list +COPY <<"END" /etc/apt/sources.list deb http://archive.debian.org/debian/ stretch main contrib non-free deb http://archive.debian.org/debian/ stretch-backports main contrib non-free deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Sat Jul 06 11:22:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Sat, 06 Jul 2024 11:22:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.754643.1163083 (Exim 4.92) (envelope-from ) id 1sQ3UR-0001TU-EQ; Sat, 06 Jul 2024 11:22:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 754643.1163083; Sat, 06 Jul 2024 11:22:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQ3UR-0001TN-Bm; Sat, 06 Jul 2024 11:22:03 +0000 Received: by outflank-mailman (input) for mailman id 754643; Sat, 06 Jul 2024 11:22:01 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQ3UP-0001TH-LB for xen-changelog@lists.xenproject.org; Sat, 06 Jul 2024 11:22:01 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQ3UP-0004I9-Jf for xen-changelog@lists.xenproject.org; Sat, 06 Jul 2024 11:22:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sQ3UP-00042U-HR for xen-changelog@lists.xenproject.org; Sat, 06 Jul 2024 11:22:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=+Guc/utTbfmERy9zdTV5JivWK60m2jEPHjzd1HA2/eo=; b=NS9JKQYSeuybPseB5uT0Lq2LGZ HK1VOIvaT+UIVxfKcsG2bctG/g4mbQrhjHSfTd0FC7jgX1GIteCbenji1E9Lsh9HBzFBduDebfyHE CWY1XZHjRZM0zDXtimSnx+fCKU8BHdbNgekcb4jYx8RkrJRPx13ZCvz9YY3f0XppGvVE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Rework the CentOS7 container Message-Id: Date: Sat, 06 Jul 2024 11:22:01 +0000 commit c2a66d0b58b9661037cfed6bf3f8122b3363ca38 Author: Andrew Cooper AuthorDate: Wed Jul 3 12:06:46 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 5 15:46:23 2024 +0100 CI: Rework the CentOS7 container CentOS 7 is fully End-of-life as of 2024-06-30, and the Yum repo configuration points at URLs which have become non-existent. First, start by using a heredoc RUN for legibility. It's important to use `set -e` to offset the fact that we're no longer chaining every command together with an &&. Also, because we're using a single RUN command to perform all RPM operations, we no longer need to work around the OverlayFS bug. Adjust the CentOS-*.repo files to point at vault.centos.org. This also involves swapping mirrorlist= for baseurl= in the yum config. Use a minor bashism to express the dependenices more coherently, and identify why we have certain dependencies. Some adjustments are: * We need bzip2-devel for the dombuilder. bzip2 needs retaining stubdom or `tar` fails to unpack the .bz2 archives. * {lzo,lz4,ztd}-devel are new optional dependency since the last time this package list was refreshed. * openssl-devel hasn't been a dependency since Xen 4.6. * We long ago ceased being able to build Qemu and SeaBIOS in this container, so drop their dependencies too. Signed-off-by: Andrew Cooper Acked-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- automation/build/centos/7.dockerfile | 101 +++++++++++++++++++++-------------- 1 file changed, 62 insertions(+), 39 deletions(-) diff --git a/automation/build/centos/7.dockerfile b/automation/build/centos/7.dockerfile index 657550f308..f41dda7320 100644 --- a/automation/build/centos/7.dockerfile +++ b/automation/build/centos/7.dockerfile @@ -6,44 +6,67 @@ LABEL maintainer.name="The Xen Project" \ RUN mkdir /build WORKDIR /build -# work around https://github.com/moby/moby/issues/10180 -# and add EPEL for dev86 -RUN rpm --rebuilddb && \ - yum -y install \ - yum-plugin-ovl \ - epel-release \ - && yum clean all && \ - rm -rf /var/cache/yum +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Mon, 08 Jul 2024 14:44:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.755454.1163815 (Exim 4.92) (envelope-from ) id 1sQpb2-0006gK-P1; Mon, 08 Jul 2024 14:44:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 755454.1163815; Mon, 08 Jul 2024 14:44:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQpb2-0006gD-LZ; Mon, 08 Jul 2024 14:44:04 +0000 Received: by outflank-mailman (input) for mailman id 755454; Mon, 08 Jul 2024 14:44:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQpb1-0006g7-Do for xen-changelog@lists.xenproject.org; Mon, 08 Jul 2024 14:44:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQpb1-0007JI-Ch for xen-changelog@lists.xenproject.org; Mon, 08 Jul 2024 14:44:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sQpb1-0000MJ-Ac for xen-changelog@lists.xenproject.org; Mon, 08 Jul 2024 14:44:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=F1FWBBo2uVfoAwMHUN44tevWtuxKnGhsGMHZXOLsAzo=; b=PRgSzAXdvERd3WC4QNqyfrB/Ee dIZ10j7FhV5gmpeWpAEhomxBWAa/jo0B3GPwx7acjUECt7i4A0aUeSlaBztPHh9jE80L7prPXL7cs bNtnid52827A8k+mPhpxaEkz6bX80/VvU5gtpJIgNI6eea5JgK9AcshBV2a2cOdcOEGM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/physdev: Return pirq that irq was already mapped to Message-Id: Date: Mon, 08 Jul 2024 14:44:03 +0000 commit 0d2b87b5adfc19e87e9027d996db204c66a47f30 Author: Jiqian Chen AuthorDate: Mon Jul 8 16:04:56 2024 +0800 Commit: Andrew Cooper CommitDate: Mon Jul 8 14:46:12 2024 +0100 x86/physdev: Return pirq that irq was already mapped to Fix bug introduced by 0762e2502f1f ("x86/physdev: factor out the code to allocate and map a pirq"). After that re-factoring, when pirq<0 and current_pirq>0, it means caller want to allocate a free pirq for irq but irq already has a mapped pirq, then it returns the negative pirq, so it fails. However, the logic before that re-factoring is different, it should return the current_pirq that irq was already mapped to and make the call success. Fixes: 0762e2502f1f ("x86/physdev: factor out the code to allocate and map a pirq") Signed-off-by: Jiqian Chen Signed-off-by: Huang Rui Signed-off-by: Jiqian Chen Reviewed-by: Jan Beulich Release-Acked-By: Oleksii Kurochko --- xen/arch/x86/irq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 017a94e311..47477d8817 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2898,6 +2898,7 @@ static int allocate_pirq(struct domain *d, int index, int pirq, int irq, d->domain_id, index, pirq, current_pirq); if ( current_pirq < 0 ) return -EBUSY; + pirq = current_pirq; } else if ( type == MAP_PIRQ_TYPE_MULTI_MSI ) { -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 08 14:44:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 08 Jul 2024 14:44:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.755455.1163818 (Exim 4.92) (envelope-from ) id 1sQpbC-0006iK-QG; Mon, 08 Jul 2024 14:44:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 755455.1163818; Mon, 08 Jul 2024 14:44:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQpbC-0006iD-NF; Mon, 08 Jul 2024 14:44:14 +0000 Received: by outflank-mailman (input) for mailman id 755455; Mon, 08 Jul 2024 14:44:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQpbB-0006i1-IL for xen-changelog@lists.xenproject.org; Mon, 08 Jul 2024 14:44:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQpbB-0007Jg-HI for xen-changelog@lists.xenproject.org; Mon, 08 Jul 2024 14:44:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sQpbB-0000Mu-GI for xen-changelog@lists.xenproject.org; Mon, 08 Jul 2024 14:44:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=T7SgkMfUB0rqPyj2ujWd7jPstgVAG5wzqAt4zEcyTdk=; b=bdkaLxSyr1k0szvKnL8chWW889 xe5lTV4zql4eIZKQMWmg/Fb1VWlZEOwqcwQ3X4ln68l1hrtGpMcuG8K0u8/EjPSKljI2zPG5fsGVz PgObSwlmr7rNEWYXdPbKmGQ7VzzaqWtAbyN/ZNhkmPst7J9QA5+tBBN4VMgkHT0ObDxo=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] build: Regenerate ./configure with Autoconf 2.71 Message-Id: Date: Mon, 08 Jul 2024 14:44:13 +0000 commit 7cc95f41669d351b9431e7660fc3a5864744df34 Author: Andrew Cooper AuthorDate: Wed Jul 3 18:21:09 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 8 14:46:12 2024 +0100 build: Regenerate ./configure with Autoconf 2.71 This is the version now found in Debian Bookworm. Signed-off-by: Andrew Cooper Acked-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- configure | 1006 +++++---- docs/configure | 990 ++++---- stubdom/configure | 2293 ++++++++++++------- tools/config.h.in | 15 +- tools/configure | 6481 +++++++++++++++++++++++++++++------------------------ 5 files changed, 6174 insertions(+), 4611 deletions(-) diff --git a/configure b/configure index df7fec483d..17b8361fa2 100755 --- a/configure +++ b/configure @@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Xen Hypervisor 4.19. +# Generated by GNU Autoconf 2.71 for Xen Hypervisor 4.19. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -96,8 +92,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -154,20 +134,22 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -187,41 +169,52 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -229,14 +222,21 @@ fi esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -254,18 +254,19 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: xen-devel@lists.xen.org about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script @@ -293,6 +294,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -310,6 +312,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -324,7 +334,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -333,7 +343,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -372,12 +382,13 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -389,18 +400,27 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -412,9 +432,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -441,7 +461,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -485,7 +505,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -499,6 +519,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -512,6 +536,13 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -751,8 +782,6 @@ do *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -793,9 +822,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -819,9 +848,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1032,9 +1061,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1048,9 +1077,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1094,9 +1123,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1112,7 +1141,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1176,7 +1205,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1351,9 +1380,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1381,7 +1410,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1389,7 +1419,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1399,9 +1429,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Xen Hypervisor configure 4.19 -generated by GNU Autoconf 2.69 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1411,14 +1441,34 @@ fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Xen Hypervisor $as_me 4.19, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -1451,8 +1501,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -1487,7 +1541,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -1522,11 +1576,13 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -1537,8 +1593,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -1562,7 +1618,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -1570,14 +1626,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -1585,15 +1641,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -1601,8 +1657,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1616,63 +1672,48 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -1682,19 +1723,117 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi + +# Auxiliary files required by this configure script. +ac_aux_files="config.guess config.sub" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -1705,12 +1844,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -1719,24 +1858,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1746,11 +1885,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -1767,55 +1907,30 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_files="$ac_config_files config/Toplevel.mk config/Paths.mk" -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -1834,21 +1949,22 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -1941,16 +2057,15 @@ CONFIG_DIR=$sysconfdir XEN_CONFIG_DIR=$CONFIG_DIR/xen -cat >>confdefs.h <<_ACEOF -#define XEN_CONFIG_DIR "$XEN_CONFIG_DIR" -_ACEOF +printf "%s\n" "#define XEN_CONFIG_DIR \"$XEN_CONFIG_DIR\"" >>confdefs.h # Check whether --with-initddir was given. -if test "${with_initddir+set}" = set; then : +if test ${with_initddir+y} +then : withval=$with_initddir; initddir_path=$withval -else +else $as_nop case "$host_os" in *linux*) if test -d $sysconfdir/rc.d/init.d ; then @@ -1968,9 +2083,10 @@ fi # Check whether --with-sysconfig-leaf-dir was given. -if test "${with_sysconfig_leaf_dir+set}" = set; then : +if test ${with_sysconfig_leaf_dir+y} +then : withval=$with_sysconfig_leaf_dir; config_leaf_dir=$withval -else +else $as_nop config_leaf_dir=sysconfig if test ! -d /etc/sysconfig ; then config_leaf_dir=default ; fi fi @@ -1980,52 +2096,55 @@ CONFIG_LEAF_DIR=$config_leaf_dir # Check whether --with-libexec-leaf-dir was given. -if test "${with_libexec_leaf_dir+set}" = set; then : +if test ${with_libexec_leaf_dir+y} +then : withval=$with_libexec_leaf_dir; libexec_subdir=$withval -else +else $as_nop libexec_subdir=$PACKAGE_TARNAME fi # Check whether --with-xen-scriptdir was given. -if test "${with_xen_scriptdir+set}" = set; then : +if test ${with_xen_scriptdir+y} +then : withval=$with_xen_scriptdir; xen_scriptdir_path=$withval -else +else $as_nop xen_scriptdir_path=$XEN_CONFIG_DIR/scripts fi XEN_SCRIPT_DIR=$xen_scriptdir_path -cat >>confdefs.h <<_ACEOF -#define XEN_SCRIPT_DIR "$XEN_SCRIPT_DIR" -_ACEOF +printf "%s\n" "#define XEN_SCRIPT_DIR \"$XEN_SCRIPT_DIR\"" >>confdefs.h # Check whether --with-xen-dumpdir was given. -if test "${with_xen_dumpdir+set}" = set; then : +if test ${with_xen_dumpdir+y} +then : withval=$with_xen_dumpdir; xen_dumpdir_path=$withval -else +else $as_nop xen_dumpdir_path=$localstatedir/lib/xen/dump fi # Check whether --with-rundir was given. -if test "${with_rundir+set}" = set; then : +if test ${with_rundir+y} +then : withval=$with_rundir; rundir_path=$withval -else +else $as_nop rundir_path=$localstatedir/run fi # Check whether --with-debugdir was given. -if test "${with_debugdir+set}" = set; then : +if test ${with_debugdir+y} +then : withval=$with_debugdir; debugdir_path=$withval -else +else $as_nop debugdir_path=$prefix/lib/debug fi @@ -2044,9 +2163,7 @@ LIBEXEC=`eval echo $libexecdir/$libexec_subdir` LIBEXEC_BIN=${LIBEXEC}/bin -cat >>confdefs.h <<_ACEOF -#define LIBEXEC_BIN "$LIBEXEC_BIN" -_ACEOF +printf "%s\n" "#define LIBEXEC_BIN \"$LIBEXEC_BIN\"" >>confdefs.h LIBEXEC_LIB=${LIBEXEC}/lib @@ -2055,41 +2172,31 @@ LIBEXEC_INC=${LIBEXEC}/include XENFIRMWAREDIR=${LIBEXEC}/boot -cat >>confdefs.h <<_ACEOF -#define XENFIRMWAREDIR "$XENFIRMWAREDIR" -_ACEOF +printf "%s\n" "#define XENFIRMWAREDIR \"$XENFIRMWAREDIR\"" >>confdefs.h XEN_RUN_DIR=$rundir_path/xen -cat >>confdefs.h <<_ACEOF -#define XEN_RUN_DIR "$XEN_RUN_DIR" -_ACEOF +printf "%s\n" "#define XEN_RUN_DIR \"$XEN_RUN_DIR\"" >>confdefs.h XEN_LOG_DIR=$localstatedir/log/xen -cat >>confdefs.h <<_ACEOF -#define XEN_LOG_DIR "$XEN_LOG_DIR" -_ACEOF +printf "%s\n" "#define XEN_LOG_DIR \"$XEN_LOG_DIR\"" >>confdefs.h XEN_RUN_STORED=$rundir_path/xenstored -cat >>confdefs.h <<_ACEOF -#define XEN_RUN_STORED "$XEN_RUN_STORED" -_ACEOF +printf "%s\n" "#define XEN_RUN_STORED \"$XEN_RUN_STORED\"" >>confdefs.h XEN_LIB_DIR=$localstatedir/lib/xen -cat >>confdefs.h <<_ACEOF -#define XEN_LIB_DIR "$XEN_LIB_DIR" -_ACEOF +printf "%s\n" "#define XEN_LIB_DIR \"$XEN_LIB_DIR\"" >>confdefs.h SHAREDIR=$prefix/share @@ -2105,9 +2212,7 @@ case "$host_os" in esac -cat >>confdefs.h <<_ACEOF -#define XEN_LOCK_DIR "$XEN_LOCK_DIR" -_ACEOF +printf "%s\n" "#define XEN_LOCK_DIR \"$XEN_LOCK_DIR\"" >>confdefs.h XEN_PAGING_DIR=$localstatedir/lib/xen/xenpaging @@ -2116,9 +2221,7 @@ XEN_PAGING_DIR=$localstatedir/lib/xen/xenpaging XEN_DUMP_DIR=$xen_dumpdir_path -cat >>confdefs.h <<_ACEOF -#define XEN_DUMP_DIR "$XEN_DUMP_DIR" -_ACEOF +printf "%s\n" "#define XEN_DUMP_DIR \"$XEN_DUMP_DIR\"" >>confdefs.h DEBUG_DIR=$debugdir_path @@ -2144,19 +2247,22 @@ esac # Check whether --enable-xen was given. -if test "${enable_xen+set}" = set; then : +if test ${enable_xen+y} +then : enableval=$enable_xen; -if test "x$enableval" = "xyes"; then : +if test "x$enableval" = "xyes" +then : xen=y SUBSYSTEMS="$SUBSYSTEMS xen" -else +else $as_nop -if test "x$enableval" = "xno"; then : +if test "x$enableval" = "xno" +then : xen=n @@ -2167,7 +2273,7 @@ fi fi -else +else $as_nop xen=y @@ -2177,7 +2283,8 @@ SUBSYSTEMS="$SUBSYSTEMS xen" fi -if test -e "xen/configure"; then : +if test -e "xen/configure" +then : if test "x$xen" = "xy" || test "x$xen" = "x" ; then subdirs="$subdirs xen" @@ -2190,19 +2297,22 @@ fi # Check whether --enable-tools was given. -if test "${enable_tools+set}" = set; then : +if test ${enable_tools+y} +then : enableval=$enable_tools; -if test "x$enableval" = "xyes"; then : +if test "x$enableval" = "xyes" +then : tools=y SUBSYSTEMS="$SUBSYSTEMS tools" -else +else $as_nop -if test "x$enableval" = "xno"; then : +if test "x$enableval" = "xno" +then : tools=n @@ -2213,7 +2323,7 @@ fi fi -else +else $as_nop tools=y @@ -2223,7 +2333,8 @@ SUBSYSTEMS="$SUBSYSTEMS tools" fi -if test -e "tools/configure"; then : +if test -e "tools/configure" +then : if test "x$tools" = "xy" || test "x$tools" = "x" ; then subdirs="$subdirs tools" @@ -2236,19 +2347,22 @@ fi # Check whether --enable-stubdom was given. -if test "${enable_stubdom+set}" = set; then : +if test ${enable_stubdom+y} +then : enableval=$enable_stubdom; -if test "x$enableval" = "xyes"; then : +if test "x$enableval" = "xyes" +then : stubdom=y SUBSYSTEMS="$SUBSYSTEMS stubdom" -else +else $as_nop -if test "x$enableval" = "xno"; then : +if test "x$enableval" = "xno" +then : stubdom=n @@ -2259,16 +2373,17 @@ fi fi -else +else $as_nop -if test "x$arch_enable_stubdom" = "xy"; then : +if test "x$arch_enable_stubdom" = "xy" +then : stubdom=y SUBSYSTEMS="$SUBSYSTEMS stubdom" -else +else $as_nop stubdom=n @@ -2279,7 +2394,8 @@ fi fi -if test -e "stubdom/configure"; then : +if test -e "stubdom/configure" +then : if test "x$stubdom" = "xy" || test "x$stubdom" = "x" ; then subdirs="$subdirs stubdom" @@ -2292,19 +2408,22 @@ fi # Check whether --enable-docs was given. -if test "${enable_docs+set}" = set; then : +if test ${enable_docs+y} +then : enableval=$enable_docs; -if test "x$enableval" = "xyes"; then : +if test "x$enableval" = "xyes" +then : docs=y SUBSYSTEMS="$SUBSYSTEMS docs" -else +else $as_nop -if test "x$enableval" = "xno"; then : +if test "x$enableval" = "xno" +then : docs=n @@ -2315,7 +2434,7 @@ fi fi -else +else $as_nop docs=y @@ -2325,7 +2444,8 @@ SUBSYSTEMS="$SUBSYSTEMS docs" fi -if test -e "docs/configure"; then : +if test -e "docs/configure" +then : if test "x$docs" = "xy" || test "x$docs" = "x" ; then subdirs="$subdirs docs" @@ -2372,8 +2492,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2403,15 +2523,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -2425,8 +2545,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -2479,7 +2599,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -2495,8 +2615,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -2519,14 +2639,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -2536,46 +2658,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -2584,13 +2706,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -2599,8 +2714,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -2612,30 +2731,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -2648,13 +2747,14 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -2681,18 +2781,20 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset + # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -2704,12 +2806,13 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -2740,7 +2843,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -2762,6 +2865,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -2775,6 +2882,12 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -2816,7 +2929,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -2825,7 +2938,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -2888,7 +3001,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by Xen Hypervisor $as_me 4.19, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -2938,14 +3051,16 @@ Report bugs to . Xen Hypervisor home page: ." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ Xen Hypervisor config.status 4.19 -configured by $0, generated by GNU Autoconf 2.69, +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -2982,21 +3097,21 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -3024,7 +3139,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -3038,7 +3153,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -3064,7 +3179,7 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree @@ -3292,7 +3407,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -3300,17 +3415,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -3327,7 +3442,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -3351,9 +3466,9 @@ $as_echo X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -3406,8 +3521,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -3449,9 +3564,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -3537,7 +3652,7 @@ if test "$no_recursion" != yes; then ;; *) case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_sub_configure_args " '$ac_arg'" ;; esac @@ -3547,7 +3662,7 @@ if test "$no_recursion" != yes; then # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" @@ -3568,17 +3683,17 @@ if test "$no_recursion" != yes; then test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" - $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 - $as_echo "$ac_msg" >&6 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 + printf "%s\n" "$ac_msg" >&6 as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -3608,17 +3723,15 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" - # Check for guested configure; otherwise get Cygnus style configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure - elif test -f "$ac_srcdir/configure.in"; then - # This should be Cygnus configure. - ac_sub_configure=$ac_aux_dir/configure else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 -$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 +printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi @@ -3631,8 +3744,8 @@ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 -$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +printf "%s\n" "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || @@ -3643,7 +3756,8 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach done fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + diff --git a/docs/configure b/docs/configure index b55e67e93a..b6732af3b4 100755 --- a/docs/configure +++ b/docs/configure @@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Xen Hypervisor Documentation 4.19. +# Generated by GNU Autoconf 2.71 for Xen Hypervisor Documentation 4.19. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -96,8 +92,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -154,20 +134,22 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -187,41 +169,52 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -229,14 +222,21 @@ fi esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -254,18 +254,19 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: xen-devel@lists.xen.org about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script @@ -293,6 +294,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -310,6 +312,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -324,7 +334,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -333,7 +343,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -372,12 +382,13 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -389,18 +400,27 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -412,9 +432,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -441,7 +461,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -485,7 +505,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -499,6 +519,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -512,6 +536,13 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -741,8 +772,6 @@ do *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -783,9 +812,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -809,9 +838,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1022,9 +1051,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1038,9 +1067,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1084,9 +1113,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1102,7 +1131,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1166,7 +1195,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1339,9 +1368,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1369,7 +1398,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1377,7 +1407,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1387,9 +1417,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Xen Hypervisor Documentation configure 4.19 -generated by GNU Autoconf 2.69 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1399,14 +1429,34 @@ fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Xen Hypervisor Documentation $as_me 4.19, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -1439,8 +1489,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -1475,7 +1529,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -1510,11 +1564,13 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -1525,8 +1581,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -1550,7 +1606,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -1558,14 +1614,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -1573,15 +1629,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -1589,8 +1645,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1604,63 +1660,48 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -1670,16 +1711,16 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1693,12 +1734,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -1707,24 +1748,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1734,11 +1775,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} From xen-changelog-bounces@lists.xenproject.org Mon Jul 08 14:44:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 08 Jul 2024 14:44:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.755456.1163822 (Exim 4.92) (envelope-from ) id 1sQpbM-0006lX-Tu; Mon, 08 Jul 2024 14:44:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 755456.1163822; Mon, 08 Jul 2024 14:44: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 1sQpbM-0006lP-RJ; Mon, 08 Jul 2024 14:44:24 +0000 Received: by outflank-mailman (input) for mailman id 755456; Mon, 08 Jul 2024 14:44:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQpbL-0006l7-MO for xen-changelog@lists.xenproject.org; Mon, 08 Jul 2024 14:44:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQpbL-0007Jt-LU for xen-changelog@lists.xenproject.org; Mon, 08 Jul 2024 14:44:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sQpbL-0000Nn-Jx for xen-changelog@lists.xenproject.org; Mon, 08 Jul 2024 14:44:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=5GNMcV/FsIKUL+eqXIzZrUiCg0FVUA83FhaBrfh7RAo=; b=5DC8P0hHUt/08HKPV+R9+QKlKF xWO5W2jCyEZjb1DA/vzGjnBuj5q9Y6I4SKPeYnpJKpJ/B4AQENDvnOzfV1kDgEiCupT0XZeozEP9i p3TdpDNEebWhL4ySkFgNWptbDa3M50t/avPMBDDdVLp+UCTa3xNKcWN0tf/rqHcVJBmM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] build: Fix the version of python checked for by ./configure Message-Id: Date: Mon, 08 Jul 2024 14:44:23 +0000 commit 64cee188376e52a154475a86a9d2adc85f029870 Author: Andrew Cooper AuthorDate: Thu Jul 4 13:08:40 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 8 14:46:12 2024 +0100 build: Fix the version of python checked for by ./configure We previously upped the minimum python version to 2.7, but neglected to reflect this in ./configure Fixes: 2a353c048c68 ("tools: Don't use distutils in configure or Makefile") Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- tools/configure | 8 ++++---- tools/configure.ac | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/configure b/tools/configure index 6c1084b7b2..d160ca2962 100755 --- a/tools/configure +++ b/tools/configure @@ -8298,15 +8298,15 @@ if test x"${PYTHONPATH}" = x"no" then as_fn_error $? "Unable to find $PYTHON, please install $PYTHON" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.6 " >&5 -printf %s "checking for python version >= 2.6 ... " >&6; } -`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 6)"))'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.7 " >&5 +printf %s "checking for python version >= 2.7 ... " >&6; } +`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 7)"))'` if test "$?" != "0" then python_version=`$PYTHON -V 2>&1` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - as_fn_error $? "$python_version is too old, minimum required version is 2.6" "$LINENO" 5 + as_fn_error $? "$python_version is too old, minimum required version is 2.7" "$LINENO" 5 else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } diff --git a/tools/configure.ac b/tools/configure.ac index ac0fdc4314..be58f06be4 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -385,7 +385,7 @@ PYTHONPATH=$PYTHON PYTHON=`basename $PYTHONPATH` AX_PATH_PROG_OR_FAIL([PYTHONPATH], [$PYTHON]) -AX_CHECK_PYTHON_VERSION([2], [6]) +AX_CHECK_PYTHON_VERSION([2], [7]) AS_IF([test "$cross_compiling" != yes], [ AX_CHECK_PYTHON_DEVEL() -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 08 17:44:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 08 Jul 2024 17:44:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.755564.1163966 (Exim 4.92) (envelope-from ) id 1sQsPF-0004Gm-4m; Mon, 08 Jul 2024 17:44:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 755564.1163966; Mon, 08 Jul 2024 17:44:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQsPF-0004Ge-2A; Mon, 08 Jul 2024 17:44:05 +0000 Received: by outflank-mailman (input) for mailman id 755564; Mon, 08 Jul 2024 17:44:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQsPE-0004GY-6U for xen-changelog@lists.xenproject.org; Mon, 08 Jul 2024 17:44:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQsPD-0002fx-RL for xen-changelog@lists.xenproject.org; Mon, 08 Jul 2024 17:44:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sQsPD-0000Np-Pd for xen-changelog@lists.xenproject.org; Mon, 08 Jul 2024 17:44:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=RfOPTpFA0CHxqGy21Pv76vzpw29lJHRtXm+X8DtalF0=; b=qCvwI1Gs64rtCFNm0JrOvyV4u8 Y4wCfb31cFKBeF6shwDrfY31ZFMvh2kxi5/35qJujuSoWZFHArXhN0HMEQH4O8LTcvW3ridPzXmDh CwTymdifBK2OQdXB+siwLy2QCQrdf/H75f0sW8cXIyvZn66mhBpOodsyX7wZ46pkamkQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Refresh the Coverity Github Action configuration Message-Id: Date: Mon, 08 Jul 2024 17:44:03 +0000 commit c4ebeb79d10a25e8d48a71cdd381898265267e67 Author: Andrew Cooper AuthorDate: Wed Jul 3 21:02:20 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 8 18:36:27 2024 +0100 CI: Refresh the Coverity Github Action configuration Update to Ubuntu 24.04, and checkout@v4 as v2 is deprecated. The build step goes out of it's way to exclude docs and stubdom (but include plain MiniOS), so disable those at the ./configure stage. Refresh the package list. libbz2-dev was in there twice, and e2fslibs-dev is a a transitional package to libext2fs-dev. I'm not aware of libtool ever having been a Xen dependency. Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- .github/workflows/coverity.yml | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 60ac8dee55..984636eb46 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -8,27 +8,39 @@ on: jobs: coverity: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Install build dependencies run: | - sudo apt-get install -y wget git gawk \ - libbz2-dev build-essential \ - zlib1g-dev libncurses5-dev iasl \ - libbz2-dev e2fslibs-dev uuid-dev ocaml \ - ocaml-findlib libyajl-dev \ - autoconf libtool liblzma-dev \ - python3-dev golang libsystemd-dev + sudo apt-get install -y \ + build-essential \ + git-core \ + golang \ + iasl \ + libbz2-dev \ + libext2fs-dev \ + liblzma-dev \ + libncurses5-dev \ + libyajl-dev \ + libzstd-dev \ + ocaml \ + ocaml-findlib \ + python3-dev \ + uuid-dev \ + zlib1g-dev \ - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: staging - name: Configure Xen run: | - ./configure --with-system-qemu=/bin/true \ - --with-system-seabios=/bin/true \ - --with-system-ovmf=/bin/true + ./configure \ + --disable-docs \ + --disable-stubdom \ + --with-system-qemu=/bin/true \ + --with-system-seabios=/bin/true \ + --with-system-ovmf=/bin/true \ - name: Pre build stuff run: | -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 09 01:33:08 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 09 Jul 2024 01:33:08 +0000 Received: from list by lists.xenproject.org with outflank-mailman.755675.1164093 (Exim 4.92) (envelope-from ) id 1sQzj4-00013n-FB; Tue, 09 Jul 2024 01:33:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 755675.1164093; Tue, 09 Jul 2024 01:33:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQzj4-00013f-C4; Tue, 09 Jul 2024 01:33:02 +0000 Received: by outflank-mailman (input) for mailman id 755675; Tue, 09 Jul 2024 01:33:01 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQzj3-00013Z-Ei for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 01:33:01 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQzj3-00064H-Cu for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 01:33:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sQzj3-0004tC-BS for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 01:33:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=VzazKcgRuoN+hPzH8+UfiEzQCFmQFqIgzPW3wQFlL9g=; b=Hg9vBGd/QO9u4b+N8jjftgKTk7 yA/mFYHP/Y8tMRPjayhyyiNyYhDAo9nN4r4bxALBPf0z6kjwe660tHKy2SksolTTchazitGBnrjOs XxgKKoSIMsM6AZJyQqDhvSsmNUaArx5yQgsA0Gr5T3HFJnHnNyLsGCvqIyTaBzoaBbrY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/physdev: Return pirq that irq was already mapped to Message-Id: Date: Tue, 09 Jul 2024 01:33:01 +0000 commit 0d2b87b5adfc19e87e9027d996db204c66a47f30 Author: Jiqian Chen AuthorDate: Mon Jul 8 16:04:56 2024 +0800 Commit: Andrew Cooper CommitDate: Mon Jul 8 14:46:12 2024 +0100 x86/physdev: Return pirq that irq was already mapped to Fix bug introduced by 0762e2502f1f ("x86/physdev: factor out the code to allocate and map a pirq"). After that re-factoring, when pirq<0 and current_pirq>0, it means caller want to allocate a free pirq for irq but irq already has a mapped pirq, then it returns the negative pirq, so it fails. However, the logic before that re-factoring is different, it should return the current_pirq that irq was already mapped to and make the call success. Fixes: 0762e2502f1f ("x86/physdev: factor out the code to allocate and map a pirq") Signed-off-by: Jiqian Chen Signed-off-by: Huang Rui Signed-off-by: Jiqian Chen Reviewed-by: Jan Beulich Release-Acked-By: Oleksii Kurochko --- xen/arch/x86/irq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 017a94e311..47477d8817 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2898,6 +2898,7 @@ static int allocate_pirq(struct domain *d, int index, int pirq, int irq, d->domain_id, index, pirq, current_pirq); if ( current_pirq < 0 ) return -EBUSY; + pirq = current_pirq; } else if ( type == MAP_PIRQ_TYPE_MULTI_MSI ) { -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 09 01:33:12 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 09 Jul 2024 01:33:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.755676.1164097 (Exim 4.92) (envelope-from ) id 1sQzjE-00015f-Hc; Tue, 09 Jul 2024 01:33:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 755676.1164097; Tue, 09 Jul 2024 01:33:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQzjE-00015W-Dn; Tue, 09 Jul 2024 01:33:12 +0000 Received: by outflank-mailman (input) for mailman id 755676; Tue, 09 Jul 2024 01:33:11 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQzjD-00015O-IJ for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 01:33:11 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQzjD-00064b-HO for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 01:33:11 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sQzjD-0004tl-GR for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 01:33:11 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=T7SgkMfUB0rqPyj2ujWd7jPstgVAG5wzqAt4zEcyTdk=; b=GhZI1xWk3vgkXHtah1KkaBB0CS dRZLIHZMv2I/oexjp2BZTku/RDH1TE7YR78yJveaPcLunw52ec3fmbszyBN8GdWVujIbQolVBOitf AJTJ6fkApuZ5fgTSb3KI4ZVsgXD+B4y8w/xbI9Vi1XE42qFkR3zBWHcR9Hb1RQ8oijHI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] build: Regenerate ./configure with Autoconf 2.71 Message-Id: Date: Tue, 09 Jul 2024 01:33:11 +0000 commit 7cc95f41669d351b9431e7660fc3a5864744df34 Author: Andrew Cooper AuthorDate: Wed Jul 3 18:21:09 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 8 14:46:12 2024 +0100 build: Regenerate ./configure with Autoconf 2.71 This is the version now found in Debian Bookworm. Signed-off-by: Andrew Cooper Acked-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- configure | 1006 +++++---- docs/configure | 990 ++++---- stubdom/configure | 2293 ++++++++++++------- tools/config.h.in | 15 +- tools/configure | 6481 +++++++++++++++++++++++++++++------------------------ 5 files changed, 6174 insertions(+), 4611 deletions(-) diff --git a/configure b/configure index df7fec483d..17b8361fa2 100755 --- a/configure +++ b/configure @@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Xen Hypervisor 4.19. +# Generated by GNU Autoconf 2.71 for Xen Hypervisor 4.19. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -96,8 +92,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -154,20 +134,22 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -187,41 +169,52 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -229,14 +222,21 @@ fi esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -254,18 +254,19 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: xen-devel@lists.xen.org about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script @@ -293,6 +294,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -310,6 +312,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -324,7 +334,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -333,7 +343,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -372,12 +382,13 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -389,18 +400,27 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -412,9 +432,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -441,7 +461,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -485,7 +505,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -499,6 +519,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -512,6 +536,13 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -751,8 +782,6 @@ do *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -793,9 +822,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -819,9 +848,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1032,9 +1061,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1048,9 +1077,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1094,9 +1123,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1112,7 +1141,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1176,7 +1205,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1351,9 +1380,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1381,7 +1410,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1389,7 +1419,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1399,9 +1429,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Xen Hypervisor configure 4.19 -generated by GNU Autoconf 2.69 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1411,14 +1441,34 @@ fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Xen Hypervisor $as_me 4.19, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -1451,8 +1501,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -1487,7 +1541,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -1522,11 +1576,13 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -1537,8 +1593,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -1562,7 +1618,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -1570,14 +1626,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -1585,15 +1641,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -1601,8 +1657,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1616,63 +1672,48 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -1682,19 +1723,117 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi + +# Auxiliary files required by this configure script. +ac_aux_files="config.guess config.sub" + +# Locations in which to look for auxiliary files. +ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." + +# Search for a directory containing all of the required auxiliary files, +# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. +# If we don't find one directory that contains all the files we need, +# we report the set of missing files from the *first* directory in +# $ac_aux_dir_candidates and give up. +ac_missing_aux_files="" +ac_first_candidate=: +printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in $ac_aux_dir_candidates +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + + printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 + ac_aux_dir_found=yes + ac_install_sh= + for ac_aux in $ac_aux_files + do + # As a special case, if "install-sh" is required, that requirement + # can be satisfied by any of "install-sh", "install.sh", or "shtool", + # and $ac_install_sh is set appropriately for whichever one is found. + if test x"$ac_aux" = x"install-sh" + then + if test -f "${as_dir}install-sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 + ac_install_sh="${as_dir}install-sh -c" + elif test -f "${as_dir}install.sh"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 + ac_install_sh="${as_dir}install.sh -c" + elif test -f "${as_dir}shtool"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 + ac_install_sh="${as_dir}shtool install -c" + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} install-sh" + else + break + fi + fi + else + if test -f "${as_dir}${ac_aux}"; then + printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 + else + ac_aux_dir_found=no + if $ac_first_candidate; then + ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" + else + break + fi + fi + fi + done + if test "$ac_aux_dir_found" = yes; then + ac_aux_dir="$as_dir" + break + fi + ac_first_candidate=false + + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +fi + + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +if test -f "${ac_aux_dir}config.guess"; then + ac_config_guess="$SHELL ${ac_aux_dir}config.guess" +fi +if test -f "${ac_aux_dir}config.sub"; then + ac_config_sub="$SHELL ${ac_aux_dir}config.sub" +fi +if test -f "$ac_aux_dir/configure"; then + ac_configure="$SHELL ${ac_aux_dir}configure" +fi + # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -1705,12 +1844,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -1719,24 +1858,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1746,11 +1885,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -1767,55 +1907,30 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_files="$ac_config_files config/Toplevel.mk config/Paths.mk" -ac_aux_dir= -for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - if test -f "$ac_dir/install-sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 -fi -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + # Make sure we can run config.sub. +$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +printf %s "checking build system type... " >&6; } +if test ${ac_cv_build+y} +then : + printf %s "(cached) " >&6 +else $as_nop ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 +ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +printf "%s\n" "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -1834,21 +1949,22 @@ IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +printf %s "checking host system type... " >&6; } +if test ${ac_cv_host+y} +then : + printf %s "(cached) " >&6 +else $as_nop if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || + as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +printf "%s\n" "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -1941,16 +2057,15 @@ CONFIG_DIR=$sysconfdir XEN_CONFIG_DIR=$CONFIG_DIR/xen -cat >>confdefs.h <<_ACEOF -#define XEN_CONFIG_DIR "$XEN_CONFIG_DIR" -_ACEOF +printf "%s\n" "#define XEN_CONFIG_DIR \"$XEN_CONFIG_DIR\"" >>confdefs.h # Check whether --with-initddir was given. -if test "${with_initddir+set}" = set; then : +if test ${with_initddir+y} +then : withval=$with_initddir; initddir_path=$withval -else +else $as_nop case "$host_os" in *linux*) if test -d $sysconfdir/rc.d/init.d ; then @@ -1968,9 +2083,10 @@ fi # Check whether --with-sysconfig-leaf-dir was given. -if test "${with_sysconfig_leaf_dir+set}" = set; then : +if test ${with_sysconfig_leaf_dir+y} +then : withval=$with_sysconfig_leaf_dir; config_leaf_dir=$withval -else +else $as_nop config_leaf_dir=sysconfig if test ! -d /etc/sysconfig ; then config_leaf_dir=default ; fi fi @@ -1980,52 +2096,55 @@ CONFIG_LEAF_DIR=$config_leaf_dir # Check whether --with-libexec-leaf-dir was given. -if test "${with_libexec_leaf_dir+set}" = set; then : +if test ${with_libexec_leaf_dir+y} +then : withval=$with_libexec_leaf_dir; libexec_subdir=$withval -else +else $as_nop libexec_subdir=$PACKAGE_TARNAME fi # Check whether --with-xen-scriptdir was given. -if test "${with_xen_scriptdir+set}" = set; then : +if test ${with_xen_scriptdir+y} +then : withval=$with_xen_scriptdir; xen_scriptdir_path=$withval -else +else $as_nop xen_scriptdir_path=$XEN_CONFIG_DIR/scripts fi XEN_SCRIPT_DIR=$xen_scriptdir_path -cat >>confdefs.h <<_ACEOF -#define XEN_SCRIPT_DIR "$XEN_SCRIPT_DIR" -_ACEOF +printf "%s\n" "#define XEN_SCRIPT_DIR \"$XEN_SCRIPT_DIR\"" >>confdefs.h # Check whether --with-xen-dumpdir was given. -if test "${with_xen_dumpdir+set}" = set; then : +if test ${with_xen_dumpdir+y} +then : withval=$with_xen_dumpdir; xen_dumpdir_path=$withval -else +else $as_nop xen_dumpdir_path=$localstatedir/lib/xen/dump fi # Check whether --with-rundir was given. -if test "${with_rundir+set}" = set; then : +if test ${with_rundir+y} +then : withval=$with_rundir; rundir_path=$withval -else +else $as_nop rundir_path=$localstatedir/run fi # Check whether --with-debugdir was given. -if test "${with_debugdir+set}" = set; then : +if test ${with_debugdir+y} +then : withval=$with_debugdir; debugdir_path=$withval -else +else $as_nop debugdir_path=$prefix/lib/debug fi @@ -2044,9 +2163,7 @@ LIBEXEC=`eval echo $libexecdir/$libexec_subdir` LIBEXEC_BIN=${LIBEXEC}/bin -cat >>confdefs.h <<_ACEOF -#define LIBEXEC_BIN "$LIBEXEC_BIN" -_ACEOF +printf "%s\n" "#define LIBEXEC_BIN \"$LIBEXEC_BIN\"" >>confdefs.h LIBEXEC_LIB=${LIBEXEC}/lib @@ -2055,41 +2172,31 @@ LIBEXEC_INC=${LIBEXEC}/include XENFIRMWAREDIR=${LIBEXEC}/boot -cat >>confdefs.h <<_ACEOF -#define XENFIRMWAREDIR "$XENFIRMWAREDIR" -_ACEOF +printf "%s\n" "#define XENFIRMWAREDIR \"$XENFIRMWAREDIR\"" >>confdefs.h XEN_RUN_DIR=$rundir_path/xen -cat >>confdefs.h <<_ACEOF -#define XEN_RUN_DIR "$XEN_RUN_DIR" -_ACEOF +printf "%s\n" "#define XEN_RUN_DIR \"$XEN_RUN_DIR\"" >>confdefs.h XEN_LOG_DIR=$localstatedir/log/xen -cat >>confdefs.h <<_ACEOF -#define XEN_LOG_DIR "$XEN_LOG_DIR" -_ACEOF +printf "%s\n" "#define XEN_LOG_DIR \"$XEN_LOG_DIR\"" >>confdefs.h XEN_RUN_STORED=$rundir_path/xenstored -cat >>confdefs.h <<_ACEOF -#define XEN_RUN_STORED "$XEN_RUN_STORED" -_ACEOF +printf "%s\n" "#define XEN_RUN_STORED \"$XEN_RUN_STORED\"" >>confdefs.h XEN_LIB_DIR=$localstatedir/lib/xen -cat >>confdefs.h <<_ACEOF -#define XEN_LIB_DIR "$XEN_LIB_DIR" -_ACEOF +printf "%s\n" "#define XEN_LIB_DIR \"$XEN_LIB_DIR\"" >>confdefs.h SHAREDIR=$prefix/share @@ -2105,9 +2212,7 @@ case "$host_os" in esac -cat >>confdefs.h <<_ACEOF -#define XEN_LOCK_DIR "$XEN_LOCK_DIR" -_ACEOF +printf "%s\n" "#define XEN_LOCK_DIR \"$XEN_LOCK_DIR\"" >>confdefs.h XEN_PAGING_DIR=$localstatedir/lib/xen/xenpaging @@ -2116,9 +2221,7 @@ XEN_PAGING_DIR=$localstatedir/lib/xen/xenpaging XEN_DUMP_DIR=$xen_dumpdir_path -cat >>confdefs.h <<_ACEOF -#define XEN_DUMP_DIR "$XEN_DUMP_DIR" -_ACEOF +printf "%s\n" "#define XEN_DUMP_DIR \"$XEN_DUMP_DIR\"" >>confdefs.h DEBUG_DIR=$debugdir_path @@ -2144,19 +2247,22 @@ esac # Check whether --enable-xen was given. -if test "${enable_xen+set}" = set; then : +if test ${enable_xen+y} +then : enableval=$enable_xen; -if test "x$enableval" = "xyes"; then : +if test "x$enableval" = "xyes" +then : xen=y SUBSYSTEMS="$SUBSYSTEMS xen" -else +else $as_nop -if test "x$enableval" = "xno"; then : +if test "x$enableval" = "xno" +then : xen=n @@ -2167,7 +2273,7 @@ fi fi -else +else $as_nop xen=y @@ -2177,7 +2283,8 @@ SUBSYSTEMS="$SUBSYSTEMS xen" fi -if test -e "xen/configure"; then : +if test -e "xen/configure" +then : if test "x$xen" = "xy" || test "x$xen" = "x" ; then subdirs="$subdirs xen" @@ -2190,19 +2297,22 @@ fi # Check whether --enable-tools was given. -if test "${enable_tools+set}" = set; then : +if test ${enable_tools+y} +then : enableval=$enable_tools; -if test "x$enableval" = "xyes"; then : +if test "x$enableval" = "xyes" +then : tools=y SUBSYSTEMS="$SUBSYSTEMS tools" -else +else $as_nop -if test "x$enableval" = "xno"; then : +if test "x$enableval" = "xno" +then : tools=n @@ -2213,7 +2323,7 @@ fi fi -else +else $as_nop tools=y @@ -2223,7 +2333,8 @@ SUBSYSTEMS="$SUBSYSTEMS tools" fi -if test -e "tools/configure"; then : +if test -e "tools/configure" +then : if test "x$tools" = "xy" || test "x$tools" = "x" ; then subdirs="$subdirs tools" @@ -2236,19 +2347,22 @@ fi # Check whether --enable-stubdom was given. -if test "${enable_stubdom+set}" = set; then : +if test ${enable_stubdom+y} +then : enableval=$enable_stubdom; -if test "x$enableval" = "xyes"; then : +if test "x$enableval" = "xyes" +then : stubdom=y SUBSYSTEMS="$SUBSYSTEMS stubdom" -else +else $as_nop -if test "x$enableval" = "xno"; then : +if test "x$enableval" = "xno" +then : stubdom=n @@ -2259,16 +2373,17 @@ fi fi -else +else $as_nop -if test "x$arch_enable_stubdom" = "xy"; then : +if test "x$arch_enable_stubdom" = "xy" +then : stubdom=y SUBSYSTEMS="$SUBSYSTEMS stubdom" -else +else $as_nop stubdom=n @@ -2279,7 +2394,8 @@ fi fi -if test -e "stubdom/configure"; then : +if test -e "stubdom/configure" +then : if test "x$stubdom" = "xy" || test "x$stubdom" = "x" ; then subdirs="$subdirs stubdom" @@ -2292,19 +2408,22 @@ fi # Check whether --enable-docs was given. -if test "${enable_docs+set}" = set; then : +if test ${enable_docs+y} +then : enableval=$enable_docs; -if test "x$enableval" = "xyes"; then : +if test "x$enableval" = "xyes" +then : docs=y SUBSYSTEMS="$SUBSYSTEMS docs" -else +else $as_nop -if test "x$enableval" = "xno"; then : +if test "x$enableval" = "xno" +then : docs=n @@ -2315,7 +2434,7 @@ fi fi -else +else $as_nop docs=y @@ -2325,7 +2444,8 @@ SUBSYSTEMS="$SUBSYSTEMS docs" fi -if test -e "docs/configure"; then : +if test -e "docs/configure" +then : if test "x$docs" = "xy" || test "x$docs" = "x" ; then subdirs="$subdirs docs" @@ -2372,8 +2492,8 @@ _ACEOF case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2403,15 +2523,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -2425,8 +2545,8 @@ $as_echo "$as_me: updating cache $cache_file" >&6;} fi fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -2479,7 +2599,7 @@ U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -2495,8 +2615,8 @@ LTLIBOBJS=$ac_ltlibobjs ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -2519,14 +2639,16 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -2536,46 +2658,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -2584,13 +2706,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -2599,8 +2714,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -2612,30 +2731,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -2648,13 +2747,14 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -2681,18 +2781,20 @@ as_fn_unset () { eval $1=; unset $1;} } as_unset=as_fn_unset + # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -2704,12 +2806,13 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -2740,7 +2843,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -2762,6 +2865,10 @@ as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -2775,6 +2882,12 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -2816,7 +2929,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -2825,7 +2938,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -2888,7 +3001,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by Xen Hypervisor $as_me 4.19, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -2938,14 +3051,16 @@ Report bugs to . Xen Hypervisor home page: ." _ACEOF +ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` +ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ Xen Hypervisor config.status 4.19 -configured by $0, generated by GNU Autoconf 2.69, +configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -2982,21 +3097,21 @@ do -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; + printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; + printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; + printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -3024,7 +3139,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -3038,7 +3153,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - $as_echo "$ac_log" + printf "%s\n" "$ac_log" } >&5 _ACEOF @@ -3064,7 +3179,7 @@ done # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree @@ -3292,7 +3407,7 @@ do esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -3300,17 +3415,17 @@ do # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | + ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -3327,7 +3442,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | +printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -3351,9 +3466,9 @@ $as_echo X"$ac_file" | case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -3406,8 +3521,8 @@ ac_sed_dataroot=' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -3449,9 +3564,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -3537,7 +3652,7 @@ if test "$no_recursion" != yes; then ;; *) case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_sub_configure_args " '$ac_arg'" ;; esac @@ -3547,7 +3662,7 @@ if test "$no_recursion" != yes; then # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in - *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" @@ -3568,17 +3683,17 @@ if test "$no_recursion" != yes; then test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" - $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 - $as_echo "$ac_msg" >&6 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 + printf "%s\n" "$ac_msg" >&6 as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -3608,17 +3723,15 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" - # Check for guested configure; otherwise get Cygnus style configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure - elif test -f "$ac_srcdir/configure.in"; then - # This should be Cygnus configure. - ac_sub_configure=$ac_aux_dir/configure else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 -$as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 +printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi @@ -3631,8 +3744,8 @@ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac - { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 -$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +printf "%s\n" "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || @@ -3643,7 +3756,8 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach done fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi + diff --git a/docs/configure b/docs/configure index b55e67e93a..b6732af3b4 100755 --- a/docs/configure +++ b/docs/configure @@ -1,11 +1,12 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for Xen Hypervisor Documentation 4.19. +# Generated by GNU Autoconf 2.71 for Xen Hypervisor Documentation 4.19. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. # # # This configure script is free software; the Free Software Foundation @@ -16,14 +17,16 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else +else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -33,46 +36,46 @@ esac fi + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then +if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -81,13 +84,6 @@ if test "${PATH_SEPARATOR+set}" != set; then fi -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -96,8 +92,12 @@ case $0 in #(( for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS @@ -109,30 +109,10 @@ if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -154,20 +134,22 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 -as_fn_exit 255 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else +else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -187,41 +169,52 @@ as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : -else +else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" - if (eval "$as_required") 2>/dev/null; then : + if (eval "$as_required") 2>/dev/null +then : as_have_required=yes -else +else $as_nop as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : -else +else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base + as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : break 2 fi fi @@ -229,14 +222,21 @@ fi esac as_found=false done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi - if test "x$CONFIG_SHELL" != x; then : + if test "x$CONFIG_SHELL" != x +then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also @@ -254,18 +254,19 @@ esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. -$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi - if test x$as_have_required = xno; then : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and $0: xen-devel@lists.xen.org about your system, including $0: any error possibly output before this message. Then $0: install a modern shell, or manually run the script @@ -293,6 +294,7 @@ as_fn_unset () } as_unset=as_fn_unset + # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -310,6 +312,14 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -324,7 +334,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -333,7 +343,7 @@ $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | +printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -372,12 +382,13 @@ as_fn_executable_p () # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : eval 'as_fn_append () { eval $1+=\$2 }' -else +else $as_nop as_fn_append () { eval $1=\$$1\$2 @@ -389,18 +400,27 @@ fi # as_fn_append # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else +else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -412,9 +432,9 @@ as_fn_error () as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $2" >&2 + printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -441,7 +461,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | +printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -485,7 +505,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -499,6 +519,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits exit } + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) @@ -512,6 +536,13 @@ case `echo -n x` in #((((( ECHO_N='-n';; esac +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -741,8 +772,6 @@ do *) ac_optarg=yes ;; esac - # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -783,9 +812,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -809,9 +838,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1022,9 +1051,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1038,9 +1067,9 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1084,9 +1113,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1102,7 +1131,7 @@ if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1166,7 +1195,7 @@ $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | +printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1339,9 +1368,9 @@ if test "$ac_init_help" = "recursive"; then case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1369,7 +1398,8 @@ esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. + # Check for configure.gnu first; this name is used for a wrapper for + # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1377,7 +1407,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1387,9 +1417,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF Xen Hypervisor Documentation configure 4.19 -generated by GNU Autoconf 2.69 +generated by GNU Autoconf 2.71 -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1399,14 +1429,34 @@ fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## +ac_configure_args_raw= +for ac_arg +do + case $ac_arg in + *\'*) + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append ac_configure_args_raw " '$ac_arg'" +done + +case $ac_configure_args_raw in + *$as_nl*) + ac_safe_unquote= ;; + *) + ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. + ac_unsafe_a="$ac_unsafe_z#~" + ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" + ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; +esac + cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by Xen Hypervisor Documentation $as_me 4.19, which was -generated by GNU Autoconf 2.69. Invocation command line was +generated by GNU Autoconf 2.71. Invocation command line was - $ $0 $@ + $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log @@ -1439,8 +1489,12 @@ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS @@ -1475,7 +1529,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -1510,11 +1564,13 @@ done # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? + # Sanitize IFS. + IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo - $as_echo "## ---------------- ## + printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -1525,8 +1581,8 @@ trap 'exit_status=$? case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -1550,7 +1606,7 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; ) echo - $as_echo "## ----------------- ## + printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -1558,14 +1614,14 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## + printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -1573,15 +1629,15 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - $as_echo "$ac_var='\''$ac_val'\''" + printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - $as_echo "## ----------- ## + printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -1589,8 +1645,8 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; echo fi test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" + printf "%s\n" "$as_me: caught signal $ac_signal" + printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -1604,63 +1660,48 @@ ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h -$as_echo "/* confdefs.h */" > confdefs.h +printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF +printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF +printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF +printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF +printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF +printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF +printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac + ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site + ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site + ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" + +for ac_site_file in $ac_site_files do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} + case $ac_site_file in #( + */*) : + ;; #( + *) : + ac_site_file=./$ac_site_file ;; +esac + if test -f "$ac_site_file" && test -r "$ac_site_file"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -1670,16 +1711,16 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi @@ -1693,12 +1734,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -1707,24 +1748,24 @@ $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1734,11 +1775,12 @@ $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} From xen-changelog-bounces@lists.xenproject.org Tue Jul 09 01:33:22 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 09 Jul 2024 01:33:22 +0000 Received: from list by lists.xenproject.org with outflank-mailman.755677.1164101 (Exim 4.92) (envelope-from ) id 1sQzjO-00019G-LV; Tue, 09 Jul 2024 01:33:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 755677.1164101; Tue, 09 Jul 2024 01:33:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQzjO-000196-IF; Tue, 09 Jul 2024 01:33:22 +0000 Received: by outflank-mailman (input) for mailman id 755677; Tue, 09 Jul 2024 01:33:21 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQzjN-00018v-OM for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 01:33:21 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sQzjN-000655-L0 for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 01:33:21 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sQzjN-0004uJ-K2 for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 01:33:21 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=mkGvb8hk1Za+ZulCTAI9BZOmiUfchEOaE8z06nOGPcQ=; b=Xsz12JsQUpr1aAToqbuSWERCDZ TMOv1+NfnUyKPwzgb3KhD+lDVvqc6PNTZfV2haK7h2InbPhKwaVu45PrHSxdotNXf8Cz9sLVSCQB/ fq9LBz/hOdrrtgVXb8ZXnTZ9mqsead9WjXK98usdCO9SVvHBK9TTx0v3TXiMrGoWJbOc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] build: Fix the version of python checked for by ./configure Message-Id: Date: Tue, 09 Jul 2024 01:33:21 +0000 commit 64cee188376e52a154475a86a9d2adc85f029870 Author: Andrew Cooper AuthorDate: Thu Jul 4 13:08:40 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 8 14:46:12 2024 +0100 build: Fix the version of python checked for by ./configure We previously upped the minimum python version to 2.7, but neglected to reflect this in ./configure Fixes: 2a353c048c68 ("tools: Don't use distutils in configure or Makefile") Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- tools/configure | 8 ++++---- tools/configure.ac | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/configure b/tools/configure index 6c1084b7b2..d160ca2962 100755 --- a/tools/configure +++ b/tools/configure @@ -8298,15 +8298,15 @@ if test x"${PYTHONPATH}" = x"no" then as_fn_error $? "Unable to find $PYTHON, please install $PYTHON" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.6 " >&5 -printf %s "checking for python version >= 2.6 ... " >&6; } -`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 6)"))'` +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for python version >= 2.7 " >&5 +printf %s "checking for python version >= 2.7 ... " >&6; } +`$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < (2, 7)"))'` if test "$?" != "0" then python_version=`$PYTHON -V 2>&1` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - as_fn_error $? "$python_version is too old, minimum required version is 2.6" "$LINENO" 5 + as_fn_error $? "$python_version is too old, minimum required version is 2.7" "$LINENO" 5 else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } diff --git a/tools/configure.ac b/tools/configure.ac index ac0fdc4314..be58f06be4 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -385,7 +385,7 @@ PYTHONPATH=$PYTHON PYTHON=`basename $PYTHONPATH` AX_PATH_PROG_OR_FAIL([PYTHONPATH], [$PYTHON]) -AX_CHECK_PYTHON_VERSION([2], [6]) +AX_CHECK_PYTHON_VERSION([2], [7]) AS_IF([test "$cross_compiling" != yes], [ AX_CHECK_PYTHON_DEVEL() -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 09 10:44:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 09 Jul 2024 10:44:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.756110.1164667 (Exim 4.92) (envelope-from ) id 1sR8KJ-0001u6-EP; Tue, 09 Jul 2024 10:44:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 756110.1164667; Tue, 09 Jul 2024 10:44:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sR8KJ-0001ty-Bj; Tue, 09 Jul 2024 10:44:03 +0000 Received: by outflank-mailman (input) for mailman id 756110; Tue, 09 Jul 2024 10:44:01 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sR8KH-0001tR-JP for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 10:44:01 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sR8KH-00016G-IP for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 10:44:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sR8KH-0002zV-Gd for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 10:44:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=riIiA8vxxXCH+PdEDQBYHmOULyufoN2eaWMApSo5deg=; b=a8OHCM8gFneaLQrxn2V260iBFv lU9oQZsWRnETA/045BxgIakh1/0R8MFWRZPd5uH8xfvKHs1bOBJSnvt+HULQeWzNUZI3UuE4mYFQR nPJc7SWbcrM6digmlQIAuejujAHa7HAMgHM64uRwdgA+1kExbCXfMOoiU+cFg/vhDfPY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Refresh the Coverity Github Action configuration Message-Id: Date: Tue, 09 Jul 2024 10:44:01 +0000 commit c4ebeb79d10a25e8d48a71cdd381898265267e67 Author: Andrew Cooper AuthorDate: Wed Jul 3 21:02:20 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 8 18:36:27 2024 +0100 CI: Refresh the Coverity Github Action configuration Update to Ubuntu 24.04, and checkout@v4 as v2 is deprecated. The build step goes out of it's way to exclude docs and stubdom (but include plain MiniOS), so disable those at the ./configure stage. Refresh the package list. libbz2-dev was in there twice, and e2fslibs-dev is a a transitional package to libext2fs-dev. I'm not aware of libtool ever having been a Xen dependency. Signed-off-by: Andrew Cooper Reviewed-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- .github/workflows/coverity.yml | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index 60ac8dee55..984636eb46 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -8,27 +8,39 @@ on: jobs: coverity: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Install build dependencies run: | - sudo apt-get install -y wget git gawk \ - libbz2-dev build-essential \ - zlib1g-dev libncurses5-dev iasl \ - libbz2-dev e2fslibs-dev uuid-dev ocaml \ - ocaml-findlib libyajl-dev \ - autoconf libtool liblzma-dev \ - python3-dev golang libsystemd-dev + sudo apt-get install -y \ + build-essential \ + git-core \ + golang \ + iasl \ + libbz2-dev \ + libext2fs-dev \ + liblzma-dev \ + libncurses5-dev \ + libyajl-dev \ + libzstd-dev \ + ocaml \ + ocaml-findlib \ + python3-dev \ + uuid-dev \ + zlib1g-dev \ - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: staging - name: Configure Xen run: | - ./configure --with-system-qemu=/bin/true \ - --with-system-seabios=/bin/true \ - --with-system-ovmf=/bin/true + ./configure \ + --disable-docs \ + --disable-stubdom \ + --with-system-qemu=/bin/true \ + --with-system-seabios=/bin/true \ + --with-system-ovmf=/bin/true \ - name: Pre build stuff run: | -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 09 14:44:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 09 Jul 2024 14:44:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.756321.1164891 (Exim 4.92) (envelope-from ) id 1sRC4a-00076C-SE; Tue, 09 Jul 2024 14:44:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 756321.1164891; Tue, 09 Jul 2024 14:44:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRC4a-000764-Pm; Tue, 09 Jul 2024 14:44:04 +0000 Received: by outflank-mailman (input) for mailman id 756321; Tue, 09 Jul 2024 14:44:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRC4Z-00075x-Rc for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 14:44:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRC4Z-0005UD-P4 for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 14:44:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRC4Z-0000LZ-Na for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 14:44:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=hugEB0iTRSyZkOy5g92zRTByP7LmUqdSZn9ZyXSSHog=; b=q0SZ3Z7bgzfLn17el8hcey/PRD 50O5AxTGsYiA7iSW2kDg/eTyCiwva7Gpb+JlzeNQj66eN+URwdYq4nWxpCe06OajBeE1zgXMwXeg0 cAi1ciYVpumwBR/8Br9zLQia69z0evOLcYK6NpWw+Xw5Zd1dofj3k4cz/jnbbB9LmLxc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] stubdom: Remove more leftovers of caml-stubdom Message-Id: Date: Tue, 09 Jul 2024 14:44:03 +0000 commit 8e7c08a3363807462e6509abb4cdc7f69dad2dbb Author: Andrew Cooper AuthorDate: Tue Jul 9 13:35:37 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 9 15:32:18 2024 +0100 stubdom: Remove more leftovers of caml-stubdom Fixes: e536a497545f ("stubdom: Remove caml-stubdom") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Release-Acked-By: Oleksii Kurochko --- config/Stubdom.mk.in | 3 --- 1 file changed, 3 deletions(-) diff --git a/config/Stubdom.mk.in b/config/Stubdom.mk.in index 5990fc4e04..b399d77740 100644 --- a/config/Stubdom.mk.in +++ b/config/Stubdom.mk.in @@ -26,9 +26,6 @@ LWIP_URL := @LWIP_URL@ GRUB_VERSION := @GRUB_VERSION@ GRUB_URL := @GRUB_URL@ -OCAML_VERSION := @OCAML_VERSION@ -OCAML_URL := @OCAML_URL@ - GMP_VERSION := @GMP_VERSION@ GMP_URL := @GMP_URL@ -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 09 14:44:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 09 Jul 2024 14:44:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.756322.1164896 (Exim 4.92) (envelope-from ) id 1sRC4k-00077e-Tn; Tue, 09 Jul 2024 14:44:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 756322.1164896; Tue, 09 Jul 2024 14:44:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRC4k-00077W-RC; Tue, 09 Jul 2024 14:44:14 +0000 Received: by outflank-mailman (input) for mailman id 756322; Tue, 09 Jul 2024 14:44:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRC4j-00077O-Ve for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 14:44:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRC4j-0005UK-Um for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 14:44:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRC4j-0000MN-RG for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 14:44:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=nppf7oLHLKiViKzlt2kLrcgaAwgMWsCB4r5qwxcoprY=; b=59tBhusOBmRaZEKsP/Gog2QS9J hzP9DF62hISNkwMyN0XzxcHUW2TS06XtPRLR0VgqC+KDyc3WKcs63P0Fy/SCHR9aCHJCGuEr8J0/O NZ0MrVc7X6ZqUbRY7ynMOPxoZt3n9fJiDsg9fEwjqN89SEXPM/+nyuo4HTjn8d0tavNI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/libxs: Fix fcntl() invocation in set_cloexec() Message-Id: Date: Tue, 09 Jul 2024 14:44:13 +0000 commit 37810b52d003f8a04af41d7b1f85eff24af9f804 Author: Andrew Cooper AuthorDate: Mon Jul 8 15:56:14 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 9 15:32:18 2024 +0100 tools/libxs: Fix fcntl() invocation in set_cloexec() set_cloexec() had a bit too much copy&pate from setnonblock(), and insufficient testing on ancient versions of Linux... As written (emulating ancient linux by undef'ing O_CLOEXEC), strace shows: open("/dev/xen/xenbus", O_RDWR) = 3 fcntl(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) fcntl(3, 0x8003 /* F_??? */, 0x7ffe4a771d90) = -1 EINVAL (Invalid argument) close(3) = 0 which is obviously nonsense. Switch F_GETFL -> F_GETFD, and fix the second invocation to use F_SETFD. With this, strace is rather happer: open("/dev/xen/xenbus", O_RDWR) = 3 fcntl(3, F_GETFD) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 Fixes: bf7c1464706a ("tools/libxs: Fix CLOEXEC handling in get_dev()") Reported-by: Ross Lagerwall Signed-off-by: Andrew Cooper Reviewed-by: Ross Lagerwall Reviewed-by: Juergen Gross Release-Acked-by: Oleksii Kurochko --- tools/libs/store/xs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index c8845b69e2..38a6ce3cf2 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -182,12 +182,12 @@ static bool setnonblock(int fd, int nonblock) { static bool set_cloexec(int fd) { - int flags = fcntl(fd, F_GETFL); + int flags = fcntl(fd, F_GETFD); if (flags < 0) return false; - return fcntl(fd, flags | FD_CLOEXEC) >= 0; + return fcntl(fd, F_SETFD, flags | FD_CLOEXEC) >= 0; } static int pipe_cloexec(int fds[2]) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 09 17:55:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 09 Jul 2024 17:55:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.756446.1165070 (Exim 4.92) (envelope-from ) id 1sRF3R-0001HT-46; Tue, 09 Jul 2024 17:55:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 756446.1165070; Tue, 09 Jul 2024 17:55:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRF3R-0001HL-1a; Tue, 09 Jul 2024 17:55:05 +0000 Received: by outflank-mailman (input) for mailman id 756446; Tue, 09 Jul 2024 17:55:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRF3P-0001HD-DI for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 17:55:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRF3P-00018I-CN for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 17:55:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRF3P-0003vY-9T for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 17:55:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Mf0PceKPOWnIwdNganS6bZ+mm0nyWGLm06CTdSTl28I=; b=I2VMDiSWA3NWlw0w83SJ/oouuQ NCmfEqxSvjqZ2iKNvkfPKt83gT3vzXFxwMLhj1aOi42m26H/GPOldSueDhxWtCn2uIIjdgrn7+QwC M1AJZZzJnzxnZTjVDw86P4Vzp8fzIYKE/ANsxwrgFsCbGGKUuuljtbuZiqmR3txESKhQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] build: Drop openssl as a build dependency Message-Id: Date: Tue, 09 Jul 2024 17:55:03 +0000 commit cb3a371469a266ed0b4ac4aef8822cf3d08c51df Author: Andrew Cooper AuthorDate: Wed Jul 3 20:25:22 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 9 18:10:24 2024 +0100 build: Drop openssl as a build dependency The final user was blktap1, removed in Xen 4.6. Fixes: f6bcc035084a ("tools: remove blktap1") Signed-off-by: Andrew Cooper Acked-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- README | 1 - automation/build/debian/bookworm-arm64v8.dockerfile | 1 - automation/build/debian/bookworm-i386.dockerfile | 1 - automation/build/debian/bookworm.dockerfile | 1 - automation/build/debian/jessie-i386.dockerfile | 1 - automation/build/debian/jessie.dockerfile | 1 - automation/build/debian/stretch-i386.dockerfile | 1 - automation/build/debian/stretch.dockerfile | 1 - automation/build/fedora/29.dockerfile | 1 - automation/build/ubuntu/bionic.dockerfile | 1 - automation/build/ubuntu/focal.dockerfile | 1 - automation/build/ubuntu/trusty.dockerfile | 1 - automation/build/ubuntu/xenial.dockerfile | 1 - automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile | 1 - automation/tests-artifacts/kernel/6.1.19.dockerfile | 1 - 15 files changed, 15 deletions(-) diff --git a/README b/README index 428e45549a..bf6b8cd4d6 100644 --- a/README +++ b/README @@ -52,7 +52,6 @@ provided by your OS distributor: * Development install of zlib (e.g., zlib-dev) * Development install of Python 2.7 or later (e.g., python-dev) * Development install of curses (e.g., libncurses-dev) - * Development install of openssl (e.g., openssl-dev) * Development install of x11 (e.g. xorg-x11-dev) * Development install of uuid (e.g. uuid-dev) * Development install of yajl (e.g. libyajl-dev) diff --git a/automation/build/debian/bookworm-arm64v8.dockerfile b/automation/build/debian/bookworm-arm64v8.dockerfile index 3ab426a082..a36b04e75e 100644 --- a/automation/build/debian/bookworm-arm64v8.dockerfile +++ b/automation/build/debian/bookworm-arm64v8.dockerfile @@ -15,7 +15,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python3-dev \ python3-setuptools \ xorg-dev \ diff --git a/automation/build/debian/bookworm-i386.dockerfile b/automation/build/debian/bookworm-i386.dockerfile index 9a54bd7293..2ccf32193f 100644 --- a/automation/build/debian/bookworm-i386.dockerfile +++ b/automation/build/debian/bookworm-i386.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python3-dev \ python3-setuptools \ xorg-dev \ diff --git a/automation/build/debian/bookworm.dockerfile b/automation/build/debian/bookworm.dockerfile index bef44dd753..d02e3df61f 100644 --- a/automation/build/debian/bookworm.dockerfile +++ b/automation/build/debian/bookworm.dockerfile @@ -15,7 +15,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python3-dev \ python3-setuptools \ xorg-dev \ diff --git a/automation/build/debian/jessie-i386.dockerfile b/automation/build/debian/jessie-i386.dockerfile index 1eb7ff11c7..d66d069202 100644 --- a/automation/build/debian/jessie-i386.dockerfile +++ b/automation/build/debian/jessie-i386.dockerfile @@ -24,7 +24,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ xorg-dev \ uuid-dev \ diff --git a/automation/build/debian/jessie.dockerfile b/automation/build/debian/jessie.dockerfile index 4c0ffe66f8..53c3bb28f1 100644 --- a/automation/build/debian/jessie.dockerfile +++ b/automation/build/debian/jessie.dockerfile @@ -22,7 +22,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ xorg-dev \ uuid-dev \ diff --git a/automation/build/debian/stretch-i386.dockerfile b/automation/build/debian/stretch-i386.dockerfile index 8ec9c3a246..36108335e5 100644 --- a/automation/build/debian/stretch-i386.dockerfile +++ b/automation/build/debian/stretch-i386.dockerfile @@ -24,7 +24,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ python3-dev \ xorg-dev \ diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile index 2db4552662..c5339d3c83 100644 --- a/automation/build/debian/stretch.dockerfile +++ b/automation/build/debian/stretch.dockerfile @@ -22,7 +22,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ python3-dev \ xorg-dev \ diff --git a/automation/build/fedora/29.dockerfile b/automation/build/fedora/29.dockerfile index 08edf70838..d5f017ac72 100644 --- a/automation/build/fedora/29.dockerfile +++ b/automation/build/fedora/29.dockerfile @@ -10,7 +10,6 @@ RUN dnf -y install \ gcc-c++ \ ncurses-devel \ zlib-devel \ - openssl-devel \ python-devel \ python3-devel \ libuuid-devel \ diff --git a/automation/build/ubuntu/bionic.dockerfile b/automation/build/ubuntu/bionic.dockerfile index cc43fc4ade..c83624e8ca 100644 --- a/automation/build/ubuntu/bionic.dockerfile +++ b/automation/build/ubuntu/bionic.dockerfile @@ -15,7 +15,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ python3-dev \ xorg-dev \ diff --git a/automation/build/ubuntu/focal.dockerfile b/automation/build/ubuntu/focal.dockerfile index cb8bb2f6fa..cabbebf377 100644 --- a/automation/build/ubuntu/focal.dockerfile +++ b/automation/build/ubuntu/focal.dockerfile @@ -15,7 +15,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python3-dev \ python3-setuptools \ xorg-dev \ diff --git a/automation/build/ubuntu/trusty.dockerfile b/automation/build/ubuntu/trusty.dockerfile index e2a1bda7c3..ecbcb71b1c 100644 --- a/automation/build/ubuntu/trusty.dockerfile +++ b/automation/build/ubuntu/trusty.dockerfile @@ -15,7 +15,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ python3-dev \ xorg-dev \ diff --git a/automation/build/ubuntu/xenial.dockerfile b/automation/build/ubuntu/xenial.dockerfile index 168bc70ffa..13ecae7a0b 100644 --- a/automation/build/ubuntu/xenial.dockerfile +++ b/automation/build/ubuntu/xenial.dockerfile @@ -15,7 +15,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ python3-dev \ xorg-dev \ diff --git a/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile b/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile index 22359c9066..8e33995ba3 100644 --- a/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile +++ b/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile @@ -14,7 +14,6 @@ WORKDIR /build RUN apt-get update && \ apt-get --quiet --yes install \ build-essential \ - libssl-dev \ bc \ curl \ flex \ diff --git a/automation/tests-artifacts/kernel/6.1.19.dockerfile b/automation/tests-artifacts/kernel/6.1.19.dockerfile index 5cf53d290c..073eaa0e11 100644 --- a/automation/tests-artifacts/kernel/6.1.19.dockerfile +++ b/automation/tests-artifacts/kernel/6.1.19.dockerfile @@ -14,7 +14,6 @@ WORKDIR /build RUN apt-get update && \ apt-get --quiet --yes install \ build-essential \ - libssl-dev \ bc \ curl \ flex \ -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 09 17:55:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 09 Jul 2024 17:55:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.756447.1165074 (Exim 4.92) (envelope-from ) id 1sRF3b-0001Jk-5n; Tue, 09 Jul 2024 17:55:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 756447.1165074; Tue, 09 Jul 2024 17:55:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRF3b-0001Jb-2z; Tue, 09 Jul 2024 17:55:15 +0000 Received: by outflank-mailman (input) for mailman id 756447; Tue, 09 Jul 2024 17:55:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRF3Z-0001JE-Ig for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 17:55:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRF3Z-00018O-Ge for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 17:55:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRF3Z-0003wE-F3 for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 17:55:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=N8diEaZSyrMnnpbHIkw4wNuvOSJI9+d/2g5NJupkYk8=; b=EmOXtGKfgyR+bkSEZDL5eB6T0o JnNYxKXh3pMOVMgsM3pe3Ch2HM2lIpxaxJVKpKsLMPJ+WGDf6IFS/jn6lmkQMW3ca29uly9aP72AA N7CO1pdEp4uJh6QM+1tjWHPFBRsPq2vn4+dX5I8aMIIiJIowAguzz5LxqzgqlSMyg+GE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] build: Drop libiconv as a build dependecy Message-Id: Date: Tue, 09 Jul 2024 17:55:13 +0000 commit 47f465d485c24fc9f917f6152c9a7e865393713d Author: Andrew Cooper AuthorDate: Wed Jul 3 21:35:36 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 9 18:10:52 2024 +0100 build: Drop libiconv as a build dependecy The final user was blktap2, removed in Xen 4.13. Strip out the ./configure check for it, and stop explicitly installing it in the FreeBSD testing. Fixes: 2a556b63a22d ("Drop blktap2") Signed-off-by: Andrew Cooper Acked-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- .cirrus.yml | 2 +- config/Tools.mk.in | 1 - tools/configure | 44 -------------------------------------------- tools/configure.ac | 2 -- 4 files changed, 1 insertion(+), 48 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index c431d8d244..72227916c7 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -5,7 +5,7 @@ freebsd_template: &FREEBSD_TEMPLATE APPEND_INCLUDES: /usr/local/include install_script: pkg install -y seabios gmake ninja bash - pkgconf python libiconv bison perl5 + pkgconf python bison perl5 yajl lzo2 pixman argp-standalone libxml2 glib git diff --git a/config/Tools.mk.in b/config/Tools.mk.in index 50fbef841f..37c071961e 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -61,7 +61,6 @@ LINUX_BACKEND_MODULES := @LINUX_BACKEND_MODULES@ #System options ZLIB_CFLAGS := @ZLIB_CFLAGS@ ZLIB_LIBS := @ZLIB_LIBS@ -CONFIG_LIBICONV := @libiconv@ EXTFS_LIBS := @EXTFS_LIBS@ CURSES_LIBS := @CURSES_LIBS@ TINFO_LIBS := @TINFO_LIBS@ diff --git a/tools/configure b/tools/configure index d160ca2962..d64818f258 100755 --- a/tools/configure +++ b/tools/configure @@ -659,7 +659,6 @@ libnl LIBNL3_LIBS LIBNL3_CFLAGS argp_ldflags -libiconv PTHREAD_LIBS PTHREAD_LDFLAGS PTHREAD_CFLAGS @@ -9741,49 +9740,6 @@ else $as_nop as_fn_error $? "Could not find zlib" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libiconv_open in -liconv" >&5 -printf %s "checking for libiconv_open in -liconv... " >&6; } -if test ${ac_cv_lib_iconv_libiconv_open+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-liconv $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char libiconv_open (); -int -main (void) -{ -return libiconv_open (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_iconv_libiconv_open=yes -else $as_nop - ac_cv_lib_iconv_libiconv_open=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_libiconv_open" >&5 -printf "%s\n" "$ac_cv_lib_iconv_libiconv_open" >&6; } -if test "x$ac_cv_lib_iconv_libiconv_open" = xyes -then : - libiconv="y" -else $as_nop - libiconv="n" -fi - - ac_fn_c_check_header_compile "$LINENO" "argp.h" "ac_cv_header_argp_h" "$ac_includes_default" if test "x$ac_cv_header_argp_h" = xyes then : diff --git a/tools/configure.ac b/tools/configure.ac index be58f06be4..0dd6d747ab 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -444,8 +444,6 @@ AX_CHECK_PTHREAD AC_CHECK_LIB([yajl], [yajl_alloc], [], [AC_MSG_ERROR([Could not find yajl])]) AC_CHECK_LIB([z], [deflateCopy], [], [AC_MSG_ERROR([Could not find zlib])]) -AC_CHECK_LIB([iconv], [libiconv_open], [libiconv="y"], [libiconv="n"]) -AC_SUBST(libiconv) AC_CHECK_HEADER([argp.h], [ AC_CHECK_LIB([argp], [argp_usage], [argp_ldflags="-largp"]) ], [AC_MSG_ERROR([Could not find argp])]) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 09 17:55:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 09 Jul 2024 17:55:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.756448.1165078 (Exim 4.92) (envelope-from ) id 1sRF3l-0001NH-7H; Tue, 09 Jul 2024 17:55:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 756448.1165078; Tue, 09 Jul 2024 17:55:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRF3l-0001NA-4O; Tue, 09 Jul 2024 17:55:25 +0000 Received: by outflank-mailman (input) for mailman id 756448; Tue, 09 Jul 2024 17:55:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRF3j-0001Mt-MB for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 17:55:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRF3j-00018h-LL for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 17:55:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRF3j-0003wy-Iv for xen-changelog@lists.xenproject.org; Tue, 09 Jul 2024 17:55:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=2ODRBnl/2fsEtiwEeJPVqh+d/dF4kB05fppKRQNMe/k=; b=2WlRSRWgI829FGYixFi1RXg67I 8BBtvZqm95yWRJ87B1r6ijxaE0JBkjfiKFlxtnngJYdLs9gSJ+KLdGrgN1NtjU847XP6fC95XUFQE Xd8sDMTDgNYXzpl6xOLPLy4Sv+v0XHjj0iRaC2010R4OmzXsyGWRXab9xAHcngvLJzQE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] build: Drop xorg-x11 as a build dependency Message-Id: Date: Tue, 09 Jul 2024 17:55:23 +0000 commit d49ba6bf8f904a58bd1cfdfe6c93023b249f0578 Author: Andrew Cooper AuthorDate: Thu Jul 4 13:09:21 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 9 18:11:35 2024 +0100 build: Drop xorg-x11 as a build dependency The history on this one is complicated. The note to README was added in commit 1f95747a4f16 ("Add openssl-dev and xorg-x11-dev to README") in 2007. At the time, there was a vendered version of Qemu in xen.git with a local modification using to access the monitor console over VNC. The final reference to keysymdef.h was dropped in commit 85896a7c4dc7 ("build: add autoconf to replace custom checks in tools/check") in 2012. The next prior mention was in 2009 with commit a8ccb671c377 ("tools: fix x11 check") noting that x11 was not a direct dependcy of Xen; it was transitive through SDL for Qemu for source-based distros. It appears there may have been other unspecified dependencies on xorg, e.g. the use of lndir by unmodified_drivers which are no longer relevant either. These days its only the Debian based dockerfiles which install xorg-x11, and Qemu builds fine in these and others without x11. Signed-off-by: Andrew Cooper Acked-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- README | 1 - automation/build/debian/bookworm-arm64v8.dockerfile | 1 - automation/build/debian/bookworm-i386.dockerfile | 1 - automation/build/debian/bookworm.dockerfile | 1 - automation/build/debian/jessie-i386.dockerfile | 1 - automation/build/debian/jessie.dockerfile | 1 - automation/build/debian/stretch-i386.dockerfile | 1 - automation/build/debian/stretch.dockerfile | 1 - automation/build/ubuntu/bionic.dockerfile | 1 - automation/build/ubuntu/focal.dockerfile | 1 - automation/build/ubuntu/trusty.dockerfile | 1 - automation/build/ubuntu/xenial.dockerfile | 1 - 12 files changed, 12 deletions(-) diff --git a/README b/README index bf6b8cd4d6..560247e710 100644 --- a/README +++ b/README @@ -52,7 +52,6 @@ provided by your OS distributor: * Development install of zlib (e.g., zlib-dev) * Development install of Python 2.7 or later (e.g., python-dev) * Development install of curses (e.g., libncurses-dev) - * Development install of x11 (e.g. xorg-x11-dev) * Development install of uuid (e.g. uuid-dev) * Development install of yajl (e.g. libyajl-dev) * Development install of libaio (e.g. libaio-dev) version 0.3.107 or diff --git a/automation/build/debian/bookworm-arm64v8.dockerfile b/automation/build/debian/bookworm-arm64v8.dockerfile index a36b04e75e..11acc07bff 100644 --- a/automation/build/debian/bookworm-arm64v8.dockerfile +++ b/automation/build/debian/bookworm-arm64v8.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ libncurses5-dev \ python3-dev \ python3-setuptools \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/debian/bookworm-i386.dockerfile b/automation/build/debian/bookworm-i386.dockerfile index 2ccf32193f..66fa3121c5 100644 --- a/automation/build/debian/bookworm-i386.dockerfile +++ b/automation/build/debian/bookworm-i386.dockerfile @@ -19,7 +19,6 @@ RUN apt-get update && \ libncurses5-dev \ python3-dev \ python3-setuptools \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/debian/bookworm.dockerfile b/automation/build/debian/bookworm.dockerfile index d02e3df61f..db866fde30 100644 --- a/automation/build/debian/bookworm.dockerfile +++ b/automation/build/debian/bookworm.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ libncurses5-dev \ python3-dev \ python3-setuptools \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/debian/jessie-i386.dockerfile b/automation/build/debian/jessie-i386.dockerfile index d66d069202..dfa6dae06c 100644 --- a/automation/build/debian/jessie-i386.dockerfile +++ b/automation/build/debian/jessie-i386.dockerfile @@ -25,7 +25,6 @@ RUN apt-get update && \ zlib1g-dev \ libncurses5-dev \ python-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/debian/jessie.dockerfile b/automation/build/debian/jessie.dockerfile index 53c3bb28f1..82dae9ec70 100644 --- a/automation/build/debian/jessie.dockerfile +++ b/automation/build/debian/jessie.dockerfile @@ -23,7 +23,6 @@ RUN apt-get update && \ zlib1g-dev \ libncurses5-dev \ python-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/debian/stretch-i386.dockerfile b/automation/build/debian/stretch-i386.dockerfile index 36108335e5..905096ab0e 100644 --- a/automation/build/debian/stretch-i386.dockerfile +++ b/automation/build/debian/stretch-i386.dockerfile @@ -26,7 +26,6 @@ RUN apt-get update && \ libncurses5-dev \ python-dev \ python3-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile index c5339d3c83..b99d229acf 100644 --- a/automation/build/debian/stretch.dockerfile +++ b/automation/build/debian/stretch.dockerfile @@ -24,7 +24,6 @@ RUN apt-get update && \ libncurses5-dev \ python-dev \ python3-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/ubuntu/bionic.dockerfile b/automation/build/ubuntu/bionic.dockerfile index c83624e8ca..c1effc725e 100644 --- a/automation/build/ubuntu/bionic.dockerfile +++ b/automation/build/ubuntu/bionic.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ libncurses5-dev \ python-dev \ python3-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/ubuntu/focal.dockerfile b/automation/build/ubuntu/focal.dockerfile index cabbebf377..b49e53d185 100644 --- a/automation/build/ubuntu/focal.dockerfile +++ b/automation/build/ubuntu/focal.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ libncurses5-dev \ python3-dev \ python3-setuptools \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/ubuntu/trusty.dockerfile b/automation/build/ubuntu/trusty.dockerfile index ecbcb71b1c..1cda1bbd3f 100644 --- a/automation/build/ubuntu/trusty.dockerfile +++ b/automation/build/ubuntu/trusty.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ libncurses5-dev \ python-dev \ python3-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/ubuntu/xenial.dockerfile b/automation/build/ubuntu/xenial.dockerfile index 13ecae7a0b..aa8f560286 100644 --- a/automation/build/ubuntu/xenial.dockerfile +++ b/automation/build/ubuntu/xenial.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ libncurses5-dev \ python-dev \ python3-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 10 06:22:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 10 Jul 2024 06:22:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.756552.1165192 (Exim 4.92) (envelope-from ) id 1sRQiK-0006Zm-0N; Wed, 10 Jul 2024 06:22:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 756552.1165192; Wed, 10 Jul 2024 06:22:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQiJ-0006Ze-Tz; Wed, 10 Jul 2024 06:22:03 +0000 Received: by outflank-mailman (input) for mailman id 756552; Wed, 10 Jul 2024 06:22:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQiI-0006ZY-Gd for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQiI-0002Ih-DQ for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRQiI-00058T-B0 for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=kM1wHXSZ/bwlwC8IPgv4jYoAZfCWRkV62KDN3vI0r30=; b=gn0fw38eM2AdwvrF9MGflw1wwx mbLjIA6yhMAcj5VbwTEF8TdUm4llqKU/DYW4+uztDyVCnl4bd8jdGLHfAk0KXSV3ZllSxs4nIFz/O 0OJgQ7tr00yjseZfbQzi0L1riEmjhyIHvtHUJDazNK/IiHb17VXt83VLx6zlMOyKAAgo=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] stubdom: Remove more leftovers of caml-stubdom Message-Id: Date: Wed, 10 Jul 2024 06:22:02 +0000 commit 8e7c08a3363807462e6509abb4cdc7f69dad2dbb Author: Andrew Cooper AuthorDate: Tue Jul 9 13:35:37 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 9 15:32:18 2024 +0100 stubdom: Remove more leftovers of caml-stubdom Fixes: e536a497545f ("stubdom: Remove caml-stubdom") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Release-Acked-By: Oleksii Kurochko --- config/Stubdom.mk.in | 3 --- 1 file changed, 3 deletions(-) diff --git a/config/Stubdom.mk.in b/config/Stubdom.mk.in index 5990fc4e04..b399d77740 100644 --- a/config/Stubdom.mk.in +++ b/config/Stubdom.mk.in @@ -26,9 +26,6 @@ LWIP_URL := @LWIP_URL@ GRUB_VERSION := @GRUB_VERSION@ GRUB_URL := @GRUB_URL@ -OCAML_VERSION := @OCAML_VERSION@ -OCAML_URL := @OCAML_URL@ - GMP_VERSION := @GMP_VERSION@ GMP_URL := @GMP_URL@ -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 10 06:22:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 10 Jul 2024 06:22:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.756553.1165195 (Exim 4.92) (envelope-from ) id 1sRQiU-0006bW-1b; Wed, 10 Jul 2024 06:22:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 756553.1165195; Wed, 10 Jul 2024 06:22:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQiT-0006bM-VN; Wed, 10 Jul 2024 06:22:13 +0000 Received: by outflank-mailman (input) for mailman id 756553; Wed, 10 Jul 2024 06:22:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQiS-0006bE-I8 for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQiS-0002Io-HI for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRQiS-00059E-FZ for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=xHREeKlStVPQfXIGOy7ufCJ8ZEu94daExZ63Sz8KHpw=; b=Bh0q2f8rkYmBOfxXQs//1S9WHs DO7bXfVKFkZfDzpm2GAVJl7J4WWfZ+XOvNSPcyBZwpAVYXykWgAJlZN49fnbRdKwfWoiE+cRnh/FI Ag0onyprDC0DxEpzVvTC1PPSI8846TCTU1CrvqbQooTa8SZmobGUTg34GOt58UEE84C4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/libxs: Fix fcntl() invocation in set_cloexec() Message-Id: Date: Wed, 10 Jul 2024 06:22:12 +0000 commit 37810b52d003f8a04af41d7b1f85eff24af9f804 Author: Andrew Cooper AuthorDate: Mon Jul 8 15:56:14 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 9 15:32:18 2024 +0100 tools/libxs: Fix fcntl() invocation in set_cloexec() set_cloexec() had a bit too much copy&pate from setnonblock(), and insufficient testing on ancient versions of Linux... As written (emulating ancient linux by undef'ing O_CLOEXEC), strace shows: open("/dev/xen/xenbus", O_RDWR) = 3 fcntl(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) fcntl(3, 0x8003 /* F_??? */, 0x7ffe4a771d90) = -1 EINVAL (Invalid argument) close(3) = 0 which is obviously nonsense. Switch F_GETFL -> F_GETFD, and fix the second invocation to use F_SETFD. With this, strace is rather happer: open("/dev/xen/xenbus", O_RDWR) = 3 fcntl(3, F_GETFD) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 Fixes: bf7c1464706a ("tools/libxs: Fix CLOEXEC handling in get_dev()") Reported-by: Ross Lagerwall Signed-off-by: Andrew Cooper Reviewed-by: Ross Lagerwall Reviewed-by: Juergen Gross Release-Acked-by: Oleksii Kurochko --- tools/libs/store/xs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index c8845b69e2..38a6ce3cf2 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -182,12 +182,12 @@ static bool setnonblock(int fd, int nonblock) { static bool set_cloexec(int fd) { - int flags = fcntl(fd, F_GETFL); + int flags = fcntl(fd, F_GETFD); if (flags < 0) return false; - return fcntl(fd, flags | FD_CLOEXEC) >= 0; + return fcntl(fd, F_SETFD, flags | FD_CLOEXEC) >= 0; } static int pipe_cloexec(int fds[2]) -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 10 06:22:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 10 Jul 2024 06:22:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.756554.1165200 (Exim 4.92) (envelope-from ) id 1sRQie-0006fe-38; Wed, 10 Jul 2024 06:22:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 756554.1165200; Wed, 10 Jul 2024 06:22: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 1sRQie-0006fW-0W; Wed, 10 Jul 2024 06:22:24 +0000 Received: by outflank-mailman (input) for mailman id 756554; Wed, 10 Jul 2024 06:22:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQic-0006fK-Mq for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQic-0002J6-LC for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRQic-00059u-Jf for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=qrAJNIHyBbN2SVNR8lsMeJ7cFeRBMnnK2ivSfxOhE1U=; b=JrpMW7m24OieSDafcTZMpY/qqB hegGi+9yKEVNzi7CbfkBp3aG7j4HuTqjph9sDEyC80Gr6kQkAg765ztUB55cwkhlM2arpxhvi7Ml1 s8SIZsfanhYGpRIjK3/tmtbfo017biCPoVv2mhqSTgkNB72vChSiKW5+FpvXzAqvciU8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] build: Drop openssl as a build dependency Message-Id: Date: Wed, 10 Jul 2024 06:22:22 +0000 commit cb3a371469a266ed0b4ac4aef8822cf3d08c51df Author: Andrew Cooper AuthorDate: Wed Jul 3 20:25:22 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 9 18:10:24 2024 +0100 build: Drop openssl as a build dependency The final user was blktap1, removed in Xen 4.6. Fixes: f6bcc035084a ("tools: remove blktap1") Signed-off-by: Andrew Cooper Acked-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- README | 1 - automation/build/debian/bookworm-arm64v8.dockerfile | 1 - automation/build/debian/bookworm-i386.dockerfile | 1 - automation/build/debian/bookworm.dockerfile | 1 - automation/build/debian/jessie-i386.dockerfile | 1 - automation/build/debian/jessie.dockerfile | 1 - automation/build/debian/stretch-i386.dockerfile | 1 - automation/build/debian/stretch.dockerfile | 1 - automation/build/fedora/29.dockerfile | 1 - automation/build/ubuntu/bionic.dockerfile | 1 - automation/build/ubuntu/focal.dockerfile | 1 - automation/build/ubuntu/trusty.dockerfile | 1 - automation/build/ubuntu/xenial.dockerfile | 1 - automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile | 1 - automation/tests-artifacts/kernel/6.1.19.dockerfile | 1 - 15 files changed, 15 deletions(-) diff --git a/README b/README index 428e45549a..bf6b8cd4d6 100644 --- a/README +++ b/README @@ -52,7 +52,6 @@ provided by your OS distributor: * Development install of zlib (e.g., zlib-dev) * Development install of Python 2.7 or later (e.g., python-dev) * Development install of curses (e.g., libncurses-dev) - * Development install of openssl (e.g., openssl-dev) * Development install of x11 (e.g. xorg-x11-dev) * Development install of uuid (e.g. uuid-dev) * Development install of yajl (e.g. libyajl-dev) diff --git a/automation/build/debian/bookworm-arm64v8.dockerfile b/automation/build/debian/bookworm-arm64v8.dockerfile index 3ab426a082..a36b04e75e 100644 --- a/automation/build/debian/bookworm-arm64v8.dockerfile +++ b/automation/build/debian/bookworm-arm64v8.dockerfile @@ -15,7 +15,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python3-dev \ python3-setuptools \ xorg-dev \ diff --git a/automation/build/debian/bookworm-i386.dockerfile b/automation/build/debian/bookworm-i386.dockerfile index 9a54bd7293..2ccf32193f 100644 --- a/automation/build/debian/bookworm-i386.dockerfile +++ b/automation/build/debian/bookworm-i386.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python3-dev \ python3-setuptools \ xorg-dev \ diff --git a/automation/build/debian/bookworm.dockerfile b/automation/build/debian/bookworm.dockerfile index bef44dd753..d02e3df61f 100644 --- a/automation/build/debian/bookworm.dockerfile +++ b/automation/build/debian/bookworm.dockerfile @@ -15,7 +15,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python3-dev \ python3-setuptools \ xorg-dev \ diff --git a/automation/build/debian/jessie-i386.dockerfile b/automation/build/debian/jessie-i386.dockerfile index 1eb7ff11c7..d66d069202 100644 --- a/automation/build/debian/jessie-i386.dockerfile +++ b/automation/build/debian/jessie-i386.dockerfile @@ -24,7 +24,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ xorg-dev \ uuid-dev \ diff --git a/automation/build/debian/jessie.dockerfile b/automation/build/debian/jessie.dockerfile index 4c0ffe66f8..53c3bb28f1 100644 --- a/automation/build/debian/jessie.dockerfile +++ b/automation/build/debian/jessie.dockerfile @@ -22,7 +22,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ xorg-dev \ uuid-dev \ diff --git a/automation/build/debian/stretch-i386.dockerfile b/automation/build/debian/stretch-i386.dockerfile index 8ec9c3a246..36108335e5 100644 --- a/automation/build/debian/stretch-i386.dockerfile +++ b/automation/build/debian/stretch-i386.dockerfile @@ -24,7 +24,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ python3-dev \ xorg-dev \ diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile index 2db4552662..c5339d3c83 100644 --- a/automation/build/debian/stretch.dockerfile +++ b/automation/build/debian/stretch.dockerfile @@ -22,7 +22,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ python3-dev \ xorg-dev \ diff --git a/automation/build/fedora/29.dockerfile b/automation/build/fedora/29.dockerfile index 08edf70838..d5f017ac72 100644 --- a/automation/build/fedora/29.dockerfile +++ b/automation/build/fedora/29.dockerfile @@ -10,7 +10,6 @@ RUN dnf -y install \ gcc-c++ \ ncurses-devel \ zlib-devel \ - openssl-devel \ python-devel \ python3-devel \ libuuid-devel \ diff --git a/automation/build/ubuntu/bionic.dockerfile b/automation/build/ubuntu/bionic.dockerfile index cc43fc4ade..c83624e8ca 100644 --- a/automation/build/ubuntu/bionic.dockerfile +++ b/automation/build/ubuntu/bionic.dockerfile @@ -15,7 +15,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ python3-dev \ xorg-dev \ diff --git a/automation/build/ubuntu/focal.dockerfile b/automation/build/ubuntu/focal.dockerfile index cb8bb2f6fa..cabbebf377 100644 --- a/automation/build/ubuntu/focal.dockerfile +++ b/automation/build/ubuntu/focal.dockerfile @@ -15,7 +15,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python3-dev \ python3-setuptools \ xorg-dev \ diff --git a/automation/build/ubuntu/trusty.dockerfile b/automation/build/ubuntu/trusty.dockerfile index e2a1bda7c3..ecbcb71b1c 100644 --- a/automation/build/ubuntu/trusty.dockerfile +++ b/automation/build/ubuntu/trusty.dockerfile @@ -15,7 +15,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ python3-dev \ xorg-dev \ diff --git a/automation/build/ubuntu/xenial.dockerfile b/automation/build/ubuntu/xenial.dockerfile index 168bc70ffa..13ecae7a0b 100644 --- a/automation/build/ubuntu/xenial.dockerfile +++ b/automation/build/ubuntu/xenial.dockerfile @@ -15,7 +15,6 @@ RUN apt-get update && \ build-essential \ zlib1g-dev \ libncurses5-dev \ - libssl-dev \ python-dev \ python3-dev \ xorg-dev \ diff --git a/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile b/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile index 22359c9066..8e33995ba3 100644 --- a/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile +++ b/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile @@ -14,7 +14,6 @@ WORKDIR /build RUN apt-get update && \ apt-get --quiet --yes install \ build-essential \ - libssl-dev \ bc \ curl \ flex \ diff --git a/automation/tests-artifacts/kernel/6.1.19.dockerfile b/automation/tests-artifacts/kernel/6.1.19.dockerfile index 5cf53d290c..073eaa0e11 100644 --- a/automation/tests-artifacts/kernel/6.1.19.dockerfile +++ b/automation/tests-artifacts/kernel/6.1.19.dockerfile @@ -14,7 +14,6 @@ WORKDIR /build RUN apt-get update && \ apt-get --quiet --yes install \ build-essential \ - libssl-dev \ bc \ curl \ flex \ -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 10 06:22:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 10 Jul 2024 06:22:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.756555.1165203 (Exim 4.92) (envelope-from ) id 1sRQio-0006ig-4b; Wed, 10 Jul 2024 06:22:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 756555.1165203; Wed, 10 Jul 2024 06:22:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQio-0006iY-21; Wed, 10 Jul 2024 06:22:34 +0000 Received: by outflank-mailman (input) for mailman id 756555; Wed, 10 Jul 2024 06:22:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQim-0006iQ-Pg for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQim-0002JD-Oe for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRQim-0005AR-Np for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=+xNl0gLu/CC2npOHGwiE9B3y30zfKd7OI5TbkkL7D6g=; b=UYzThNr8q3mypA3kOjxgKv5K1W eg6HgQfEdk9k6Q8T+C8l8YtvaQfWD/oejtdEMbJW6vb2pGdcxfux6rdlC0ba6LyZGb3Ltx2ZAhZR3 jH9nst9L1/KYDClqt5pbWv2V2p8mZ38fVAwvbyyw/uH1BK0sJSQkpjoLv50z9Fl6gqHc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] build: Drop libiconv as a build dependecy Message-Id: Date: Wed, 10 Jul 2024 06:22:32 +0000 commit 47f465d485c24fc9f917f6152c9a7e865393713d Author: Andrew Cooper AuthorDate: Wed Jul 3 21:35:36 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 9 18:10:52 2024 +0100 build: Drop libiconv as a build dependecy The final user was blktap2, removed in Xen 4.13. Strip out the ./configure check for it, and stop explicitly installing it in the FreeBSD testing. Fixes: 2a556b63a22d ("Drop blktap2") Signed-off-by: Andrew Cooper Acked-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- .cirrus.yml | 2 +- config/Tools.mk.in | 1 - tools/configure | 44 -------------------------------------------- tools/configure.ac | 2 -- 4 files changed, 1 insertion(+), 48 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index c431d8d244..72227916c7 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -5,7 +5,7 @@ freebsd_template: &FREEBSD_TEMPLATE APPEND_INCLUDES: /usr/local/include install_script: pkg install -y seabios gmake ninja bash - pkgconf python libiconv bison perl5 + pkgconf python bison perl5 yajl lzo2 pixman argp-standalone libxml2 glib git diff --git a/config/Tools.mk.in b/config/Tools.mk.in index 50fbef841f..37c071961e 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -61,7 +61,6 @@ LINUX_BACKEND_MODULES := @LINUX_BACKEND_MODULES@ #System options ZLIB_CFLAGS := @ZLIB_CFLAGS@ ZLIB_LIBS := @ZLIB_LIBS@ -CONFIG_LIBICONV := @libiconv@ EXTFS_LIBS := @EXTFS_LIBS@ CURSES_LIBS := @CURSES_LIBS@ TINFO_LIBS := @TINFO_LIBS@ diff --git a/tools/configure b/tools/configure index d160ca2962..d64818f258 100755 --- a/tools/configure +++ b/tools/configure @@ -659,7 +659,6 @@ libnl LIBNL3_LIBS LIBNL3_CFLAGS argp_ldflags -libiconv PTHREAD_LIBS PTHREAD_LDFLAGS PTHREAD_CFLAGS @@ -9741,49 +9740,6 @@ else $as_nop as_fn_error $? "Could not find zlib" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libiconv_open in -liconv" >&5 -printf %s "checking for libiconv_open in -liconv... " >&6; } -if test ${ac_cv_lib_iconv_libiconv_open+y} -then : - printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS -LIBS="-liconv $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char libiconv_open (); -int -main (void) -{ -return libiconv_open (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO" -then : - ac_cv_lib_iconv_libiconv_open=yes -else $as_nop - ac_cv_lib_iconv_libiconv_open=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iconv_libiconv_open" >&5 -printf "%s\n" "$ac_cv_lib_iconv_libiconv_open" >&6; } -if test "x$ac_cv_lib_iconv_libiconv_open" = xyes -then : - libiconv="y" -else $as_nop - libiconv="n" -fi - - ac_fn_c_check_header_compile "$LINENO" "argp.h" "ac_cv_header_argp_h" "$ac_includes_default" if test "x$ac_cv_header_argp_h" = xyes then : diff --git a/tools/configure.ac b/tools/configure.ac index be58f06be4..0dd6d747ab 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -444,8 +444,6 @@ AX_CHECK_PTHREAD AC_CHECK_LIB([yajl], [yajl_alloc], [], [AC_MSG_ERROR([Could not find yajl])]) AC_CHECK_LIB([z], [deflateCopy], [], [AC_MSG_ERROR([Could not find zlib])]) -AC_CHECK_LIB([iconv], [libiconv_open], [libiconv="y"], [libiconv="n"]) -AC_SUBST(libiconv) AC_CHECK_HEADER([argp.h], [ AC_CHECK_LIB([argp], [argp_usage], [argp_ldflags="-largp"]) ], [AC_MSG_ERROR([Could not find argp])]) -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 10 06:22:44 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 10 Jul 2024 06:22:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.756556.1165208 (Exim 4.92) (envelope-from ) id 1sRQiy-0006li-6i; Wed, 10 Jul 2024 06:22:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 756556.1165208; Wed, 10 Jul 2024 06:22:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQiy-0006lY-3X; Wed, 10 Jul 2024 06:22:44 +0000 Received: by outflank-mailman (input) for mailman id 756556; Wed, 10 Jul 2024 06:22:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQiw-0006lI-TX for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRQiw-0002Jd-Se for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRQiw-0005B9-Qx for xen-changelog@lists.xenproject.org; Wed, 10 Jul 2024 06:22:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=TRUfBgZBGn7hFCB1uqdLl+aF+2MKDJmuNuJmDoop2E8=; b=Z8ig/7sC4rH/AoA5yL+/HJFLti cYYNxFvQZDrmP+BUiLK5IDty7v585v8hWnS3PpsQdi4G9kuLun2PXkDYpIyS9ykameKUc6jhb+FEs Xsqg12e2sovWaKEn1JG3ynGCwcsbX7RxdOoju1vMv0aaXvJRnJNROgUgpSKBDAzkUPhg=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] build: Drop xorg-x11 as a build dependency Message-Id: Date: Wed, 10 Jul 2024 06:22:42 +0000 commit d49ba6bf8f904a58bd1cfdfe6c93023b249f0578 Author: Andrew Cooper AuthorDate: Thu Jul 4 13:09:21 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 9 18:11:35 2024 +0100 build: Drop xorg-x11 as a build dependency The history on this one is complicated. The note to README was added in commit 1f95747a4f16 ("Add openssl-dev and xorg-x11-dev to README") in 2007. At the time, there was a vendered version of Qemu in xen.git with a local modification using to access the monitor console over VNC. The final reference to keysymdef.h was dropped in commit 85896a7c4dc7 ("build: add autoconf to replace custom checks in tools/check") in 2012. The next prior mention was in 2009 with commit a8ccb671c377 ("tools: fix x11 check") noting that x11 was not a direct dependcy of Xen; it was transitive through SDL for Qemu for source-based distros. It appears there may have been other unspecified dependencies on xorg, e.g. the use of lndir by unmodified_drivers which are no longer relevant either. These days its only the Debian based dockerfiles which install xorg-x11, and Qemu builds fine in these and others without x11. Signed-off-by: Andrew Cooper Acked-by: Roger Pau Monné Release-Acked-by: Oleksii Kurochko --- README | 1 - automation/build/debian/bookworm-arm64v8.dockerfile | 1 - automation/build/debian/bookworm-i386.dockerfile | 1 - automation/build/debian/bookworm.dockerfile | 1 - automation/build/debian/jessie-i386.dockerfile | 1 - automation/build/debian/jessie.dockerfile | 1 - automation/build/debian/stretch-i386.dockerfile | 1 - automation/build/debian/stretch.dockerfile | 1 - automation/build/ubuntu/bionic.dockerfile | 1 - automation/build/ubuntu/focal.dockerfile | 1 - automation/build/ubuntu/trusty.dockerfile | 1 - automation/build/ubuntu/xenial.dockerfile | 1 - 12 files changed, 12 deletions(-) diff --git a/README b/README index bf6b8cd4d6..560247e710 100644 --- a/README +++ b/README @@ -52,7 +52,6 @@ provided by your OS distributor: * Development install of zlib (e.g., zlib-dev) * Development install of Python 2.7 or later (e.g., python-dev) * Development install of curses (e.g., libncurses-dev) - * Development install of x11 (e.g. xorg-x11-dev) * Development install of uuid (e.g. uuid-dev) * Development install of yajl (e.g. libyajl-dev) * Development install of libaio (e.g. libaio-dev) version 0.3.107 or diff --git a/automation/build/debian/bookworm-arm64v8.dockerfile b/automation/build/debian/bookworm-arm64v8.dockerfile index a36b04e75e..11acc07bff 100644 --- a/automation/build/debian/bookworm-arm64v8.dockerfile +++ b/automation/build/debian/bookworm-arm64v8.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ libncurses5-dev \ python3-dev \ python3-setuptools \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/debian/bookworm-i386.dockerfile b/automation/build/debian/bookworm-i386.dockerfile index 2ccf32193f..66fa3121c5 100644 --- a/automation/build/debian/bookworm-i386.dockerfile +++ b/automation/build/debian/bookworm-i386.dockerfile @@ -19,7 +19,6 @@ RUN apt-get update && \ libncurses5-dev \ python3-dev \ python3-setuptools \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/debian/bookworm.dockerfile b/automation/build/debian/bookworm.dockerfile index d02e3df61f..db866fde30 100644 --- a/automation/build/debian/bookworm.dockerfile +++ b/automation/build/debian/bookworm.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ libncurses5-dev \ python3-dev \ python3-setuptools \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/debian/jessie-i386.dockerfile b/automation/build/debian/jessie-i386.dockerfile index d66d069202..dfa6dae06c 100644 --- a/automation/build/debian/jessie-i386.dockerfile +++ b/automation/build/debian/jessie-i386.dockerfile @@ -25,7 +25,6 @@ RUN apt-get update && \ zlib1g-dev \ libncurses5-dev \ python-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/debian/jessie.dockerfile b/automation/build/debian/jessie.dockerfile index 53c3bb28f1..82dae9ec70 100644 --- a/automation/build/debian/jessie.dockerfile +++ b/automation/build/debian/jessie.dockerfile @@ -23,7 +23,6 @@ RUN apt-get update && \ zlib1g-dev \ libncurses5-dev \ python-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/debian/stretch-i386.dockerfile b/automation/build/debian/stretch-i386.dockerfile index 36108335e5..905096ab0e 100644 --- a/automation/build/debian/stretch-i386.dockerfile +++ b/automation/build/debian/stretch-i386.dockerfile @@ -26,7 +26,6 @@ RUN apt-get update && \ libncurses5-dev \ python-dev \ python3-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile index c5339d3c83..b99d229acf 100644 --- a/automation/build/debian/stretch.dockerfile +++ b/automation/build/debian/stretch.dockerfile @@ -24,7 +24,6 @@ RUN apt-get update && \ libncurses5-dev \ python-dev \ python3-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/ubuntu/bionic.dockerfile b/automation/build/ubuntu/bionic.dockerfile index c83624e8ca..c1effc725e 100644 --- a/automation/build/ubuntu/bionic.dockerfile +++ b/automation/build/ubuntu/bionic.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ libncurses5-dev \ python-dev \ python3-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/ubuntu/focal.dockerfile b/automation/build/ubuntu/focal.dockerfile index cabbebf377..b49e53d185 100644 --- a/automation/build/ubuntu/focal.dockerfile +++ b/automation/build/ubuntu/focal.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ libncurses5-dev \ python3-dev \ python3-setuptools \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/ubuntu/trusty.dockerfile b/automation/build/ubuntu/trusty.dockerfile index ecbcb71b1c..1cda1bbd3f 100644 --- a/automation/build/ubuntu/trusty.dockerfile +++ b/automation/build/ubuntu/trusty.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ libncurses5-dev \ python-dev \ python3-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ diff --git a/automation/build/ubuntu/xenial.dockerfile b/automation/build/ubuntu/xenial.dockerfile index 13ecae7a0b..aa8f560286 100644 --- a/automation/build/ubuntu/xenial.dockerfile +++ b/automation/build/ubuntu/xenial.dockerfile @@ -17,7 +17,6 @@ RUN apt-get update && \ libncurses5-dev \ python-dev \ python3-dev \ - xorg-dev \ uuid-dev \ libyajl-dev \ libaio-dev \ -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 11 10:22:12 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 11 Jul 2024 10:22:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.757276.1166083 (Exim 4.92) (envelope-from ) id 1sRqw9-0004j5-14; Thu, 11 Jul 2024 10:22:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 757276.1166083; Thu, 11 Jul 2024 10:22:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRqw8-0004ix-Ug; Thu, 11 Jul 2024 10:22:04 +0000 Received: by outflank-mailman (input) for mailman id 757276; Thu, 11 Jul 2024 10:22:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRqw8-0004iq-3j for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 10:22:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRqw7-0006fE-LJ for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 10:22:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRqw7-0001Nu-Jv for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 10:22:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=S6HFaxCfQZuth91juzQIUsgybtz7bpusfadeGgXL8lc=; b=63bt9IiPGyskF3egaU0BIyAaZN BwZMLUbhEp5M7KKCzdLqD/zVaCS17Kpk+zulV6qgUZmPfuMK5AGJB7JkjcvJBhWWlZ4Ziid4GRdFJ reLiejHZt/O2VKHRRv3tQwyHSxYMAWcaezMeu7WIgKED4drlFR0stHIXRnFxObLvQTkw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] automation: Use a different ImageBuilder repository URL Message-Id: Date: Thu, 11 Jul 2024 10:22:03 +0000 commit 5d3e2140bbf1dc0ab0972efbc096d79509ca9ae8 Author: Michal Orzel AuthorDate: Wed Jul 10 11:37:51 2024 +0200 Commit: Andrew Cooper CommitDate: Thu Jul 11 11:11:20 2024 +0100 automation: Use a different ImageBuilder repository URL Switch to using https://gitlab.com/xen-project/imagebuilder.git which should be considered official ImageBuilder repo. Take the opportunity to truncate the git history when cloning using --depth 1. Signed-off-by: Michal Orzel Reviewed-by: Stefano Stabellini Reviewed-by: Alejandro Vallejo Release-Acked-By: Oleksii Kurochko --- automation/scripts/qemu-smoke-dom0-arm32.sh | 2 +- automation/scripts/qemu-smoke-dom0-arm64.sh | 2 +- automation/scripts/qemu-smoke-dom0less-arm32.sh | 2 +- automation/scripts/qemu-smoke-dom0less-arm64.sh | 2 +- automation/scripts/qemu-xtf-dom0less-arm64.sh | 2 +- automation/scripts/xilinx-smoke-dom0less-arm64.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/automation/scripts/qemu-smoke-dom0-arm32.sh b/automation/scripts/qemu-smoke-dom0-arm32.sh index d916489056..31c05cc840 100755 --- a/automation/scripts/qemu-smoke-dom0-arm32.sh +++ b/automation/scripts/qemu-smoke-dom0-arm32.sh @@ -73,7 +73,7 @@ UBOOT_SOURCE="boot.source" UBOOT_SCRIPT="boot.scr"' > config rm -rf imagebuilder -git clone https://gitlab.com/ViryaOS/imagebuilder +git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c config rm -f ${serial_log} diff --git a/automation/scripts/qemu-smoke-dom0-arm64.sh b/automation/scripts/qemu-smoke-dom0-arm64.sh index e0bb37af36..352963a741 100755 --- a/automation/scripts/qemu-smoke-dom0-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0-arm64.sh @@ -87,7 +87,7 @@ LOAD_CMD="tftpb" UBOOT_SOURCE="boot.source" UBOOT_SCRIPT="boot.scr"' > binaries/config rm -rf imagebuilder -git clone https://gitlab.com/ViryaOS/imagebuilder +git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d binaries/ -c binaries/config diff --git a/automation/scripts/qemu-smoke-dom0less-arm32.sh b/automation/scripts/qemu-smoke-dom0less-arm32.sh index 1e2b939aad..c027c8c5c8 100755 --- a/automation/scripts/qemu-smoke-dom0less-arm32.sh +++ b/automation/scripts/qemu-smoke-dom0less-arm32.sh @@ -125,7 +125,7 @@ if [[ "${test_variant}" == "without-dom0" ]]; then fi rm -rf imagebuilder -git clone https://gitlab.com/ViryaOS/imagebuilder +git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c config # Run the test diff --git a/automation/scripts/qemu-smoke-dom0less-arm64.sh b/automation/scripts/qemu-smoke-dom0less-arm64.sh index 292c38a561..15258692d5 100755 --- a/automation/scripts/qemu-smoke-dom0less-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0less-arm64.sh @@ -198,7 +198,7 @@ NUM_CPUPOOLS=1' >> binaries/config fi rm -rf imagebuilder -git clone https://gitlab.com/ViryaOS/imagebuilder +git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d binaries/ -c binaries/config diff --git a/automation/scripts/qemu-xtf-dom0less-arm64.sh b/automation/scripts/qemu-xtf-dom0less-arm64.sh index a667e0412c..b08c2d44fb 100755 --- a/automation/scripts/qemu-xtf-dom0less-arm64.sh +++ b/automation/scripts/qemu-xtf-dom0less-arm64.sh @@ -45,7 +45,7 @@ UBOOT_SOURCE="boot.source" UBOOT_SCRIPT="boot.scr"' > binaries/config rm -rf imagebuilder -git clone https://gitlab.com/ViryaOS/imagebuilder +git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d binaries/ -c binaries/config # Run the test diff --git a/automation/scripts/xilinx-smoke-dom0less-arm64.sh b/automation/scripts/xilinx-smoke-dom0less-arm64.sh index 4a071c6ef1..666411d6a0 100755 --- a/automation/scripts/xilinx-smoke-dom0less-arm64.sh +++ b/automation/scripts/xilinx-smoke-dom0less-arm64.sh @@ -122,7 +122,7 @@ if [[ "${test_variant}" == "gem-passthrough" ]]; then fi rm -rf imagebuilder -git clone https://gitlab.com/ViryaOS/imagebuilder +git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d $TFTP/ -c $TFTP/config # restart the board -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 11 17:33:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 11 Jul 2024 17:33:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.757651.1166722 (Exim 4.92) (envelope-from ) id 1sRxfE-0001Jz-W8; Thu, 11 Jul 2024 17:33:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 757651.1166722; Thu, 11 Jul 2024 17:33:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfE-0001Js-TE; Thu, 11 Jul 2024 17:33:04 +0000 Received: by outflank-mailman (input) for mailman id 757651; Thu, 11 Jul 2024 17:33:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfD-0001Jm-NY for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfD-0000ci-KD for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRxfD-0002NA-IQ for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=cnChOucx147P34oFHeCSdAZGVFK+j/zM6Sz9N+yU1u0=; b=2kFP6X6mQvr642NCiDVBrpTL8j OkYcTHEwTd0M/hGLI+wNp2/0d56vCACjuXb8Hhb3j7k0glhx5WhkMx5Rpsl6c80WfJT7RD8ZWYtu2 GvE+9JPdP72yESYyVde27WS6YE1/AdYFLL2DROO5UUmZjIr+Fa+aWqoARauFTV4JHhSE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Fix CONTAINER_UID0=1 scripts/containerize Message-Id: Date: Thu, 11 Jul 2024 17:33:03 +0000 commit 3420cc1a50f794df82e398855f72f928c127548f Author: Andrew Cooper AuthorDate: Mon Jul 8 18:00:49 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 17:45:57 2024 +0100 CI: Fix CONTAINER_UID0=1 scripts/containerize Right now, most build containers use root. Archlinux, Fedora and Yocto set up a regular user called `user`. For those containers, trying to containerize as root fails, because CONTAINER_UID0=1 does nothing, whereas CONTAINER_UID0=0 forces the user away from root. To make CONTAINER_UID0=1 work reliably, force to root if requested. Fixes: 17fbe6504dfd ("automation: introduce a new variable to control container user") Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/scripts/containerize | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/scripts/containerize b/automation/scripts/containerize index acdef1b548..03bc483735 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -51,7 +51,7 @@ esac # Use this variable to control whether root should be used case "_${CONTAINER_UID0}" in - _1) userarg= ;; + _1) userarg="-u 0" ;; _0|_) userarg="-u $(id -u) $userns_podman" ;; esac -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 11 17:33:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 11 Jul 2024 17:33:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.757652.1166725 (Exim 4.92) (envelope-from ) id 1sRxfP-0001Lg-1C; Thu, 11 Jul 2024 17:33:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 757652.1166725; Thu, 11 Jul 2024 17:33:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfO-0001LZ-Uq; Thu, 11 Jul 2024 17:33:14 +0000 Received: by outflank-mailman (input) for mailman id 757652; Thu, 11 Jul 2024 17:33:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfN-0001LT-Rx for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfN-0000cq-Pb for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRxfN-0002OU-MT for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=qncHIfKelxJrrA2MuJ/BIb3ebpWY95aOwd2hw+UIjuc=; b=hy2ztJJDmOsueo6oUyvHKVvvfJ fOlBL4VU1sRKsqBEn+/O0S7FnBNJmLHyY7FgMMVKDxlZDz3xvGObQl69V0JEKH1f6QaOwMihh7z7O sWOak+XmBRpTzAADmtPWgZ5TC7xN/DK0oY/Q72XYugTRUWVZVIyUb5KkiLAFMnUd935o=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Remove useless/misleading randconfig jobs Message-Id: Date: Thu, 11 Jul 2024 17:33:13 +0000 commit 83754331a78bb35ba6fff29a086439cb15b0d9b4 Author: Andrew Cooper AuthorDate: Thu Jul 11 00:38:58 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 17:45:57 2024 +0100 CI: Remove useless/misleading randconfig jobs Randconfig builds pick CONFIG_DEBUG with 50% probability. Therefore $foo{,-debug}-randconfig are just two equivalent jobs with misleading names. Furthermore, arm64 has randconfig jobs for both Alpine and Bookworm; Both environments use GCC 12.2, so we have 4 equivalent jobs. Delete 3 of them. This leaves us with 4 primary randconfig jobs: gitlab-ci/build.yaml:381:debian-bookworm-gcc-arm32-randconfig: gitlab-ci/build.yaml:429:alpine-3.18-gcc-arm64-randconfig: gitlab-ci/build.yaml:495:archlinux-current-gcc-riscv64-randconfig: gitlab-ci/build.yaml:640:debian-bookworm-gcc-randconfig: as PPC64 doesn't want randconfig right now, and buster-gcc-ibt is a special job with a custom compiler. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/gitlab-ci/build.yaml | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index ff5c9055d1..da7b8885aa 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -385,13 +385,6 @@ debian-bookworm-gcc-arm32-randconfig: HYPERVISOR_ONLY: y RANDCONFIG: y -debian-bookworm-gcc-arm32-debug-randconfig: - extends: .gcc-arm32-cross-build-debug - variables: - CONTAINER: debian:bookworm-arm64v8-arm32-gcc - HYPERVISOR_ONLY: y - RANDCONFIG: y - debian-bookworm-gcc-arm32-debug-staticmem: extends: .gcc-arm32-cross-build-debug variables: @@ -423,18 +416,6 @@ debian-bookworm-gcc-debug-arm64: variables: CONTAINER: debian:bookworm-arm64v8 -debian-bookworm-gcc-arm64-randconfig: - extends: .gcc-arm64-build - variables: - CONTAINER: debian:bookworm-arm64v8 - RANDCONFIG: y - -debian-bookworm-gcc-debug-arm64-randconfig: - extends: .gcc-arm64-build-debug - variables: - CONTAINER: debian:bookworm-arm64v8 - RANDCONFIG: y - alpine-3.18-gcc-arm64: extends: .gcc-arm64-build variables: @@ -451,12 +432,6 @@ alpine-3.18-gcc-arm64-randconfig: CONTAINER: alpine:3.18-arm64v8 RANDCONFIG: y -alpine-3.18-gcc-debug-arm64-randconfig: - extends: .gcc-arm64-build-debug - variables: - CONTAINER: alpine:3.18-arm64v8 - RANDCONFIG: y - alpine-3.18-gcc-debug-arm64-staticmem: extends: .gcc-arm64-build-debug variables: @@ -525,14 +500,6 @@ archlinux-current-gcc-riscv64-randconfig: RANDCONFIG: y <<: *riscv-fixed-randconfig -archlinux-current-gcc-riscv64-debug-randconfig: - extends: .gcc-riscv64-cross-build-debug - variables: - CONTAINER: archlinux:current-riscv64 - KBUILD_DEFCONFIG: tiny64_defconfig - RANDCONFIG: y - <<: *riscv-fixed-randconfig - # Power cross-build debian-bullseye-gcc-ppc64le: extends: .gcc-ppc64le-cross-build @@ -676,12 +643,6 @@ debian-bookworm-gcc-randconfig: CONTAINER: debian:bookworm RANDCONFIG: y -debian-bookworm-gcc-debug-randconfig: - extends: .gcc-x86-64-build-debug - variables: - CONTAINER: debian:bookworm - RANDCONFIG: y - debian-bookworm-32-clang-debug: extends: .clang-x86-32-build-debug variables: -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 11 17:33:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 11 Jul 2024 17:33:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.757653.1166729 (Exim 4.92) (envelope-from ) id 1sRxfZ-0001ON-2U; Thu, 11 Jul 2024 17:33:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 757653.1166729; Thu, 11 Jul 2024 17:33:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfZ-0001OG-02; Thu, 11 Jul 2024 17:33:25 +0000 Received: by outflank-mailman (input) for mailman id 757653; Thu, 11 Jul 2024 17:33:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfX-0001O0-Ta for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfX-0000d1-Si for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRxfX-0002Pn-Ro for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=5xe3a3UN1qxUFZNeERC8RePCXiILZ8si7WTvDJdS8Bc=; b=cumHr6mPt0ghy6nKJwDHH37ceF ml4xlQyiNmbdXxhF6t6AHvXj1HePPzylPbfegXGaHrg9XwVWVMAQhcz8hvHG4LjcGekalrc1GoEtP Cpa+rvMbAVLZ2Mi58BzviLystFel7TfsWel5zbVe5lEJ/wp3yE0hQUwJLDtlnfxu95Vc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Drop Debian Jessie dockerfiles Message-Id: Date: Thu, 11 Jul 2024 17:33:23 +0000 commit aabccd1018e944248b1d06201827b9e492baafe6 Author: Andrew Cooper AuthorDate: Wed Jul 10 00:02:47 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 17:45:57 2024 +0100 CI: Drop Debian Jessie dockerfiles These were removed from testing in Xen 4.18. Fixes: 3817e3c1b4b8 ("automation: Remove testing on Debian Jessie") Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/debian/jessie-i386.dockerfile | 55 -------------------------- automation/build/debian/jessie.dockerfile | 52 ------------------------ automation/scripts/containerize | 2 - 3 files changed, 109 deletions(-) diff --git a/automation/build/debian/jessie-i386.dockerfile b/automation/build/debian/jessie-i386.dockerfile deleted file mode 100644 index dfa6dae06c..0000000000 --- a/automation/build/debian/jessie-i386.dockerfile +++ /dev/null @@ -1,55 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/i386 debian/eol:jessie -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 - -ENTRYPOINT ["linux32"] - -# replace repos in archive as release is EOL -COPY <<"END" /etc/apt/sources.list -deb http://archive.debian.org/debian/ jessie main contrib non-free -deb http://archive.debian.org/debian/ jessie-backports main contrib non-free -deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free -END - -# build depends -RUN apt-get update && \ - apt-get --quiet --yes install \ - build-essential \ - zlib1g-dev \ - libncurses5-dev \ - python-dev \ - uuid-dev \ - libyajl-dev \ - libaio-dev \ - libglib2.0-dev \ - clang \ - libpixman-1-dev \ - pkg-config \ - flex \ - bison \ - acpica-tools \ - bin86 \ - bcc \ - liblzma-dev \ - libc6-dev \ - libnl-3-dev \ - ocaml-nox \ - libfindlib-ocaml-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/build/debian/jessie.dockerfile b/automation/build/debian/jessie.dockerfile deleted file mode 100644 index 82dae9ec70..0000000000 --- a/automation/build/debian/jessie.dockerfile +++ /dev/null @@ -1,52 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/amd64 debian/eol:jessie -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 - -# replace repos in archive as release is EOL -COPY <<"END" /etc/apt/sources.list -deb http://archive.debian.org/debian/ jessie main contrib non-free -deb http://archive.debian.org/debian/ jessie-backports main contrib non-free -deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free -END - -# build depends -RUN apt-get update && \ - apt-get --quiet --yes install \ - build-essential \ - zlib1g-dev \ - libncurses5-dev \ - python-dev \ - uuid-dev \ - libyajl-dev \ - libaio-dev \ - libglib2.0-dev \ - clang \ - libpixman-1-dev \ - pkg-config \ - flex \ - bison \ - acpica-tools \ - bin86 \ - bcc \ - liblzma-dev \ - libnl-3-dev \ - ocaml-nox \ - libfindlib-ocaml-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 03bc483735..57db42d10c 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -31,8 +31,6 @@ case "_${CONTAINER}" in _centos7) CONTAINER="${BASE}/centos:7" ;; _fedora) CONTAINER="${BASE}/fedora:29";; _focal) CONTAINER="${BASE}/ubuntu:focal" ;; - _jessie) CONTAINER="${BASE}/debian:jessie" ;; - _jessie-i386) CONTAINER="${BASE}/debian:jessie-i386" ;; _bullseye-ppc64le) CONTAINER="${BASE}/debian:bullseye-ppc64le" ;; _stretch|_) CONTAINER="${BASE}/debian:stretch" ;; _stretch-i386) CONTAINER="${BASE}/debian:stretch-i386" ;; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 11 17:33:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 11 Jul 2024 17:33:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.757654.1166734 (Exim 4.92) (envelope-from ) id 1sRxfj-0001RG-47; Thu, 11 Jul 2024 17:33:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 757654.1166734; Thu, 11 Jul 2024 17:33:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfj-0001R8-1W; Thu, 11 Jul 2024 17:33:35 +0000 Received: by outflank-mailman (input) for mailman id 757654; Thu, 11 Jul 2024 17:33:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfi-0001R0-0O for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfh-0000dD-Vo for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRxfh-0002QK-Ur for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=xBtmSnPQiZkUNSV+azxMQ/Lky3FEcLIqJ/dCaxXA99Q=; b=46iSaDVGMgo6QME6WIvOvMUKoW rBcgjK7rusokmQ5PRqhn8TFIvqekjw4nzqh55BlLctk/quSRYI9Eu+y/vRTSB6R/0IbyRT/dKK6Gx vWJoB4YnubITprzNYxSFIdp5PcHCcpdEq4HaozzC8YD2A3laeivHiBYUqtGc8yiT3G9w=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Drop Debian Stretch testing Message-Id: Date: Thu, 11 Jul 2024 17:33:33 +0000 commit 2617d2f14167e8fb9d4228b1173ed93b9c7c9b8f Author: Andrew Cooper AuthorDate: Wed Jul 10 00:26:56 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 17:45:57 2024 +0100 CI: Drop Debian Stretch testing Debian stretch is also End of Life. Update a couple of test steps to use bookworm instead. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/debian/stretch-i386.dockerfile | 57 ----------------------- automation/build/debian/stretch.dockerfile | 60 ------------------------- automation/gitlab-ci/build.yaml | 34 +------------- automation/gitlab-ci/test.yaml | 4 +- automation/scripts/containerize | 2 - 5 files changed, 4 insertions(+), 153 deletions(-) diff --git a/automation/build/debian/stretch-i386.dockerfile b/automation/build/debian/stretch-i386.dockerfile deleted file mode 100644 index 905096ab0e..0000000000 --- a/automation/build/debian/stretch-i386.dockerfile +++ /dev/null @@ -1,57 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/i386 debian:stretch -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 - -ENTRYPOINT ["linux32"] - -# replace repos in archive as release is EOL -COPY <<"END" /etc/apt/sources.list -deb http://archive.debian.org/debian/ stretch main contrib non-free -deb http://archive.debian.org/debian/ stretch-backports main contrib non-free -deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free -END - -# build depends -RUN apt-get update && \ - apt-get --quiet --yes install \ - build-essential \ - zlib1g-dev \ - libncurses5-dev \ - python-dev \ - python3-dev \ - uuid-dev \ - libyajl-dev \ - libaio-dev \ - libglib2.0-dev \ - clang \ - libpixman-1-dev \ - pkg-config \ - flex \ - bison \ - acpica-tools \ - bin86 \ - bcc \ - liblzma-dev \ - libc6-dev \ - libnl-3-dev \ - ocaml-nox \ - libfindlib-ocaml-dev \ - markdown \ - transfig \ - pandoc \ - checkpolicy \ - wget \ - git \ - nasm \ - apt-transport-https \ - && \ - apt-get autoremove -y && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/* diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile deleted file mode 100644 index b99d229acf..0000000000 --- a/automation/build/debian/stretch.dockerfile +++ /dev/null @@ -1,60 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/amd64 debian:stretch -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 - -# replace repos in archive as release is EOL -COPY <<"END" /etc/apt/sources.list -deb http://archive.debian.org/debian/ stretch main contrib non-free -deb http://archive.debian.org/debian/ stretch-backports main contrib non-free -deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free -END - -# build depends -RUN apt-get update && \ - apt-get --quiet --yes install \ - build-essential \ - zlib1g-dev \ - libncurses5-dev \ - python-dev \ - python3-dev \ - uuid-dev \ - libyajl-dev \ - libaio-dev \ - libglib2.0-dev \ - clang \ - libpixman-1-dev \ - pkg-config \ - flex \ - bison \ - acpica-tools \ - bin86 \ - bcc \ - liblzma-dev \ - libnl-3-dev \ - ocaml-nox \ - libfindlib-ocaml-dev \ - markdown \ - transfig \ - pandoc \ - checkpolicy \ - wget \ - git \ - nasm \ - gnupg \ - apt-transport-https \ - # for test phase, qemu-smoke-* jobs - qemu-system-x86 \ - # for test phase, qemu-alpine-* jobs - cpio \ - busybox-static \ - && \ - apt-get autoremove -y && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/* diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index da7b8885aa..2c6eb17bef 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -354,10 +354,10 @@ alpine-3.18-gcc-debug: variables: CONTAINER: alpine:3.18 -debian-stretch-gcc-debug: +debian-bookworm-gcc-debug: extends: .gcc-x86-64-build-debug variables: - CONTAINER: debian:stretch + CONTAINER: debian:bookworm debian-bookworm-clang-debug: extends: .clang-x86-64-build-debug @@ -589,31 +589,6 @@ centos-7-gcc-debug: variables: CONTAINER: centos:7 -debian-stretch-gcc: - extends: .gcc-x86-64-build - variables: - CONTAINER: debian:stretch - -debian-stretch-clang: - extends: .clang-x86-64-build - variables: - CONTAINER: debian:stretch - -debian-stretch-clang-debug: - extends: .clang-x86-64-build-debug - variables: - CONTAINER: debian:stretch - -debian-stretch-32-clang-debug: - extends: .clang-x86-32-build-debug - variables: - CONTAINER: debian:stretch-i386 - -debian-stretch-32-gcc-debug: - extends: .gcc-x86-32-build-debug - variables: - CONTAINER: debian:stretch-i386 - debian-buster-gcc-ibt: extends: .gcc-x86-64-build variables: @@ -632,11 +607,6 @@ debian-bookworm-gcc: variables: CONTAINER: debian:bookworm -debian-bookworm-gcc-debug: - extends: .gcc-x86-64-build-debug - variables: - CONTAINER: debian:bookworm - debian-bookworm-gcc-randconfig: extends: .gcc-x86-64-build variables: diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 898d2adc8c..d50e522f9f 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -412,7 +412,7 @@ qemu-smoke-x86-64-gcc: script: - ./automation/scripts/qemu-smoke-x86-64.sh pv 2>&1 | tee ${LOGFILE} needs: - - debian-stretch-gcc-debug + - debian-bookworm-gcc-debug qemu-smoke-x86-64-clang: extends: .qemu-x86-64 @@ -426,7 +426,7 @@ qemu-smoke-x86-64-gcc-pvh: script: - ./automation/scripts/qemu-smoke-x86-64.sh pvh 2>&1 | tee ${LOGFILE} needs: - - debian-stretch-gcc-debug + - debian-bookworm-gcc-debug qemu-smoke-x86-64-clang-pvh: extends: .qemu-x86-64 diff --git a/automation/scripts/containerize b/automation/scripts/containerize index 57db42d10c..5140765cee 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -32,8 +32,6 @@ case "_${CONTAINER}" in _fedora) CONTAINER="${BASE}/fedora:29";; _focal) CONTAINER="${BASE}/ubuntu:focal" ;; _bullseye-ppc64le) CONTAINER="${BASE}/debian:bullseye-ppc64le" ;; - _stretch|_) CONTAINER="${BASE}/debian:stretch" ;; - _stretch-i386) CONTAINER="${BASE}/debian:stretch-i386" ;; _buster-gcc-ibt) CONTAINER="${BASE}/debian:buster-gcc-ibt" ;; _bookworm|_) CONTAINER="${BASE}/debian:bookworm" ;; _bookworm-i386) CONTAINER="${BASE}/debian:bookworm-i386" ;; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 11 17:33:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 11 Jul 2024 17:33:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.757655.1166737 (Exim 4.92) (envelope-from ) id 1sRxft-0001UJ-5Y; Thu, 11 Jul 2024 17:33:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 757655.1166737; Thu, 11 Jul 2024 17:33:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxft-0001UB-2u; Thu, 11 Jul 2024 17:33:45 +0000 Received: by outflank-mailman (input) for mailman id 757655; Thu, 11 Jul 2024 17:33:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfs-0001Tz-3I for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxfs-0000dM-2Y for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:44 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRxfs-0002Qp-1i for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:44 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=IjJLbZFpdRdLTb89/xKH+SMMMCWaZ47XEdNysY2hnsc=; b=hsac7xiM+XEhl81shT6ZCn26wr PzVTOOCgjOXxUoS4Ccw8Uf0lT/BDXShLs/q/HH888ipSqa2kiOYfiufDxfwKQnkYoQktEUZuxXYG/ N2GwTF8HHReYIYEN6EY01C+bxyzL4UbSq0OxRQm9NBXLAEEmFxst704x+TWwkqFqZwl0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Drop Ubuntu Trusty testing Message-Id: Date: Thu, 11 Jul 2024 17:33:44 +0000 commit 4b716647f794515f193e00e3deac6d88dfb892f3 Author: Andrew Cooper AuthorDate: Wed Jul 10 01:01:13 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 17:45:57 2024 +0100 CI: Drop Ubuntu Trusty testing This is also End of Life. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/ubuntu/trusty.dockerfile | 51 ------------------------------- automation/gitlab-ci/build.yaml | 12 -------- automation/scripts/containerize | 1 - 3 files changed, 64 deletions(-) diff --git a/automation/build/ubuntu/trusty.dockerfile b/automation/build/ubuntu/trusty.dockerfile deleted file mode 100644 index 1cda1bbd3f..0000000000 --- a/automation/build/ubuntu/trusty.dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/amd64 ubuntu:14.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 \ - python-dev \ - python3-dev \ - uuid-dev \ - libyajl-dev \ - libaio-dev \ - libglib2.0-dev \ - clang \ - libpixman-1-dev \ - pkg-config \ - flex \ - bison \ - acpica-tools \ - bin86 \ - bcc \ - liblzma-dev \ - libnl-3-dev \ - ocaml-nox \ - libfindlib-ocaml-dev \ - markdown \ - transfig \ - pandoc \ - checkpolicy \ - wget \ - git \ - nasm \ - && \ - apt-get autoremove -y && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/* - -# Remove expired certificate that Let's Encrypt certificates used to relie on. -# (Not needed anymore) -RUN sed -i 's#mozilla/DST_Root_CA_X3\.crt#!\0#' /etc/ca-certificates.conf && \ - update-ca-certificates diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index 2c6eb17bef..3e299f34f4 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -633,18 +633,6 @@ fedora-gcc-debug: variables: CONTAINER: fedora:29 -# Ubuntu Trusty's Clang is 3.4 while Xen requires 3.5 - -ubuntu-trusty-gcc: - extends: .gcc-x86-64-build - variables: - CONTAINER: ubuntu:trusty - -ubuntu-trusty-gcc-debug: - extends: .gcc-x86-64-build-debug - variables: - CONTAINER: ubuntu:trusty - ubuntu-xenial-clang: extends: .clang-x86-64-build variables: diff --git a/automation/scripts/containerize b/automation/scripts/containerize index 5140765cee..e9ad20aa0c 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -39,7 +39,6 @@ case "_${CONTAINER}" in _bookworm-arm64v8) CONTAINER="${BASE}/debian:bookworm-arm64v8" ;; _bookworm-cppcheck) CONTAINER="${BASE}/debian:bookworm-cppcheck" ;; _bionic) CONTAINER="${BASE}/ubuntu:bionic" ;; - _trusty) CONTAINER="${BASE}/ubuntu:trusty" ;; _xenial) CONTAINER="${BASE}/ubuntu:xenial" ;; _opensuse-leap|_leap) CONTAINER="${BASE}/suse:opensuse-leap" ;; _opensuse-tumbleweed|_tumbleweed) CONTAINER="${BASE}/suse:opensuse-tumbleweed" ;; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 11 17:33:55 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 11 Jul 2024 17:33:55 +0000 Received: from list by lists.xenproject.org with outflank-mailman.757656.1166742 (Exim 4.92) (envelope-from ) id 1sRxg3-0001XR-8P; Thu, 11 Jul 2024 17:33:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 757656.1166742; Thu, 11 Jul 2024 17:33:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxg3-0001XJ-5m; Thu, 11 Jul 2024 17:33:55 +0000 Received: by outflank-mailman (input) for mailman id 757656; Thu, 11 Jul 2024 17:33:54 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxg2-0001XB-6B for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:54 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRxg2-0000dY-5N for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:54 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRxg2-0002RN-4f for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 17:33:54 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=L30Nfr/L8ABAELeixbE5fUYgky9QMeR9ZIbAftWqckA=; b=45gMOvTmDdT61PClt5giAe+s6L xn+72zVbacF0BRZu4dKEsF27Xwp1OOWBekVH4rjLT8VTMWyz2Gi9rIeF13WZuFdwunON97LB6gNsI 59VxoUYIWTsxI+zvqgI9yZ/BiJV1Lo5wvfRFaWfMze9efi8haogx6tAhwzAZB84AdUcs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Mark Archlinux/x86 as allowing failures Message-Id: Date: Thu, 11 Jul 2024 17:33:54 +0000 commit 5e1773dc863d6e1fb4c1398e380bdfc754342f7b Author: Andrew Cooper AuthorDate: Wed Jul 10 13:38:52 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 17:45:57 2024 +0100 CI: Mark Archlinux/x86 as allowing failures Archlinux is a rolling distro. As a consequence, rebuilding the container periodically changes the toolchain, and this affects all stable branches in one go. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/gitlab-ci/build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index 3e299f34f4..1446bc1d0e 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -573,11 +573,13 @@ archlinux-gcc: extends: .gcc-x86-64-build variables: CONTAINER: archlinux:current + allow_failure: true archlinux-gcc-debug: extends: .gcc-x86-64-build-debug variables: CONTAINER: archlinux:current + allow_failure: true centos-7-gcc: extends: .gcc-x86-64-build -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 11 18:55:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 11 Jul 2024 18:55:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.757671.1166766 (Exim 4.92) (envelope-from ) id 1sRywa-0003gQ-9J; Thu, 11 Jul 2024 18:55:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 757671.1166766; Thu, 11 Jul 2024 18:55:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRywa-0003gI-6h; Thu, 11 Jul 2024 18:55:04 +0000 Received: by outflank-mailman (input) for mailman id 757671; Thu, 11 Jul 2024 18:55:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRywZ-0003gC-QB for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 18:55:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRywZ-0002Tx-OW for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 18:55:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRywZ-0008KZ-Mm for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 18:55:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=/wwDoSnVijxgFo1s5SCNS2y3cd4BBRq+hIML9vQ87sA=; b=UZ8jgk7bzKP3kfGBgE0Mb8wU0+ KM2m9EnYaFmuJsnefP14PcNePYRLqpWQXrKgaDGzgstsTyI7RaG2BoWd/6BPCN0oPFJkjhqIXTzJH +UYnvFNM9hQ+gIP2OxU7e2rPKEBIp/Qcwz/PSZvmoCk5dhMg8vXqN/Fk6TeJWBarfCUU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Introduce a debian:12-ppc64le container Message-Id: Date: Thu, 11 Jul 2024 18:55:03 +0000 commit a2a0ee0eaf6f5e850e436d878d7a87ef71c1aa12 Author: Andrew Cooper AuthorDate: Mon Jul 8 18:00:21 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 19:26:47 2024 +0100 CI: Introduce a debian:12-ppc64le container ... conforming to the new naming scheme; $DISTRO-$VERSION-$ARCH-* so the jobs sort more coherently. Make it non-root by default, and set XEN_TARGET_ARCH=ppc64. Include QEMU too, which will be used subsequently. Add build jobs too, with debian-12-ppc64le-gcc-debug specifically early as it will be used for smoke testing shortly. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/debian/12-ppc64le.dockerfile | 36 +++++++++++++++++++++++++++ automation/gitlab-ci/build.yaml | 15 +++++++++++ automation/scripts/containerize | 1 + 3 files changed, 52 insertions(+) diff --git a/automation/build/debian/12-ppc64le.dockerfile b/automation/build/debian/12-ppc64le.dockerfile new file mode 100644 index 0000000000..3b311e675e --- /dev/null +++ b/automation/build/debian/12-ppc64le.dockerfile @@ -0,0 +1,36 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 debian:bookworm-slim +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive +ENV CROSS_COMPILE=powerpc64le-linux-gnu- +ENV XEN_TARGET_ARCH=ppc64 + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Thu, 11 Jul 2024 18:55:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.757672.1166770 (Exim 4.92) (envelope-from ) id 1sRywl-0003i2-Ae; Thu, 11 Jul 2024 18:55:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 757672.1166770; Thu, 11 Jul 2024 18:55:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRywl-0003hu-87; Thu, 11 Jul 2024 18:55:15 +0000 Received: by outflank-mailman (input) for mailman id 757672; Thu, 11 Jul 2024 18:55:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRywj-0003hi-TK for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 18:55:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRywj-0002U4-S2 for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 18:55:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRywj-0008LZ-Qi for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 18:55:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=O//kayd22/RvkDoQEX3RHqEB9DYHIWwKHXmNfy6dl2Y=; b=O98A6H5/F85afViIGp7cp9GJhA uQthJZekTkBj/goOyx0bZasgLK/W5GZ7njmM5D4ObP0ZtrGusLnIo+Drp+bf9btgC/ws4iujPzNpa lt9wrzh1qrrcCymDKPGocdTCk4CI0kkTwUA5z2V+mBvacn09Cy4AzopVBgHhhIbrDS9k=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Use debian:12-ppc64le for smoke testing Message-Id: Date: Thu, 11 Jul 2024 18:55:13 +0000 commit 155c9d7f1b84de5e440c7428063f119d1749f217 Author: Andrew Cooper AuthorDate: Mon Jul 8 18:17:25 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 19:26:47 2024 +0100 CI: Use debian:12-ppc64le for smoke testing qemu-system-ppc64/8.1.0-ppc64 was added because bullseye's QEMU didn't understand the powernv9 machine. However bookworm's QEMU does and this is preferable to maintaining a random build of QEMU ourselves. Use the debian:12-ppc64le container and test the output of that build too. Remove qemu-system-ppc64-8.1.0-ppc64-export which is unused now. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/gitlab-ci/build.yaml | 14 -------- automation/gitlab-ci/test.yaml | 5 ++- automation/scripts/qemu-smoke-ppc64le.sh | 4 +-- .../qemu-system-ppc64/8.1.0-ppc64.dockerfile | 38 ---------------------- 4 files changed, 4 insertions(+), 57 deletions(-) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index d5ab4fcaf4..8351029ecb 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -302,20 +302,6 @@ qemu-system-aarch64-6.0.0-arm32-export: tags: - arm64 -# ppc64 test artifacts - -qemu-system-ppc64-8.1.0-ppc64-export: - extends: .test-jobs-artifact-common - image: registry.gitlab.com/xen-project/xen/tests-artifacts/qemu-system-ppc64:8.1.0-ppc64 - script: - - mkdir binaries && cp /qemu-system-ppc64 /skiboot.lid binaries/ - artifacts: - paths: - - binaries/qemu-system-ppc64 - - binaries/skiboot.lid - tags: - - x86_64 - # x86_64 test artifacts alpine-3.18-rootfs-export: diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index d50e522f9f..70c946f877 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -69,7 +69,7 @@ .qemu-ppc64le: extends: .test-jobs-common variables: - CONTAINER: debian:bullseye-ppc64le + CONTAINER: debian:12-ppc64le LOGFILE: qemu-smoke-ppc64le.log artifacts: paths: @@ -447,5 +447,4 @@ qemu-smoke-ppc64le-powernv9-gcc: script: - ./automation/scripts/qemu-smoke-ppc64le.sh powernv9 2>&1 | tee ${LOGFILE} needs: - - qemu-system-ppc64-8.1.0-ppc64-export - - debian-bullseye-gcc-ppc64le-debug + - debian-12-ppc64le-gcc-debug diff --git a/automation/scripts/qemu-smoke-ppc64le.sh b/automation/scripts/qemu-smoke-ppc64le.sh index 701d81107d..9088881b73 100755 --- a/automation/scripts/qemu-smoke-ppc64le.sh +++ b/automation/scripts/qemu-smoke-ppc64le.sh @@ -12,8 +12,8 @@ rm -f ${serial_log} set +e timeout -k 1 20 \ -binaries/qemu-system-ppc64 \ - -bios binaries/skiboot.lid \ +qemu-system-ppc64 \ + -bios skiboot.lid \ -M $machine \ -m 2g \ -smp 1 \ diff --git a/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile b/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile deleted file mode 100644 index e28d686492..0000000000 --- a/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/amd64 debian:bullseye-slim -LABEL maintainer.name="The Xen Project" \ - maintainer.email="xen-devel@lists.xenproject.org" - -ENV DEBIAN_FRONTEND=noninteractive -ENV QEMU_VERSION=8.1.0 -ENV USER root - -RUN mkdir /build -WORKDIR /build - -# build depends -RUN apt-get update && \ - apt-get --quiet --yes install \ - build-essential \ - curl \ - python3 \ - python3-pip \ - python3-elementpath \ - ninja-build \ - pkg-config \ - libglib2.0-dev \ - libpixman-1-dev \ - && \ - \ - curl -fsSLO https://download.qemu.org/qemu-"$QEMU_VERSION".tar.xz && \ - tar xvJf qemu-"$QEMU_VERSION".tar.xz && \ - cd qemu-"$QEMU_VERSION" && \ - ./configure --target-list=ppc64-softmmu && \ - make -j$(nproc) && \ - cp ./build/qemu-system-ppc64 / && \ - cp ./build/qemu-bundle/usr/local/share/qemu/skiboot.lid / && \ - cd /build && \ - rm -rf qemu-"$QEMU_VERSION"* && \ - apt-get autoremove -y && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/* -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 11 18:55:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 11 Jul 2024 18:55:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.757673.1166774 (Exim 4.92) (envelope-from ) id 1sRywv-0003kH-C6; Thu, 11 Jul 2024 18:55:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 757673.1166774; Thu, 11 Jul 2024 18:55:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRywv-0003k9-9Y; Thu, 11 Jul 2024 18:55:25 +0000 Received: by outflank-mailman (input) for mailman id 757673; Thu, 11 Jul 2024 18:55:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRywu-0003jz-0c for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 18:55:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sRywt-0002UH-VZ for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 18:55:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sRywt-0008MR-UC for xen-changelog@lists.xenproject.org; Thu, 11 Jul 2024 18:55:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=JILGdKspLkKMe9LMYW1jSdyGpd0i4xmi8z1pOPmyrhA=; b=oNob3uYsHD6R71qLJKTldYKqdj x86cWkxEcHTuFS7uUvq3qULQOraGmNwwCt04h2bLSFClzTnxdBqUGd9ojlZUIbjDwKhqHfxk7gxuM 58c5YinuO5B9Mwqwlm2MJ1T0JfVRc8rxVvUJRHcX1io3XeFuSZ3vb+IpCZyJO8R7nYxs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Refresh bullseye-ppc64le as debian:11-ppc64le Message-Id: Date: Thu, 11 Jul 2024 18:55:23 +0000 commit d46e4264c3fa68974fbb9b1bce514ea44af6d945 Author: Andrew Cooper AuthorDate: Mon Jul 8 18:18:22 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 19:26:47 2024 +0100 CI: Refresh bullseye-ppc64le as debian:11-ppc64le ... in the style of debian:12-ppc64le. Rename the jobs and reposition them later as they're not a dependency for the smoke testing any more. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/debian/11-ppc64le.dockerfile | 33 ++++++++++++++++++++++ .../build/debian/bullseye-ppc64le.dockerfile | 32 --------------------- automation/gitlab-ci/build.yaml | 29 +++++++++---------- automation/scripts/containerize | 2 +- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/automation/build/debian/11-ppc64le.dockerfile b/automation/build/debian/11-ppc64le.dockerfile new file mode 100644 index 0000000000..d846b670d0 --- /dev/null +++ b/automation/build/debian/11-ppc64le.dockerfile @@ -0,0 +1,33 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 debian:bullseye-slim +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive +ENV CROSS_COMPILE=powerpc64le-linux-gnu- +ENV XEN_TARGET_ARCH=ppc64 + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 03:33:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.757760.1166902 (Exim 4.92) (envelope-from ) id 1sS71r-00032T-0z; Fri, 12 Jul 2024 03:33:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 757760.1166902; Fri, 12 Jul 2024 03:33:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sS71q-00032D-UG; Fri, 12 Jul 2024 03:33:02 +0000 Received: by outflank-mailman (input) for mailman id 757760; Fri, 12 Jul 2024 03:33:01 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sS71p-00031d-Lg for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 03:33:01 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sS71p-0007iU-KO for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 03:33:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sS71p-0006vg-JF for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 03:33:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=nki4hpnQgYPfQBc3x/uwCbNH5XBYHkIUAaa+dAbzqzg=; b=jAoNHXwNCIOVzHXLX8fXf0qb0S 3agzJ8SgsP5vRMIxqfmVfsZoqF2hC5aOA6Pe9PqJQWrRpG7bSca7WrcnZ0YLLHdupU1CxRO0Y0Hyb 9I4Ie8PFPx+V9Lnta5Smy6vrI0TYeHbskTi66T/XvHj+YTMEBuIaHoghryDWU7EWauu0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] automation: Use a different ImageBuilder repository URL Message-Id: Date: Fri, 12 Jul 2024 03:33:01 +0000 commit 5d3e2140bbf1dc0ab0972efbc096d79509ca9ae8 Author: Michal Orzel AuthorDate: Wed Jul 10 11:37:51 2024 +0200 Commit: Andrew Cooper CommitDate: Thu Jul 11 11:11:20 2024 +0100 automation: Use a different ImageBuilder repository URL Switch to using https://gitlab.com/xen-project/imagebuilder.git which should be considered official ImageBuilder repo. Take the opportunity to truncate the git history when cloning using --depth 1. Signed-off-by: Michal Orzel Reviewed-by: Stefano Stabellini Reviewed-by: Alejandro Vallejo Release-Acked-By: Oleksii Kurochko --- automation/scripts/qemu-smoke-dom0-arm32.sh | 2 +- automation/scripts/qemu-smoke-dom0-arm64.sh | 2 +- automation/scripts/qemu-smoke-dom0less-arm32.sh | 2 +- automation/scripts/qemu-smoke-dom0less-arm64.sh | 2 +- automation/scripts/qemu-xtf-dom0less-arm64.sh | 2 +- automation/scripts/xilinx-smoke-dom0less-arm64.sh | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/automation/scripts/qemu-smoke-dom0-arm32.sh b/automation/scripts/qemu-smoke-dom0-arm32.sh index d916489056..31c05cc840 100755 --- a/automation/scripts/qemu-smoke-dom0-arm32.sh +++ b/automation/scripts/qemu-smoke-dom0-arm32.sh @@ -73,7 +73,7 @@ UBOOT_SOURCE="boot.source" UBOOT_SCRIPT="boot.scr"' > config rm -rf imagebuilder -git clone https://gitlab.com/ViryaOS/imagebuilder +git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c config rm -f ${serial_log} diff --git a/automation/scripts/qemu-smoke-dom0-arm64.sh b/automation/scripts/qemu-smoke-dom0-arm64.sh index e0bb37af36..352963a741 100755 --- a/automation/scripts/qemu-smoke-dom0-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0-arm64.sh @@ -87,7 +87,7 @@ LOAD_CMD="tftpb" UBOOT_SOURCE="boot.source" UBOOT_SCRIPT="boot.scr"' > binaries/config rm -rf imagebuilder -git clone https://gitlab.com/ViryaOS/imagebuilder +git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d binaries/ -c binaries/config diff --git a/automation/scripts/qemu-smoke-dom0less-arm32.sh b/automation/scripts/qemu-smoke-dom0less-arm32.sh index 1e2b939aad..c027c8c5c8 100755 --- a/automation/scripts/qemu-smoke-dom0less-arm32.sh +++ b/automation/scripts/qemu-smoke-dom0less-arm32.sh @@ -125,7 +125,7 @@ if [[ "${test_variant}" == "without-dom0" ]]; then fi rm -rf imagebuilder -git clone https://gitlab.com/ViryaOS/imagebuilder +git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d . -c config # Run the test diff --git a/automation/scripts/qemu-smoke-dom0less-arm64.sh b/automation/scripts/qemu-smoke-dom0less-arm64.sh index 292c38a561..15258692d5 100755 --- a/automation/scripts/qemu-smoke-dom0less-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0less-arm64.sh @@ -198,7 +198,7 @@ NUM_CPUPOOLS=1' >> binaries/config fi rm -rf imagebuilder -git clone https://gitlab.com/ViryaOS/imagebuilder +git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d binaries/ -c binaries/config diff --git a/automation/scripts/qemu-xtf-dom0less-arm64.sh b/automation/scripts/qemu-xtf-dom0less-arm64.sh index a667e0412c..b08c2d44fb 100755 --- a/automation/scripts/qemu-xtf-dom0less-arm64.sh +++ b/automation/scripts/qemu-xtf-dom0less-arm64.sh @@ -45,7 +45,7 @@ UBOOT_SOURCE="boot.source" UBOOT_SCRIPT="boot.scr"' > binaries/config rm -rf imagebuilder -git clone https://gitlab.com/ViryaOS/imagebuilder +git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d binaries/ -c binaries/config # Run the test diff --git a/automation/scripts/xilinx-smoke-dom0less-arm64.sh b/automation/scripts/xilinx-smoke-dom0less-arm64.sh index 4a071c6ef1..666411d6a0 100755 --- a/automation/scripts/xilinx-smoke-dom0less-arm64.sh +++ b/automation/scripts/xilinx-smoke-dom0less-arm64.sh @@ -122,7 +122,7 @@ if [[ "${test_variant}" == "gem-passthrough" ]]; then fi rm -rf imagebuilder -git clone https://gitlab.com/ViryaOS/imagebuilder +git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d $TFTP/ -c $TFTP/config # restart the board -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 12 14:22:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 14:22:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758110.1167383 (Exim 4.92) (envelope-from ) id 1sSH9v-0002cW-0X; Fri, 12 Jul 2024 14:22:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758110.1167383; Fri, 12 Jul 2024 14:22:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSH9u-0002cO-U9; Fri, 12 Jul 2024 14:22:02 +0000 Received: by outflank-mailman (input) for mailman id 758110; Fri, 12 Jul 2024 14:22:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSH9u-0002cI-A6 for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSH9u-0004VY-4T for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSH9u-0001Nq-1w for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=VO9ALi0/QkW6Jyo8DJw3QmUUMfOcTmSvp67K6FXSwD0=; b=zQByGX6prX0FoNgmh4oCFVLaFI rUKz/T3o1Ofylpo6FkMua5D0JSTAUkMZedx3j9wDJrDOnNS0c0HlUkTFhM3d8xFYUjNwwWqwiekIv OTViSNxrmnqyg0NxnsHd0kw+pNBbf2wqCMe4heoHtPvRHXwr9CKLGV5JoG8DaeH/i3Ng=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Fix CONTAINER_UID0=1 scripts/containerize Message-Id: Date: Fri, 12 Jul 2024 14:22:02 +0000 commit 3420cc1a50f794df82e398855f72f928c127548f Author: Andrew Cooper AuthorDate: Mon Jul 8 18:00:49 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 17:45:57 2024 +0100 CI: Fix CONTAINER_UID0=1 scripts/containerize Right now, most build containers use root. Archlinux, Fedora and Yocto set up a regular user called `user`. For those containers, trying to containerize as root fails, because CONTAINER_UID0=1 does nothing, whereas CONTAINER_UID0=0 forces the user away from root. To make CONTAINER_UID0=1 work reliably, force to root if requested. Fixes: 17fbe6504dfd ("automation: introduce a new variable to control container user") Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/scripts/containerize | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/scripts/containerize b/automation/scripts/containerize index acdef1b548..03bc483735 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -51,7 +51,7 @@ esac # Use this variable to control whether root should be used case "_${CONTAINER_UID0}" in - _1) userarg= ;; + _1) userarg="-u 0" ;; _0|_) userarg="-u $(id -u) $userns_podman" ;; esac -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 12 14:22:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 14:22:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758111.1167386 (Exim 4.92) (envelope-from ) id 1sSHA5-0002eG-1s; Fri, 12 Jul 2024 14:22:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758111.1167386; Fri, 12 Jul 2024 14:22:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHA4-0002e8-VY; Fri, 12 Jul 2024 14:22:12 +0000 Received: by outflank-mailman (input) for mailman id 758111; Fri, 12 Jul 2024 14:22:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHA4-0002e0-8y for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHA4-0004Vi-85 for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSHA4-0001P6-6i for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=LaKBRmswynMabVXL00HvaCZBFPqr7HVpANR5luy6hHo=; b=J3nVoDwTdGc83QEPyvNEY82P+0 nwV1GLHM+Hmj6N0D/C5vEBIASai6EbHSTfwhp5rbAkMZm6CUdRECVKemRFlBqDRVsXYcow2h0SLUX SCHcQs/OhhDWbZWTpnLTDHR9JZjslHrcTdoPp570KaPZatgrkeYMOzgazxJ+kQl2heFY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Remove useless/misleading randconfig jobs Message-Id: Date: Fri, 12 Jul 2024 14:22:12 +0000 commit 83754331a78bb35ba6fff29a086439cb15b0d9b4 Author: Andrew Cooper AuthorDate: Thu Jul 11 00:38:58 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 17:45:57 2024 +0100 CI: Remove useless/misleading randconfig jobs Randconfig builds pick CONFIG_DEBUG with 50% probability. Therefore $foo{,-debug}-randconfig are just two equivalent jobs with misleading names. Furthermore, arm64 has randconfig jobs for both Alpine and Bookworm; Both environments use GCC 12.2, so we have 4 equivalent jobs. Delete 3 of them. This leaves us with 4 primary randconfig jobs: gitlab-ci/build.yaml:381:debian-bookworm-gcc-arm32-randconfig: gitlab-ci/build.yaml:429:alpine-3.18-gcc-arm64-randconfig: gitlab-ci/build.yaml:495:archlinux-current-gcc-riscv64-randconfig: gitlab-ci/build.yaml:640:debian-bookworm-gcc-randconfig: as PPC64 doesn't want randconfig right now, and buster-gcc-ibt is a special job with a custom compiler. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/gitlab-ci/build.yaml | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index ff5c9055d1..da7b8885aa 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -385,13 +385,6 @@ debian-bookworm-gcc-arm32-randconfig: HYPERVISOR_ONLY: y RANDCONFIG: y -debian-bookworm-gcc-arm32-debug-randconfig: - extends: .gcc-arm32-cross-build-debug - variables: - CONTAINER: debian:bookworm-arm64v8-arm32-gcc - HYPERVISOR_ONLY: y - RANDCONFIG: y - debian-bookworm-gcc-arm32-debug-staticmem: extends: .gcc-arm32-cross-build-debug variables: @@ -423,18 +416,6 @@ debian-bookworm-gcc-debug-arm64: variables: CONTAINER: debian:bookworm-arm64v8 -debian-bookworm-gcc-arm64-randconfig: - extends: .gcc-arm64-build - variables: - CONTAINER: debian:bookworm-arm64v8 - RANDCONFIG: y - -debian-bookworm-gcc-debug-arm64-randconfig: - extends: .gcc-arm64-build-debug - variables: - CONTAINER: debian:bookworm-arm64v8 - RANDCONFIG: y - alpine-3.18-gcc-arm64: extends: .gcc-arm64-build variables: @@ -451,12 +432,6 @@ alpine-3.18-gcc-arm64-randconfig: CONTAINER: alpine:3.18-arm64v8 RANDCONFIG: y -alpine-3.18-gcc-debug-arm64-randconfig: - extends: .gcc-arm64-build-debug - variables: - CONTAINER: alpine:3.18-arm64v8 - RANDCONFIG: y - alpine-3.18-gcc-debug-arm64-staticmem: extends: .gcc-arm64-build-debug variables: @@ -525,14 +500,6 @@ archlinux-current-gcc-riscv64-randconfig: RANDCONFIG: y <<: *riscv-fixed-randconfig -archlinux-current-gcc-riscv64-debug-randconfig: - extends: .gcc-riscv64-cross-build-debug - variables: - CONTAINER: archlinux:current-riscv64 - KBUILD_DEFCONFIG: tiny64_defconfig - RANDCONFIG: y - <<: *riscv-fixed-randconfig - # Power cross-build debian-bullseye-gcc-ppc64le: extends: .gcc-ppc64le-cross-build @@ -676,12 +643,6 @@ debian-bookworm-gcc-randconfig: CONTAINER: debian:bookworm RANDCONFIG: y -debian-bookworm-gcc-debug-randconfig: - extends: .gcc-x86-64-build-debug - variables: - CONTAINER: debian:bookworm - RANDCONFIG: y - debian-bookworm-32-clang-debug: extends: .clang-x86-32-build-debug variables: -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 12 14:22:23 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 14:22:23 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758112.1167391 (Exim 4.92) (envelope-from ) id 1sSHAF-0002ib-3N; Fri, 12 Jul 2024 14:22:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758112.1167391; Fri, 12 Jul 2024 14:22:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAF-0002iT-0i; Fri, 12 Jul 2024 14:22:23 +0000 Received: by outflank-mailman (input) for mailman id 758112; Fri, 12 Jul 2024 14:22:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAE-0002iL-EE for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAE-0004WJ-Bo for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSHAE-0001Po-AD for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=AWDB9N/eTSdvi+gKBDjMU5vYu/duujksHwx2BM3WLWo=; b=eCYDIZFt6IKek8NthhtPTVDSIu +4HRq/cd9v5n+EmZyYlDcv3IZS8sHILldkB2Gd/dhhQ9/pZfHc/EyVRQ1EXUQXoGsRiKkBpDxCL0v RVJ1YdlnLQU5YcrHDLchIoCnSymUze2Ovf2lK2bKxt65TX2zZtcfkwLLmgxVc57PoHwA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Drop Debian Jessie dockerfiles Message-Id: Date: Fri, 12 Jul 2024 14:22:22 +0000 commit aabccd1018e944248b1d06201827b9e492baafe6 Author: Andrew Cooper AuthorDate: Wed Jul 10 00:02:47 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 17:45:57 2024 +0100 CI: Drop Debian Jessie dockerfiles These were removed from testing in Xen 4.18. Fixes: 3817e3c1b4b8 ("automation: Remove testing on Debian Jessie") Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/debian/jessie-i386.dockerfile | 55 -------------------------- automation/build/debian/jessie.dockerfile | 52 ------------------------ automation/scripts/containerize | 2 - 3 files changed, 109 deletions(-) diff --git a/automation/build/debian/jessie-i386.dockerfile b/automation/build/debian/jessie-i386.dockerfile deleted file mode 100644 index dfa6dae06c..0000000000 --- a/automation/build/debian/jessie-i386.dockerfile +++ /dev/null @@ -1,55 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/i386 debian/eol:jessie -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 - -ENTRYPOINT ["linux32"] - -# replace repos in archive as release is EOL -COPY <<"END" /etc/apt/sources.list -deb http://archive.debian.org/debian/ jessie main contrib non-free -deb http://archive.debian.org/debian/ jessie-backports main contrib non-free -deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free -END - -# build depends -RUN apt-get update && \ - apt-get --quiet --yes install \ - build-essential \ - zlib1g-dev \ - libncurses5-dev \ - python-dev \ - uuid-dev \ - libyajl-dev \ - libaio-dev \ - libglib2.0-dev \ - clang \ - libpixman-1-dev \ - pkg-config \ - flex \ - bison \ - acpica-tools \ - bin86 \ - bcc \ - liblzma-dev \ - libc6-dev \ - libnl-3-dev \ - ocaml-nox \ - libfindlib-ocaml-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/build/debian/jessie.dockerfile b/automation/build/debian/jessie.dockerfile deleted file mode 100644 index 82dae9ec70..0000000000 --- a/automation/build/debian/jessie.dockerfile +++ /dev/null @@ -1,52 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/amd64 debian/eol:jessie -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 - -# replace repos in archive as release is EOL -COPY <<"END" /etc/apt/sources.list -deb http://archive.debian.org/debian/ jessie main contrib non-free -deb http://archive.debian.org/debian/ jessie-backports main contrib non-free -deb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free -END - -# build depends -RUN apt-get update && \ - apt-get --quiet --yes install \ - build-essential \ - zlib1g-dev \ - libncurses5-dev \ - python-dev \ - uuid-dev \ - libyajl-dev \ - libaio-dev \ - libglib2.0-dev \ - clang \ - libpixman-1-dev \ - pkg-config \ - flex \ - bison \ - acpica-tools \ - bin86 \ - bcc \ - liblzma-dev \ - libnl-3-dev \ - ocaml-nox \ - libfindlib-ocaml-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 03bc483735..57db42d10c 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -31,8 +31,6 @@ case "_${CONTAINER}" in _centos7) CONTAINER="${BASE}/centos:7" ;; _fedora) CONTAINER="${BASE}/fedora:29";; _focal) CONTAINER="${BASE}/ubuntu:focal" ;; - _jessie) CONTAINER="${BASE}/debian:jessie" ;; - _jessie-i386) CONTAINER="${BASE}/debian:jessie-i386" ;; _bullseye-ppc64le) CONTAINER="${BASE}/debian:bullseye-ppc64le" ;; _stretch|_) CONTAINER="${BASE}/debian:stretch" ;; _stretch-i386) CONTAINER="${BASE}/debian:stretch-i386" ;; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 12 14:22:33 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 14:22:33 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758113.1167395 (Exim 4.92) (envelope-from ) id 1sSHAP-0002l9-4X; Fri, 12 Jul 2024 14:22:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758113.1167395; Fri, 12 Jul 2024 14:22:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAP-0002l2-2A; Fri, 12 Jul 2024 14:22:33 +0000 Received: by outflank-mailman (input) for mailman id 758113; Fri, 12 Jul 2024 14:22:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAO-0002ks-Fv for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAO-0004WQ-F5 for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSHAO-0001QN-E3 for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=ClVyl4hayyZag48emER2iYWRE6cbWuz1qDqtAFwLwEc=; b=Pf1I10MHGjjYeqx2xlLotCd04E lq6urUleQwr+ozR8w0oN/v6xKEWQm4ctdfT8awqxulbZbhsRw7LlElNRBlpKBD9Ibvx8BAFUr7NIT LapzGiq61taW7cYVpup8/Q3UXFbWixgtq1qKR4Ih0/KxyKy+HWgNcLFeqAtODA8usijM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Drop Debian Stretch testing Message-Id: Date: Fri, 12 Jul 2024 14:22:32 +0000 commit 2617d2f14167e8fb9d4228b1173ed93b9c7c9b8f Author: Andrew Cooper AuthorDate: Wed Jul 10 00:26:56 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 17:45:57 2024 +0100 CI: Drop Debian Stretch testing Debian stretch is also End of Life. Update a couple of test steps to use bookworm instead. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/debian/stretch-i386.dockerfile | 57 ----------------------- automation/build/debian/stretch.dockerfile | 60 ------------------------- automation/gitlab-ci/build.yaml | 34 +------------- automation/gitlab-ci/test.yaml | 4 +- automation/scripts/containerize | 2 - 5 files changed, 4 insertions(+), 153 deletions(-) diff --git a/automation/build/debian/stretch-i386.dockerfile b/automation/build/debian/stretch-i386.dockerfile deleted file mode 100644 index 905096ab0e..0000000000 --- a/automation/build/debian/stretch-i386.dockerfile +++ /dev/null @@ -1,57 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/i386 debian:stretch -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 - -ENTRYPOINT ["linux32"] - -# replace repos in archive as release is EOL -COPY <<"END" /etc/apt/sources.list -deb http://archive.debian.org/debian/ stretch main contrib non-free -deb http://archive.debian.org/debian/ stretch-backports main contrib non-free -deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free -END - -# build depends -RUN apt-get update && \ - apt-get --quiet --yes install \ - build-essential \ - zlib1g-dev \ - libncurses5-dev \ - python-dev \ - python3-dev \ - uuid-dev \ - libyajl-dev \ - libaio-dev \ - libglib2.0-dev \ - clang \ - libpixman-1-dev \ - pkg-config \ - flex \ - bison \ - acpica-tools \ - bin86 \ - bcc \ - liblzma-dev \ - libc6-dev \ - libnl-3-dev \ - ocaml-nox \ - libfindlib-ocaml-dev \ - markdown \ - transfig \ - pandoc \ - checkpolicy \ - wget \ - git \ - nasm \ - apt-transport-https \ - && \ - apt-get autoremove -y && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/* diff --git a/automation/build/debian/stretch.dockerfile b/automation/build/debian/stretch.dockerfile deleted file mode 100644 index b99d229acf..0000000000 --- a/automation/build/debian/stretch.dockerfile +++ /dev/null @@ -1,60 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/amd64 debian:stretch -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 - -# replace repos in archive as release is EOL -COPY <<"END" /etc/apt/sources.list -deb http://archive.debian.org/debian/ stretch main contrib non-free -deb http://archive.debian.org/debian/ stretch-backports main contrib non-free -deb http://archive.debian.org/debian-security/ stretch/updates main contrib non-free -END - -# build depends -RUN apt-get update && \ - apt-get --quiet --yes install \ - build-essential \ - zlib1g-dev \ - libncurses5-dev \ - python-dev \ - python3-dev \ - uuid-dev \ - libyajl-dev \ - libaio-dev \ - libglib2.0-dev \ - clang \ - libpixman-1-dev \ - pkg-config \ - flex \ - bison \ - acpica-tools \ - bin86 \ - bcc \ - liblzma-dev \ - libnl-3-dev \ - ocaml-nox \ - libfindlib-ocaml-dev \ - markdown \ - transfig \ - pandoc \ - checkpolicy \ - wget \ - git \ - nasm \ - gnupg \ - apt-transport-https \ - # for test phase, qemu-smoke-* jobs - qemu-system-x86 \ - # for test phase, qemu-alpine-* jobs - cpio \ - busybox-static \ - && \ - apt-get autoremove -y && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/* diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index da7b8885aa..2c6eb17bef 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -354,10 +354,10 @@ alpine-3.18-gcc-debug: variables: CONTAINER: alpine:3.18 -debian-stretch-gcc-debug: +debian-bookworm-gcc-debug: extends: .gcc-x86-64-build-debug variables: - CONTAINER: debian:stretch + CONTAINER: debian:bookworm debian-bookworm-clang-debug: extends: .clang-x86-64-build-debug @@ -589,31 +589,6 @@ centos-7-gcc-debug: variables: CONTAINER: centos:7 -debian-stretch-gcc: - extends: .gcc-x86-64-build - variables: - CONTAINER: debian:stretch - -debian-stretch-clang: - extends: .clang-x86-64-build - variables: - CONTAINER: debian:stretch - -debian-stretch-clang-debug: - extends: .clang-x86-64-build-debug - variables: - CONTAINER: debian:stretch - -debian-stretch-32-clang-debug: - extends: .clang-x86-32-build-debug - variables: - CONTAINER: debian:stretch-i386 - -debian-stretch-32-gcc-debug: - extends: .gcc-x86-32-build-debug - variables: - CONTAINER: debian:stretch-i386 - debian-buster-gcc-ibt: extends: .gcc-x86-64-build variables: @@ -632,11 +607,6 @@ debian-bookworm-gcc: variables: CONTAINER: debian:bookworm -debian-bookworm-gcc-debug: - extends: .gcc-x86-64-build-debug - variables: - CONTAINER: debian:bookworm - debian-bookworm-gcc-randconfig: extends: .gcc-x86-64-build variables: diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 898d2adc8c..d50e522f9f 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -412,7 +412,7 @@ qemu-smoke-x86-64-gcc: script: - ./automation/scripts/qemu-smoke-x86-64.sh pv 2>&1 | tee ${LOGFILE} needs: - - debian-stretch-gcc-debug + - debian-bookworm-gcc-debug qemu-smoke-x86-64-clang: extends: .qemu-x86-64 @@ -426,7 +426,7 @@ qemu-smoke-x86-64-gcc-pvh: script: - ./automation/scripts/qemu-smoke-x86-64.sh pvh 2>&1 | tee ${LOGFILE} needs: - - debian-stretch-gcc-debug + - debian-bookworm-gcc-debug qemu-smoke-x86-64-clang-pvh: extends: .qemu-x86-64 diff --git a/automation/scripts/containerize b/automation/scripts/containerize index 57db42d10c..5140765cee 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -32,8 +32,6 @@ case "_${CONTAINER}" in _fedora) CONTAINER="${BASE}/fedora:29";; _focal) CONTAINER="${BASE}/ubuntu:focal" ;; _bullseye-ppc64le) CONTAINER="${BASE}/debian:bullseye-ppc64le" ;; - _stretch|_) CONTAINER="${BASE}/debian:stretch" ;; - _stretch-i386) CONTAINER="${BASE}/debian:stretch-i386" ;; _buster-gcc-ibt) CONTAINER="${BASE}/debian:buster-gcc-ibt" ;; _bookworm|_) CONTAINER="${BASE}/debian:bookworm" ;; _bookworm-i386) CONTAINER="${BASE}/debian:bookworm-i386" ;; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 12 14:22:43 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 14:22:43 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758114.1167398 (Exim 4.92) (envelope-from ) id 1sSHAZ-0002o8-6A; Fri, 12 Jul 2024 14:22:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758114.1167398; Fri, 12 Jul 2024 14:22:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAZ-0002o0-3Y; Fri, 12 Jul 2024 14:22:43 +0000 Received: by outflank-mailman (input) for mailman id 758114; Fri, 12 Jul 2024 14:22:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAY-0002nj-JF for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAY-0004Wd-IT for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSHAY-0001R1-HF for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=cI/aE/ku5t6Y3dqBV7X+BR/NaW54+kToKAkkLSefdy8=; b=ti0INo3RSpcCdCjs7gCR+YtGw+ cKMbmo39SbYfKh0CI9Gbs8s3bJDOJfpCI9Iq/oyKygdymCpMXe2kMnYwB388JYUF2tw+1h/gOk2CC pKUp/ue9LqeyhtdeThKLP31yqXs1B0LWa3AfGa14TXpqlRKe9KlEzZ1A3shWFZ5ufF5U=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Drop Ubuntu Trusty testing Message-Id: Date: Fri, 12 Jul 2024 14:22:42 +0000 commit 4b716647f794515f193e00e3deac6d88dfb892f3 Author: Andrew Cooper AuthorDate: Wed Jul 10 01:01:13 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 17:45:57 2024 +0100 CI: Drop Ubuntu Trusty testing This is also End of Life. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/ubuntu/trusty.dockerfile | 51 ------------------------------- automation/gitlab-ci/build.yaml | 12 -------- automation/scripts/containerize | 1 - 3 files changed, 64 deletions(-) diff --git a/automation/build/ubuntu/trusty.dockerfile b/automation/build/ubuntu/trusty.dockerfile deleted file mode 100644 index 1cda1bbd3f..0000000000 --- a/automation/build/ubuntu/trusty.dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/amd64 ubuntu:14.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 \ - python-dev \ - python3-dev \ - uuid-dev \ - libyajl-dev \ - libaio-dev \ - libglib2.0-dev \ - clang \ - libpixman-1-dev \ - pkg-config \ - flex \ - bison \ - acpica-tools \ - bin86 \ - bcc \ - liblzma-dev \ - libnl-3-dev \ - ocaml-nox \ - libfindlib-ocaml-dev \ - markdown \ - transfig \ - pandoc \ - checkpolicy \ - wget \ - git \ - nasm \ - && \ - apt-get autoremove -y && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/* - -# Remove expired certificate that Let's Encrypt certificates used to relie on. -# (Not needed anymore) -RUN sed -i 's#mozilla/DST_Root_CA_X3\.crt#!\0#' /etc/ca-certificates.conf && \ - update-ca-certificates diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index 2c6eb17bef..3e299f34f4 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -633,18 +633,6 @@ fedora-gcc-debug: variables: CONTAINER: fedora:29 -# Ubuntu Trusty's Clang is 3.4 while Xen requires 3.5 - -ubuntu-trusty-gcc: - extends: .gcc-x86-64-build - variables: - CONTAINER: ubuntu:trusty - -ubuntu-trusty-gcc-debug: - extends: .gcc-x86-64-build-debug - variables: - CONTAINER: ubuntu:trusty - ubuntu-xenial-clang: extends: .clang-x86-64-build variables: diff --git a/automation/scripts/containerize b/automation/scripts/containerize index 5140765cee..e9ad20aa0c 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -39,7 +39,6 @@ case "_${CONTAINER}" in _bookworm-arm64v8) CONTAINER="${BASE}/debian:bookworm-arm64v8" ;; _bookworm-cppcheck) CONTAINER="${BASE}/debian:bookworm-cppcheck" ;; _bionic) CONTAINER="${BASE}/ubuntu:bionic" ;; - _trusty) CONTAINER="${BASE}/ubuntu:trusty" ;; _xenial) CONTAINER="${BASE}/ubuntu:xenial" ;; _opensuse-leap|_leap) CONTAINER="${BASE}/suse:opensuse-leap" ;; _opensuse-tumbleweed|_tumbleweed) CONTAINER="${BASE}/suse:opensuse-tumbleweed" ;; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 12 14:22:53 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 14:22:53 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758115.1167403 (Exim 4.92) (envelope-from ) id 1sSHAj-0002rK-8w; Fri, 12 Jul 2024 14:22:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758115.1167403; Fri, 12 Jul 2024 14:22:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAj-0002rC-6F; Fri, 12 Jul 2024 14:22:53 +0000 Received: by outflank-mailman (input) for mailman id 758115; Fri, 12 Jul 2024 14:22:52 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAi-0002r3-ME for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:52 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAi-0004Wk-LP for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:52 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSHAi-0001RS-KZ for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:22:52 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=DZo3pP+7Esd9qoOnuz4U5eSxpXr5z5w0qheElj5sP3Q=; b=Hu4ES3570kDm5eNmR4JVpKzyTV jvSqqxWnKk52D78Tgd+ywUVcO2pc99web8Z86YSv0Is92zoxsbEXNUWem3+TDovjQsFHSlNcDmGLf bak0VQT6PPlpD0rVnpphxw8feR8E8FQDg+GqHpMQ31KIOL+dDJ/Oi0jdER79aN+6WDDE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Mark Archlinux/x86 as allowing failures Message-Id: Date: Fri, 12 Jul 2024 14:22:52 +0000 commit 5e1773dc863d6e1fb4c1398e380bdfc754342f7b Author: Andrew Cooper AuthorDate: Wed Jul 10 13:38:52 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 17:45:57 2024 +0100 CI: Mark Archlinux/x86 as allowing failures Archlinux is a rolling distro. As a consequence, rebuilding the container periodically changes the toolchain, and this affects all stable branches in one go. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/gitlab-ci/build.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index 3e299f34f4..1446bc1d0e 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -573,11 +573,13 @@ archlinux-gcc: extends: .gcc-x86-64-build variables: CONTAINER: archlinux:current + allow_failure: true archlinux-gcc-debug: extends: .gcc-x86-64-build-debug variables: CONTAINER: archlinux:current + allow_failure: true centos-7-gcc: extends: .gcc-x86-64-build -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 12 14:23:04 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 14:23:04 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758116.1167407 (Exim 4.92) (envelope-from ) id 1sSHAu-0002u8-AJ; Fri, 12 Jul 2024 14:23:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758116.1167407; Fri, 12 Jul 2024 14:23:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAu-0002u0-7g; Fri, 12 Jul 2024 14:23:04 +0000 Received: by outflank-mailman (input) for mailman id 758116; Fri, 12 Jul 2024 14:23:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAs-0002tg-PD for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:23:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHAs-0004X7-OP for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:23:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSHAs-0001SF-Na for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:23:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=LYGwkfCe35aOaTWcv9PlDrpGtn6O1nEnv1Y6bzsBE1Y=; b=ejlSjfiEfycJ0MEUwhp8yKH5A6 55xehaDoh+sRn6YNV42nfQapBpdVa86wnSufPAl3zlWoXd9tSerHQiKI4l7KglvbFWAGSHopRb2/a vqWUXd2EBCFaplBCRMpN3tVuVXPpvkCwh4ZnlVS5WrkHLyICTNnNydNPbbyQCsbxOO2w=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Introduce a debian:12-ppc64le container Message-Id: Date: Fri, 12 Jul 2024 14:23:02 +0000 commit a2a0ee0eaf6f5e850e436d878d7a87ef71c1aa12 Author: Andrew Cooper AuthorDate: Mon Jul 8 18:00:21 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 19:26:47 2024 +0100 CI: Introduce a debian:12-ppc64le container ... conforming to the new naming scheme; $DISTRO-$VERSION-$ARCH-* so the jobs sort more coherently. Make it non-root by default, and set XEN_TARGET_ARCH=ppc64. Include QEMU too, which will be used subsequently. Add build jobs too, with debian-12-ppc64le-gcc-debug specifically early as it will be used for smoke testing shortly. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/debian/12-ppc64le.dockerfile | 36 +++++++++++++++++++++++++++ automation/gitlab-ci/build.yaml | 15 +++++++++++ automation/scripts/containerize | 1 + 3 files changed, 52 insertions(+) diff --git a/automation/build/debian/12-ppc64le.dockerfile b/automation/build/debian/12-ppc64le.dockerfile new file mode 100644 index 0000000000..3b311e675e --- /dev/null +++ b/automation/build/debian/12-ppc64le.dockerfile @@ -0,0 +1,36 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 debian:bookworm-slim +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive +ENV CROSS_COMPILE=powerpc64le-linux-gnu- +ENV XEN_TARGET_ARCH=ppc64 + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 14:23:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758117.1167411 (Exim 4.92) (envelope-from ) id 1sSHB4-0002x0-Bc; Fri, 12 Jul 2024 14:23:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758117.1167411; Fri, 12 Jul 2024 14:23:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHB4-0002wt-94; Fri, 12 Jul 2024 14:23:14 +0000 Received: by outflank-mailman (input) for mailman id 758117; Fri, 12 Jul 2024 14:23:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHB2-0002wQ-SZ for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:23:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHB2-0004XM-Rm for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:23:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSHB2-0001T4-QY for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:23:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=u9PNg7n4mE97fnHAi2FFOOqr7G9/27YKcVtKM4RIlR0=; b=ZCgp5CeOkUHb/mBooHZ36DrnDM rfMy9O5QGkED18ELlM8GFdf12+n1DDcluE6Yzrn5Wonf4wP5NCUlRGhHcqCFSpSX1iNFtyA39IFUh mHOcCevCFwwOjoKqkyZYpF4ywwkVEb5JppYplZedKBvjGgRW/brD1PROb4ibC9Fpxv1w=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Use debian:12-ppc64le for smoke testing Message-Id: Date: Fri, 12 Jul 2024 14:23:12 +0000 commit 155c9d7f1b84de5e440c7428063f119d1749f217 Author: Andrew Cooper AuthorDate: Mon Jul 8 18:17:25 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 19:26:47 2024 +0100 CI: Use debian:12-ppc64le for smoke testing qemu-system-ppc64/8.1.0-ppc64 was added because bullseye's QEMU didn't understand the powernv9 machine. However bookworm's QEMU does and this is preferable to maintaining a random build of QEMU ourselves. Use the debian:12-ppc64le container and test the output of that build too. Remove qemu-system-ppc64-8.1.0-ppc64-export which is unused now. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/gitlab-ci/build.yaml | 14 -------- automation/gitlab-ci/test.yaml | 5 ++- automation/scripts/qemu-smoke-ppc64le.sh | 4 +-- .../qemu-system-ppc64/8.1.0-ppc64.dockerfile | 38 ---------------------- 4 files changed, 4 insertions(+), 57 deletions(-) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index d5ab4fcaf4..8351029ecb 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -302,20 +302,6 @@ qemu-system-aarch64-6.0.0-arm32-export: tags: - arm64 -# ppc64 test artifacts - -qemu-system-ppc64-8.1.0-ppc64-export: - extends: .test-jobs-artifact-common - image: registry.gitlab.com/xen-project/xen/tests-artifacts/qemu-system-ppc64:8.1.0-ppc64 - script: - - mkdir binaries && cp /qemu-system-ppc64 /skiboot.lid binaries/ - artifacts: - paths: - - binaries/qemu-system-ppc64 - - binaries/skiboot.lid - tags: - - x86_64 - # x86_64 test artifacts alpine-3.18-rootfs-export: diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index d50e522f9f..70c946f877 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -69,7 +69,7 @@ .qemu-ppc64le: extends: .test-jobs-common variables: - CONTAINER: debian:bullseye-ppc64le + CONTAINER: debian:12-ppc64le LOGFILE: qemu-smoke-ppc64le.log artifacts: paths: @@ -447,5 +447,4 @@ qemu-smoke-ppc64le-powernv9-gcc: script: - ./automation/scripts/qemu-smoke-ppc64le.sh powernv9 2>&1 | tee ${LOGFILE} needs: - - qemu-system-ppc64-8.1.0-ppc64-export - - debian-bullseye-gcc-ppc64le-debug + - debian-12-ppc64le-gcc-debug diff --git a/automation/scripts/qemu-smoke-ppc64le.sh b/automation/scripts/qemu-smoke-ppc64le.sh index 701d81107d..9088881b73 100755 --- a/automation/scripts/qemu-smoke-ppc64le.sh +++ b/automation/scripts/qemu-smoke-ppc64le.sh @@ -12,8 +12,8 @@ rm -f ${serial_log} set +e timeout -k 1 20 \ -binaries/qemu-system-ppc64 \ - -bios binaries/skiboot.lid \ +qemu-system-ppc64 \ + -bios skiboot.lid \ -M $machine \ -m 2g \ -smp 1 \ diff --git a/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile b/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile deleted file mode 100644 index e28d686492..0000000000 --- a/automation/tests-artifacts/qemu-system-ppc64/8.1.0-ppc64.dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/amd64 debian:bullseye-slim -LABEL maintainer.name="The Xen Project" \ - maintainer.email="xen-devel@lists.xenproject.org" - -ENV DEBIAN_FRONTEND=noninteractive -ENV QEMU_VERSION=8.1.0 -ENV USER root - -RUN mkdir /build -WORKDIR /build - -# build depends -RUN apt-get update && \ - apt-get --quiet --yes install \ - build-essential \ - curl \ - python3 \ - python3-pip \ - python3-elementpath \ - ninja-build \ - pkg-config \ - libglib2.0-dev \ - libpixman-1-dev \ - && \ - \ - curl -fsSLO https://download.qemu.org/qemu-"$QEMU_VERSION".tar.xz && \ - tar xvJf qemu-"$QEMU_VERSION".tar.xz && \ - cd qemu-"$QEMU_VERSION" && \ - ./configure --target-list=ppc64-softmmu && \ - make -j$(nproc) && \ - cp ./build/qemu-system-ppc64 / && \ - cp ./build/qemu-bundle/usr/local/share/qemu/skiboot.lid / && \ - cd /build && \ - rm -rf qemu-"$QEMU_VERSION"* && \ - apt-get autoremove -y && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/* -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 12 14:23:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 14:23:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758118.1167415 (Exim 4.92) (envelope-from ) id 1sSHBE-0002zY-D6; Fri, 12 Jul 2024 14:23:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758118.1167415; Fri, 12 Jul 2024 14:23: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 1sSHBE-0002zQ-AY; Fri, 12 Jul 2024 14:23:24 +0000 Received: by outflank-mailman (input) for mailman id 758118; Fri, 12 Jul 2024 14:23:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHBC-0002zG-Vv for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:23:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSHBC-0004Xk-Ul for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:23:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSHBC-0001VN-Tv for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 14:23:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=2insnY/r5Vz8Ti2NLCtbgT9fglME6MIetClWwuW1Bbo=; b=t5IO9x/kjvygWxfJXMQ//BAYF1 LK3gL8jAGBQRGvScRFnxI5U1PxW9eCNj4XbxpWcgUOgrybQ/Atw0ktbL9FtK2m9L5hsZVIpBgD36G 7aHp6N7v6J1iTWjvpMGWRnTmF/nC6P/iDACz6F7wq/+2rcjodCghuV6QQvt1Kx0ZXSRI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Refresh bullseye-ppc64le as debian:11-ppc64le Message-Id: Date: Fri, 12 Jul 2024 14:23:22 +0000 commit d46e4264c3fa68974fbb9b1bce514ea44af6d945 Author: Andrew Cooper AuthorDate: Mon Jul 8 18:18:22 2024 +0100 Commit: Andrew Cooper CommitDate: Thu Jul 11 19:26:47 2024 +0100 CI: Refresh bullseye-ppc64le as debian:11-ppc64le ... in the style of debian:12-ppc64le. Rename the jobs and reposition them later as they're not a dependency for the smoke testing any more. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/debian/11-ppc64le.dockerfile | 33 ++++++++++++++++++++++ .../build/debian/bullseye-ppc64le.dockerfile | 32 --------------------- automation/gitlab-ci/build.yaml | 29 +++++++++---------- automation/scripts/containerize | 2 +- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/automation/build/debian/11-ppc64le.dockerfile b/automation/build/debian/11-ppc64le.dockerfile new file mode 100644 index 0000000000..d846b670d0 --- /dev/null +++ b/automation/build/debian/11-ppc64le.dockerfile @@ -0,0 +1,33 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 debian:bullseye-slim +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive +ENV CROSS_COMPILE=powerpc64le-linux-gnu- +ENV XEN_TARGET_ARCH=ppc64 + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 15:22:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758132.1167439 (Exim 4.92) (envelope-from ) id 1sSI60-00051u-Um; Fri, 12 Jul 2024 15:22:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758132.1167439; Fri, 12 Jul 2024 15:22:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSI60-00051n-S4; Fri, 12 Jul 2024 15:22:04 +0000 Received: by outflank-mailman (input) for mailman id 758132; Fri, 12 Jul 2024 15:22:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSI5z-00051h-J9 for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 15:22:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSI5z-0005hY-EX for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 15:22:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSI5z-0006CU-CO for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 15:22:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=m84sE6I+ympSQ0IQ4aqpf733JRnXnLnmwme8qRlbFXI=; b=kHNQMP85wG8ssYppn/lbXBpkuH dr1duCoqmOYcIaqNShvH9rxgKPNqSsCYEV5KuStIBP5H89oCvF5lUCQPL50muHOBrirCsEbUrl0+Z CiKj3dItG7prTTg4thcd/itdFtKfLU4eH47ywCnk07nAzoXDKLObJq8LMitxdeBFays4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Introduce debian:11/12-riscv64 containers Message-Id: Date: Fri, 12 Jul 2024 15:22:03 +0000 commit a507bd7d1febaafc0965489c42ec7507a51b5663 Author: Andrew Cooper AuthorDate: Tue Jul 9 15:10:07 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 15:40:03 2024 +0100 CI: Introduce debian:11/12-riscv64 containers For starters, they're slightly smaller: $ docker image list registry.gitlab.com/xen-project/xen/debian 12-riscv64 772MB registry.gitlab.com/xen-project/xen/debian 11-riscv64 422MB registry.gitlab.com/xen-project/xen/archlinux current-riscv64 2.32GB They also not rolling distros, so will be more predicatable testing for the stable trees in the future. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Reviewed-by: Oleksii Kurochko Release-Acked-By: Oleksii Kurochko --- automation/build/debian/11-riscv64.dockerfile | 33 ++++++++++++++++++++++++ automation/build/debian/12-riscv64.dockerfile | 36 +++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/automation/build/debian/11-riscv64.dockerfile b/automation/build/debian/11-riscv64.dockerfile new file mode 100644 index 0000000000..1c99bc89ea --- /dev/null +++ b/automation/build/debian/11-riscv64.dockerfile @@ -0,0 +1,33 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 debian:bullseye-slim +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive +ENV CROSS_COMPILE=riscv64-linux-gnu- +ENV XEN_TARGET_ARCH=riscv64 + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 15:22:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758133.1167443 (Exim 4.92) (envelope-from ) id 1sSI6A-00053n-09; Fri, 12 Jul 2024 15:22:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758133.1167443; Fri, 12 Jul 2024 15:22:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSI69-00053f-Tb; Fri, 12 Jul 2024 15:22:13 +0000 Received: by outflank-mailman (input) for mailman id 758133; Fri, 12 Jul 2024 15:22:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSI69-00053J-J4 for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 15:22:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSI69-0005hf-I2 for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 15:22:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSI69-0006DB-Gk for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 15:22:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=sKtS+k3Kj7p2v2hXgWt+/KGEtzKdZZEscS/a33HiTDQ=; b=w+NHpUqkgZWrL4EmdY/rfb9ouh TpSOK+jtmLMitQLYHeG5X/G4Z+EsAkNwURAqYZXg8qDHdogabN1FhaJv5md4DguoFh1W002qmJLW/ PC0cvocgxP6hGWb8u4WIp3qdkAjzi0FQJIbf2V5odwZXAZrsumbKtq1QoZiGTwXRwqv8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Swap to debian for riscv64 build and test Message-Id: Date: Fri, 12 Jul 2024 15:22:13 +0000 commit 248200bd5bd7416a658bc18c2456a338d7fd3f75 Author: Andrew Cooper AuthorDate: Tue Jul 9 15:23:19 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 15:40:03 2024 +0100 CI: Swap to debian for riscv64 build and test The containers are both much smaller, with stable toolchains over time, and this at least means we're not doing all testing with a single compiler. Rename the jobs to follow to sort coherently ($DISTRO-$VERSION-$ARCH-*) and reposition the jobs to optimise starting the smoke test. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Reviewed-by: Oleksii Kurochko Release-Acked-By: Oleksii Kurochko --- .../build/archlinux/current-riscv64.dockerfile | 22 ------ automation/gitlab-ci/build.yaml | 84 +++++++++++++--------- automation/gitlab-ci/test.yaml | 4 +- automation/scripts/containerize | 3 +- 4 files changed, 53 insertions(+), 60 deletions(-) diff --git a/automation/build/archlinux/current-riscv64.dockerfile b/automation/build/archlinux/current-riscv64.dockerfile deleted file mode 100644 index f7770bf82a..0000000000 --- a/automation/build/archlinux/current-riscv64.dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/amd64 archlinux -LABEL maintainer.name="The Xen Project" \ - maintainer.email="xen-devel@lists.xenproject.org" - -# Packages needed for the build -RUN pacman --noconfirm --needed -Syu \ - base-devel \ - git \ - inetutils \ - riscv64-linux-gnu-binutils \ - riscv64-linux-gnu-gcc \ - riscv64-linux-gnu-glibc \ - # For test phase - qemu-system-riscv - -# Add compiler path -ENV CROSS_COMPILE=riscv64-linux-gnu- - -RUN useradd --create-home user -USER user -WORKDIR /build diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index ba732fb962..4b9d80cc56 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -357,6 +357,13 @@ debian-12-ppc64le-gcc-debug: KBUILD_DEFCONFIG: ppc64_defconfig HYPERVISOR_ONLY: y +debian-12-riscv64-gcc-debug: + extends: .gcc-riscv64-cross-build-debug + variables: + CONTAINER: debian:12-riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + HYPERVISOR_ONLY: y + # Arm32 cross-build debian-bookworm-gcc-arm32: @@ -458,41 +465,6 @@ alpine-3.18-gcc-debug-arm64-earlyprintk: CONFIG_EARLY_UART_CHOICE_PL011=y CONFIG_EARLY_UART_BASE_ADDRESS=0x9000000 -# RISC-V 64 cross-build -.riscv-fixed-randconfig: - variables: &riscv-fixed-randconfig - EXTRA_FIXED_RANDCONFIG: | - CONFIG_BOOT_TIME_CPUPOOLS=n - CONFIG_COVERAGE=n - CONFIG_EXPERT=y - CONFIG_GRANT_TABLE=n - CONFIG_MEM_ACCESS=n - CONFIG_PERF_COUNTERS=n - CONFIG_LIVEPATCH=n - CONFIG_XSM=n - -archlinux-current-gcc-riscv64: - extends: .gcc-riscv64-cross-build - variables: - CONTAINER: archlinux:current-riscv64 - KBUILD_DEFCONFIG: tiny64_defconfig - HYPERVISOR_ONLY: y - -archlinux-current-gcc-riscv64-debug: - extends: .gcc-riscv64-cross-build-debug - variables: - CONTAINER: archlinux:current-riscv64 - KBUILD_DEFCONFIG: tiny64_defconfig - HYPERVISOR_ONLY: y - -archlinux-current-gcc-riscv64-randconfig: - extends: .gcc-riscv64-cross-build - variables: - CONTAINER: archlinux:current-riscv64 - KBUILD_DEFCONFIG: tiny64_defconfig - RANDCONFIG: y - <<: *riscv-fixed-randconfig - # Yocto test jobs yocto-qemuarm64: extends: .yocto-test-arm64 @@ -738,3 +710,45 @@ debian-12-ppc64le-gcc: CONTAINER: debian:12-ppc64le KBUILD_DEFCONFIG: ppc64_defconfig HYPERVISOR_ONLY: y + +# RISC-V 64 cross-build +debian-11-riscv64-gcc: + extends: .gcc-riscv64-cross-build + variables: + CONTAINER: debian:11-riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + HYPERVISOR_ONLY: y + +debian-11-riscv64-gcc-debug: + extends: .gcc-riscv64-cross-build-debug + variables: + CONTAINER: debian:11-riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + HYPERVISOR_ONLY: y + +debian-12-riscv64-gcc: + extends: .gcc-riscv64-cross-build + variables: + CONTAINER: debian:12-riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + HYPERVISOR_ONLY: y + +.riscv-fixed-randconfig: + variables: &riscv-fixed-randconfig + EXTRA_FIXED_RANDCONFIG: | + CONFIG_BOOT_TIME_CPUPOOLS=n + CONFIG_COVERAGE=n + CONFIG_EXPERT=y + CONFIG_GRANT_TABLE=n + CONFIG_MEM_ACCESS=n + CONFIG_PERF_COUNTERS=n + CONFIG_LIVEPATCH=n + CONFIG_XSM=n + +debian-12-riscv64-gcc-randconfig: + extends: .gcc-riscv64-cross-build + variables: + CONTAINER: debian:12-riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + RANDCONFIG: y + <<: *riscv-fixed-randconfig diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 70c946f877..d89e41f244 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -56,7 +56,7 @@ .qemu-riscv64: extends: .test-jobs-common variables: - CONTAINER: archlinux:current-riscv64 + CONTAINER: debian:12-riscv64 LOGFILE: qemu-smoke-riscv64.log artifacts: paths: @@ -440,7 +440,7 @@ qemu-smoke-riscv64-gcc: script: - ./automation/scripts/qemu-smoke-riscv64.sh 2>&1 | tee ${LOGFILE} needs: - - archlinux-current-gcc-riscv64-debug + - debian-12-riscv64-gcc-debug qemu-smoke-ppc64le-powernv9-gcc: extends: .qemu-ppc64le diff --git a/automation/scripts/containerize b/automation/scripts/containerize index 5c3f6782d9..6dbf55c8f8 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -27,12 +27,13 @@ case "_${CONTAINER}" in _alpine) CONTAINER="${BASE}/alpine:3.18" ;; _alpine-arm64v8) CONTAINER="${BASE}/alpine:3.18-arm64v8" ;; _archlinux|_arch) CONTAINER="${BASE}/archlinux:current" ;; - _riscv64) CONTAINER="${BASE}/archlinux:current-riscv64" ;; _centos7) CONTAINER="${BASE}/centos:7" ;; _fedora) CONTAINER="${BASE}/fedora:29";; _focal) CONTAINER="${BASE}/ubuntu:focal" ;; _bullseye-ppc64le) CONTAINER="${BASE}/debian:11-ppc64le" ;; _bookworm-ppc64le) CONTAINER="${BASE}/debian:12-ppc64le" ;; + _bullseye-riscv64) CONTAINER="${BASE}/debian:11-riscv64" ;; + _bookworm-riscv64) CONTAINER="${BASE}/debian:12-riscv64" ;; _buster-gcc-ibt) CONTAINER="${BASE}/debian:buster-gcc-ibt" ;; _bookworm|_) CONTAINER="${BASE}/debian:bookworm" ;; _bookworm-i386) CONTAINER="${BASE}/debian:bookworm-i386" ;; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Fri Jul 12 15:22:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 15:22:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758134.1167447 (Exim 4.92) (envelope-from ) id 1sSI6K-000598-31; Fri, 12 Jul 2024 15:22:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758134.1167447; Fri, 12 Jul 2024 15:22: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 1sSI6K-00058x-09; Fri, 12 Jul 2024 15:22:24 +0000 Received: by outflank-mailman (input) for mailman id 758134; Fri, 12 Jul 2024 15:22:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSI6J-00058p-Na for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 15:22:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSI6J-0005iG-Mh for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 15:22:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSI6J-0006Do-KG for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 15:22:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=CXWkB7+dEiCkdDVe/wS7GekCPqB1BdGNYoar44Um/NQ=; b=yS6ILnLtCDCJzYgPUDil1Jg3oP LUDswydJQoIti2pJ04dffc4i1dhe0s6FbnANXsKf6skdJuN9GalJgNFMd9DlpNiTQaVwT3FzwuSL+ 6wORxIWnW6N+7KQ3oGlJ72uxjEPn//ZY9KrJzUvEKMzw5aI4FDwE3xcaqpQe241tBlFg=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Refresh and upgrade the GCC-IBT container Message-Id: Date: Fri, 12 Jul 2024 15:22:23 +0000 commit 1e66e188069532eb50bb48e01709b89d5f8718e9 Author: Andrew Cooper AuthorDate: Tue Jul 9 15:54:52 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 15:40:03 2024 +0100 CI: Refresh and upgrade the GCC-IBT container Upgrade from Debian buster to bookworm, GCC 11.3 to 11.4 and to be a non-root container. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- .../build/debian/12-x86_64-gcc-ibt.dockerfile | 81 ++++++++++++++++++++++ automation/build/debian/buster-gcc-ibt.dockerfile | 70 ------------------- automation/gitlab-ci/build.yaml | 4 +- automation/scripts/containerize | 2 +- 4 files changed, 84 insertions(+), 73 deletions(-) diff --git a/automation/build/debian/12-x86_64-gcc-ibt.dockerfile b/automation/build/debian/12-x86_64-gcc-ibt.dockerfile new file mode 100644 index 0000000000..3ce60e7d94 --- /dev/null +++ b/automation/build/debian/12-x86_64-gcc-ibt.dockerfile @@ -0,0 +1,81 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 debian:bookworm-slim AS builder + +ENV DEBIAN_FRONTEND=noninteractive + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 17:44:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758244.1167640 (Exim 4.92) (envelope-from ) id 1sSKJR-0004Hm-Aj; Fri, 12 Jul 2024 17:44:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758244.1167640; Fri, 12 Jul 2024 17:44:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSKJR-0004Hf-7s; Fri, 12 Jul 2024 17:44:05 +0000 Received: by outflank-mailman (input) for mailman id 758244; Fri, 12 Jul 2024 17:44:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSKJP-0004HZ-Nz for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 17:44:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSKJP-0000Vo-KM for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 17:44:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSKJP-0004bp-Is for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 17:44:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=FNpMH524oXiWaQCzfSoD09OOmpLTiLPxqIoHnu3IJII=; b=BFCotkCTjTU1mckg5/zQoXxx+g D4cXcBaXgJzmxH6Eui45jmZkMWPZQDqKCRNkXq+YZvu9Nsp07AmaZuxarCFIHykkou5+GVE5qEZ2P pZr1S1h1aT+msAkYNDIC6ADE4boOhv0sIE5uN4Av1nBMahaR4JIQD1UIjlYwPbctGIYw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Refresh OpenSUSE Tumbleweed container Message-Id: Date: Fri, 12 Jul 2024 17:44:03 +0000 commit a8bc31be0103475772e23fc47fedcd09d71fe7c5 Author: Andrew Cooper AuthorDate: Wed Jul 10 14:40:23 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 16:27:28 2024 +0100 CI: Refresh OpenSUSE Tumbleweed container Existing as suse:opensuse-tumbleweed is a historical quirk, and adjusted for consistency with all the other containers. Make it non-root, use heredocs for legibility, and use the zypper long names for the benefit of those wondering what was being referenced or duplicated. Trim the dependencies substantially. Testing docs isn't very interesting and saves a lot of space. Other savings come from removing a huge pile of optional QEMU dependencies (QEMU just needs to build the Xen parts to be useful here, not have a full GUI environment). Finally, there where some packages such as bc, libssh2-devel, libtasn1-devel and nasm that I'm not aware of any reason to have had, even historically. This shaves 1G off the size of the container: registry.gitlab.com/xen-project/xen/opensuse tumbleweed-x86_64 1.39GB registry.gitlab.com/xen-project/xen/suse opensuse-tumbleweed 2.35GB Furthermore, identify which components of the build use which dependencies, which will help managing them in the future. Thanks to Olaf Hering for dependency fixes that have been subsumed into this total overhaul. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- .../build/opensuse/tumbleweed-x86_64.dockerfile | 76 ++++++++++++++++++++++ .../build/suse/opensuse-tumbleweed.dockerfile | 74 --------------------- automation/gitlab-ci/build.yaml | 8 +-- automation/scripts/containerize | 2 +- 4 files changed, 81 insertions(+), 79 deletions(-) diff --git a/automation/build/opensuse/tumbleweed-x86_64.dockerfile b/automation/build/opensuse/tumbleweed-x86_64.dockerfile new file mode 100644 index 0000000000..61e840fc67 --- /dev/null +++ b/automation/build/opensuse/tumbleweed-x86_64.dockerfile @@ -0,0 +1,76 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 opensuse/tumbleweed +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV XEN_TARGET_ARCH=x86_64 + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 17:44:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758245.1167645 (Exim 4.92) (envelope-from ) id 1sSKJb-0004JS-CR; Fri, 12 Jul 2024 17:44:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758245.1167645; Fri, 12 Jul 2024 17:44:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSKJb-0004JK-9f; Fri, 12 Jul 2024 17:44:15 +0000 Received: by outflank-mailman (input) for mailman id 758245; Fri, 12 Jul 2024 17:44:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSKJZ-0004J4-P5 for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 17:44:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSKJZ-0000Vu-OF for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 17:44:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSKJZ-0004cr-Mc for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 17:44:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=V8c0e2RkWC56UHBxc614nIht2+fJ2T9tuFq7DNg4w5c=; b=lHjmdo3j03KtPBBK8Nca3fE2N0 U12ptO0+b+pWXUkNNUXky/rR+BL8dAWZohmeA1eFrk1ptZYhKaEJsv9SbSJu95iaP0ddsXe5fCQu+ iozI6lweLmqqE5+E4/jSVRqFw/08cR8LIVjCXAiizMks+H5bsrhF5H2+jxTKkcAdnjpc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Refresh OpenSUSE Leap container Message-Id: Date: Fri, 12 Jul 2024 17:44:13 +0000 commit e85ff1f1af8c298f3f25f226698e670600eff905 Author: Andrew Cooper AuthorDate: Wed Jul 10 14:37:53 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 16:27:28 2024 +0100 CI: Refresh OpenSUSE Leap container See prior patch for most discussion. Despite appearing to be a fixed release (and therefore not marked as permitted failure), the dockerfile references the `leap` tag which is rolling in practice. Switch to 15.6 explicitly, for better test stability. Vs tumbleweed, use `zypper update` rather than dist-upgrade, and retain the RomBIOS dependencies; bin86 and dev86. In terms of size, this saves ~700M: registry.gitlab.com/xen-project/xen/opensuse leap-15.6-x86_64 1.33GB registry.gitlab.com/xen-project/xen/suse opensuse-leap 2.05GB Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- .../build/opensuse/leap-15.6-x86_64.dockerfile | 79 ++++++++++++++++++++++ automation/build/suse/opensuse-leap.dockerfile | 75 -------------------- automation/gitlab-ci/build.yaml | 16 ++--- automation/scripts/containerize | 2 +- 4 files changed, 88 insertions(+), 84 deletions(-) diff --git a/automation/build/opensuse/leap-15.6-x86_64.dockerfile b/automation/build/opensuse/leap-15.6-x86_64.dockerfile new file mode 100644 index 0000000000..ea70dffe2a --- /dev/null +++ b/automation/build/opensuse/leap-15.6-x86_64.dockerfile @@ -0,0 +1,79 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 opensuse/leap:15.6 +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV XEN_TARGET_ARCH=x86_64 + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 19:22:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758268.1167669 (Exim 4.92) (envelope-from ) id 1sSLqG-0007p2-Ls; Fri, 12 Jul 2024 19:22:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758268.1167669; Fri, 12 Jul 2024 19:22:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSLqG-0007os-IR; Fri, 12 Jul 2024 19:22:04 +0000 Received: by outflank-mailman (input) for mailman id 758268; Fri, 12 Jul 2024 19:22:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSLqF-0007om-JW for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 19:22:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSLqF-0002WJ-Ee for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 19:22:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSLqF-0004II-Cm for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 19:22:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=+mZa+Otb/P3jsi60mQtMyLkXoM/gTH7sCvt2r17L9Xs=; b=KY8UA9dY3qCj5PdDXhuDCyqP8U 72UUb0aDtssXPwBkKUfoIOUsFhCOdolWoCHgeDSWbilejpK+R2CTWRv/BwSI4bonj9L+TqjySBxBi Kh6aEnEPW489eaozJzI6k/D1O47ZryjmSdKJrPK0ct92D/6k0tfCCmVB74qtZpxf0mJs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Refresh Ubuntu Xenial container as 16.04-x86_64 Message-Id: Date: Fri, 12 Jul 2024 19:22:03 +0000 commit 1ab414b915d5b00f219db83301dc2e9543b2eb94 Author: Andrew Cooper AuthorDate: Thu Jul 11 16:08:24 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 18:58:45 2024 +0100 CI: Refresh Ubuntu Xenial container as 16.04-x86_64 Rework the container to be non-root, use heredocs for legibility, and use apt-get --no-install-recommends to keep the size down. Ubuntu Xenial has no ninja-build package, so can't build the QEMU referenced by Xen 4.16. Therefore, drop the dependencies too. This saves ~500M: registry.gitlab.com/xen-project/xen/ubuntu 16.04-x86_64 698MB registry.gitlab.com/xen-project/xen/ubuntu xenial 1.21GB Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/ubuntu/16.04-x86_64.dockerfile | 64 +++++++++++++++++++++++++ automation/build/ubuntu/xenial.dockerfile | 46 ------------------ automation/gitlab-ci/build.yaml | 16 +++---- automation/scripts/containerize | 2 +- 4 files changed, 73 insertions(+), 55 deletions(-) diff --git a/automation/build/ubuntu/16.04-x86_64.dockerfile b/automation/build/ubuntu/16.04-x86_64.dockerfile new file mode 100644 index 0000000000..d8617bfade --- /dev/null +++ b/automation/build/ubuntu/16.04-x86_64.dockerfile @@ -0,0 +1,64 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 ubuntu:16.04 +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 19:22:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758269.1167672 (Exim 4.92) (envelope-from ) id 1sSLqQ-0007rN-NX; Fri, 12 Jul 2024 19:22:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758269.1167672; Fri, 12 Jul 2024 19:22:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSLqQ-0007rG-LA; Fri, 12 Jul 2024 19:22:14 +0000 Received: by outflank-mailman (input) for mailman id 758269; Fri, 12 Jul 2024 19:22:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSLqP-0007r8-KF for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 19:22:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSLqP-0002WU-Iv for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 19:22:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSLqP-0004JB-Gp for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 19:22:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=t3MjU/SzD4IJbCgDnCuatqnbqlg+6KUEAP1kRR+zmn8=; b=NGT3pWCK3S7L2R+HrJPtqP9QGt GXs0R/3zt985/FRc8V8BAaeDR2oyVa2FZf2sVxSQJh/5S1QTop2XyJdpPnHf37VaHINu/34dyaseS IXyyVcB0IGn77M9R6HqNhKGCPuuX1voc5znceKMNd/LgQvlTxgzdrRrRcky5GBF4Kxlc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Refresh Ubuntu Bionic container as 18.04-x86_64 Message-Id: Date: Fri, 12 Jul 2024 19:22:13 +0000 commit 51e5081c6eac6176efdb72df4a878722bf56d834 Author: Andrew Cooper AuthorDate: Thu Jul 11 16:08:39 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 18:58:45 2024 +0100 CI: Refresh Ubuntu Bionic container as 18.04-x86_64 As with 16.04 (Xenial), except that ninja-build package is available so QEMU can be built. This halves the size of the container: registry.gitlab.com/xen-project/xen/ubuntu 18.04-x86_64 857MB registry.gitlab.com/xen-project/xen/ubuntu bionic 1.44GB Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/ubuntu/18.04-x86_64.dockerfile | 71 +++++++++++++++++++++++++ automation/build/ubuntu/bionic.dockerfile | 48 ----------------- automation/gitlab-ci/build.yaml | 16 +++--- automation/scripts/containerize | 2 +- 4 files changed, 80 insertions(+), 57 deletions(-) diff --git a/automation/build/ubuntu/18.04-x86_64.dockerfile b/automation/build/ubuntu/18.04-x86_64.dockerfile new file mode 100644 index 0000000000..336697ad95 --- /dev/null +++ b/automation/build/ubuntu/18.04-x86_64.dockerfile @@ -0,0 +1,71 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 ubuntu:18.04 +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 19:22:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758270.1167677 (Exim 4.92) (envelope-from ) id 1sSLqa-0007vj-PI; Fri, 12 Jul 2024 19:22:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758270.1167677; Fri, 12 Jul 2024 19:22: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 1sSLqa-0007vb-Mc; Fri, 12 Jul 2024 19:22:24 +0000 Received: by outflank-mailman (input) for mailman id 758270; Fri, 12 Jul 2024 19:22:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSLqZ-0007vS-Nb for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 19:22:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSLqZ-0002X4-Lz for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 19:22:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSLqZ-0004Jm-L7 for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 19:22:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=fnhDQbvxnAuBTfuC4Hz4i+bva/KsXmBKWoqbQKtp95g=; b=w5Ka0XFKs7BYrtXY955jP3vwwJ jhePQgv/SC/4GKRy0AK4OArdPGGPrFeqhHi3CalX5uDE5zMkZcXih0R7BkXFVTkL1BOw6bkPM3V3A 5/aZv5HI6COA8okaA2gYYeHDqdyA3zNWQjOEXJ7GgKSg2XoEXRVMfGWM6PN3EtO2pYZU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Refresh Ubuntu Focal container as 20.04-x86_64 Message-Id: Date: Fri, 12 Jul 2024 19:22:23 +0000 commit 6db222eb1fcee720c75d6230fda90290daf6079c Author: Andrew Cooper AuthorDate: Thu Jul 11 16:09:22 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 18:58:45 2024 +0100 CI: Refresh Ubuntu Focal container as 20.04-x86_64 As with 16.04 (Xenial), with python3-setuptools included. Having this package only in some containers was intentional; see commit bbc72a7877d8 ("automation: Add python3's setuptools to some containers") for the rational. This saves ~500M: registry.gitlab.com/xen-project/xen/ubuntu 20.04-x86_64 1.06GB registry.gitlab.com/xen-project/xen/ubuntu focal 1.57GB Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/ubuntu/20.04-x86_64.dockerfile | 72 +++++++++++++++++++++++++ automation/build/ubuntu/focal.dockerfile | 49 ----------------- automation/gitlab-ci/build.yaml | 16 +++--- automation/scripts/containerize | 2 +- 4 files changed, 81 insertions(+), 58 deletions(-) diff --git a/automation/build/ubuntu/20.04-x86_64.dockerfile b/automation/build/ubuntu/20.04-x86_64.dockerfile new file mode 100644 index 0000000000..39fb297519 --- /dev/null +++ b/automation/build/ubuntu/20.04-x86_64.dockerfile @@ -0,0 +1,72 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 ubuntu:20.04 +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Fri, 12 Jul 2024 19:22:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758271.1167681 (Exim 4.92) (envelope-from ) id 1sSLqk-0007yZ-Qn; Fri, 12 Jul 2024 19:22:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758271.1167681; Fri, 12 Jul 2024 19:22:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSLqk-0007yP-O2; Fri, 12 Jul 2024 19:22:34 +0000 Received: by outflank-mailman (input) for mailman id 758271; Fri, 12 Jul 2024 19:22:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSLqj-0007yE-Qe for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 19:22:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSLqj-0002XF-Po for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 19:22:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSLqj-0004KF-O9 for xen-changelog@lists.xenproject.org; Fri, 12 Jul 2024 19:22:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=o7o46qYbFGwE+ZxNDEN85JmrrUB93c11AMmXtG3ZsCk=; b=PCP7ZvdEv5GqfJPLpCxHi9mz66 2V1q31bZvdueIvobrF/gYthJCQQ6hDCQmBelj/fyG2mYt8lhOdrHIN0Wp0qHqdDFyU+nKI7kxFw3Q sDizDn3vzH5V8Vjv4eiGuHWGzglBa5DDXIeRzKgv5lazbj33gaxa7NriuVVCM86MHR9s=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CI: Add Ubuntu 22.04 (Jammy) and 24.04 (Noble) testing Message-Id: Date: Fri, 12 Jul 2024 19:22:33 +0000 commit 1ddc8c1bad93aa6cbfe616dd72333460c47f96c9 Author: Andrew Cooper AuthorDate: Thu Jul 11 16:09:58 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 18:58:45 2024 +0100 CI: Add Ubuntu 22.04 (Jammy) and 24.04 (Noble) testing The containers are exactly as per 20.04 (Focal). However, this now brings us to 5 releases * 4 build jobs worth of Ubuntu testing, which is overkill. The oldest and newest toolchains are the most likely to find problems with new code, so reduce the middle 3 releases (18/20/22) to just a single smoke test each. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/ubuntu/22.04-x86_64.dockerfile | 72 +++++++++++++++++++++++++ automation/build/ubuntu/24.04-x86_64.dockerfile | 72 +++++++++++++++++++++++++ automation/gitlab-ci/build.yaml | 39 ++++++-------- automation/scripts/containerize | 2 + 4 files changed, 163 insertions(+), 22 deletions(-) diff --git a/automation/build/ubuntu/22.04-x86_64.dockerfile b/automation/build/ubuntu/22.04-x86_64.dockerfile new file mode 100644 index 0000000000..230903f624 --- /dev/null +++ b/automation/build/ubuntu/22.04-x86_64.dockerfile @@ -0,0 +1,72 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 ubuntu:22.04 +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Sat, 13 Jul 2024 03:11:10 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758385.1167858 (Exim 4.92) (envelope-from ) id 1sSTA6-00088f-Mw; Sat, 13 Jul 2024 03:11:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758385.1167858; Sat, 13 Jul 2024 03:11:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSTA6-00088X-KH; Sat, 13 Jul 2024 03:11:02 +0000 Received: by outflank-mailman (input) for mailman id 758385; Sat, 13 Jul 2024 03:11:01 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSTA5-00088R-JJ for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 03:11:01 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSTA5-0005pa-Eq for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 03:11:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSTA5-0005GR-D1 for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 03:11:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=kyd7zg8EvNsXEzlREa0VC2u20WH5M22h9EJual3T4iQ=; b=hGrhKTlBpYssSrBprk/aMBVFSs 6Crw4khm+Kq2NGok6gokUaD+N7Av03EbgjFI7dk75R8qZ3/eNBIgjDZJDUjMYVutG9kpqOAO5osVg /l8AQ4OZ2mJda4lOqouIyjGOCvcCOlv3rBHNILgD46ZzhPVuqV0cRgiRpVvKHpjL4Ptc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Introduce debian:11/12-riscv64 containers Message-Id: Date: Sat, 13 Jul 2024 03:11:01 +0000 commit a507bd7d1febaafc0965489c42ec7507a51b5663 Author: Andrew Cooper AuthorDate: Tue Jul 9 15:10:07 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 15:40:03 2024 +0100 CI: Introduce debian:11/12-riscv64 containers For starters, they're slightly smaller: $ docker image list registry.gitlab.com/xen-project/xen/debian 12-riscv64 772MB registry.gitlab.com/xen-project/xen/debian 11-riscv64 422MB registry.gitlab.com/xen-project/xen/archlinux current-riscv64 2.32GB They also not rolling distros, so will be more predicatable testing for the stable trees in the future. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Reviewed-by: Oleksii Kurochko Release-Acked-By: Oleksii Kurochko --- automation/build/debian/11-riscv64.dockerfile | 33 ++++++++++++++++++++++++ automation/build/debian/12-riscv64.dockerfile | 36 +++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/automation/build/debian/11-riscv64.dockerfile b/automation/build/debian/11-riscv64.dockerfile new file mode 100644 index 0000000000..1c99bc89ea --- /dev/null +++ b/automation/build/debian/11-riscv64.dockerfile @@ -0,0 +1,33 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 debian:bullseye-slim +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive +ENV CROSS_COMPILE=riscv64-linux-gnu- +ENV XEN_TARGET_ARCH=riscv64 + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Sat, 13 Jul 2024 03:11:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758386.1167862 (Exim 4.92) (envelope-from ) id 1sSTAG-0008At-Q4; Sat, 13 Jul 2024 03:11:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758386.1167862; Sat, 13 Jul 2024 03:11:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSTAG-0008Al-NK; Sat, 13 Jul 2024 03:11:12 +0000 Received: by outflank-mailman (input) for mailman id 758386; Sat, 13 Jul 2024 03:11:11 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSTAF-0008Af-JV for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 03:11:11 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSTAF-0005ph-ID for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 03:11:11 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSTAF-0005H6-HH for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 03:11:11 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Bxc5wyErv+eEfsFCuyAZL3XulqbxZ2Kgu7DZR695JNI=; b=W9SK97bys0qjvjibhgC1T6kH5c 1GAcd98eU9GDaR20zmk67DfY3ekoVR+GMAHEGq+Uy9tAU7YT+eihLcE4aUpoOOAmz7dzlVAJygWSb 2qFcP1pa2U90/q7U+eu8r3UTKQnky9WmAy/DVsyrNyyog7Q0LUloEgIZDddo//k68wFs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Swap to debian for riscv64 build and test Message-Id: Date: Sat, 13 Jul 2024 03:11:11 +0000 commit 248200bd5bd7416a658bc18c2456a338d7fd3f75 Author: Andrew Cooper AuthorDate: Tue Jul 9 15:23:19 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 15:40:03 2024 +0100 CI: Swap to debian for riscv64 build and test The containers are both much smaller, with stable toolchains over time, and this at least means we're not doing all testing with a single compiler. Rename the jobs to follow to sort coherently ($DISTRO-$VERSION-$ARCH-*) and reposition the jobs to optimise starting the smoke test. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Reviewed-by: Oleksii Kurochko Release-Acked-By: Oleksii Kurochko --- .../build/archlinux/current-riscv64.dockerfile | 22 ------ automation/gitlab-ci/build.yaml | 84 +++++++++++++--------- automation/gitlab-ci/test.yaml | 4 +- automation/scripts/containerize | 3 +- 4 files changed, 53 insertions(+), 60 deletions(-) diff --git a/automation/build/archlinux/current-riscv64.dockerfile b/automation/build/archlinux/current-riscv64.dockerfile deleted file mode 100644 index f7770bf82a..0000000000 --- a/automation/build/archlinux/current-riscv64.dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# syntax=docker/dockerfile:1 -FROM --platform=linux/amd64 archlinux -LABEL maintainer.name="The Xen Project" \ - maintainer.email="xen-devel@lists.xenproject.org" - -# Packages needed for the build -RUN pacman --noconfirm --needed -Syu \ - base-devel \ - git \ - inetutils \ - riscv64-linux-gnu-binutils \ - riscv64-linux-gnu-gcc \ - riscv64-linux-gnu-glibc \ - # For test phase - qemu-system-riscv - -# Add compiler path -ENV CROSS_COMPILE=riscv64-linux-gnu- - -RUN useradd --create-home user -USER user -WORKDIR /build diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index ba732fb962..4b9d80cc56 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -357,6 +357,13 @@ debian-12-ppc64le-gcc-debug: KBUILD_DEFCONFIG: ppc64_defconfig HYPERVISOR_ONLY: y +debian-12-riscv64-gcc-debug: + extends: .gcc-riscv64-cross-build-debug + variables: + CONTAINER: debian:12-riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + HYPERVISOR_ONLY: y + # Arm32 cross-build debian-bookworm-gcc-arm32: @@ -458,41 +465,6 @@ alpine-3.18-gcc-debug-arm64-earlyprintk: CONFIG_EARLY_UART_CHOICE_PL011=y CONFIG_EARLY_UART_BASE_ADDRESS=0x9000000 -# RISC-V 64 cross-build -.riscv-fixed-randconfig: - variables: &riscv-fixed-randconfig - EXTRA_FIXED_RANDCONFIG: | - CONFIG_BOOT_TIME_CPUPOOLS=n - CONFIG_COVERAGE=n - CONFIG_EXPERT=y - CONFIG_GRANT_TABLE=n - CONFIG_MEM_ACCESS=n - CONFIG_PERF_COUNTERS=n - CONFIG_LIVEPATCH=n - CONFIG_XSM=n - -archlinux-current-gcc-riscv64: - extends: .gcc-riscv64-cross-build - variables: - CONTAINER: archlinux:current-riscv64 - KBUILD_DEFCONFIG: tiny64_defconfig - HYPERVISOR_ONLY: y - -archlinux-current-gcc-riscv64-debug: - extends: .gcc-riscv64-cross-build-debug - variables: - CONTAINER: archlinux:current-riscv64 - KBUILD_DEFCONFIG: tiny64_defconfig - HYPERVISOR_ONLY: y - -archlinux-current-gcc-riscv64-randconfig: - extends: .gcc-riscv64-cross-build - variables: - CONTAINER: archlinux:current-riscv64 - KBUILD_DEFCONFIG: tiny64_defconfig - RANDCONFIG: y - <<: *riscv-fixed-randconfig - # Yocto test jobs yocto-qemuarm64: extends: .yocto-test-arm64 @@ -738,3 +710,45 @@ debian-12-ppc64le-gcc: CONTAINER: debian:12-ppc64le KBUILD_DEFCONFIG: ppc64_defconfig HYPERVISOR_ONLY: y + +# RISC-V 64 cross-build +debian-11-riscv64-gcc: + extends: .gcc-riscv64-cross-build + variables: + CONTAINER: debian:11-riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + HYPERVISOR_ONLY: y + +debian-11-riscv64-gcc-debug: + extends: .gcc-riscv64-cross-build-debug + variables: + CONTAINER: debian:11-riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + HYPERVISOR_ONLY: y + +debian-12-riscv64-gcc: + extends: .gcc-riscv64-cross-build + variables: + CONTAINER: debian:12-riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + HYPERVISOR_ONLY: y + +.riscv-fixed-randconfig: + variables: &riscv-fixed-randconfig + EXTRA_FIXED_RANDCONFIG: | + CONFIG_BOOT_TIME_CPUPOOLS=n + CONFIG_COVERAGE=n + CONFIG_EXPERT=y + CONFIG_GRANT_TABLE=n + CONFIG_MEM_ACCESS=n + CONFIG_PERF_COUNTERS=n + CONFIG_LIVEPATCH=n + CONFIG_XSM=n + +debian-12-riscv64-gcc-randconfig: + extends: .gcc-riscv64-cross-build + variables: + CONTAINER: debian:12-riscv64 + KBUILD_DEFCONFIG: tiny64_defconfig + RANDCONFIG: y + <<: *riscv-fixed-randconfig diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 70c946f877..d89e41f244 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -56,7 +56,7 @@ .qemu-riscv64: extends: .test-jobs-common variables: - CONTAINER: archlinux:current-riscv64 + CONTAINER: debian:12-riscv64 LOGFILE: qemu-smoke-riscv64.log artifacts: paths: @@ -440,7 +440,7 @@ qemu-smoke-riscv64-gcc: script: - ./automation/scripts/qemu-smoke-riscv64.sh 2>&1 | tee ${LOGFILE} needs: - - archlinux-current-gcc-riscv64-debug + - debian-12-riscv64-gcc-debug qemu-smoke-ppc64le-powernv9-gcc: extends: .qemu-ppc64le diff --git a/automation/scripts/containerize b/automation/scripts/containerize index 5c3f6782d9..6dbf55c8f8 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -27,12 +27,13 @@ case "_${CONTAINER}" in _alpine) CONTAINER="${BASE}/alpine:3.18" ;; _alpine-arm64v8) CONTAINER="${BASE}/alpine:3.18-arm64v8" ;; _archlinux|_arch) CONTAINER="${BASE}/archlinux:current" ;; - _riscv64) CONTAINER="${BASE}/archlinux:current-riscv64" ;; _centos7) CONTAINER="${BASE}/centos:7" ;; _fedora) CONTAINER="${BASE}/fedora:29";; _focal) CONTAINER="${BASE}/ubuntu:focal" ;; _bullseye-ppc64le) CONTAINER="${BASE}/debian:11-ppc64le" ;; _bookworm-ppc64le) CONTAINER="${BASE}/debian:12-ppc64le" ;; + _bullseye-riscv64) CONTAINER="${BASE}/debian:11-riscv64" ;; + _bookworm-riscv64) CONTAINER="${BASE}/debian:12-riscv64" ;; _buster-gcc-ibt) CONTAINER="${BASE}/debian:buster-gcc-ibt" ;; _bookworm|_) CONTAINER="${BASE}/debian:bookworm" ;; _bookworm-i386) CONTAINER="${BASE}/debian:bookworm-i386" ;; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Sat Jul 13 03:11:22 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Sat, 13 Jul 2024 03:11:22 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758387.1167866 (Exim 4.92) (envelope-from ) id 1sSTAQ-0008Dc-Rc; Sat, 13 Jul 2024 03:11:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758387.1167866; Sat, 13 Jul 2024 03:11:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSTAQ-0008DS-Ok; Sat, 13 Jul 2024 03:11:22 +0000 Received: by outflank-mailman (input) for mailman id 758387; Sat, 13 Jul 2024 03:11:21 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSTAP-0008DE-Mg for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 03:11:21 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSTAP-0005rU-LP for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 03:11:21 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSTAP-0005HX-KR for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 03:11:21 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=KGhpkJqQ6eyg1zEyTezdoSOrQegnICh5ZJTQgDOJeAE=; b=zUgsc0PMF3kAEWxp3dNr6Q3quj EEhr6gJ4WJ5+FROE5Bs3SQzx+T88tWf9DtaDLrqAOCC+a05kJ98qM7ZwKepTTGInKa1I67Tc0EFE/ h1SMkWgcd6Ao/yMwQMngSqqf+y3MeUj8l62tFuYjkibNISdy5XK0SBzFjGebqnnV0uIw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Refresh and upgrade the GCC-IBT container Message-Id: Date: Sat, 13 Jul 2024 03:11:21 +0000 commit 1e66e188069532eb50bb48e01709b89d5f8718e9 Author: Andrew Cooper AuthorDate: Tue Jul 9 15:54:52 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 15:40:03 2024 +0100 CI: Refresh and upgrade the GCC-IBT container Upgrade from Debian buster to bookworm, GCC 11.3 to 11.4 and to be a non-root container. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- .../build/debian/12-x86_64-gcc-ibt.dockerfile | 81 ++++++++++++++++++++++ automation/build/debian/buster-gcc-ibt.dockerfile | 70 ------------------- automation/gitlab-ci/build.yaml | 4 +- automation/scripts/containerize | 2 +- 4 files changed, 84 insertions(+), 73 deletions(-) diff --git a/automation/build/debian/12-x86_64-gcc-ibt.dockerfile b/automation/build/debian/12-x86_64-gcc-ibt.dockerfile new file mode 100644 index 0000000000..3ce60e7d94 --- /dev/null +++ b/automation/build/debian/12-x86_64-gcc-ibt.dockerfile @@ -0,0 +1,81 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 debian:bookworm-slim AS builder + +ENV DEBIAN_FRONTEND=noninteractive + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Sat, 13 Jul 2024 12:33:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758434.1167894 (Exim 4.92) (envelope-from ) id 1sSbw8-0000Co-Sh; Sat, 13 Jul 2024 12:33:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758434.1167894; Sat, 13 Jul 2024 12:33:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbw8-0000Cd-Pn; Sat, 13 Jul 2024 12:33:12 +0000 Received: by outflank-mailman (input) for mailman id 758434; Sat, 13 Jul 2024 12:33:11 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbw7-0000CT-Nv for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:11 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbw7-0000sT-N3 for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:11 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSbw7-0003rz-Kw for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:11 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=4NJRKorwK0AHqsZWlHNk7EQk5l3HpukQLlfvqh1nGZU=; b=nHce6VKVJLiQe7pHfXWAbOPPVw 8qHroahj2lCeJWhDxvp9NAPwZLvcOxKjCLSklCBuFakyvFEc83fR8zX6sw7nTeNqaiq5BzoWr8/hO /9sdlaTc0p2eR/tCceDetWhTIG2RgwU5dv+tnYgkOyK1twCr8nL+Wyy7D6u9GXjuh15Y=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Refresh OpenSUSE Leap container Message-Id: Date: Sat, 13 Jul 2024 12:33:11 +0000 commit e85ff1f1af8c298f3f25f226698e670600eff905 Author: Andrew Cooper AuthorDate: Wed Jul 10 14:37:53 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 16:27:28 2024 +0100 CI: Refresh OpenSUSE Leap container See prior patch for most discussion. Despite appearing to be a fixed release (and therefore not marked as permitted failure), the dockerfile references the `leap` tag which is rolling in practice. Switch to 15.6 explicitly, for better test stability. Vs tumbleweed, use `zypper update` rather than dist-upgrade, and retain the RomBIOS dependencies; bin86 and dev86. In terms of size, this saves ~700M: registry.gitlab.com/xen-project/xen/opensuse leap-15.6-x86_64 1.33GB registry.gitlab.com/xen-project/xen/suse opensuse-leap 2.05GB Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- .../build/opensuse/leap-15.6-x86_64.dockerfile | 79 ++++++++++++++++++++++ automation/build/suse/opensuse-leap.dockerfile | 75 -------------------- automation/gitlab-ci/build.yaml | 16 ++--- automation/scripts/containerize | 2 +- 4 files changed, 88 insertions(+), 84 deletions(-) diff --git a/automation/build/opensuse/leap-15.6-x86_64.dockerfile b/automation/build/opensuse/leap-15.6-x86_64.dockerfile new file mode 100644 index 0000000000..ea70dffe2a --- /dev/null +++ b/automation/build/opensuse/leap-15.6-x86_64.dockerfile @@ -0,0 +1,79 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 opensuse/leap:15.6 +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV XEN_TARGET_ARCH=x86_64 + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Sat, 13 Jul 2024 12:33:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758433.1167890 (Exim 4.92) (envelope-from ) id 1sSbvy-0000BG-Qw; Sat, 13 Jul 2024 12:33:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758433.1167890; Sat, 13 Jul 2024 12:33:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbvy-0000B8-OM; Sat, 13 Jul 2024 12:33:02 +0000 Received: by outflank-mailman (input) for mailman id 758433; Sat, 13 Jul 2024 12:33:01 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbvx-0000B2-LD for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:01 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbvx-0000sA-Ih for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSbvx-0003r2-Fg for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=b63sK/laX8qG6JLbXwdjkrgs42XnXIZBKAZhNHOb/G4=; b=htHwee2o5k6uiCTwr7Ec+5L4S3 ENM1ehy+yGfaqB5/Vgfya19Ym9fudx9QOIfu33RFWv0JuVGVEJ5aoTUl9QuKiq2aFqxDlf4VsOM9l kpCp3ZcJ5jhoqLfn1U/+Ob7WlQDe57htzsMZBh1EgYVvAE8mg8sfTSW/5aUjGoKzE7sE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Refresh OpenSUSE Tumbleweed container Message-Id: Date: Sat, 13 Jul 2024 12:33:01 +0000 commit a8bc31be0103475772e23fc47fedcd09d71fe7c5 Author: Andrew Cooper AuthorDate: Wed Jul 10 14:40:23 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 16:27:28 2024 +0100 CI: Refresh OpenSUSE Tumbleweed container Existing as suse:opensuse-tumbleweed is a historical quirk, and adjusted for consistency with all the other containers. Make it non-root, use heredocs for legibility, and use the zypper long names for the benefit of those wondering what was being referenced or duplicated. Trim the dependencies substantially. Testing docs isn't very interesting and saves a lot of space. Other savings come from removing a huge pile of optional QEMU dependencies (QEMU just needs to build the Xen parts to be useful here, not have a full GUI environment). Finally, there where some packages such as bc, libssh2-devel, libtasn1-devel and nasm that I'm not aware of any reason to have had, even historically. This shaves 1G off the size of the container: registry.gitlab.com/xen-project/xen/opensuse tumbleweed-x86_64 1.39GB registry.gitlab.com/xen-project/xen/suse opensuse-tumbleweed 2.35GB Furthermore, identify which components of the build use which dependencies, which will help managing them in the future. Thanks to Olaf Hering for dependency fixes that have been subsumed into this total overhaul. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- .../build/opensuse/tumbleweed-x86_64.dockerfile | 76 ++++++++++++++++++++++ .../build/suse/opensuse-tumbleweed.dockerfile | 74 --------------------- automation/gitlab-ci/build.yaml | 8 +-- automation/scripts/containerize | 2 +- 4 files changed, 81 insertions(+), 79 deletions(-) diff --git a/automation/build/opensuse/tumbleweed-x86_64.dockerfile b/automation/build/opensuse/tumbleweed-x86_64.dockerfile new file mode 100644 index 0000000000..61e840fc67 --- /dev/null +++ b/automation/build/opensuse/tumbleweed-x86_64.dockerfile @@ -0,0 +1,76 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 opensuse/tumbleweed +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV XEN_TARGET_ARCH=x86_64 + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Sat, 13 Jul 2024 12:33:22 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758435.1167897 (Exim 4.92) (envelope-from ) id 1sSbwI-0000FY-Tg; Sat, 13 Jul 2024 12:33:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758435.1167897; Sat, 13 Jul 2024 12:33:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbwI-0000FR-RF; Sat, 13 Jul 2024 12:33:22 +0000 Received: by outflank-mailman (input) for mailman id 758435; Sat, 13 Jul 2024 12:33:21 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbwH-0000F6-R4 for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:21 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbwH-0000sf-QG for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:21 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSbwH-0003u3-P8 for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:21 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=c7xvE39e/gUFTetfA5nlGlz4VZrjHTNMUCI4HTiAL78=; b=03TN1DX4N6gKsKQm/jz/7ndLmo XDZKhJeZ8/aG0srDCE6e4E5IogEN1hWw7LPeWs6Lwrg3wcUUY2Q298iamlyzsfhu8eMkkNKB8NWvK w83B1sU0PhrZVrFzcGljO9wRk4ox9Gqwas0lFCKfvR1Pec0/ySdvNGaund2/gMuK6HIw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Refresh Ubuntu Xenial container as 16.04-x86_64 Message-Id: Date: Sat, 13 Jul 2024 12:33:21 +0000 commit 1ab414b915d5b00f219db83301dc2e9543b2eb94 Author: Andrew Cooper AuthorDate: Thu Jul 11 16:08:24 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 18:58:45 2024 +0100 CI: Refresh Ubuntu Xenial container as 16.04-x86_64 Rework the container to be non-root, use heredocs for legibility, and use apt-get --no-install-recommends to keep the size down. Ubuntu Xenial has no ninja-build package, so can't build the QEMU referenced by Xen 4.16. Therefore, drop the dependencies too. This saves ~500M: registry.gitlab.com/xen-project/xen/ubuntu 16.04-x86_64 698MB registry.gitlab.com/xen-project/xen/ubuntu xenial 1.21GB Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/ubuntu/16.04-x86_64.dockerfile | 64 +++++++++++++++++++++++++ automation/build/ubuntu/xenial.dockerfile | 46 ------------------ automation/gitlab-ci/build.yaml | 16 +++---- automation/scripts/containerize | 2 +- 4 files changed, 73 insertions(+), 55 deletions(-) diff --git a/automation/build/ubuntu/16.04-x86_64.dockerfile b/automation/build/ubuntu/16.04-x86_64.dockerfile new file mode 100644 index 0000000000..d8617bfade --- /dev/null +++ b/automation/build/ubuntu/16.04-x86_64.dockerfile @@ -0,0 +1,64 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 ubuntu:16.04 +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Sat, 13 Jul 2024 12:33:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758436.1167901 (Exim 4.92) (envelope-from ) id 1sSbwT-0000It-Vi; Sat, 13 Jul 2024 12:33:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758436.1167901; Sat, 13 Jul 2024 12:33:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbwT-0000Il-Sn; Sat, 13 Jul 2024 12:33:33 +0000 Received: by outflank-mailman (input) for mailman id 758436; Sat, 13 Jul 2024 12:33:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbwR-0000Ic-VA for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:31 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbwR-0000ss-UI for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:31 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSbwR-0003uv-SZ for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:31 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=/YdmkOLMaD9Vd4GN6lVEZcifednFf16XtskN+0suSwM=; b=gcaLyaQ3464NvBzgiq3vXoPCpr ox9oQvHbQitOijTP7rU3PNUtZFrap1S4PikgQoY/LEOOS4WHcFstb4RrFj3eo270yZ7CMK/u5Prk5 s4FOuQc7C453vSnd2JJT5AbN6ZHRO1BelvSKsrroWuOQkwDZR4GSF13myRBLPOnV+8r4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Refresh Ubuntu Bionic container as 18.04-x86_64 Message-Id: Date: Sat, 13 Jul 2024 12:33:31 +0000 commit 51e5081c6eac6176efdb72df4a878722bf56d834 Author: Andrew Cooper AuthorDate: Thu Jul 11 16:08:39 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 18:58:45 2024 +0100 CI: Refresh Ubuntu Bionic container as 18.04-x86_64 As with 16.04 (Xenial), except that ninja-build package is available so QEMU can be built. This halves the size of the container: registry.gitlab.com/xen-project/xen/ubuntu 18.04-x86_64 857MB registry.gitlab.com/xen-project/xen/ubuntu bionic 1.44GB Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/ubuntu/18.04-x86_64.dockerfile | 71 +++++++++++++++++++++++++ automation/build/ubuntu/bionic.dockerfile | 48 ----------------- automation/gitlab-ci/build.yaml | 16 +++--- automation/scripts/containerize | 2 +- 4 files changed, 80 insertions(+), 57 deletions(-) diff --git a/automation/build/ubuntu/18.04-x86_64.dockerfile b/automation/build/ubuntu/18.04-x86_64.dockerfile new file mode 100644 index 0000000000..336697ad95 --- /dev/null +++ b/automation/build/ubuntu/18.04-x86_64.dockerfile @@ -0,0 +1,71 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 ubuntu:18.04 +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Sat, 13 Jul 2024 12:33:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758437.1167906 (Exim 4.92) (envelope-from ) id 1sSbwe-0000Ld-2H; Sat, 13 Jul 2024 12:33:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758437.1167906; Sat, 13 Jul 2024 12:33:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbwd-0000LV-Vx; Sat, 13 Jul 2024 12:33:43 +0000 Received: by outflank-mailman (input) for mailman id 758437; Sat, 13 Jul 2024 12:33:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbwc-0000LP-20 for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbwc-0000tD-1A for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSbwc-0003vZ-0F for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=W6FeXzpbV597pANL5m3KWNSAzvC2SMVjsEc3fYLba5E=; b=pc4gIS55OqqXfYT79QHYekDGPS YLVdAzpy9mQ1SaZa7mkMd6CpfCjNKb8pSvjDzVIj1KORoSYa8pBl7p/LmGDE6/gZgNh4MAdTpzBze 6QfvB5DcudsYCbZoCmoIUrKllojoy0LPxMYqad9NMXBMWT0lbKPaH1EJZN48luvKSEWE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Refresh Ubuntu Focal container as 20.04-x86_64 Message-Id: Date: Sat, 13 Jul 2024 12:33:42 +0000 commit 6db222eb1fcee720c75d6230fda90290daf6079c Author: Andrew Cooper AuthorDate: Thu Jul 11 16:09:22 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 18:58:45 2024 +0100 CI: Refresh Ubuntu Focal container as 20.04-x86_64 As with 16.04 (Xenial), with python3-setuptools included. Having this package only in some containers was intentional; see commit bbc72a7877d8 ("automation: Add python3's setuptools to some containers") for the rational. This saves ~500M: registry.gitlab.com/xen-project/xen/ubuntu 20.04-x86_64 1.06GB registry.gitlab.com/xen-project/xen/ubuntu focal 1.57GB Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/ubuntu/20.04-x86_64.dockerfile | 72 +++++++++++++++++++++++++ automation/build/ubuntu/focal.dockerfile | 49 ----------------- automation/gitlab-ci/build.yaml | 16 +++--- automation/scripts/containerize | 2 +- 4 files changed, 81 insertions(+), 58 deletions(-) diff --git a/automation/build/ubuntu/20.04-x86_64.dockerfile b/automation/build/ubuntu/20.04-x86_64.dockerfile new file mode 100644 index 0000000000..39fb297519 --- /dev/null +++ b/automation/build/ubuntu/20.04-x86_64.dockerfile @@ -0,0 +1,72 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 ubuntu:20.04 +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Sat, 13 Jul 2024 12:33:54 +0000 Received: from list by lists.xenproject.org with outflank-mailman.758438.1167910 (Exim 4.92) (envelope-from ) id 1sSbwo-0000P5-41; Sat, 13 Jul 2024 12:33:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 758438.1167910; Sat, 13 Jul 2024 12:33:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbwo-0000Ow-18; Sat, 13 Jul 2024 12:33:54 +0000 Received: by outflank-mailman (input) for mailman id 758438; Sat, 13 Jul 2024 12:33:52 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbwm-0000Nn-51 for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:52 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sSbwm-0000tO-4F for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:52 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sSbwm-0003w2-3Q for xen-changelog@lists.xenproject.org; Sat, 13 Jul 2024 12:33:52 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=7mBbIVh7mwXwKXbal4GwD5x6XtazGrjHsYf0F/HNerk=; b=RJKAeXEWO71mh7j8zlHtKIuHUq f+ZBF3Zsfbn1SRMcpDFuBTdJVCKJ38vfdetajw7Rtx+0t2CmeI9KTJNhmgA3XYM/RQL/zBhMRK1Df GGiPV3u+M28bAllmxbQ8+b31YFfIqd5MJKh0OMOT4QEEK8JszfLlUKacFgh+L2OXTOnw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CI: Add Ubuntu 22.04 (Jammy) and 24.04 (Noble) testing Message-Id: Date: Sat, 13 Jul 2024 12:33:52 +0000 commit 1ddc8c1bad93aa6cbfe616dd72333460c47f96c9 Author: Andrew Cooper AuthorDate: Thu Jul 11 16:09:58 2024 +0100 Commit: Andrew Cooper CommitDate: Fri Jul 12 18:58:45 2024 +0100 CI: Add Ubuntu 22.04 (Jammy) and 24.04 (Noble) testing The containers are exactly as per 20.04 (Focal). However, this now brings us to 5 releases * 4 build jobs worth of Ubuntu testing, which is overkill. The oldest and newest toolchains are the most likely to find problems with new code, so reduce the middle 3 releases (18/20/22) to just a single smoke test each. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD Release-Acked-By: Oleksii Kurochko --- automation/build/ubuntu/22.04-x86_64.dockerfile | 72 +++++++++++++++++++++++++ automation/build/ubuntu/24.04-x86_64.dockerfile | 72 +++++++++++++++++++++++++ automation/gitlab-ci/build.yaml | 39 ++++++-------- automation/scripts/containerize | 2 + 4 files changed, 163 insertions(+), 22 deletions(-) diff --git a/automation/build/ubuntu/22.04-x86_64.dockerfile b/automation/build/ubuntu/22.04-x86_64.dockerfile new file mode 100644 index 0000000000..230903f624 --- /dev/null +++ b/automation/build/ubuntu/22.04-x86_64.dockerfile @@ -0,0 +1,72 @@ +# syntax=docker/dockerfile:1 +FROM --platform=linux/amd64 ubuntu:22.04 +LABEL maintainer.name="The Xen Project" +LABEL maintainer.email="xen-devel@lists.xenproject.org" + +ENV DEBIAN_FRONTEND=noninteractive + +RUN < Envelope-to: archives@lists.xen.org Delivery-date: Tue, 16 Jul 2024 12:22:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.759597.1169258 (Exim 4.92) (envelope-from ) id 1sThC0-0004Rg-Bn; Tue, 16 Jul 2024 12:22:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 759597.1169258; Tue, 16 Jul 2024 12:22:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sThC0-0004RY-9E; Tue, 16 Jul 2024 12:22:04 +0000 Received: by outflank-mailman (input) for mailman id 759597; Tue, 16 Jul 2024 12:22:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sThBz-0004RS-Dq for xen-changelog@lists.xenproject.org; Tue, 16 Jul 2024 12:22:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sThBz-0005Fx-BW for xen-changelog@lists.xenproject.org; Tue, 16 Jul 2024 12:22:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sThBz-00020F-A0 for xen-changelog@lists.xenproject.org; Tue, 16 Jul 2024 12:22:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=+oaviCh/ejGqDvOunlsl3p/tJWGLDLiS+RhY6KsflNI=; b=c8Rqv6AJp0ylfvxyxgDSYAXr+t XlmKw97Pj0nQgyHpSsQ0JnqCY3QgyGrmqxxPOFAzCHGnz1srP/y3QQflVa9CuIaV5zClw4HM073+Z EhT5ryIqZ6c09YnVE/bVlH+boB4/BCRhkLmBl4FUSwbD4oraKQ2V1NeBMK48PmPMcxFU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/IRQ: avoid double unlock in map_domain_pirq() Message-Id: Date: Tue, 16 Jul 2024 12:22:03 +0000 commit 57338346f29cea7b183403561bdc5f407163b846 Author: Jan Beulich AuthorDate: Tue Jul 16 14:09:14 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 16 14:09:14 2024 +0200 x86/IRQ: avoid double unlock in map_domain_pirq() Forever since its introduction the main loop in the function dealing with multi-vector MSI had error exit points ("break") with different properties: In one case no IRQ descriptor lock is being held. Nevertheless the subsequent error cleanup path assumed such a lock would uniformly need releasing. Identify the case by setting "desc" to NULL, thus allowing the unlock to be skipped as necessary. This is CVE-2024-31143 / XSA-458. Coverity ID: 1605298 Fixes: d1b6d0a02489 ("x86: enable multi-vector MSI") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné --- xen/arch/x86/irq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 47477d8817..0001e93ba8 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2274,6 +2274,7 @@ int map_domain_pirq( set_domain_irq_pirq(d, irq, info); spin_unlock_irqrestore(&desc->lock, flags); + desc = NULL; info = NULL; irq = create_irq(NUMA_NO_NODE, true); @@ -2309,7 +2310,9 @@ int map_domain_pirq( if ( ret ) { - spin_unlock_irqrestore(&desc->lock, flags); + if ( desc ) + spin_unlock_irqrestore(&desc->lock, flags); + pci_disable_msi(msi_desc); if ( nr ) { -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 16 12:22:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 16 Jul 2024 12:22:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.759598.1169261 (Exim 4.92) (envelope-from ) id 1sThCB-0004Tg-DI; Tue, 16 Jul 2024 12:22:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 759598.1169261; Tue, 16 Jul 2024 12:22:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sThCB-0004TX-Aj; Tue, 16 Jul 2024 12:22:15 +0000 Received: by outflank-mailman (input) for mailman id 759598; Tue, 16 Jul 2024 12:22:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sThC9-0004T6-Ko for xen-changelog@lists.xenproject.org; Tue, 16 Jul 2024 12:22:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sThC9-0005G4-Jx for xen-changelog@lists.xenproject.org; Tue, 16 Jul 2024 12:22:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sThC9-00021G-Iy for xen-changelog@lists.xenproject.org; Tue, 16 Jul 2024 12:22:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=rt5Gjdf+pYW5WZEMPIQGjvW8gEkJ2d4WnVMDl1Mf9I8=; b=Pk1cYr+3Xdg7TpdkvTm425Jq3n CvaK5/UqB5zMn78XupmcbvSqRVrhjbopddMvlyWjbzsgOy53aBJBrPHpYHbwNbn0VS2dIhuePynjV tO+dYppg/8JWALYmqmM+BcYsfKg79abv2v2vSg8tA4uNsXtaPGVaRIvhuetlmBL9CxhY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] x86/IRQ: avoid double unlock in map_domain_pirq() Message-Id: Date: Tue, 16 Jul 2024 12:22:13 +0000 commit d46a1ce3175dc45e97a8c9b89b0d0ff46145ae64 Author: Jan Beulich AuthorDate: Tue Jul 16 14:14:43 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 16 14:14:43 2024 +0200 x86/IRQ: avoid double unlock in map_domain_pirq() Forever since its introduction the main loop in the function dealing with multi-vector MSI had error exit points ("break") with different properties: In one case no IRQ descriptor lock is being held. Nevertheless the subsequent error cleanup path assumed such a lock would uniformly need releasing. Identify the case by setting "desc" to NULL, thus allowing the unlock to be skipped as necessary. This is CVE-2024-31143 / XSA-458. Coverity ID: 1605298 Fixes: d1b6d0a02489 ("x86: enable multi-vector MSI") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: 57338346f29cea7b183403561bdc5f407163b846 master date: 2024-07-16 14:09:14 +0200 --- xen/arch/x86/irq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 00be3b88e8..5dae8bd1b9 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2287,6 +2287,7 @@ int map_domain_pirq( set_domain_irq_pirq(d, irq, info); spin_unlock_irqrestore(&desc->lock, flags); + desc = NULL; info = NULL; irq = create_irq(NUMA_NO_NODE, true); @@ -2322,7 +2323,9 @@ int map_domain_pirq( if ( ret ) { - spin_unlock_irqrestore(&desc->lock, flags); + if ( desc ) + spin_unlock_irqrestore(&desc->lock, flags); + pci_disable_msi(msi_desc); if ( nr ) { -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Tue Jul 16 12:22:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 16 Jul 2024 12:22:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.759599.1169266 (Exim 4.92) (envelope-from ) id 1sThCL-0004YD-Ey; Tue, 16 Jul 2024 12:22:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 759599.1169266; Tue, 16 Jul 2024 12:22:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sThCL-0004Y5-C6; Tue, 16 Jul 2024 12:22:25 +0000 Received: by outflank-mailman (input) for mailman id 759599; Tue, 16 Jul 2024 12:22:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sThCJ-0004Xf-Uu for xen-changelog@lists.xenproject.org; Tue, 16 Jul 2024 12:22:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sThCJ-0005Ge-S4 for xen-changelog@lists.xenproject.org; Tue, 16 Jul 2024 12:22:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sThCJ-000254-R6 for xen-changelog@lists.xenproject.org; Tue, 16 Jul 2024 12:22:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=hTWfKl3JIwNVHQL2VWeg64wM+lB+rx089sHPI8lnI+k=; b=c8G2Xn7T3koSrJtbzHaYZ62yuz 6BCFTWXlHQ6V+KM46I0AfxqOKnW6ckm7Uy0QIt0DvDt0zyfG7NPTbqqoQdFIcHKURa2jl/Qaenzmk LExe1T+Mr2z+rywFef2Or1TIjmXf8kNWIKKbQs2pN2jqvRnDWm2JsqyhHiI47lhkSltg=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] x86/IRQ: avoid double unlock in map_domain_pirq() Message-Id: Date: Tue, 16 Jul 2024 12:22:23 +0000 commit 8f653989ecdc6e152ee39e974be82a659453f4f8 Author: Jan Beulich AuthorDate: Tue Jul 16 14:15:33 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 16 14:15:33 2024 +0200 x86/IRQ: avoid double unlock in map_domain_pirq() Forever since its introduction the main loop in the function dealing with multi-vector MSI had error exit points ("break") with different properties: In one case no IRQ descriptor lock is being held. Nevertheless the subsequent error cleanup path assumed such a lock would uniformly need releasing. Identify the case by setting "desc" to NULL, thus allowing the unlock to be skipped as necessary. This is CVE-2024-31143 / XSA-458. Coverity ID: 1605298 Fixes: d1b6d0a02489 ("x86: enable multi-vector MSI") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: 57338346f29cea7b183403561bdc5f407163b846 master date: 2024-07-16 14:09:14 +0200 --- xen/arch/x86/irq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 827ed556d3..98654ba784 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2287,6 +2287,7 @@ int map_domain_pirq( set_domain_irq_pirq(d, irq, info); spin_unlock_irqrestore(&desc->lock, flags); + desc = NULL; info = NULL; irq = create_irq(NUMA_NO_NODE, true); @@ -2322,7 +2323,9 @@ int map_domain_pirq( if ( ret ) { - spin_unlock_irqrestore(&desc->lock, flags); + if ( desc ) + spin_unlock_irqrestore(&desc->lock, flags); + pci_disable_msi(msi_desc); if ( nr ) { -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Tue Jul 16 12:22:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 16 Jul 2024 12:22:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.759600.1169270 (Exim 4.92) (envelope-from ) id 1sThCV-0004ao-GB; Tue, 16 Jul 2024 12:22:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 759600.1169270; Tue, 16 Jul 2024 12:22:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sThCV-0004ag-DZ; Tue, 16 Jul 2024 12:22:35 +0000 Received: by outflank-mailman (input) for mailman id 759600; Tue, 16 Jul 2024 12:22:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sThCU-0004aX-5C for xen-changelog@lists.xenproject.org; Tue, 16 Jul 2024 12:22:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sThCU-0005Gn-3b for xen-changelog@lists.xenproject.org; Tue, 16 Jul 2024 12:22:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sThCU-00026z-2o for xen-changelog@lists.xenproject.org; Tue, 16 Jul 2024 12:22:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=X4nEKK2+1yG7o/I+SSAmImWH9o1psWeI8XL+lVciUlA=; b=wnJOGi7D5kxkxWrB3WCZYZBx+1 Kq3JPBWoqlo9CE6dOHWdOwDcaujQVEWBajRFj3JhQUMT6DGfBntuwhBNYyqjB9+p1B0nqDrVFSlir 8lqyJ4iHEyyaZ26AVHsdZSuUvE7l5V0HUhkuGPmcP68w1+v5BZuo3UZ4tIoOwUnQOmCc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.16] x86/IRQ: avoid double unlock in map_domain_pirq() Message-Id: Date: Tue, 16 Jul 2024 12:22:34 +0000 commit 9fe713202e4ef4ff0264d6ecfaea26bc4e50705b Author: Jan Beulich AuthorDate: Tue Jul 16 14:16:27 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 16 14:16:27 2024 +0200 x86/IRQ: avoid double unlock in map_domain_pirq() Forever since its introduction the main loop in the function dealing with multi-vector MSI had error exit points ("break") with different properties: In one case no IRQ descriptor lock is being held. Nevertheless the subsequent error cleanup path assumed such a lock would uniformly need releasing. Identify the case by setting "desc" to NULL, thus allowing the unlock to be skipped as necessary. This is CVE-2024-31143 / XSA-458. Coverity ID: 1605298 Fixes: d1b6d0a02489 ("x86: enable multi-vector MSI") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: 57338346f29cea7b183403561bdc5f407163b846 master date: 2024-07-16 14:09:14 +0200 --- xen/arch/x86/irq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 80ce9d624f..efed4fe09f 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2215,6 +2215,7 @@ int map_domain_pirq( set_domain_irq_pirq(d, irq, info); spin_unlock_irqrestore(&desc->lock, flags); + desc = NULL; info = NULL; irq = create_irq(NUMA_NO_NODE, true); @@ -2250,7 +2251,9 @@ int map_domain_pirq( if ( ret ) { - spin_unlock_irqrestore(&desc->lock, flags); + if ( desc ) + spin_unlock_irqrestore(&desc->lock, flags); + pci_disable_msi(msi_desc); if ( nr ) { -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.16 From xen-changelog-bounces@lists.xenproject.org Wed Jul 17 07:22:10 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 17 Jul 2024 07:22:10 +0000 Received: from list by lists.xenproject.org with outflank-mailman.759872.1169561 (Exim 4.92) (envelope-from ) id 1sTyzC-0003D4-IS; Wed, 17 Jul 2024 07:22:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 759872.1169561; Wed, 17 Jul 2024 07:22:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTyzC-0003Cw-FV; Wed, 17 Jul 2024 07:22:02 +0000 Received: by outflank-mailman (input) for mailman id 759872; Wed, 17 Jul 2024 07:22:01 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTyzB-0003Cq-RA for xen-changelog@lists.xenproject.org; Wed, 17 Jul 2024 07:22:01 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTyzB-0001nZ-QH for xen-changelog@lists.xenproject.org; Wed, 17 Jul 2024 07:22:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sTyzB-0007uQ-P8 for xen-changelog@lists.xenproject.org; Wed, 17 Jul 2024 07:22:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=LwX/xsCetICu7Q31BiE5kADr7sP0woeNWcDUM3g4njk=; b=BR89ZwoM3fM0/+/9K4Fw295Rjo u56EOzZbr1DLK/F4tVc3ign2a0vibqbhhQ9Spbd9uz4FCMzgYhpv9CUohaTdx3h9qLif4nKS2io9p L53sayKp5bGr2pyFeYnFuubU+8BYjKTO+Ctz27vDJwIUvoPdtsZYSFsIUQxJz5J208rU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] x86/IRQ: avoid double unlock in map_domain_pirq() Message-Id: Date: Wed, 17 Jul 2024 07:22:01 +0000 commit 8f653989ecdc6e152ee39e974be82a659453f4f8 Author: Jan Beulich AuthorDate: Tue Jul 16 14:15:33 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 16 14:15:33 2024 +0200 x86/IRQ: avoid double unlock in map_domain_pirq() Forever since its introduction the main loop in the function dealing with multi-vector MSI had error exit points ("break") with different properties: In one case no IRQ descriptor lock is being held. Nevertheless the subsequent error cleanup path assumed such a lock would uniformly need releasing. Identify the case by setting "desc" to NULL, thus allowing the unlock to be skipped as necessary. This is CVE-2024-31143 / XSA-458. Coverity ID: 1605298 Fixes: d1b6d0a02489 ("x86: enable multi-vector MSI") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: 57338346f29cea7b183403561bdc5f407163b846 master date: 2024-07-16 14:09:14 +0200 --- xen/arch/x86/irq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 827ed556d3..98654ba784 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2287,6 +2287,7 @@ int map_domain_pirq( set_domain_irq_pirq(d, irq, info); spin_unlock_irqrestore(&desc->lock, flags); + desc = NULL; info = NULL; irq = create_irq(NUMA_NO_NODE, true); @@ -2322,7 +2323,9 @@ int map_domain_pirq( if ( ret ) { - spin_unlock_irqrestore(&desc->lock, flags); + if ( desc ) + spin_unlock_irqrestore(&desc->lock, flags); + pci_disable_msi(msi_desc); if ( nr ) { -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Wed Jul 17 08:00:08 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 17 Jul 2024 08:00:08 +0000 Received: from list by lists.xenproject.org with outflank-mailman.759886.1169574 (Exim 4.92) (envelope-from ) id 1sTzZz-0007jL-Gw; Wed, 17 Jul 2024 08:00:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 759886.1169574; Wed, 17 Jul 2024 08:00:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTzZz-0007iz-E8; Wed, 17 Jul 2024 08:00:03 +0000 Received: by outflank-mailman (input) for mailman id 759886; Wed, 17 Jul 2024 08:00:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTzZy-0007O8-4r for xen-changelog@lists.xenproject.org; Wed, 17 Jul 2024 08:00:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sTzZy-0002TK-2f for xen-changelog@lists.xenproject.org; Wed, 17 Jul 2024 08:00:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sTzZy-00030a-0u for xen-changelog@lists.xenproject.org; Wed, 17 Jul 2024 08:00:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=O9IFfW2v9TmVUeZoMDL5H9ty4CHXpMiPCoQuHK20TTA=; b=QHov0vnMs+gL83AH5EHxHKZs3d Zc//+ja1sfrVbFJZEccPTcJxv7VfqxHbA92P/KVtT5LPaOjcy3kvSx39T7UD7og0cqqB8KgSS+xa3 upa2jJMancxie6X9f8v/aaQpYWjFsa6m663cR+8l+0b5FfdbgQXc91ZQYtQTK9JL8SUM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] x86/IRQ: avoid double unlock in map_domain_pirq() Message-Id: Date: Wed, 17 Jul 2024 08:00:02 +0000 commit d46a1ce3175dc45e97a8c9b89b0d0ff46145ae64 Author: Jan Beulich AuthorDate: Tue Jul 16 14:14:43 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 16 14:14:43 2024 +0200 x86/IRQ: avoid double unlock in map_domain_pirq() Forever since its introduction the main loop in the function dealing with multi-vector MSI had error exit points ("break") with different properties: In one case no IRQ descriptor lock is being held. Nevertheless the subsequent error cleanup path assumed such a lock would uniformly need releasing. Identify the case by setting "desc" to NULL, thus allowing the unlock to be skipped as necessary. This is CVE-2024-31143 / XSA-458. Coverity ID: 1605298 Fixes: d1b6d0a02489 ("x86: enable multi-vector MSI") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: 57338346f29cea7b183403561bdc5f407163b846 master date: 2024-07-16 14:09:14 +0200 --- xen/arch/x86/irq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 00be3b88e8..5dae8bd1b9 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2287,6 +2287,7 @@ int map_domain_pirq( set_domain_irq_pirq(d, irq, info); spin_unlock_irqrestore(&desc->lock, flags); + desc = NULL; info = NULL; irq = create_irq(NUMA_NO_NODE, true); @@ -2322,7 +2323,9 @@ int map_domain_pirq( if ( ret ) { - spin_unlock_irqrestore(&desc->lock, flags); + if ( desc ) + spin_unlock_irqrestore(&desc->lock, flags); + pci_disable_msi(msi_desc); if ( nr ) { -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Wed Jul 17 17:11:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 17 Jul 2024 17:11:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.760115.1169834 (Exim 4.92) (envelope-from ) id 1sU8BD-0001jG-HX; Wed, 17 Jul 2024 17:11:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 760115.1169834; Wed, 17 Jul 2024 17:11:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sU8BD-0001j8-Ev; Wed, 17 Jul 2024 17:11:03 +0000 Received: by outflank-mailman (input) for mailman id 760115; Wed, 17 Jul 2024 17:11:01 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sU8BB-0001j2-Ln for xen-changelog@lists.xenproject.org; Wed, 17 Jul 2024 17:11:01 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sU8BB-0006Bt-JA for xen-changelog@lists.xenproject.org; Wed, 17 Jul 2024 17:11:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sU8BB-0004t6-Ht for xen-changelog@lists.xenproject.org; Wed, 17 Jul 2024 17:11:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=jr+Ich/BbXfxVYtQWmFzzkDUNhjkib6193sAsiblgA8=; b=6IjT7imE800FesxI5efZePHwJi 31JSMpKr4/yJJ5XsjoMyBBJwuYh5+i+foyBe5vaR0QFy8o0PBfumC9WLcaqCnyLD94i9a884Pyij3 xLQEhz6XqEr8U+xMT85tU5Z2jF2PiHI5rWgTCDxMnsPxnSgwjXj8mle2/s/nMJYe0lLQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/IRQ: avoid double unlock in map_domain_pirq() Message-Id: Date: Wed, 17 Jul 2024 17:11:01 +0000 commit 57338346f29cea7b183403561bdc5f407163b846 Author: Jan Beulich AuthorDate: Tue Jul 16 14:09:14 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 16 14:09:14 2024 +0200 x86/IRQ: avoid double unlock in map_domain_pirq() Forever since its introduction the main loop in the function dealing with multi-vector MSI had error exit points ("break") with different properties: In one case no IRQ descriptor lock is being held. Nevertheless the subsequent error cleanup path assumed such a lock would uniformly need releasing. Identify the case by setting "desc" to NULL, thus allowing the unlock to be skipped as necessary. This is CVE-2024-31143 / XSA-458. Coverity ID: 1605298 Fixes: d1b6d0a02489 ("x86: enable multi-vector MSI") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné --- xen/arch/x86/irq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 47477d8817..0001e93ba8 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2274,6 +2274,7 @@ int map_domain_pirq( set_domain_irq_pirq(d, irq, info); spin_unlock_irqrestore(&desc->lock, flags); + desc = NULL; info = NULL; irq = create_irq(NUMA_NO_NODE, true); @@ -2309,7 +2310,9 @@ int map_domain_pirq( if ( ret ) { - spin_unlock_irqrestore(&desc->lock, flags); + if ( desc ) + spin_unlock_irqrestore(&desc->lock, flags); + pci_disable_msi(msi_desc); if ( nr ) { -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 18 14:00:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 18 Jul 2024 14:00:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.760540.1170402 (Exim 4.92) (envelope-from ) id 1sURfw-0002GO-2w; Thu, 18 Jul 2024 14:00:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 760540.1170402; Thu, 18 Jul 2024 14:00:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sURfv-0002G2-Vo; Thu, 18 Jul 2024 14:00:03 +0000 Received: by outflank-mailman (input) for mailman id 760540; Thu, 18 Jul 2024 14:00:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sURfu-000203-IB for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:00:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sURfu-0002Jm-FP for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:00:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sURfu-0006yz-DY for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:00:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=3Ie/C1Y2PrkPp5CgpR6/bWiQKv3CkQPUqr1EupZygwc=; b=osL8DX9DPPQQma1ZYgTLVMCWUw FuSJQTqqryAO6mstv4gDNTG3DIpSwHXy2r7IFWC0KHvrF2O0AYOeXzlVPpafg00Z93ojbB3fl79Au LmnmXvbNURjlampl5647Ku8BcJPq/KuDhEOu8O6+xRh+03vtlriijkirq1svwX5T6WlE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [qemu-xen-traditional stable-4.19] qemu-trad: remove Xen path dependencies Message-Id: Date: Thu, 18 Jul 2024 14:00:02 +0000 *** New tip has no discernable common ancestor with previous history *** commit 3d273dd05e51e5a1ffba3d98c7437ee84e8f8764 Author: Juergen Gross AuthorDate: Wed Jul 15 10:01:40 2020 +0100 Commit: Ian Jackson CommitDate: Tue Aug 18 15:54:39 2020 +0100 qemu-trad: remove Xen path dependencies xen-hhoks.mak contains hard wired paths for the used libraries of qemu-trad. Replace those by the make variables from Xen's Rules.mk, which is already included. This in turn removes the need to add the runtime link paths of the libraries the directly used libraries depend on. Signed-off-by: Juergen Gross Reviewed-by: Ian Jackson -- generated by git-patchbot for /home/xen/git/qemu-xen-traditional.git#stable-4.19 From xen-changelog-bounces@lists.xenproject.org Thu Jul 18 14:33:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 18 Jul 2024 14:33:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.760554.1170411 (Exim 4.92) (envelope-from ) id 1sUSC2-0006h4-CC; Thu, 18 Jul 2024 14:33:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 760554.1170411; Thu, 18 Jul 2024 14:33:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSC2-0006gw-9Q; Thu, 18 Jul 2024 14:33:14 +0000 Received: by outflank-mailman (input) for mailman id 760554; Thu, 18 Jul 2024 14:33:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSC1-0006gq-EO for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:33:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSC1-0002zP-Cl for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:33:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUSC1-00014A-Bz for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:33:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=+l64vSbYom1Gm/UOWYsnMd4pCaY0Pqq3uun6l+RhXVY=; b=nzzM05j745UW+lszvhndQL2TIq ZXRcaBj3TD590jCavZ+6ITLKFswM8A6UeEszS66N2pQxlez/tlacUgkksb+SzodmhKXhlm3F6hCj+ d8IOQTNpHRxpix5oxshlj9leN5zoJIzJT+RFBYXt8vvlbZVd28a4Su3khhP7TEU8JiZc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.19] Turn off debug by default Message-Id: Date: Thu, 18 Jul 2024 14:33:13 +0000 commit 7ae9503645077ffeb727500fa375c384b3467fb0 Author: Julien Grall AuthorDate: Thu Jul 18 15:28:17 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 15:28:17 2024 +0100 Turn off debug by default Signed-off-by: Julien Grall --- tools/Rules.mk | 2 +- xen/Kconfig.debug | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/Rules.mk b/tools/Rules.mk index 18cf83f5be..cb3fd82c1f 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -25,7 +25,7 @@ CFLAGS_xeninclude = -I$(XEN_INCLUDE) XENSTORE_XENSTORED ?= y # A debug build of tools? -debug ?= y +debug ?= n debug_symbols ?= $(debug) XEN_GOCODE_URL = golang.xenproject.org diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug index 07ff7eb7ba..78b5a7c603 100644 --- a/xen/Kconfig.debug +++ b/xen/Kconfig.debug @@ -3,7 +3,7 @@ menu "Debugging Options" config DEBUG bool "Developer Checks" - default y + default n help If you say Y here this will enable developer checks such as asserts and extra printks. This option is intended for development purposes -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.19 From xen-changelog-bounces@lists.xenproject.org Thu Jul 18 14:33:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 18 Jul 2024 14:33:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.760553.1170407 (Exim 4.92) (envelope-from ) id 1sUSBs-0006fP-AK; Thu, 18 Jul 2024 14:33:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 760553.1170407; Thu, 18 Jul 2024 14:33:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSBs-0006fI-7s; Thu, 18 Jul 2024 14:33:04 +0000 Received: by outflank-mailman (input) for mailman id 760553; Thu, 18 Jul 2024 14:33:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSBr-0006fC-Hg for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:33:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSBr-0002zH-9n for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:33:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUSBr-00012Y-8j for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:33:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=uI3nHEP29qClinzD6RwvUz+xsg0yK4uShsy/Vkrotx0=; b=4zirnv1yvM4aOXrPh7eg8ij0aC EgO8NQh0AuL9ggzAVqH2IeFGPap+AjhauJa1uA8P831SbYEC6kwHj2usPdt26MDWG0tsA05HQluTi huwU9xm6sHsxn8xkOX6pa3KA0TJYWKLfUevjNxcapj8O1KxuZsxBVg/63KbDNl/BW9Rs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.19] Config.mk: switch to named tags (for stable branch) Message-Id: Date: Thu, 18 Jul 2024 14:33:03 +0000 commit 48acf0fd3e50d5cc5b70db3bf49fbb0f2c6518af Author: Julien Grall AuthorDate: Thu Jul 18 15:26:32 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 15:26:32 2024 +0100 Config.mk: switch to named tags (for stable branch) Signed-off-by: Julien Grall --- Config.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Config.mk b/Config.mk index e7aa8ceaaf..8f759e95b3 100644 --- a/Config.mk +++ b/Config.mk @@ -221,10 +221,10 @@ OVMF_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/ovmf.git OVMF_UPSTREAM_REVISION ?= ba91d0292e593df8528b66f99c1b0b14fadc8e16 QEMU_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/qemu-xen.git -QEMU_UPSTREAM_REVISION ?= 0df9387c8983e1b1e72d8c574356f572342c03e6 +QEMU_UPSTREAM_REVISION ?= qemu-xen-4.19.0-rc4 MINIOS_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/mini-os.git -MINIOS_UPSTREAM_REVISION ?= 8b038c7411ae7e823eaf6d15d5efbe037a07197a +MINIOS_UPSTREAM_REVISION ?= xen-4.19.0-rc4 SEABIOS_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/seabios.git SEABIOS_UPSTREAM_REVISION ?= rel-1.16.3 @@ -233,7 +233,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e QEMU_TRADITIONAL_URL ?= https://xenbits.xen.org/git-http/qemu-xen-traditional.git -QEMU_TRADITIONAL_REVISION ?= 3d273dd05e51e5a1ffba3d98c7437ee84e8f8764 +QEMU_TRADITIONAL_REVISION ?= xen-4.19.0-rc4 # Wed Jul 15 10:01:40 2020 +0100 # qemu-trad: remove Xen path dependencies -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.19 From xen-changelog-bounces@lists.xenproject.org Thu Jul 18 14:44:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 18 Jul 2024 14:44:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.760557.1170415 (Exim 4.92) (envelope-from ) id 1sUSMX-0007y2-4Z; Thu, 18 Jul 2024 14:44:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 760557.1170415; Thu, 18 Jul 2024 14:44:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSMX-0007xv-27; Thu, 18 Jul 2024 14:44:05 +0000 Received: by outflank-mailman (input) for mailman id 760557; Thu, 18 Jul 2024 14:44:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSMW-0007xp-1k for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:44:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSMV-0003BO-Rl for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:44:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUSMV-0001vG-Qj for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:44:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=djMzp6RNKxL292A2MaWlXwuVMDfErtRwQbja4gH+AcE=; b=MXJdlyZ6STjvsWLW4cmUq7NhsH dauKOeiaQpLKMZ/1p+93rIwLzMjuFFRkVvUNtuaaF11ZCPOlxKMc2e7Tx9GwjoIoVnc6pW5O34FSK W/+iDo99EbkcnGDbW2dCmYoEaGYydGP5TLRkS5dnRTtPioNdVNfvXXR0g4U3d/C/UoWE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] Revert "Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.19 RC1)" Message-Id: Date: Thu, 18 Jul 2024 14:44:03 +0000 commit b181bb9fdbae9cdae96f979cfcc30c6195071417 Author: Julien Grall AuthorDate: Thu Jul 18 15:40:44 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 15:40:44 2024 +0100 Revert "Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.19 RC1)" The branch is unstable again. This reverts commit 7584e39986ef2cb4816892ffaefb26f4ad063468. --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index e7aa8ceaaf..1a3938b6c4 100644 --- a/Config.mk +++ b/Config.mk @@ -221,7 +221,7 @@ OVMF_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/ovmf.git OVMF_UPSTREAM_REVISION ?= ba91d0292e593df8528b66f99c1b0b14fadc8e16 QEMU_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/qemu-xen.git -QEMU_UPSTREAM_REVISION ?= 0df9387c8983e1b1e72d8c574356f572342c03e6 +QEMU_UPSTREAM_REVISION ?= master MINIOS_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/mini-os.git MINIOS_UPSTREAM_REVISION ?= 8b038c7411ae7e823eaf6d15d5efbe037a07197a -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 18 14:44:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 18 Jul 2024 14:44:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.760558.1170420 (Exim 4.92) (envelope-from ) id 1sUSMh-0007zr-6C; Thu, 18 Jul 2024 14:44:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 760558.1170420; Thu, 18 Jul 2024 14:44:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSMh-0007zk-3Z; Thu, 18 Jul 2024 14:44:15 +0000 Received: by outflank-mailman (input) for mailman id 760558; Thu, 18 Jul 2024 14:44:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSMf-0007zc-Vh for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:44:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSMf-0003BY-Ui for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:44:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUSMf-0001vl-Tw for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 14:44:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=UupiSVfBL5TkAxbTdgGfmNquj3KN6N5WSYFNGI5ht48=; b=TNyjgs0AZ4u92rIaMrkfCoSrSI RUqwWE5uddlniW/06/y7K+IA7VbaB5Gblzxhx0hFaqEI5aYO8WY4RdWZgn9kCwBKri3lmS6FhaW4E E1P1526SQYA05U8Ms77WPGWyxVqNIfZ5PabwmadQf1hLQsPjBtUNCtpbgYKAWyDuxM7U=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] Set version to 4.20; 4.19 has branched Message-Id: Date: Thu, 18 Jul 2024 14:44:13 +0000 commit f66e523189f1130a2fd3b77a9f0c8ac152355ac8 Author: Julien Grall AuthorDate: Thu Jul 18 15:42:58 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 15:42:58 2024 +0100 Set version to 4.20; 4.19 has branched Signed-off-by: Julien Grall --- README | 16 ++++++++-------- xen/Makefile | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README b/README index 560247e710..72f6b0fcde 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ -################################################# -__ __ _ _ _ ___ -\ \/ /___ _ __ | || | / |/ _ \ _ __ ___ - \ // _ \ '_ \ | || |_ | | (_) |_____| '__/ __| - / \ __/ | | | |__ _|| |\__, |_____| | | (__ -/_/\_\___|_| |_| |_|(_)_| /_/ |_| \___| - -################################################# +############################################################ +__ __ _ _ _ +\ \/ /___ _ __ _ _ _ __ ___| |_ __ _| |__ | | ___ + \ // _ \ '_ \ _____| | | | '_ \/ __| __/ _` | '_ \| |/ _ \ + / \ __/ | | |_____| |_| | | | \__ \ || (_| | |_) | | __/ +/_/\_\___|_| |_| \__,_|_| |_|___/\__\__,_|_.__/|_|\___| + +############################################################ https://www.xen.org/ diff --git a/xen/Makefile b/xen/Makefile index e9fd19536f..ca0ead3f23 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -5,8 +5,8 @@ this-makefile := $(call lastword,$(MAKEFILE_LIST)) # This is the correct place to edit the build version. # All other places this is stored (eg. compile.h) should be autogenerated. export XEN_VERSION = 4 -export XEN_SUBVERSION = 19 -export XEN_EXTRAVERSION ?= -rc$(XEN_VENDORVERSION) +export XEN_SUBVERSION = 20 +export XEN_EXTRAVERSION ?= $(XEN_VENDORVERSION) export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) -include xen-version -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 18 15:11:10 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 18 Jul 2024 15:11:10 +0000 Received: from list by lists.xenproject.org with outflank-mailman.760569.1170434 (Exim 4.92) (envelope-from ) id 1sUSmf-0003fJ-6q; Thu, 18 Jul 2024 15:11:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 760569.1170434; Thu, 18 Jul 2024 15:11:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSmf-0003fB-3a; Thu, 18 Jul 2024 15:11:05 +0000 Received: by outflank-mailman (input) for mailman id 760569; Thu, 18 Jul 2024 15:11:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSme-0003f4-8G for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 15:11:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUSme-0003gL-4M for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 15:11:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUSme-0003xr-2W for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 15:11:04 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=tmwNiNbofCm7C61iFp20XzfwYaarCWRMuH0/8j+BBjg=; b=hFs0em3nH6Otu9/cymiEqsBdVZ EoJFrncuqzKLGSsxzc/GwA3f7RMmKgdGvC8evACYwdTmKWDo1oUEpaQ0DDCnNlU2eEirv1Kymw1hq W3Ph6gE6dl5ALD7k2807Ld9cl5gAuvaoqalhanMfbwsdKzZjyPfuPo1hU+NCk5kmNITA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] Re-run ./autogens.h for 4.20 Message-Id: Date: Thu, 18 Jul 2024 15:11:04 +0000 commit 285937175be2509bc5b4c2eff2ec0b2fa758ff69 Author: Julien Grall AuthorDate: Thu Jul 18 16:00:47 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 16:00:52 2024 +0100 Re-run ./autogens.h for 4.20 Signed-off-by: Julien Grall --- configure | 18 +++++++++--------- docs/configure | 18 +++++++++--------- stubdom/configure | 18 +++++++++--------- tools/configure | 18 +++++++++--------- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/configure b/configure index 17b8361fa2..2d7b20aa50 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Xen Hypervisor 4.19. +# Generated by GNU Autoconf 2.71 for Xen Hypervisor 4.20. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Xen Hypervisor' PACKAGE_TARNAME='xen' -PACKAGE_VERSION='4.19' -PACKAGE_STRING='Xen Hypervisor 4.19' +PACKAGE_VERSION='4.20' +PACKAGE_STRING='Xen Hypervisor 4.20' PACKAGE_BUGREPORT='xen-devel@lists.xen.org' PACKAGE_URL='https://www.xen.org/' @@ -1262,7 +1262,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Xen Hypervisor 4.19 to adapt to many kinds of systems. +\`configure' configures Xen Hypervisor 4.20 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1328,7 +1328,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Xen Hypervisor 4.19:";; + short | recursive ) echo "Configuration of Xen Hypervisor 4.20:";; esac cat <<\_ACEOF @@ -1428,7 +1428,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Xen Hypervisor configure 4.19 +Xen Hypervisor configure 4.20 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1465,7 +1465,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Xen Hypervisor $as_me 4.19, which was +It was created by Xen Hypervisor $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3000,7 +3000,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Xen Hypervisor $as_me 4.19, which was +This file was extended by Xen Hypervisor $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3056,7 +3056,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Xen Hypervisor config.status 4.19 +Xen Hypervisor config.status 4.20 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/docs/configure b/docs/configure index b6732af3b4..7c8e0771d6 100755 --- a/docs/configure +++ b/docs/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Xen Hypervisor Documentation 4.19. +# Generated by GNU Autoconf 2.71 for Xen Hypervisor Documentation 4.20. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Xen Hypervisor Documentation' PACKAGE_TARNAME='xen' -PACKAGE_VERSION='4.19' -PACKAGE_STRING='Xen Hypervisor Documentation 4.19' +PACKAGE_VERSION='4.20' +PACKAGE_STRING='Xen Hypervisor Documentation 4.20' PACKAGE_BUGREPORT='xen-devel@lists.xen.org' PACKAGE_URL='https://www.xen.org/' @@ -1252,7 +1252,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Xen Hypervisor Documentation 4.19 to adapt to many kinds of systems. +\`configure' configures Xen Hypervisor Documentation 4.20 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1314,7 +1314,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Xen Hypervisor Documentation 4.19:";; + short | recursive ) echo "Configuration of Xen Hypervisor Documentation 4.20:";; esac cat <<\_ACEOF @@ -1416,7 +1416,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Xen Hypervisor Documentation configure 4.19 +Xen Hypervisor Documentation configure 4.20 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1453,7 +1453,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Xen Hypervisor Documentation $as_me 4.19, which was +It was created by Xen Hypervisor Documentation $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2896,7 +2896,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Xen Hypervisor Documentation $as_me 4.19, which was +This file was extended by Xen Hypervisor Documentation $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2952,7 +2952,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Xen Hypervisor Documentation config.status 4.19 +Xen Hypervisor Documentation config.status 4.20 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/stubdom/configure b/stubdom/configure index e642fab1f1..197d3399a5 100755 --- a/stubdom/configure +++ b/stubdom/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Xen Hypervisor Stub Domains 4.19. +# Generated by GNU Autoconf 2.71 for Xen Hypervisor Stub Domains 4.20. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Xen Hypervisor Stub Domains' PACKAGE_TARNAME='xen' -PACKAGE_VERSION='4.19' -PACKAGE_STRING='Xen Hypervisor Stub Domains 4.19' +PACKAGE_VERSION='4.20' +PACKAGE_STRING='Xen Hypervisor Stub Domains 4.20' PACKAGE_BUGREPORT='xen-devel@lists.xen.org' PACKAGE_URL='https://www.xen.org/' @@ -1289,7 +1289,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Xen Hypervisor Stub Domains 4.19 to adapt to many kinds of systems. +\`configure' configures Xen Hypervisor Stub Domains 4.20 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1355,7 +1355,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Xen Hypervisor Stub Domains 4.19:";; + short | recursive ) echo "Configuration of Xen Hypervisor Stub Domains 4.20:";; esac cat <<\_ACEOF @@ -1467,7 +1467,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Xen Hypervisor Stub Domains configure 4.19 +Xen Hypervisor Stub Domains configure 4.20 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1543,7 +1543,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Xen Hypervisor Stub Domains $as_me 4.19, which was +It was created by Xen Hypervisor Stub Domains $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -4924,7 +4924,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Xen Hypervisor Stub Domains $as_me 4.19, which was +This file was extended by Xen Hypervisor Stub Domains $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4980,7 +4980,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Xen Hypervisor Stub Domains config.status 4.19 +Xen Hypervisor Stub Domains config.status 4.20 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/tools/configure b/tools/configure index d64818f258..7f98303fdd 100755 --- a/tools/configure +++ b/tools/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Xen Hypervisor Tools 4.19. +# Generated by GNU Autoconf 2.71 for Xen Hypervisor Tools 4.20. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Xen Hypervisor Tools' PACKAGE_TARNAME='xen' -PACKAGE_VERSION='4.19' -PACKAGE_STRING='Xen Hypervisor Tools 4.19' +PACKAGE_VERSION='4.20' +PACKAGE_STRING='Xen Hypervisor Tools 4.20' PACKAGE_BUGREPORT='xen-devel@lists.xen.org' PACKAGE_URL='https://www.xen.org/' @@ -1432,7 +1432,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Xen Hypervisor Tools 4.19 to adapt to many kinds of systems. +\`configure' configures Xen Hypervisor Tools 4.20 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1498,7 +1498,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Xen Hypervisor Tools 4.19:";; + short | recursive ) echo "Configuration of Xen Hypervisor Tools 4.20:";; esac cat <<\_ACEOF @@ -1704,7 +1704,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Xen Hypervisor Tools configure 4.19 +Xen Hypervisor Tools configure 4.20 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1974,7 +1974,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Xen Hypervisor Tools $as_me 4.19, which was +It was created by Xen Hypervisor Tools $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -10927,7 +10927,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Xen Hypervisor Tools $as_me 4.19, which was +This file was extended by Xen Hypervisor Tools $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -10992,7 +10992,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Xen Hypervisor Tools config.status 4.19 +Xen Hypervisor Tools config.status 4.20 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 18 15:55:12 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 18 Jul 2024 15:55:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.760573.1170447 (Exim 4.92) (envelope-from ) id 1sUTTF-0008QH-D0; Thu, 18 Jul 2024 15:55:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 760573.1170447; Thu, 18 Jul 2024 15:55:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUTTF-0008Q9-Ab; Thu, 18 Jul 2024 15:55:05 +0000 Received: by outflank-mailman (input) for mailman id 760573; Thu, 18 Jul 2024 15:55:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUTTE-0008Pn-4n for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 15:55:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUTTE-0004UQ-0Z for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 15:55:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUTTD-0006pM-V5 for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 15:55:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=1uNMBEs37D9yrHXKWlv5C188gv6ZWj6jAfMign1Vy8U=; b=yJmcNRy/W7ctHxfqLnD9PwtpKH GNmSewJwsqRGUUtrePdpnl70w+3zgj0IP6Eiw3WkCqVcuM8T9EauJKkmP+wHAF5OCw5NO4vWj1wdF Pw3PhCLgwDWpVtiwuv9wm2UMYYx/xT98Od7yt6fF2UTAJfto3dsBB92rTKN4c5arRlRQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CHANGELOG.md: Set release date for 4.19 Message-Id: Date: Thu, 18 Jul 2024 15:55:03 +0000 commit 974ad0926e4616444dc0c1d83ba86bd6eb8dd52d Author: Julien Grall AuthorDate: Thu Jul 18 16:48:06 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 16:49:57 2024 +0100 CHANGELOG.md: Set release date for 4.19 Signed-off-by: Julien Grall --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35c3488f4b..f8fbe82df6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Notable changes to Xen will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [4.19.0 UNRELEASED](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - TBD +## [4.19.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - 2024-07-29 ### Changed - Changed flexible array definitions in public I/O interface headers to not -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 18 15:55:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 18 Jul 2024 15:55:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.760575.1170452 (Exim 4.92) (envelope-from ) id 1sUTTP-0008Uf-Eo; Thu, 18 Jul 2024 15:55:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 760575.1170452; Thu, 18 Jul 2024 15:55:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUTTP-0008UY-C0; Thu, 18 Jul 2024 15:55:15 +0000 Received: by outflank-mailman (input) for mailman id 760575; Thu, 18 Jul 2024 15:55:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUTTO-0008U7-4f for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 15:55:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUTTO-0004UU-3p for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 15:55:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUTTO-0006q3-2k for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 15:55:14 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=oX36260n28a4xe4Vi/E15+mHgnLOmPY7kb984xzxFSY=; b=WrM1MGFD4nqilUfJRwmW+m4GtH yQaZ25RE0XYZBYvmpXcm4+QGGAato3YDcKRqFoXgazGlJc/7Ili/yQEqEjf4enFyYcb5TbQP7WkoK xMG3d1HTZK3IEx4kS8LwJAd5kPedqkbbCc6EuTtS/zo7yCZscOkL1YiK5Vnl0P/InVfs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CHANGELOG.md: Start new 4.20.0 section Message-Id: Date: Thu, 18 Jul 2024 15:55:14 +0000 commit a99f25f7ac60544e9af4b3b516d7566ba8841cc4 Author: Julien Grall AuthorDate: Thu Jul 18 16:51:02 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 16:51:02 2024 +0100 CHANGELOG.md: Start new 4.20.0 section Signed-off-by: Julien Grall --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8fbe82df6..c3b788df61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,15 @@ Notable changes to Xen will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [4.19.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - 2024-07-29 +## [4.20.0 UNRELEASED](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - TBD + +### Changed + +### Added + +### Removed + +## [4.19.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.19.0) - 2024-07-29 ### Changed - Changed flexible array definitions in public I/O interface headers to not -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 18 15:55:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 18 Jul 2024 15:55:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.760577.1170455 (Exim 4.92) (envelope-from ) id 1sUTTZ-00007V-G9; Thu, 18 Jul 2024 15:55:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 760577.1170455; Thu, 18 Jul 2024 15:55:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUTTZ-00007N-Db; Thu, 18 Jul 2024 15:55:25 +0000 Received: by outflank-mailman (input) for mailman id 760577; Thu, 18 Jul 2024 15:55:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUTTY-000079-Ev for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 15:55:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUTTY-0004Uj-D7 for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 15:55:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUTTY-0006rA-BZ for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 15:55:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=iNhga7TZHwKtPbk37IExLXvbxoQ6Wr1E6i0EDEBupGs=; b=UdSXUu0Xuu0vRD5Gh74zisWzrO CzU0DcBp1fTRDIhpqLpY4w88VFVSHNAq+U9vPw+B86ypnF9BgSgCvq/RdE909QJvo4pyvxYrOMnkI Y5Cq+zBM74OgMRGJB12YgXcp6EVYG7unzcWn1yleeA1+JnlLF5eXsUupVGtSx73Wpbpc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.19] CHANGELOG.md: Set release date for 4.19 Message-Id: Date: Thu, 18 Jul 2024 15:55:24 +0000 commit 5eea8790495c9494fa0c7a4ba0e76d3e273af25b Author: Julien Grall AuthorDate: Thu Jul 18 16:48:06 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 16:51:59 2024 +0100 CHANGELOG.md: Set release date for 4.19 Signed-off-by: Julien Grall (cherry picked from commit 974ad0926e4616444dc0c1d83ba86bd6eb8dd52d) --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35c3488f4b..f8fbe82df6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Notable changes to Xen will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [4.19.0 UNRELEASED](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - TBD +## [4.19.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - 2024-07-29 ### Changed - Changed flexible array definitions in public I/O interface headers to not -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.19 From xen-changelog-bounces@lists.xenproject.org Thu Jul 18 19:22:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 18 Jul 2024 19:22:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.760696.1170590 (Exim 4.92) (envelope-from ) id 1sUWhW-000276-VS; Thu, 18 Jul 2024 19:22:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 760696.1170590; Thu, 18 Jul 2024 19:22:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUWhW-00026y-Sm; Thu, 18 Jul 2024 19:22:02 +0000 Received: by outflank-mailman (input) for mailman id 760696; Thu, 18 Jul 2024 19:22:01 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUWhV-00026s-KL for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 19:22:01 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUWhV-0000cm-Ic for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 19:22:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUWhV-0007CM-H7 for xen-changelog@lists.xenproject.org; Thu, 18 Jul 2024 19:22:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=RaWjHm/0fFBVeCWNGO+Zk6L4N1zLPsTyHFtMfZPjfXY=; b=GTn3L7CPKRyJn0+zQT8ryuZM4b rD/DjZWaDUfJWeG2qr6V57avru7Rm2qkDNCEslEjd/eAIxIj5ZnzivVCGaRnmRpmvQYDC60gdNFlv UcpcIYiu6M2UfNcgvYUEB1kkYkvakgCq3L+Eszs3s084U//uUuu8tHN84HOMuyAXq0AE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.16] x86/IRQ: avoid double unlock in map_domain_pirq() Message-Id: Date: Thu, 18 Jul 2024 19:22:01 +0000 commit 9fe713202e4ef4ff0264d6ecfaea26bc4e50705b Author: Jan Beulich AuthorDate: Tue Jul 16 14:16:27 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 16 14:16:27 2024 +0200 x86/IRQ: avoid double unlock in map_domain_pirq() Forever since its introduction the main loop in the function dealing with multi-vector MSI had error exit points ("break") with different properties: In one case no IRQ descriptor lock is being held. Nevertheless the subsequent error cleanup path assumed such a lock would uniformly need releasing. Identify the case by setting "desc" to NULL, thus allowing the unlock to be skipped as necessary. This is CVE-2024-31143 / XSA-458. Coverity ID: 1605298 Fixes: d1b6d0a02489 ("x86: enable multi-vector MSI") Signed-off-by: Jan Beulich Reviewed-by: Roger Pau Monné master commit: 57338346f29cea7b183403561bdc5f407163b846 master date: 2024-07-16 14:09:14 +0200 --- xen/arch/x86/irq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 80ce9d624f..efed4fe09f 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2215,6 +2215,7 @@ int map_domain_pirq( set_domain_irq_pirq(d, irq, info); spin_unlock_irqrestore(&desc->lock, flags); + desc = NULL; info = NULL; irq = create_irq(NUMA_NO_NODE, true); @@ -2250,7 +2251,9 @@ int map_domain_pirq( if ( ret ) { - spin_unlock_irqrestore(&desc->lock, flags); + if ( desc ) + spin_unlock_irqrestore(&desc->lock, flags); + pci_disable_msi(msi_desc); if ( nr ) { -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.16 From xen-changelog-bounces@lists.xenproject.org Fri Jul 19 11:44:10 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 19 Jul 2024 11:44:10 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761031.1171003 (Exim 4.92) (envelope-from ) id 1sUm1s-0006Ko-Th; Fri, 19 Jul 2024 11:44:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761031.1171003; Fri, 19 Jul 2024 11:44:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUm1s-0006Kg-R5; Fri, 19 Jul 2024 11:44:04 +0000 Received: by outflank-mailman (input) for mailman id 761031; Fri, 19 Jul 2024 11:44:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUm1r-0006Ka-ND for xen-changelog@lists.xenproject.org; Fri, 19 Jul 2024 11:44:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUm1r-0007Ho-K7 for xen-changelog@lists.xenproject.org; Fri, 19 Jul 2024 11:44:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUm1r-0002f3-Gs for xen-changelog@lists.xenproject.org; Fri, 19 Jul 2024 11:44:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=zY5iIKExOYR0qYkPwkdVhrn+31TYbv7kGx6ZiE7t6q4=; b=aeHxnz91ZWRBg992hfhRGJQsPW nS69olDkKW72N0jRKZam4JGS7vaZCRt/zKN5/lxu2ei5ofJIQR56M+xBei32nX8p0iFnVIBUvr8cS cwQshs5sWoF2Mpxl/Z79TTo+N7z9AFat/GopcctwRl4FzOl1CxV1LBWSnJIrmDqS8F6c=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/Makefile: Correct XEN_EXTERVERSION for unstable Message-Id: Date: Fri, 19 Jul 2024 11:44:03 +0000 commit e5182b40cf4bbb89292d66b8f3047a9ee913a90a Author: Julien Grall AuthorDate: Fri Jul 19 12:34:24 2024 +0100 Commit: Julien Grall CommitDate: Fri Jul 19 12:34:32 2024 +0100 xen/Makefile: Correct XEN_EXTERVERSION for unstable Signed-off-by: Julien Grall --- xen/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/Makefile b/xen/Makefile index ca0ead3f23..2e1a925c84 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -6,7 +6,7 @@ this-makefile := $(call lastword,$(MAKEFILE_LIST)) # All other places this is stored (eg. compile.h) should be autogenerated. export XEN_VERSION = 4 export XEN_SUBVERSION = 20 -export XEN_EXTRAVERSION ?= $(XEN_VENDORVERSION) +export XEN_EXTRAVERSION ?= -unstable$(XEN_VENDORVERSION) export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) -include xen-version -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Fri Jul 19 21:11:08 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 19 Jul 2024 21:11:08 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761195.1171190 (Exim 4.92) (envelope-from ) id 1sUusY-0008Kd-Jp; Fri, 19 Jul 2024 21:11:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761195.1171190; Fri, 19 Jul 2024 21:11:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUusY-0008KT-Gy; Fri, 19 Jul 2024 21:11:02 +0000 Received: by outflank-mailman (input) for mailman id 761195; Fri, 19 Jul 2024 21:11:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUusY-0008KN-4H for xen-changelog@lists.xenproject.org; Fri, 19 Jul 2024 21:11:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUusY-0001kd-1q for xen-changelog@lists.xenproject.org; Fri, 19 Jul 2024 21:11:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUusY-0002Xs-0i for xen-changelog@lists.xenproject.org; Fri, 19 Jul 2024 21:11:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=nd2sS9o86JbOiswV6tPgc/8zY4hmppcZz3DI7TKRlrM=; b=u32wONXBeubeGqvT31zXk73lxp 8mMfLmGazxKke49gpAqv9aGqo/MsL1YeqX0PzZBZHt1zhYsrMymhm8hhtuWnsImI/KjHnyREjin7t lQ4rjgWk//Z2lIFJvyB6VyWYML5Z7skXg910hq4hPAja2o70U1Fbqh3qkBvILDz7qEMY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.19] Config.mk: switch to named tags (for stable branch) Message-Id: Date: Fri, 19 Jul 2024 21:11:02 +0000 commit 48acf0fd3e50d5cc5b70db3bf49fbb0f2c6518af Author: Julien Grall AuthorDate: Thu Jul 18 15:26:32 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 15:26:32 2024 +0100 Config.mk: switch to named tags (for stable branch) Signed-off-by: Julien Grall --- Config.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Config.mk b/Config.mk index e7aa8ceaaf..8f759e95b3 100644 --- a/Config.mk +++ b/Config.mk @@ -221,10 +221,10 @@ OVMF_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/ovmf.git OVMF_UPSTREAM_REVISION ?= ba91d0292e593df8528b66f99c1b0b14fadc8e16 QEMU_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/qemu-xen.git -QEMU_UPSTREAM_REVISION ?= 0df9387c8983e1b1e72d8c574356f572342c03e6 +QEMU_UPSTREAM_REVISION ?= qemu-xen-4.19.0-rc4 MINIOS_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/mini-os.git -MINIOS_UPSTREAM_REVISION ?= 8b038c7411ae7e823eaf6d15d5efbe037a07197a +MINIOS_UPSTREAM_REVISION ?= xen-4.19.0-rc4 SEABIOS_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/seabios.git SEABIOS_UPSTREAM_REVISION ?= rel-1.16.3 @@ -233,7 +233,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e QEMU_TRADITIONAL_URL ?= https://xenbits.xen.org/git-http/qemu-xen-traditional.git -QEMU_TRADITIONAL_REVISION ?= 3d273dd05e51e5a1ffba3d98c7437ee84e8f8764 +QEMU_TRADITIONAL_REVISION ?= xen-4.19.0-rc4 # Wed Jul 15 10:01:40 2020 +0100 # qemu-trad: remove Xen path dependencies -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.19 From xen-changelog-bounces@lists.xenproject.org Fri Jul 19 21:11:12 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 19 Jul 2024 21:11:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761196.1171194 (Exim 4.92) (envelope-from ) id 1sUusi-0008Mk-Kh; Fri, 19 Jul 2024 21:11:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761196.1171194; Fri, 19 Jul 2024 21:11:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUusi-0008Md-IM; Fri, 19 Jul 2024 21:11:12 +0000 Received: by outflank-mailman (input) for mailman id 761196; Fri, 19 Jul 2024 21:11:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUusi-0008MX-6b for xen-changelog@lists.xenproject.org; Fri, 19 Jul 2024 21:11:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUusi-0001kk-54 for xen-changelog@lists.xenproject.org; Fri, 19 Jul 2024 21:11:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUusi-0002Yj-45 for xen-changelog@lists.xenproject.org; Fri, 19 Jul 2024 21:11:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=gGJVPMSVscC03qzesNQcdj1KIFIe0D6NwNLzL+1UlPg=; b=0rxmPAMtoNUGoFU9uMaBVs3U+e sftVHut1OtQNMaUc2gupBLSgWPRLXVApAa5Yclkgr/Pq5pH1AJrentOlkTjgTabP1ZXGYDy59IOCh OlB9AxmSJnTVyYDFc7ZkWWsp4gazB2YoRwb0a9JB4tBnjkOH3Lt7a5kTfBqZsc12/vlg=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.19] Turn off debug by default Message-Id: Date: Fri, 19 Jul 2024 21:11:12 +0000 commit 7ae9503645077ffeb727500fa375c384b3467fb0 Author: Julien Grall AuthorDate: Thu Jul 18 15:28:17 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 15:28:17 2024 +0100 Turn off debug by default Signed-off-by: Julien Grall --- tools/Rules.mk | 2 +- xen/Kconfig.debug | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/Rules.mk b/tools/Rules.mk index 18cf83f5be..cb3fd82c1f 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -25,7 +25,7 @@ CFLAGS_xeninclude = -I$(XEN_INCLUDE) XENSTORE_XENSTORED ?= y # A debug build of tools? -debug ?= y +debug ?= n debug_symbols ?= $(debug) XEN_GOCODE_URL = golang.xenproject.org diff --git a/xen/Kconfig.debug b/xen/Kconfig.debug index 07ff7eb7ba..78b5a7c603 100644 --- a/xen/Kconfig.debug +++ b/xen/Kconfig.debug @@ -3,7 +3,7 @@ menu "Debugging Options" config DEBUG bool "Developer Checks" - default y + default n help If you say Y here this will enable developer checks such as asserts and extra printks. This option is intended for development purposes -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.19 From xen-changelog-bounces@lists.xenproject.org Fri Jul 19 21:11:22 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 19 Jul 2024 21:11:22 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761197.1171198 (Exim 4.92) (envelope-from ) id 1sUuss-0008PD-MP; Fri, 19 Jul 2024 21:11:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761197.1171198; Fri, 19 Jul 2024 21:11:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUuss-0008P5-Jq; Fri, 19 Jul 2024 21:11:22 +0000 Received: by outflank-mailman (input) for mailman id 761197; Fri, 19 Jul 2024 21:11:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUuss-0008Ox-B5 for xen-changelog@lists.xenproject.org; Fri, 19 Jul 2024 21:11:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUuss-0001ml-9U for xen-changelog@lists.xenproject.org; Fri, 19 Jul 2024 21:11:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUuss-0002Zc-78 for xen-changelog@lists.xenproject.org; Fri, 19 Jul 2024 21:11:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=8CtS9AydSHKYVypXGxwuC2/gX8jI6IbbpfjtSTEfIug=; b=GCsjGDB3BKF3Vhuk83lMpdZAtR M2Z3n6wVbU4WXH5CGw15ZL0U6WjHCEs7RnjuwCeGzNpfQdgTy4o7fCOFyRA80tWtpHNoe+V+CBVVG REEk0ywO7bqefm2rvT1YEHvPDDm0VJDIUuYLTBGPj7Lkv1/HOVrO0clH2V50qUdtK0es=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.19] CHANGELOG.md: Set release date for 4.19 Message-Id: Date: Fri, 19 Jul 2024 21:11:22 +0000 commit 5eea8790495c9494fa0c7a4ba0e76d3e273af25b Author: Julien Grall AuthorDate: Thu Jul 18 16:48:06 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 16:51:59 2024 +0100 CHANGELOG.md: Set release date for 4.19 Signed-off-by: Julien Grall (cherry picked from commit 974ad0926e4616444dc0c1d83ba86bd6eb8dd52d) --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35c3488f4b..f8fbe82df6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Notable changes to Xen will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [4.19.0 UNRELEASED](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - TBD +## [4.19.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - 2024-07-29 ### Changed - Changed flexible array definitions in public I/O interface headers to not -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.19 From xen-changelog-bounces@lists.xenproject.org Sat Jul 20 00:55:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Sat, 20 Jul 2024 00:55:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761229.1171231 (Exim 4.92) (envelope-from ) id 1sUyNL-0008Nx-Pa; Sat, 20 Jul 2024 00:55:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761229.1171231; Sat, 20 Jul 2024 00:55:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNL-0008Nq-NB; Sat, 20 Jul 2024 00:55:03 +0000 Received: by outflank-mailman (input) for mailman id 761229; Sat, 20 Jul 2024 00:55:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNK-0008Nk-6j for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNK-0006Z5-3q for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUyNK-000220-2X for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=oF/iRgb/83j2fL74VgScjTkrav/hB1pcN3XFf+mDvKc=; b=TUyl7hZZJktuSFVMoSXOLaW8fL 96LgQ1gUQGlbvceVHLsmIunTFK+VuWSBmgGT5gvxXkSvG9iJYzkbhcwDnJZSumnAs7IHun9BLr151 O8aI3moRhNks4kJvZWxR6nI7Umk6Gpdt+SpahMhPOoK7QhdJarqzwRuBnQag360Iorl8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] Revert "Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.19 RC1)" Message-Id: Date: Sat, 20 Jul 2024 00:55:02 +0000 commit b181bb9fdbae9cdae96f979cfcc30c6195071417 Author: Julien Grall AuthorDate: Thu Jul 18 15:40:44 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 15:40:44 2024 +0100 Revert "Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.19 RC1)" The branch is unstable again. This reverts commit 7584e39986ef2cb4816892ffaefb26f4ad063468. --- Config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Config.mk b/Config.mk index e7aa8ceaaf..1a3938b6c4 100644 --- a/Config.mk +++ b/Config.mk @@ -221,7 +221,7 @@ OVMF_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/ovmf.git OVMF_UPSTREAM_REVISION ?= ba91d0292e593df8528b66f99c1b0b14fadc8e16 QEMU_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/qemu-xen.git -QEMU_UPSTREAM_REVISION ?= 0df9387c8983e1b1e72d8c574356f572342c03e6 +QEMU_UPSTREAM_REVISION ?= master MINIOS_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/mini-os.git MINIOS_UPSTREAM_REVISION ?= 8b038c7411ae7e823eaf6d15d5efbe037a07197a -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Sat Jul 20 00:55:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Sat, 20 Jul 2024 00:55:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761230.1171236 (Exim 4.92) (envelope-from ) id 1sUyNV-0008Q3-R2; Sat, 20 Jul 2024 00:55:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761230.1171236; Sat, 20 Jul 2024 00:55:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNV-0008Pw-OZ; Sat, 20 Jul 2024 00:55:13 +0000 Received: by outflank-mailman (input) for mailman id 761230; Sat, 20 Jul 2024 00:55:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNU-0008Pn-7o for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNU-0006ZB-6v for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUyNU-000231-63 for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=LFpuU9xXvGrL9pafTFaG/PQ0zNR6ZvEYjDAZNjjMTwQ=; b=ddxDAi+WQ5Q/92t/IinwBjx6md OBykwjO/USbU8Ve1Gew7ymL9/9GaXTHxDC9RolVaH68i0vYMf3N7haxhAEJwO/mUZ5lxlj/GF2c6Q 2HaJNinpBVrqKgbjDcXY5SSutou9LDVlLx346iChLP2apcyDsg6uY2S+qk4NC6Bn9ww8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] Set version to 4.20; 4.19 has branched Message-Id: Date: Sat, 20 Jul 2024 00:55:12 +0000 commit f66e523189f1130a2fd3b77a9f0c8ac152355ac8 Author: Julien Grall AuthorDate: Thu Jul 18 15:42:58 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 15:42:58 2024 +0100 Set version to 4.20; 4.19 has branched Signed-off-by: Julien Grall --- README | 16 ++++++++-------- xen/Makefile | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README b/README index 560247e710..72f6b0fcde 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ -################################################# -__ __ _ _ _ ___ -\ \/ /___ _ __ | || | / |/ _ \ _ __ ___ - \ // _ \ '_ \ | || |_ | | (_) |_____| '__/ __| - / \ __/ | | | |__ _|| |\__, |_____| | | (__ -/_/\_\___|_| |_| |_|(_)_| /_/ |_| \___| - -################################################# +############################################################ +__ __ _ _ _ +\ \/ /___ _ __ _ _ _ __ ___| |_ __ _| |__ | | ___ + \ // _ \ '_ \ _____| | | | '_ \/ __| __/ _` | '_ \| |/ _ \ + / \ __/ | | |_____| |_| | | | \__ \ || (_| | |_) | | __/ +/_/\_\___|_| |_| \__,_|_| |_|___/\__\__,_|_.__/|_|\___| + +############################################################ https://www.xen.org/ diff --git a/xen/Makefile b/xen/Makefile index e9fd19536f..ca0ead3f23 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -5,8 +5,8 @@ this-makefile := $(call lastword,$(MAKEFILE_LIST)) # This is the correct place to edit the build version. # All other places this is stored (eg. compile.h) should be autogenerated. export XEN_VERSION = 4 -export XEN_SUBVERSION = 19 -export XEN_EXTRAVERSION ?= -rc$(XEN_VENDORVERSION) +export XEN_SUBVERSION = 20 +export XEN_EXTRAVERSION ?= $(XEN_VENDORVERSION) export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) -include xen-version -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Sat Jul 20 00:55:23 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Sat, 20 Jul 2024 00:55:23 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761231.1171240 (Exim 4.92) (envelope-from ) id 1sUyNf-0008T4-Sv; Sat, 20 Jul 2024 00:55:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761231.1171240; Sat, 20 Jul 2024 00:55:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNf-0008Sw-Q8; Sat, 20 Jul 2024 00:55:23 +0000 Received: by outflank-mailman (input) for mailman id 761231; Sat, 20 Jul 2024 00:55:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNe-0008Sa-CO for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNe-0006Zf-Ba for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUyNe-00023v-9x for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=u9VKNjURxyjFnyvzF7G693KLqp5Z3xlBEXjli1l9i6Y=; b=cFmg6UWltQHiUP+ik9IjGDnzaX oA+V7WEfmjex8nDRXWE2tlYOnl3ebwMcAf80lhohPCzymMtmW5fMOBW+b5jzO4o74/uzkOkil9/w4 iuGGjO0G9OXcPAp+gbiyEWl4TVhDMlQzxtw40TJ7PVKhJ4qygpaL0u2FZhy+ux084ADQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] Re-run ./autogens.h for 4.20 Message-Id: Date: Sat, 20 Jul 2024 00:55:22 +0000 commit 285937175be2509bc5b4c2eff2ec0b2fa758ff69 Author: Julien Grall AuthorDate: Thu Jul 18 16:00:47 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 16:00:52 2024 +0100 Re-run ./autogens.h for 4.20 Signed-off-by: Julien Grall --- configure | 18 +++++++++--------- docs/configure | 18 +++++++++--------- stubdom/configure | 18 +++++++++--------- tools/configure | 18 +++++++++--------- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/configure b/configure index 17b8361fa2..2d7b20aa50 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Xen Hypervisor 4.19. +# Generated by GNU Autoconf 2.71 for Xen Hypervisor 4.20. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Xen Hypervisor' PACKAGE_TARNAME='xen' -PACKAGE_VERSION='4.19' -PACKAGE_STRING='Xen Hypervisor 4.19' +PACKAGE_VERSION='4.20' +PACKAGE_STRING='Xen Hypervisor 4.20' PACKAGE_BUGREPORT='xen-devel@lists.xen.org' PACKAGE_URL='https://www.xen.org/' @@ -1262,7 +1262,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Xen Hypervisor 4.19 to adapt to many kinds of systems. +\`configure' configures Xen Hypervisor 4.20 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1328,7 +1328,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Xen Hypervisor 4.19:";; + short | recursive ) echo "Configuration of Xen Hypervisor 4.20:";; esac cat <<\_ACEOF @@ -1428,7 +1428,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Xen Hypervisor configure 4.19 +Xen Hypervisor configure 4.20 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1465,7 +1465,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Xen Hypervisor $as_me 4.19, which was +It was created by Xen Hypervisor $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3000,7 +3000,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Xen Hypervisor $as_me 4.19, which was +This file was extended by Xen Hypervisor $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3056,7 +3056,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Xen Hypervisor config.status 4.19 +Xen Hypervisor config.status 4.20 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/docs/configure b/docs/configure index b6732af3b4..7c8e0771d6 100755 --- a/docs/configure +++ b/docs/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Xen Hypervisor Documentation 4.19. +# Generated by GNU Autoconf 2.71 for Xen Hypervisor Documentation 4.20. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Xen Hypervisor Documentation' PACKAGE_TARNAME='xen' -PACKAGE_VERSION='4.19' -PACKAGE_STRING='Xen Hypervisor Documentation 4.19' +PACKAGE_VERSION='4.20' +PACKAGE_STRING='Xen Hypervisor Documentation 4.20' PACKAGE_BUGREPORT='xen-devel@lists.xen.org' PACKAGE_URL='https://www.xen.org/' @@ -1252,7 +1252,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Xen Hypervisor Documentation 4.19 to adapt to many kinds of systems. +\`configure' configures Xen Hypervisor Documentation 4.20 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1314,7 +1314,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Xen Hypervisor Documentation 4.19:";; + short | recursive ) echo "Configuration of Xen Hypervisor Documentation 4.20:";; esac cat <<\_ACEOF @@ -1416,7 +1416,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Xen Hypervisor Documentation configure 4.19 +Xen Hypervisor Documentation configure 4.20 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1453,7 +1453,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Xen Hypervisor Documentation $as_me 4.19, which was +It was created by Xen Hypervisor Documentation $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2896,7 +2896,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Xen Hypervisor Documentation $as_me 4.19, which was +This file was extended by Xen Hypervisor Documentation $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -2952,7 +2952,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Xen Hypervisor Documentation config.status 4.19 +Xen Hypervisor Documentation config.status 4.20 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/stubdom/configure b/stubdom/configure index e642fab1f1..197d3399a5 100755 --- a/stubdom/configure +++ b/stubdom/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Xen Hypervisor Stub Domains 4.19. +# Generated by GNU Autoconf 2.71 for Xen Hypervisor Stub Domains 4.20. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Xen Hypervisor Stub Domains' PACKAGE_TARNAME='xen' -PACKAGE_VERSION='4.19' -PACKAGE_STRING='Xen Hypervisor Stub Domains 4.19' +PACKAGE_VERSION='4.20' +PACKAGE_STRING='Xen Hypervisor Stub Domains 4.20' PACKAGE_BUGREPORT='xen-devel@lists.xen.org' PACKAGE_URL='https://www.xen.org/' @@ -1289,7 +1289,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Xen Hypervisor Stub Domains 4.19 to adapt to many kinds of systems. +\`configure' configures Xen Hypervisor Stub Domains 4.20 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1355,7 +1355,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Xen Hypervisor Stub Domains 4.19:";; + short | recursive ) echo "Configuration of Xen Hypervisor Stub Domains 4.20:";; esac cat <<\_ACEOF @@ -1467,7 +1467,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Xen Hypervisor Stub Domains configure 4.19 +Xen Hypervisor Stub Domains configure 4.20 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1543,7 +1543,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Xen Hypervisor Stub Domains $as_me 4.19, which was +It was created by Xen Hypervisor Stub Domains $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -4924,7 +4924,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Xen Hypervisor Stub Domains $as_me 4.19, which was +This file was extended by Xen Hypervisor Stub Domains $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -4980,7 +4980,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Xen Hypervisor Stub Domains config.status 4.19 +Xen Hypervisor Stub Domains config.status 4.20 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/tools/configure b/tools/configure index d64818f258..7f98303fdd 100755 --- a/tools/configure +++ b/tools/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for Xen Hypervisor Tools 4.19. +# Generated by GNU Autoconf 2.71 for Xen Hypervisor Tools 4.20. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='Xen Hypervisor Tools' PACKAGE_TARNAME='xen' -PACKAGE_VERSION='4.19' -PACKAGE_STRING='Xen Hypervisor Tools 4.19' +PACKAGE_VERSION='4.20' +PACKAGE_STRING='Xen Hypervisor Tools 4.20' PACKAGE_BUGREPORT='xen-devel@lists.xen.org' PACKAGE_URL='https://www.xen.org/' @@ -1432,7 +1432,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures Xen Hypervisor Tools 4.19 to adapt to many kinds of systems. +\`configure' configures Xen Hypervisor Tools 4.20 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1498,7 +1498,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of Xen Hypervisor Tools 4.19:";; + short | recursive ) echo "Configuration of Xen Hypervisor Tools 4.20:";; esac cat <<\_ACEOF @@ -1704,7 +1704,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -Xen Hypervisor Tools configure 4.19 +Xen Hypervisor Tools configure 4.20 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1974,7 +1974,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by Xen Hypervisor Tools $as_me 4.19, which was +It was created by Xen Hypervisor Tools $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -10927,7 +10927,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by Xen Hypervisor Tools $as_me 4.19, which was +This file was extended by Xen Hypervisor Tools $as_me 4.20, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -10992,7 +10992,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -Xen Hypervisor Tools config.status 4.19 +Xen Hypervisor Tools config.status 4.20 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Sat Jul 20 00:55:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Sat, 20 Jul 2024 00:55:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761232.1171245 (Exim 4.92) (envelope-from ) id 1sUyNq-0008WG-08; Sat, 20 Jul 2024 00:55:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761232.1171245; Sat, 20 Jul 2024 00:55:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNp-0008W8-TE; Sat, 20 Jul 2024 00:55:33 +0000 Received: by outflank-mailman (input) for mailman id 761232; Sat, 20 Jul 2024 00:55:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNo-0008Vw-FN for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNo-0006Zs-EY for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUyNo-00024q-Di for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=/U3qBX2xSHeK6ghI6N+C9/EqIKTZL1JhWG3i6Pzm9Kw=; b=6+ZE0V79AWh0Q9HZqzc82hX3Kr C9Y/Ov1hNye9l4JMbNekhAGS7X7l9z5KFyCB3fxY2qOp959TmYYaPEK7haTs0Ekbhe2KEcjSdqxfE Bj1XFezjZQ0S13ibM+mDX8VWCa0D8CJChCXDBY1Pf0qr0iZr9SG7c+Hfwpg3gw9qPS7o=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CHANGELOG.md: Set release date for 4.19 Message-Id: Date: Sat, 20 Jul 2024 00:55:32 +0000 commit 974ad0926e4616444dc0c1d83ba86bd6eb8dd52d Author: Julien Grall AuthorDate: Thu Jul 18 16:48:06 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 16:49:57 2024 +0100 CHANGELOG.md: Set release date for 4.19 Signed-off-by: Julien Grall --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35c3488f4b..f8fbe82df6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Notable changes to Xen will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [4.19.0 UNRELEASED](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - TBD +## [4.19.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - 2024-07-29 ### Changed - Changed flexible array definitions in public I/O interface headers to not -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Sat Jul 20 00:55:44 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Sat, 20 Jul 2024 00:55:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761233.1171248 (Exim 4.92) (envelope-from ) id 1sUyO0-00007G-14; Sat, 20 Jul 2024 00:55:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761233.1171248; Sat, 20 Jul 2024 00:55:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNz-000075-Uh; Sat, 20 Jul 2024 00:55:43 +0000 Received: by outflank-mailman (input) for mailman id 761233; Sat, 20 Jul 2024 00:55:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNy-00006v-KV for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyNy-0006a6-Je for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUyNy-00025z-GY for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=f0a/4xnHQSncL12sjeGvI/h/EjPqj40jGJmHMTprLlA=; b=mAbQxMKRPT5Kwwn+5m4IlXzm8e NUKHRP1SxmDxRQGoQe7QODQnIeSdFgbTioUrrFy911u64Or+9tCS8M6k3sEEXTlYA0UG/iZ5bOONt wXUaJ0UVEQtWs7Ry4SgktYpB0fWekz5m+unQOyEcfA2Kr31vkaDInPGk+c/f7JU9cTEA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CHANGELOG.md: Start new 4.20.0 section Message-Id: Date: Sat, 20 Jul 2024 00:55:42 +0000 commit a99f25f7ac60544e9af4b3b516d7566ba8841cc4 Author: Julien Grall AuthorDate: Thu Jul 18 16:51:02 2024 +0100 Commit: Julien Grall CommitDate: Thu Jul 18 16:51:02 2024 +0100 CHANGELOG.md: Start new 4.20.0 section Signed-off-by: Julien Grall --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8fbe82df6..c3b788df61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,15 @@ Notable changes to Xen will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) -## [4.19.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - 2024-07-29 +## [4.20.0 UNRELEASED](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=staging) - TBD + +### Changed + +### Added + +### Removed + +## [4.19.0](https://xenbits.xenproject.org/gitweb/?p=xen.git;a=shortlog;h=RELEASE-4.19.0) - 2024-07-29 ### Changed - Changed flexible array definitions in public I/O interface headers to not -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Sat Jul 20 00:55:54 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Sat, 20 Jul 2024 00:55:54 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761234.1171254 (Exim 4.92) (envelope-from ) id 1sUyOA-0000AY-3q; Sat, 20 Jul 2024 00:55:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761234.1171254; Sat, 20 Jul 2024 00:55:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyO9-0000AQ-WF; Sat, 20 Jul 2024 00:55:54 +0000 Received: by outflank-mailman (input) for mailman id 761234; Sat, 20 Jul 2024 00:55:52 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyO8-00009w-NY for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:52 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sUyO8-0006aE-Mf for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:52 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sUyO8-00026v-Lm for xen-changelog@lists.xenproject.org; Sat, 20 Jul 2024 00:55:52 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=cmyXpH+Bp8UFC8aOCRQHFzUXOBqkMlSnWGlgJxG+pXc=; b=zpxIPv1Wz7RGqF0HSEf5LIVg3Y 4jlvpbOG84gqv5uzM5FlFplv4WP3pXd9ZjeJkwEsZ9RTBj9Vp5FXH4lK9yrIVfQfTl05lclbZ8axi GeTBy2Dt0Np2sTTeDyMhDQ5He4zL+Tcr7PVzMp7Rb4E/oLkIzdOlUOFpHcAwIhYCixHk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] xen/Makefile: Correct XEN_EXTERVERSION for unstable Message-Id: Date: Sat, 20 Jul 2024 00:55:52 +0000 commit e5182b40cf4bbb89292d66b8f3047a9ee913a90a Author: Julien Grall AuthorDate: Fri Jul 19 12:34:24 2024 +0100 Commit: Julien Grall CommitDate: Fri Jul 19 12:34:32 2024 +0100 xen/Makefile: Correct XEN_EXTERVERSION for unstable Signed-off-by: Julien Grall --- xen/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/Makefile b/xen/Makefile index ca0ead3f23..2e1a925c84 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -6,7 +6,7 @@ this-makefile := $(call lastword,$(MAKEFILE_LIST)) # All other places this is stored (eg. compile.h) should be autogenerated. export XEN_VERSION = 4 export XEN_SUBVERSION = 20 -export XEN_EXTRAVERSION ?= $(XEN_VENDORVERSION) +export XEN_EXTRAVERSION ?= -unstable$(XEN_VENDORVERSION) export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) -include xen-version -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 07:44:16 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 07:44:16 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761527.1171460 (Exim 4.92) (envelope-from ) id 1sVniI-0004VK-16; Mon, 22 Jul 2024 07:44:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761527.1171460; Mon, 22 Jul 2024 07:44:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVniH-0004VC-Uq; Mon, 22 Jul 2024 07:44:05 +0000 Received: by outflank-mailman (input) for mailman id 761527; Mon, 22 Jul 2024 07:44:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVniG-0004V6-Gd for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVniG-00083Z-1k for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVniF-0005fO-Vt for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=3I/oiMx4UM36KQ2FADZ1rBbYrSAKx2ntqE98OmpRBiA=; b=b7GD97x0++8d67KPUDXv1QwnR8 92xEwnPHOvYY5VSCSadYeb4bQILCQHlt8397MbyRX4OCbr3Z6082EeyGgRl4jHdyk1WXLfJ4zq9mz 8XflPZVq2/7Ldvvh1L/+FHRJftbQZt7ChlP3bsQIibuTDm+y5x8bsLmgwACzWuBuB8N8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] MAINTAINERS: drop separate x86/mm section Message-Id: Date: Mon, 22 Jul 2024 07:44:03 +0000 commit 820034ef91675517901f48da2f26b77146b07a73 Author: Jan Beulich AuthorDate: Mon Jul 22 09:35:42 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:35:42 2024 +0200 MAINTAINERS: drop separate x86/mm section Let the subtree fall under general x86 maintainership instead, then also properly reflecting Roger's role there. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper Acked-by: Roger Pau Monné --- MAINTAINERS | 6 ------ 1 file changed, 6 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 2b0c894527..32facd7c47 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -594,12 +594,6 @@ F: tools/misc/xen-cpuid.c F: tools/tests/cpu-policy/ F: tools/tests/x86_emulator/ -X86 MEMORY MANAGEMENT -M: Jan Beulich -M: Andrew Cooper -S: Supported -F: xen/arch/x86/mm/ - X86 MEMORY PAGING S: Orphaned F: xen/arch/x86/mm/mem_paging.c -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 07:44:16 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 07:44:16 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761528.1171464 (Exim 4.92) (envelope-from ) id 1sVniS-0004Wu-2S; Mon, 22 Jul 2024 07:44:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761528.1171464; Mon, 22 Jul 2024 07:44:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVniR-0004Wm-W9; Mon, 22 Jul 2024 07:44:15 +0000 Received: by outflank-mailman (input) for mailman id 761528; Mon, 22 Jul 2024 07:44:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVniQ-0004We-8P for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVniQ-00083g-6I for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVniQ-0005fq-3w for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:14 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=+5Xys+6tM28n9YwkQH/ph/GH8e/QckuVIQN+ZRTkszA=; b=A3lyrm/Xv5mUb94APSd1wqkvcL 5/hzBHKFAp2+VKAMpVu2lmv+Mly88Viya9BvQfBGbd7U+kOYDJSrnDib0OFqTQ19idY6tHFIX6Wyt euEw35MmbSbnCVj8xX6/B+ozirgD3COashX6saa5UvYYBRmqlUETB/A4hWK9yUvGTVuM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] MAINTAINERS: drop CPU POOLS section Message-Id: Date: Mon, 22 Jul 2024 07:44:14 +0000 commit 7b6c1ba3b1c98dc17d076e058260167449a334b0 Author: Juergen Gross AuthorDate: Mon Jul 22 09:36:09 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:36:09 2024 +0200 MAINTAINERS: drop CPU POOLS section The CPU POOLS sections in MAINTAINERS can be dropped, as the SCHEDULING section has the same maintainers and it is covering the CPU POOLS files as well. Signed-off-by: Juergen Gross Acked-by: Jan Beulich Acked-by: Andrew Cooper --- MAINTAINERS | 6 ------ 1 file changed, 6 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 32facd7c47..fcec4377b1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -284,12 +284,6 @@ S: Supported F: .gitlab-ci.yml F: automation/ -CPU POOLS -M: Juergen Gross -M: Dario Faggioli -S: Supported -F: xen/common/sched/*cpupool.c - DEVICE TREE M: Stefano Stabellini M: Julien Grall -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 07:44:26 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 07:44:26 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761529.1171468 (Exim 4.92) (envelope-from ) id 1sVnic-0004Zb-47; Mon, 22 Jul 2024 07:44:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761529.1171468; Mon, 22 Jul 2024 07:44:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnic-0004ZT-1T; Mon, 22 Jul 2024 07:44:26 +0000 Received: by outflank-mailman (input) for mailman id 761529; Mon, 22 Jul 2024 07:44:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnia-0004ZB-AW for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnia-00083t-9Y for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVnia-0005gv-8W for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=kfFRSx/YbfpbGf4nsQd5o1qLniauVmZaAnq4Bap+phA=; b=xGl1SlZYD4+g3wb7JJ5RNvOhUO /Cn4NaSiVtnZnB2XhW7ANj3jLG7a9fXlKKSDobA8kQ+KhGh/4en+4qQUBUDNIBQc+CcS8UbHEdRxp pYSRhjOyNVPBxOzdOGOlvMbRfe0j7z1LpWGM5omzcI/R22vvOzQB2+IJm5WEiFKHKEmk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] SUPPORT.md: update Xen version Message-Id: Date: Mon, 22 Jul 2024 07:44:24 +0000 commit 8c000b8fd3caf9c1ff615fc15429e13271b26849 Author: Juergen Gross AuthorDate: Mon Jul 22 09:36:21 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:36:21 2024 +0200 SUPPORT.md: update Xen version Update the Xen version to 4.20 Signed-off-by: Juergen Gross Acked-by: Julien Grall --- SUPPORT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SUPPORT.md b/SUPPORT.md index 77d2a7a7db..bd4316523d 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -9,7 +9,7 @@ for the definitions of the support status levels etc. # Release Support - Xen-Version: 4.19-rc + Xen-Version: 4.20-unstable Initial-Release: n/a Supported-Until: TBD Security-Support-Until: Unreleased - not yet security-supported -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 07:44:36 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 07:44:36 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761530.1171471 (Exim 4.92) (envelope-from ) id 1sVnim-0004c2-5E; Mon, 22 Jul 2024 07:44:36 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761530.1171471; Mon, 22 Jul 2024 07:44:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnim-0004bv-2r; Mon, 22 Jul 2024 07:44:36 +0000 Received: by outflank-mailman (input) for mailman id 761530; Mon, 22 Jul 2024 07:44:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnik-0004bn-DM for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnik-000847-CV for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVnik-0005hX-Bf for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=MZGq8oU7ZxGMnSwAprnw/mqiV8kkb8jgJZpCh1SrRcI=; b=CD+Jkj7S0s4zev5rFuYLpTwJUJ dybBmhjqF06NnBxfSnpZ6XsZrcsb3AB/IpdXna7s+cXIujhgKHeK2wpGn6Td3HlOYEE3sMgoaFw6Q QjgilgJ1ftbi+BSAfYcZG3qIg71WcLT7oD7CIRElpI4wBWMM/wTGAUD87wsoPstxFJ94=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/cpufreq: clean up stale powernow_cpufreq_init() Message-Id: Date: Mon, 22 Jul 2024 07:44:34 +0000 commit d3029dba8e13b36adc0a513581850bbc9b51feda Author: Sergiy Kibrik AuthorDate: Mon Jul 22 09:36:35 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:36:35 2024 +0200 x86/cpufreq: clean up stale powernow_cpufreq_init() Remove useless declaration, eliminating a MISRA C:2012 Rule 8.6 violation: The routine itself was removed by following commit long time ago: 222013114 x86: Fix RevF detection in powernow.c No functional change. Signed-off-by: Sergiy Kibrik Reviewed-by: Jan Beulich --- xen/include/acpi/cpufreq/processor_perf.h | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/include/acpi/cpufreq/processor_perf.h b/xen/include/acpi/cpufreq/processor_perf.h index 5f48aceadb..301104e16f 100644 --- a/xen/include/acpi/cpufreq/processor_perf.h +++ b/xen/include/acpi/cpufreq/processor_perf.h @@ -7,7 +7,6 @@ #define XEN_PX_INIT 0x80000000U -int powernow_cpufreq_init(void); unsigned int powernow_register_driver(void); unsigned int get_measured_perf(unsigned int cpu, unsigned int flag); void cpufreq_residency_update(unsigned int cpu, uint8_t state); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 07:44:46 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 07:44:46 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761531.1171475 (Exim 4.92) (envelope-from ) id 1sVniw-0004fM-6j; Mon, 22 Jul 2024 07:44:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761531.1171475; Mon, 22 Jul 2024 07:44:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVniw-0004fF-4H; Mon, 22 Jul 2024 07:44:46 +0000 Received: by outflank-mailman (input) for mailman id 761531; Mon, 22 Jul 2024 07:44:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVniu-0004ex-GO for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVniu-00084G-FV for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:44 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVniu-0005iB-Ef for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:44 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=p0tDItDpT4LMfzFjcp6ofKCfsH/wx97G/PanOr9BpNw=; b=A6iVnfVflfdTQLgBjjp5YSCron WPP2zlFKb0iTt+bOoVafaDmdRNvo01V2fgMqj3JMgIjCJWODCIHmJHKs6NwHPSxV6832qxUoHmHLW upnYMyHARFZ51sPT1FcPHfmM+TSWv5ZibR5mcSTzY7ohO9eZczraa7Sgn9ySR6WhWx7A=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] public/sysctl: address violations of MISRA C: 2012 Rule 7.3 Message-Id: Date: Mon, 22 Jul 2024 07:44:44 +0000 commit c1059b4799d4ce3378b6722e01d66422f0b63977 Author: Alessandro Zucchelli AuthorDate: Mon Jul 22 09:37:11 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:37:11 2024 +0200 public/sysctl: address violations of MISRA C: 2012 Rule 7.3 This addresses violations of MISRA C:2012 Rule 7.3 which states as following: The lowercase character `l' shall not be used in a literal suffix. Changed moreover suffixes 'u' in 'U' for better readability next to the 'L's. No functional change. Signed-off-by: Alessandro Zucchelli Acked-by: Jan Beulich --- xen/include/public/sysctl.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h index 3a6e7d48f0..b2a5a724db 100644 --- a/xen/include/public/sysctl.h +++ b/xen/include/public/sysctl.h @@ -898,15 +898,15 @@ struct xen_sysctl_psr_alloc { * instruction for PV guests. */ struct xen_sysctl_cpu_levelling_caps { -#define XEN_SYSCTL_CPU_LEVELCAP_faulting (1ul << 0) /* CPUID faulting */ -#define XEN_SYSCTL_CPU_LEVELCAP_ecx (1ul << 1) /* 0x00000001.ecx */ -#define XEN_SYSCTL_CPU_LEVELCAP_edx (1ul << 2) /* 0x00000001.edx */ -#define XEN_SYSCTL_CPU_LEVELCAP_extd_ecx (1ul << 3) /* 0x80000001.ecx */ -#define XEN_SYSCTL_CPU_LEVELCAP_extd_edx (1ul << 4) /* 0x80000001.edx */ -#define XEN_SYSCTL_CPU_LEVELCAP_xsave_eax (1ul << 5) /* 0x0000000D:1.eax */ -#define XEN_SYSCTL_CPU_LEVELCAP_thermal_ecx (1ul << 6) /* 0x00000006.ecx */ -#define XEN_SYSCTL_CPU_LEVELCAP_l7s0_eax (1ul << 7) /* 0x00000007:0.eax */ -#define XEN_SYSCTL_CPU_LEVELCAP_l7s0_ebx (1ul << 8) /* 0x00000007:0.ebx */ +#define XEN_SYSCTL_CPU_LEVELCAP_faulting (1UL << 0) /* CPUID faulting */ +#define XEN_SYSCTL_CPU_LEVELCAP_ecx (1UL << 1) /* 0x00000001.ecx */ +#define XEN_SYSCTL_CPU_LEVELCAP_edx (1UL << 2) /* 0x00000001.edx */ +#define XEN_SYSCTL_CPU_LEVELCAP_extd_ecx (1UL << 3) /* 0x80000001.ecx */ +#define XEN_SYSCTL_CPU_LEVELCAP_extd_edx (1UL << 4) /* 0x80000001.edx */ +#define XEN_SYSCTL_CPU_LEVELCAP_xsave_eax (1UL << 5) /* 0x0000000D:1.eax */ +#define XEN_SYSCTL_CPU_LEVELCAP_thermal_ecx (1UL << 6) /* 0x00000006.ecx */ +#define XEN_SYSCTL_CPU_LEVELCAP_l7s0_eax (1UL << 7) /* 0x00000007:0.eax */ +#define XEN_SYSCTL_CPU_LEVELCAP_l7s0_ebx (1UL << 8) /* 0x00000007:0.ebx */ uint32_t caps; }; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 07:44:56 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 07:44:56 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761532.1171479 (Exim 4.92) (envelope-from ) id 1sVnj6-0004iB-8C; Mon, 22 Jul 2024 07:44:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761532.1171479; Mon, 22 Jul 2024 07:44:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnj6-0004i3-5f; Mon, 22 Jul 2024 07:44:56 +0000 Received: by outflank-mailman (input) for mailman id 761532; Mon, 22 Jul 2024 07:44:54 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnj4-0004hc-JZ for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:54 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnj4-00084N-Ig for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:54 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVnj4-0005ic-Hs for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:44:54 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=UEQEgyeEs8/Jtc817Ub7DmQ1KTbFYy9fsGjWt/dBVsk=; b=Lh1ZRWEdZ3SNsRhdd2ZvDMpewR MuXUJ9FPLndv96JJmjftVJ23KOkxSKjIaodqm7igdqGsda0UXiEp2PoDl++v8MxoTBlCE4O0e2Hj8 LAvLPXon48YloqqqJMx/NPG2TvYIpMYO3SrMnB0wiuu/PaoXl5KM7bPcA9rpcbQFX95Q=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] common/sched: address a violation of MISRA C Rule 8.7 Message-Id: Date: Mon, 22 Jul 2024 07:44:54 +0000 commit 4b09c30b0f778160523045396f7fff631a24bc1c Author: Victor Lira AuthorDate: Mon Jul 22 09:37:45 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:37:45 2024 +0200 common/sched: address a violation of MISRA C Rule 8.7 Rule 8.7: "Functions and objects should not be defined with external linkage if they are referenced in only one translation unit". This patch fixes this by adding the static specifier. No functional changes. Reported-by: Stewart Hildebrand stewart.hildebrand@amd.com Signed-off-by: Victor Lira Acked-by: George Dunlap --- xen/common/sched/credit2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c index 685929c290..b4e03e2a63 100644 --- a/xen/common/sched/credit2.c +++ b/xen/common/sched/credit2.c @@ -1476,8 +1476,8 @@ static inline void runq_remove(struct csched2_unit *svc) list_del_init(&svc->runq_elem); } -void burn_credits(struct csched2_runqueue_data *rqd, struct csched2_unit *svc, - s_time_t now); +static void burn_credits(struct csched2_runqueue_data *rqd, + struct csched2_unit *svc, s_time_t now); static inline void tickle_cpu(unsigned int cpu, struct csched2_runqueue_data *rqd) @@ -1855,8 +1855,8 @@ static void reset_credit(int cpu, s_time_t now, struct csched2_unit *snext) /* No need to resort runqueue, as everyone's order should be the same. */ } -void burn_credits(struct csched2_runqueue_data *rqd, - struct csched2_unit *svc, s_time_t now) +static void burn_credits(struct csched2_runqueue_data *rqd, + struct csched2_unit *svc, s_time_t now) { s_time_t delta; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 07:45:06 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 07:45:06 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761533.1171484 (Exim 4.92) (envelope-from ) id 1sVnjG-0004kX-9j; Mon, 22 Jul 2024 07:45:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761533.1171484; Mon, 22 Jul 2024 07:45:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnjG-0004kP-79; Mon, 22 Jul 2024 07:45:06 +0000 Received: by outflank-mailman (input) for mailman id 761533; Mon, 22 Jul 2024 07:45:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnjE-0004kG-OH for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:45:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnjE-00085E-Ld for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:45:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVnjE-0005jZ-Kz for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:45:04 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=FfPRrAcTor5XHPcWvvenx24VxH5SyJWmyHVT3Xj/BCU=; b=DnUyefATNFZM7j8MNfcdFed/3j JS7POCjRxtgTL9hSDNOvo4veW42KuAWPttQS9ZIEPIrryOeZPZExVi6ci4Yq49uOL5SNLiAOlqUay FYPCs8OgzRh0aV8wKn8rUQCQxW0Osp/5/WqPORPqCGOKSdnCMc3WGeiWhg3bY11gy0kI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] Add libfuzzer target to fuzz/x86_instruction_emulator Message-Id: Date: Mon, 22 Jul 2024 07:45:04 +0000 commit af67ae49ce8f7298bf52345558490013a9d044b3 Author: Tamas K Lengyel AuthorDate: Mon Jul 22 09:38:28 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:38:28 2024 +0200 Add libfuzzer target to fuzz/x86_instruction_emulator This target enables integration into oss-fuzz. Changing invalid input return to -1 as values other then 0/-1 are reserved by libfuzzer. Also adding the missing __wrap_vsnprintf wrapper which is required for successful oss-fuzz build. Signed-off-by: Tamas K Lengyel Acked-by: Jan Beulich --- tools/fuzz/x86_instruction_emulator/Makefile | 11 +++++++++-- tools/fuzz/x86_instruction_emulator/fuzz-emul.c | 6 ++---- tools/tests/x86_emulator/wrappers.c | 11 +++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/tools/fuzz/x86_instruction_emulator/Makefile b/tools/fuzz/x86_instruction_emulator/Makefile index 1e4c6b37f5..8606c62c83 100644 --- a/tools/fuzz/x86_instruction_emulator/Makefile +++ b/tools/fuzz/x86_instruction_emulator/Makefile @@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk .PHONY: x86-insn-fuzz-all ifeq ($(CONFIG_X86_64),y) -x86-insn-fuzz-all: x86-insn-fuzzer.a fuzz-emul.o afl +x86-insn-fuzz-all: x86-insn-fuzzer.a fuzz-emul.o afl libfuzzer else x86-insn-fuzz-all: endif @@ -58,6 +58,9 @@ afl-harness: afl-harness.o $(OBJS) cpuid.o wrappers.o afl-harness-cov: afl-harness-cov.o $(patsubst %.o,%-cov.o,$(OBJS)) cpuid.o wrappers.o $(CC) $(CFLAGS) $(GCOV_FLAGS) $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@ +libfuzzer-harness: $(OBJS) cpuid.o wrappers.o + $(CC) $(CFLAGS) $(LIB_FUZZING_ENGINE) -fsanitize=fuzzer $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@ + # Common targets .PHONY: all all: x86-insn-fuzz-all @@ -67,7 +70,8 @@ distclean: clean .PHONY: clean clean: - rm -f *.a *.o $(DEPS_RM) afl-harness afl-harness-cov *.gcda *.gcno *.gcov + rm -f *.a *.o $(DEPS_RM) *.gcda *.gcno *.gcov + rm -f afl-harness afl-harness-cov libfuzzer-harness rm -rf x86_emulate x86-emulate.c x86-emulate.h wrappers.c cpuid.c .PHONY: install @@ -81,4 +85,7 @@ afl: afl-harness .PHONY: afl-cov afl-cov: afl-harness-cov +.PHONY: libfuzzer +libfuzzer: libfuzzer-harness + -include $(DEPS_INCLUDE) diff --git a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c index eeeb6931f4..2ba9ca9e0b 100644 --- a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c +++ b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c @@ -906,14 +906,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data_p, size_t size) if ( size <= DATA_OFFSET ) { - printf("Input too small\n"); - return 1; + return -1; } if ( size > FUZZ_CORPUS_SIZE ) { - printf("Input too large\n"); - return 1; + return -1; } memcpy(&input, data_p, size); diff --git a/tools/tests/x86_emulator/wrappers.c b/tools/tests/x86_emulator/wrappers.c index 3829a6f416..8f3bd1656f 100644 --- a/tools/tests/x86_emulator/wrappers.c +++ b/tools/tests/x86_emulator/wrappers.c @@ -91,6 +91,17 @@ int __wrap_snprintf(char *buf, size_t n, const char *fmt, ...) return rc; } +int __wrap_vsnprintf(char *buf, size_t n, const char *fmt, va_list varg) +{ + int rc; + + emul_save_fpu_state(); + rc = __real_vsnprintf(buf, n, fmt, varg); + emul_restore_fpu_state(); + + return rc; +} + char *__wrap_strstr(const char *s1, const char *s2) { char *s; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 07:45:16 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 07:45:16 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761534.1171490 (Exim 4.92) (envelope-from ) id 1sVnjQ-0004my-CM; Mon, 22 Jul 2024 07:45:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761534.1171490; Mon, 22 Jul 2024 07:45:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnjQ-0004mq-8b; Mon, 22 Jul 2024 07:45:16 +0000 Received: by outflank-mailman (input) for mailman id 761534; Mon, 22 Jul 2024 07:45:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnjO-0004ma-Pe for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:45:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnjO-00085P-Og for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:45:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVnjO-0005kA-No for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:45:14 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=wyyf7O71qucGwsLQhftjP0VhA/SNrAn7M8eI5xEM+NM=; b=0B/YNfFx8GynmqJyDI+dzEvaDV /HYKtIlLyDZfItYkyFm338v+SC6NxkPi0Ci2QDp6dKAs9yMY4oXEj4sjlteFYhrfE5XpT/q4nk3o1 YdN07kmpjX5BHapDAPwhJpSU72jSSG7yqXcVuqq09Dmpkfui3jlBPgC5QKr42s9yopdw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86: drop REX64_PREFIX Message-Id: Date: Mon, 22 Jul 2024 07:45:14 +0000 commit 0e3642514719c0659f2af44b1bbe8aba63d4a2ed Author: Jan Beulich AuthorDate: Mon Jul 22 09:39:40 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:39:40 2024 +0200 x86: drop REX64_PREFIX While we didn't copy the full Linux commentary, Linux commit 7180d4fb8308 ("x86_64: Fix 64bit FXSAVE encoding") is quite explicit about gas 2.16 supporting FXSAVEQ / FXRSTORQ. As that's presently our minimal required version, we can drop the workaround that was needed for yet older gas. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/i387.c | 15 ++++----------- xen/arch/x86/include/asm/asm_defns.h | 8 -------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/xen/arch/x86/i387.c b/xen/arch/x86/i387.c index fcdee10a6e..400c70114a 100644 --- a/xen/arch/x86/i387.c +++ b/xen/arch/x86/i387.c @@ -64,13 +64,12 @@ static inline void fpu_fxrstor(struct vcpu *v) { default: asm volatile ( - /* See below for why the operands/constraints are this way. */ - "1: " REX64_PREFIX "fxrstor (%2)\n" + "1: fxrstorq %0\n" ".section .fixup,\"ax\" \n" "2: push %%"__OP"ax \n" " push %%"__OP"cx \n" " push %%"__OP"di \n" - " mov %2,%%"__OP"di \n" + " lea %0,%%"__OP"di \n" " mov %1,%%ecx \n" " xor %%eax,%%eax \n" " rep ; stosl \n" @@ -81,7 +80,7 @@ static inline void fpu_fxrstor(struct vcpu *v) ".previous \n" _ASM_EXTABLE(1b, 2b) : - : "m" (*fpu_ctxt), "i" (sizeof(*fpu_ctxt) / 4), "R" (fpu_ctxt) ); + : "m" (*fpu_ctxt), "i" (sizeof(*fpu_ctxt) / 4) ); break; case 4: case 2: asm volatile ( @@ -157,13 +156,7 @@ static inline void fpu_fxsave(struct vcpu *v) if ( fip_width != 4 ) { - /* - * The only way to force fxsaveq on a wide range of gas versions. - * On older versions the rex64 prefix works only if we force an - * addressing mode that doesn't require extended registers. - */ - asm volatile ( REX64_PREFIX "fxsave (%1)" - : "=m" (*fpu_ctxt) : "R" (fpu_ctxt) ); + asm volatile ( "fxsaveq %0" : "=m" (*fpu_ctxt) ); /* * Some CPUs don't save/restore FDP/FIP/FOP unless an exception is diff --git a/xen/arch/x86/include/asm/asm_defns.h b/xen/arch/x86/include/asm/asm_defns.h index 0a3ff70566..92b4116a15 100644 --- a/xen/arch/x86/include/asm/asm_defns.h +++ b/xen/arch/x86/include/asm/asm_defns.h @@ -331,14 +331,6 @@ static always_inline void stac(void) #define safe_swapgs \ "mfence; swapgs;" -#ifdef __sun__ -#define REX64_PREFIX "rex64\\" -#elif defined(__clang__) -#define REX64_PREFIX ".byte 0x48; " -#else -#define REX64_PREFIX "rex64/" -#endif - #define ELFNOTE(name, type, desc) \ .pushsection .note.name, "a", @note ; \ .p2align 2 ; \ -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 07:45:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 07:45:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761535.1171492 (Exim 4.92) (envelope-from ) id 1sVnjZ-0004qg-FO; Mon, 22 Jul 2024 07:45:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761535.1171492; Mon, 22 Jul 2024 07:45:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnjZ-0004qX-CT; Mon, 22 Jul 2024 07:45:25 +0000 Received: by outflank-mailman (input) for mailman id 761535; Mon, 22 Jul 2024 07:45:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnjY-0004qM-Sj for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:45:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnjY-00085a-Rt for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:45:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVnjY-0005ks-R5 for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:45:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=xD2mUl/qWYRYFnaq0VSE+CyOte4Y4xPRH31KLWfhZ6s=; b=v7rpEt3/Thg/P1YG5fJf5eKKZ/ 9J09ES/ICsHNbS3XbdRWeP3b8tXQUVyYPFXp5ZqR8C7+kS2UCG866oq4qaR0QNCGtZndNcZn/fMlz zI8lR8/SuPwty1yNzoV3k1XSQUzT49InJ2e7pXzxt/+AtcQ5EEgWZmlR2VMmTR7FLD/E=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/mm: drop gfn_to_paddr() Message-Id: Date: Mon, 22 Jul 2024 07:45:24 +0000 commit 8d5dc7d7df92d8d7f9450cee0bab57dceefa26c5 Author: Jan Beulich AuthorDate: Mon Jul 22 09:40:24 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:40:24 2024 +0200 x86/mm: drop gfn_to_paddr() This really is gfn_to_gaddr() in disguise; no need to have two variants of the same logic. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/include/asm/guest_pt.h | 6 ------ xen/arch/x86/mm/shadow/multi.c | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/include/asm/guest_pt.h b/xen/arch/x86/include/asm/guest_pt.h index 7b0c9b005c..e01db4a671 100644 --- a/xen/arch/x86/include/asm/guest_pt.h +++ b/xen/arch/x86/include/asm/guest_pt.h @@ -20,12 +20,6 @@ #error GUEST_PAGING_LEVELS not defined #endif -static inline paddr_t -gfn_to_paddr(gfn_t gfn) -{ - return ((paddr_t)gfn_x(gfn)) << PAGE_SHIFT; -} - /* Override get_gfn to work with gfn_t */ #undef get_gfn #define get_gfn(d, g, t) get_gfn_type((d), gfn_x(g), (t), P2M_ALLOC) diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index 8e0046ae69..376f6823cd 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -562,7 +562,7 @@ _sh_propagate(struct vcpu *v, if ( p2mt == p2m_mmio_direct ) sflags |= get_pat_flags(v, gflags, - gfn_to_paddr(target_gfn), + gfn_to_gaddr(target_gfn), mfn_to_maddr(target_mfn), X86_MT_UC); else if ( is_iommu_enabled(d) && iommu_snoop ) @@ -570,7 +570,7 @@ _sh_propagate(struct vcpu *v, else sflags |= get_pat_flags(v, gflags, - gfn_to_paddr(target_gfn), + gfn_to_gaddr(target_gfn), mfn_to_maddr(target_mfn), NO_HARDCODE_MEM_TYPE); } -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 07:45:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 07:45:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761536.1171497 (Exim 4.92) (envelope-from ) id 1sVnjj-0004tQ-Gp; Mon, 22 Jul 2024 07:45:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761536.1171497; Mon, 22 Jul 2024 07:45:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnjj-0004tI-Ds; Mon, 22 Jul 2024 07:45:35 +0000 Received: by outflank-mailman (input) for mailman id 761536; Mon, 22 Jul 2024 07:45:35 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnji-0004t8-Vl for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:45:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVnji-00085i-Ux for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:45:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVnji-0005lK-UD for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 07:45:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Z2pid38a+ZguPJ8IDCjKod+raYC/O18Syvn42eZ8hyk=; b=sZIB4MZ/PN/TI22z1GB8zSMp7n EUTE1oJ7u4n1QdhS62mh/ftuHWbuRJp7OkcfORNmvmBDukXtbK38QGSu+51O7H3ZlaNg6vmbUV8y7 g7yy1Dx3y3NyhHmWbLGbiSIMsSOB2KC6H68zB5L1qoGIQaTyLbppSuUc7xxc0YtdeapY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86: don't open-code [gm]fn_to_[gm]addr() Message-Id: Date: Mon, 22 Jul 2024 07:45:34 +0000 commit c674c77f69684bfa57e3c61d6dbf404c13953f34 Author: Jan Beulich AuthorDate: Mon Jul 22 09:41:03 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:41:03 2024 +0200 x86: don't open-code [gm]fn_to_[gm]addr() At least in pure address calculation use the intended basic construct instead of opend-coded left-shifting by PAGE_SHIFT. Leave alone page table entry calculations for now, as those aren't really calculating addresses. No functional change. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/guest/xen/xen.c | 2 +- xen/arch/x86/include/asm/guest_pt.h | 2 +- xen/arch/x86/mm/hap/nested_hap.c | 2 +- xen/arch/x86/mm/p2m-ept.c | 7 +++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/guest/xen/xen.c b/xen/arch/x86/guest/xen/xen.c index 7484b3f73a..c17f5c447a 100644 --- a/xen/arch/x86/guest/xen/xen.c +++ b/xen/arch/x86/guest/xen/xen.c @@ -73,7 +73,7 @@ static void map_shared_info(void) if ( rc ) panic("failed to map shared_info page: %ld\n", rc); - set_fixmap(FIX_XEN_SHARED_INFO, mfn_x(mfn) << PAGE_SHIFT); + set_fixmap(FIX_XEN_SHARED_INFO, mfn_to_maddr(mfn)); /* Mask all upcalls */ for ( i = 0; i < ARRAY_SIZE(XEN_shared_info->evtchn_mask); i++ ) diff --git a/xen/arch/x86/include/asm/guest_pt.h b/xen/arch/x86/include/asm/guest_pt.h index e01db4a671..21473f9bbc 100644 --- a/xen/arch/x86/include/asm/guest_pt.h +++ b/xen/arch/x86/include/asm/guest_pt.h @@ -371,7 +371,7 @@ static inline paddr_t guest_walk_to_gpa(const walk_t *gw) if ( gfn_eq(gfn, INVALID_GFN) ) return INVALID_PADDR; - return (gfn_x(gfn) << PAGE_SHIFT) | (gw->va & ~PAGE_MASK); + return gfn_to_gaddr(gfn) | (gw->va & ~PAGE_MASK); } /* Given a walk_t from a successful walk, return the page-order of the diff --git a/xen/arch/x86/mm/hap/nested_hap.c b/xen/arch/x86/mm/hap/nested_hap.c index ee78a797d1..080b60adf0 100644 --- a/xen/arch/x86/mm/hap/nested_hap.c +++ b/xen/arch/x86/mm/hap/nested_hap.c @@ -134,7 +134,7 @@ static int nestedhap_walk_L0_p2m( rc = NESTEDHVM_PAGEFAULT_DONE; direct_mmio_out: - *L0_gpa = (mfn_x(mfn) << PAGE_SHIFT) + (L1_gpa & ~PAGE_MASK); + *L0_gpa = mfn_to_maddr(mfn) + (L1_gpa & ~PAGE_MASK); out: p2m_put_gfn(p2m, gaddr_to_gfn(L1_gpa)); return rc; diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index 469e27ee93..9925c560c1 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -565,11 +565,10 @@ int epte_get_entry_emt(struct domain *d, gfn_t gfn, mfn_t mfn, if ( gmtrr_mtype == -EADDRNOTAVAIL ) return -1; - gmtrr_mtype = v ? mtrr_get_type(&v->arch.hvm.mtrr, - gfn_x(gfn) << PAGE_SHIFT, order) + gmtrr_mtype = v ? mtrr_get_type(&v->arch.hvm.mtrr, gfn_to_gaddr(gfn), + order) : X86_MT_WB; - hmtrr_mtype = mtrr_get_type(&mtrr_state, mfn_x(mfn) << PAGE_SHIFT, - order); + hmtrr_mtype = mtrr_get_type(&mtrr_state, mfn_to_maddr(mfn), order); if ( gmtrr_mtype < 0 || hmtrr_mtype < 0 ) return -1; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 09:22:10 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 09:22:10 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761586.1171554 (Exim 4.92) (envelope-from ) id 1sVpF7-0002RE-77; Mon, 22 Jul 2024 09:22:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761586.1171554; Mon, 22 Jul 2024 09:22:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVpF7-0002R4-4U; Mon, 22 Jul 2024 09:22:05 +0000 Received: by outflank-mailman (input) for mailman id 761586; Mon, 22 Jul 2024 09:22:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVpF5-0002Qu-U9 for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:22:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVpF5-0002GC-Fl for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:22:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVpF5-0003we-Er for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:22:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=SXXwjeVHrLLejGuKSgYg3ByPZB6oBCCfaZAs5GlNa14=; b=u2qOpmHvJB1OGtUIfQGQ5iwbUg HLHFjCVbwqpC20ZFLuU49pnRxcAQ/oXPRvt6lT8R2006yhjzqIxShQl0SMNa7K6QDMbbJa+BOhLKy YwCRz077CwjiwIxoYk6BBVjMB3SBIzS/36OJBNdllX40z0x2I/4OwxZKrSz5PBZNLTV0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] Revert "Add libfuzzer target to fuzz/x86_instruction_emulator" Message-Id: Date: Mon, 22 Jul 2024 09:22:03 +0000 commit ff652ed5dcd797a46c84258255dfd429ae68a2d6 Author: Jan Beulich AuthorDate: Mon Jul 22 11:17:17 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 11:17:17 2024 +0200 Revert "Add libfuzzer target to fuzz/x86_instruction_emulator" This reverts commit af67ae49ce8f7298bf52345558490013a9d044b3 for breaking the build with at least older gcc. --- tools/fuzz/x86_instruction_emulator/Makefile | 11 ++--------- tools/fuzz/x86_instruction_emulator/fuzz-emul.c | 6 ++++-- tools/tests/x86_emulator/wrappers.c | 11 ----------- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/tools/fuzz/x86_instruction_emulator/Makefile b/tools/fuzz/x86_instruction_emulator/Makefile index 8606c62c83..1e4c6b37f5 100644 --- a/tools/fuzz/x86_instruction_emulator/Makefile +++ b/tools/fuzz/x86_instruction_emulator/Makefile @@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk .PHONY: x86-insn-fuzz-all ifeq ($(CONFIG_X86_64),y) -x86-insn-fuzz-all: x86-insn-fuzzer.a fuzz-emul.o afl libfuzzer +x86-insn-fuzz-all: x86-insn-fuzzer.a fuzz-emul.o afl else x86-insn-fuzz-all: endif @@ -58,9 +58,6 @@ afl-harness: afl-harness.o $(OBJS) cpuid.o wrappers.o afl-harness-cov: afl-harness-cov.o $(patsubst %.o,%-cov.o,$(OBJS)) cpuid.o wrappers.o $(CC) $(CFLAGS) $(GCOV_FLAGS) $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@ -libfuzzer-harness: $(OBJS) cpuid.o wrappers.o - $(CC) $(CFLAGS) $(LIB_FUZZING_ENGINE) -fsanitize=fuzzer $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@ - # Common targets .PHONY: all all: x86-insn-fuzz-all @@ -70,8 +67,7 @@ distclean: clean .PHONY: clean clean: - rm -f *.a *.o $(DEPS_RM) *.gcda *.gcno *.gcov - rm -f afl-harness afl-harness-cov libfuzzer-harness + rm -f *.a *.o $(DEPS_RM) afl-harness afl-harness-cov *.gcda *.gcno *.gcov rm -rf x86_emulate x86-emulate.c x86-emulate.h wrappers.c cpuid.c .PHONY: install @@ -85,7 +81,4 @@ afl: afl-harness .PHONY: afl-cov afl-cov: afl-harness-cov -.PHONY: libfuzzer -libfuzzer: libfuzzer-harness - -include $(DEPS_INCLUDE) diff --git a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c index 2ba9ca9e0b..eeeb6931f4 100644 --- a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c +++ b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c @@ -906,12 +906,14 @@ int LLVMFuzzerTestOneInput(const uint8_t *data_p, size_t size) if ( size <= DATA_OFFSET ) { - return -1; + printf("Input too small\n"); + return 1; } if ( size > FUZZ_CORPUS_SIZE ) { - return -1; + printf("Input too large\n"); + return 1; } memcpy(&input, data_p, size); diff --git a/tools/tests/x86_emulator/wrappers.c b/tools/tests/x86_emulator/wrappers.c index 8f3bd1656f..3829a6f416 100644 --- a/tools/tests/x86_emulator/wrappers.c +++ b/tools/tests/x86_emulator/wrappers.c @@ -91,17 +91,6 @@ int __wrap_snprintf(char *buf, size_t n, const char *fmt, ...) return rc; } -int __wrap_vsnprintf(char *buf, size_t n, const char *fmt, va_list varg) -{ - int rc; - - emul_save_fpu_state(); - rc = __real_vsnprintf(buf, n, fmt, varg); - emul_restore_fpu_state(); - - return rc; -} - char *__wrap_strstr(const char *s1, const char *s2) { char *s; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 09:55:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 09:55:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761590.1171558 (Exim 4.92) (envelope-from ) id 1sVpl3-0006E1-9P; Mon, 22 Jul 2024 09:55:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761590.1171558; Mon, 22 Jul 2024 09:55:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVpl3-0006Du-6g; Mon, 22 Jul 2024 09:55:05 +0000 Received: by outflank-mailman (input) for mailman id 761590; Mon, 22 Jul 2024 09:55:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVpl2-0006Do-0B for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVpl1-0002tO-NB for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVpl1-0006CA-LX for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=hReRWI/1OVjfX5B1Vej2G3KOaveMNKcAy7WdF8cCtUg=; b=XV8EMeDKnISBNxBaCt1PbgQHno +1Z/hcov4vXurREo3aKQEOi4LhDuCuZjN4jbwf9G+fcHmLNSeGrpWJ+Cgg5Gq2dviK9+XpJxpE7FU ctNKcHEVmUv7L3wo9P8yfCl4udMpajBBcpG0RaXjKD01+4iVjSwxtN6fBEnuWaw6GOrE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/libxs: Drop XSTEST Message-Id: Date: Mon, 22 Jul 2024 09:55:03 +0000 commit ebc92622cf3e304d1a0a239e2a139187a4940b5d Author: Andrew Cooper AuthorDate: Fri Jun 28 15:56:39 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 10:50:03 2024 +0100 tools/libxs: Drop XSTEST This appears to been missed from the previous attempt in 2007. Fixes: fed194611785 ("xenstore: Remove broken and unmaintained test code") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross --- tools/libs/store/xs.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 38a6ce3cf2..ec77379ab9 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -494,10 +494,6 @@ out_false: return false; } -#ifdef XSTEST -#define read_all read_all_choice -#define xs_write_all write_all_choice -#else /* Simple routine for writing to sockets, etc. */ bool xs_write_all(int fd, const void *data, unsigned int len) { @@ -515,7 +511,6 @@ bool xs_write_all(int fd, const void *data, unsigned int len) return true; } -#endif static int get_error(const char *errorstring) { -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 09:55:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 09:55:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761591.1171561 (Exim 4.92) (envelope-from ) id 1sVplD-0006Fh-Al; Mon, 22 Jul 2024 09:55:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761591.1171561; Mon, 22 Jul 2024 09:55:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVplD-0006Fa-8M; Mon, 22 Jul 2024 09:55:15 +0000 Received: by outflank-mailman (input) for mailman id 761591; Mon, 22 Jul 2024 09:55:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVplB-0006FI-U0 for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVplB-0002tT-Si for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVplB-0006Cq-QW for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=e3shxR/pO58IF+QDVC/kvePHKAPOnVBMV1pu9qSi41c=; b=U1erp65B+KD8sdJzMRNqHI3sYF GzYXnIBdMmPQ7njvzeHJzmNSym9OywqIjjsdoVyAFcxbN4MLXyun3FdxxZuyoupEQpwOOlZoIUk0A E5dhN3R95S8t0TXAMJNaLJtv+WJOued/bIemEH2wzVYD/26pA908bIWVgi+0L2B9IxQE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/ppc: Avoid using the legacy __read_mostly/__ro_after_init definitions Message-Id: Date: Mon, 22 Jul 2024 09:55:13 +0000 commit 1d3034ac5bf1e3fe0b86994b242fb819f7a5d246 Author: Andrew Cooper AuthorDate: Fri Jun 21 19:23:11 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 10:50:03 2024 +0100 xen/ppc: Avoid using the legacy __read_mostly/__ro_after_init definitions RISC-V wants to introduce a full build of Xen without using the legacy definitions. PPC64 has the most minimal full build of Xen right now, so make it compile without the legacy definitions. Mostly this is just including xen/sections.h in a variety of common files. In a couple of cases, we can drop an inclusion of {xen,asm}/cache.h, but almost all files get the definitions transitively. No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich Reviewed-by: Oleksii Kurochko --- xen/arch/ppc/include/asm/cache.h | 3 --- xen/arch/ppc/mm-radix.c | 1 + xen/arch/ppc/stubs.c | 1 + xen/common/argo.c | 1 + xen/common/cpu.c | 1 + xen/common/debugtrace.c | 1 + xen/common/domain.c | 1 + xen/common/event_channel.c | 2 ++ xen/common/keyhandler.c | 1 + xen/common/memory.c | 1 + xen/common/page_alloc.c | 1 + xen/common/pdx.c | 1 + xen/common/radix-tree.c | 1 + xen/common/random.c | 2 +- xen/common/rcupdate.c | 1 + xen/common/sched/core.c | 1 + xen/common/sched/cpupool.c | 1 + xen/common/sched/credit.c | 1 + xen/common/sched/credit2.c | 1 + xen/common/shutdown.c | 1 + xen/common/spinlock.c | 1 + xen/common/timer.c | 1 + xen/common/version.c | 3 +-- xen/common/virtual_region.c | 1 + xen/common/vmap.c | 2 +- xen/drivers/char/console.c | 1 + xen/drivers/char/ns16550.c | 1 + xen/drivers/char/serial.c | 2 +- xen/include/xen/cache.h | 2 +- xen/include/xen/hypfs.h | 1 + 30 files changed, 30 insertions(+), 9 deletions(-) diff --git a/xen/arch/ppc/include/asm/cache.h b/xen/arch/ppc/include/asm/cache.h index 13c0bf3242..8a0a6b7b17 100644 --- a/xen/arch/ppc/include/asm/cache.h +++ b/xen/arch/ppc/include/asm/cache.h @@ -3,7 +3,4 @@ #ifndef _ASM_PPC_CACHE_H #define _ASM_PPC_CACHE_H -/* TODO: Phase out the use of this via cache.h */ -#define __read_mostly __section(".data.read_mostly") - #endif /* _ASM_PPC_CACHE_H */ diff --git a/xen/arch/ppc/mm-radix.c b/xen/arch/ppc/mm-radix.c index ab5a10695c..0a47959e64 100644 --- a/xen/arch/ppc/mm-radix.c +++ b/xen/arch/ppc/mm-radix.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include diff --git a/xen/arch/ppc/stubs.c b/xen/arch/ppc/stubs.c index 923f0e7b20..e743a86710 100644 --- a/xen/arch/ppc/stubs.c +++ b/xen/arch/ppc/stubs.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/argo.c b/xen/common/argo.c index 901f41eb2d..df19006744 100644 --- a/xen/common/argo.c +++ b/xen/common/argo.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/xen/common/cpu.c b/xen/common/cpu.c index 6e35b114c0..f09af0444b 100644 --- a/xen/common/cpu.c +++ b/xen/common/cpu.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include diff --git a/xen/common/debugtrace.c b/xen/common/debugtrace.c index a272e5e437..ca883ad919 100644 --- a/xen/common/debugtrace.c +++ b/xen/common/debugtrace.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/domain.c b/xen/common/domain.c index fb262dcec9..7b47696dd3 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index aac7d4b93f..13b97c94d7 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -26,6 +26,8 @@ #include #include #include +#include + #include #include diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c index 127ca50696..674e7be39e 100644 --- a/xen/common/keyhandler.c +++ b/xen/common/keyhandler.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/memory.c b/xen/common/memory.c index de2cc7ad92..a6f2f6d1b3 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 054b7edb39..33c8c917d9 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -134,6 +134,7 @@ #include #include #include +#include #include #include diff --git a/xen/common/pdx.c b/xen/common/pdx.c index d3d63b0750..b8384e6189 100644 --- a/xen/common/pdx.c +++ b/xen/common/pdx.c @@ -19,6 +19,7 @@ #include #include #include +#include /** * Maximum (non-inclusive) usable pdx. Must be diff --git a/xen/common/radix-tree.c b/xen/common/radix-tree.c index adc3034222..fb283a9d52 100644 --- a/xen/common/radix-tree.c +++ b/xen/common/radix-tree.c @@ -21,6 +21,7 @@ #include #include #include +#include struct radix_tree_path { struct radix_tree_node *node; diff --git a/xen/common/random.c b/xen/common/random.c index a29f2fcb99..35a9f387fd 100644 --- a/xen/common/random.c +++ b/xen/common/random.c @@ -1,6 +1,6 @@ -#include #include #include +#include #include #include #include diff --git a/xen/common/rcupdate.c b/xen/common/rcupdate.c index 212a99acd8..fd5d3d7484 100644 --- a/xen/common/rcupdate.c +++ b/xen/common/rcupdate.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c index d84b65f197..1a3ff5ae4d 100644 --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/sched/cpupool.c b/xen/common/sched/cpupool.c index ad8f608462..57dfee26f2 100644 --- a/xen/common/sched/cpupool.c +++ b/xen/common/sched/cpupool.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "private.h" diff --git a/xen/common/sched/credit.c b/xen/common/sched/credit.c index 020f44595e..a6bb321e7d 100644 --- a/xen/common/sched/credit.c +++ b/xen/common/sched/credit.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c index b4e03e2a63..76a273d4f6 100644 --- a/xen/common/sched/credit2.c +++ b/xen/common/sched/credit2.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c index 5f8141edc6..f413f331af 100644 --- a/xen/common/shutdown.c +++ b/xen/common/shutdown.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c index 28c6e9d3ac..0b87738445 100644 --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/timer.c b/xen/common/timer.c index a21798b76f..da0d069cc6 100644 --- a/xen/common/timer.c +++ b/xen/common/timer.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/version.c b/xen/common/version.c index 80869430fc..b7d7d515a3 100644 --- a/xen/common/version.c +++ b/xen/common/version.c @@ -3,14 +3,13 @@ #include #include #include +#include #include #include #include #include #include -#include - const char *xen_compile_date(void) { return XEN_COMPILE_DATE; diff --git a/xen/common/virtual_region.c b/xen/common/virtual_region.c index 52405d84b2..1dc2e9f592 100644 --- a/xen/common/virtual_region.c +++ b/xen/common/virtual_region.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include diff --git a/xen/common/vmap.c b/xen/common/vmap.c index 966a7e763f..b3b4ddf653 100644 --- a/xen/common/vmap.c +++ b/xen/common/vmap.c @@ -1,6 +1,6 @@ #ifdef VMAP_VIRT_START #include -#include +#include #include #include #include diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 3a3a97bcbe..7da8c5296f 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -32,6 +32,7 @@ #include #include #include +#include #ifdef CONFIG_X86 #include diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index 8f76bbe676..eaeb0e09d0 100644 --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/drivers/char/serial.c b/xen/drivers/char/serial.c index f28d8557c0..591a009008 100644 --- a/xen/drivers/char/serial.c +++ b/xen/drivers/char/serial.c @@ -10,8 +10,8 @@ #include #include #include +#include #include -#include #include diff --git a/xen/include/xen/cache.h b/xen/include/xen/cache.h index 82a3ba38e3..a19942fd63 100644 --- a/xen/include/xen/cache.h +++ b/xen/include/xen/cache.h @@ -15,7 +15,7 @@ #define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) #endif -#if defined(CONFIG_ARM) || defined(CONFIG_X86) || defined(CONFIG_PPC64) +#if defined(CONFIG_ARM) || defined(CONFIG_X86) /* TODO: Phase out the use of this via cache.h */ #define __ro_after_init __section(".data.ro_after_init") #endif diff --git a/xen/include/xen/hypfs.h b/xen/include/xen/hypfs.h index 1b65a9188c..d8fcac23b4 100644 --- a/xen/include/xen/hypfs.h +++ b/xen/include/xen/hypfs.h @@ -4,6 +4,7 @@ #ifdef CONFIG_HYPFS #include #include +#include #include #include -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 09:55:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 09:55:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761592.1171566 (Exim 4.92) (envelope-from ) id 1sVplN-0006J8-Du; Mon, 22 Jul 2024 09:55:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761592.1171566; Mon, 22 Jul 2024 09:55:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVplN-0006J1-BJ; Mon, 22 Jul 2024 09:55:25 +0000 Received: by outflank-mailman (input) for mailman id 761592; Mon, 22 Jul 2024 09:55:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVplM-0006Ir-12 for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVplM-0002tg-0D for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVplL-0006Dl-Uz for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=PlUbekVIjH4W/A88Akwy9Ng/c/2UvgLWYAxyGujuFsk=; b=CUVujH9GVHmLZ7pWC5prKMWrnZ n1IBEUfG/YXWBFTFsf4+nNJH/XnRANaelnEg/HwYxYM9hnZ3n/jLHqWC5JVFNtEdScrwyhCmEh9gc emzpnC9TNbjHc8loLP5Huqtbv0lIo9x4iHOomXq/vuFWBc6TL+WrnpIac0FDoAVIgQiw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/shutdown: Fix build issue with shutdown.h on PowerPC Message-Id: Date: Mon, 22 Jul 2024 09:55:23 +0000 commit 10b9589e6d4dd5e09c3d863bbebd927fe3f9beac Author: Andrew Cooper AuthorDate: Fri Jul 5 18:59:24 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 10:50:03 2024 +0100 xen/shutdown: Fix build issue with shutdown.h on PowerPC The use of bool needs xen/types.h, which shutdown.h picks up by chance in all other architectures. While fixing this, swap u8 for unsigned char in hwdom_shutdown(), and move opt_noreboot into __ro_after_init. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/common/shutdown.c | 4 ++-- xen/include/xen/shutdown.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c index f413f331af..c47341b977 100644 --- a/xen/common/shutdown.c +++ b/xen/common/shutdown.c @@ -12,7 +12,7 @@ #include /* opt_noreboot: If true, machine will need manual reset on error. */ -bool __read_mostly opt_noreboot; +bool __ro_after_init opt_noreboot; boolean_param("noreboot", opt_noreboot); static void noreturn reboot_or_halt(void) @@ -30,7 +30,7 @@ static void noreturn reboot_or_halt(void) } } -void hwdom_shutdown(u8 reason) +void hwdom_shutdown(unsigned char reason) { switch ( reason ) { diff --git a/xen/include/xen/shutdown.h b/xen/include/xen/shutdown.h index 668aed0be5..c7fa23aec1 100644 --- a/xen/include/xen/shutdown.h +++ b/xen/include/xen/shutdown.h @@ -2,11 +2,12 @@ #define __XEN_SHUTDOWN_H__ #include +#include /* opt_noreboot: If true, machine will need manual reset on error. */ extern bool opt_noreboot; -void noreturn hwdom_shutdown(u8 reason); +void noreturn hwdom_shutdown(unsigned char reason); void noreturn machine_restart(unsigned int delay_millisecs); void noreturn machine_halt(void); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 09:55:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 09:55:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761593.1171570 (Exim 4.92) (envelope-from ) id 1sVplX-0006M6-FW; Mon, 22 Jul 2024 09:55:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761593.1171570; Mon, 22 Jul 2024 09:55:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVplX-0006Ly-Cq; Mon, 22 Jul 2024 09:55:35 +0000 Received: by outflank-mailman (input) for mailman id 761593; Mon, 22 Jul 2024 09:55:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVplW-0006Lo-8G for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVplW-0002tq-5r for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVplW-0006Ej-2R for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=pt4GihMXXxX3ct3kEzD9GYi3D9kRvY57RhnY66ooRxE=; b=I/kTMXBdboHNSpTJ66m3neqA5d 9ua6Xiug10XgJuUGf+KxpjG2HnRqH5P/j5rF5mpxIOhr6xxK25UkFKJpu5XFDWU4wchY5OaM29V1h rWRr6C5JvHTd4KLpdAjNKwfG3Y+BUfptlRigDzykwTboLGocb1vLsokbwG53xshWc+Bc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/misc: xen-hvmcrash: Inject #DF instead of overwriting RIP Message-Id: Date: Mon, 22 Jul 2024 09:55:34 +0000 commit e42e4d8c3e2c391e8ce990e0a2c76d6e9a17aad6 Author: Matthew Barnes AuthorDate: Fri Jul 5 16:05:07 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 10:50:03 2024 +0100 tools/misc: xen-hvmcrash: Inject #DF instead of overwriting RIP xen-hvmcrash would previously save records, overwrite the instruction pointer with a bogus value, and then restore them to crash a domain just enough to cause the guest OS to memdump. This approach is found to be unreliable when tested on a guest running Windows 10 x64, with some executions doing nothing at all. Another approach would be to trigger NMIs. This approach is found to be unreliable when tested on Linux (Ubuntu 22.04), as Linux will ignore NMIs if it is not configured to handle such. Injecting a double fault abort to all vCPUs is found to be more reliable at crashing and invoking memdumps from Windows and Linux domains. This patch modifies the xen-hvmcrash tool to inject #DF to all vCPUs belonging to the specified domain, instead of overwriting RIP. Signed-off-by: Matthew Barnes Reviewed-by: Andrew Cooper --- tools/misc/Makefile | 2 +- tools/misc/xen-hvmcrash.c | 87 +++++++++++++---------------------------------- 2 files changed, 24 insertions(+), 65 deletions(-) diff --git a/tools/misc/Makefile b/tools/misc/Makefile index 66d0d6b090..c26e544e83 100644 --- a/tools/misc/Makefile +++ b/tools/misc/Makefile @@ -81,7 +81,7 @@ xen-hvmctx: xen-hvmctx.o $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS) xen-hvmcrash: xen-hvmcrash.o - $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS) + $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(LDLIBS_libxendevicemodel) $(APPEND_LDFLAGS) xen-memshare: xen-memshare.o $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS) diff --git a/tools/misc/xen-hvmcrash.c b/tools/misc/xen-hvmcrash.c index 1d058fa40a..5ae5bedb2b 100644 --- a/tools/misc/xen-hvmcrash.c +++ b/tools/misc/xen-hvmcrash.c @@ -1,7 +1,7 @@ /* * xen-hvmcrash.c * - * Attempt to crash an HVM guest by overwriting RIP/EIP with a bogus value + * Attempt to crash an HVM guest by injecting #DF to every vcpu * * Copyright (c) 2010 Citrix Systems, Inc. * @@ -24,36 +24,25 @@ * DEALINGS IN THE SOFTWARE. */ -#include #include #include -#include -#include -#include #include #include -#include - -#include -#include -#include #include -#include -#include -#include +#include + +#include int main(int argc, char **argv) { int domid; xc_interface *xch; + xendevicemodel_handle *dmod; xc_domaininfo_t dominfo; - int ret; - uint32_t len; - uint8_t *buf; - uint32_t off; - struct hvm_save_descriptor *descriptor; + int vcpu_id, ret; + bool injected = false; if (argc != 2 || !argv[1] || (domid = atoi(argv[1])) < 0) { fprintf(stderr, "usage: %s \n", argv[0]); @@ -83,59 +72,29 @@ main(int argc, char **argv) exit(-1); } - /* - * Calling with zero buffer length should return the buffer length - * required. - */ - ret = xc_domain_hvm_getcontext(xch, domid, 0, 0); - if (ret < 0) { - perror("xc_domain_hvm_getcontext"); - exit(1); - } - - len = ret; - buf = malloc(len); - if (buf == NULL) { - perror("malloc"); - exit(1); - } - - ret = xc_domain_hvm_getcontext(xch, domid, buf, len); - if (ret < 0) { - perror("xc_domain_hvm_getcontext"); - exit(1); - } - - off = 0; - - while (off < len) { - descriptor = (struct hvm_save_descriptor *)(buf + off); - - off += sizeof (struct hvm_save_descriptor); - - if (descriptor->typecode == HVM_SAVE_CODE(CPU)) { - HVM_SAVE_TYPE(CPU) *cpu; - - /* Overwrite EIP/RIP with some recognisable but bogus value */ - cpu = (HVM_SAVE_TYPE(CPU) *)(buf + off); - printf("CPU[%d]: RIP = %" PRIx64 "\n", descriptor->instance, cpu->rip); - cpu->rip = 0xf001; - } else if (descriptor->typecode == HVM_SAVE_CODE(END)) { - break; + dmod = xc_interface_dmod_handle(xch); + + for (vcpu_id = 0; vcpu_id <= dominfo.max_vcpu_id; vcpu_id++) { + printf("Injecting #DF to vcpu ID #%d...\n", vcpu_id); + ret = xendevicemodel_inject_event(dmod, domid, vcpu_id, + X86_EXC_DF, + XEN_DMOP_EVENT_hw_exc, 0, 0, 0); + if (ret < 0) { + fprintf(stderr, "Could not inject #DF to vcpu ID #%d: %s\n", + vcpu_id, strerror(errno)); + continue; } - - off += descriptor->length; + injected = true; } - ret = xc_domain_hvm_setcontext(xch, domid, buf, len); + ret = xc_domain_unpause(xch, domid); if (ret < 0) { - perror("xc_domain_hvm_setcontext"); + perror("xc_domain_unpause"); exit(1); } - ret = xc_domain_unpause(xch, domid); - if (ret < 0) { - perror("xc_domain_unpause"); + if (!injected) { + fprintf(stderr, "Could not inject #DF to any vcpu!\n"); exit(1); } -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 09:55:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 09:55:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761594.1171574 (Exim 4.92) (envelope-from ) id 1sVplh-0006P3-HA; Mon, 22 Jul 2024 09:55:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761594.1171574; Mon, 22 Jul 2024 09:55:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVplh-0006Ov-EO; Mon, 22 Jul 2024 09:55:45 +0000 Received: by outflank-mailman (input) for mailman id 761594; Mon, 22 Jul 2024 09:55:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVplg-0006OR-Ad for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVplg-0002u2-8z for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:44 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVplg-0006FD-7z for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 09:55:44 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=sUEFdw5etqnE2kVkUYiPIf26LW+s4lQjPrF5XbocdSQ=; b=FUBKhK8iJp8YYJlgXCGsfSNKhy 4jreixE3fLxlo/SLJvroBMiowC8Toni6DN9jnwhxGEvtjrrpbPlXTNSTtNb9SnlpHdiPWt/v2omTi eKkGAV2wEjf/75ATQHW4OQmKbH7rUdHQBCLAE+P6+Lqc6b0DqI0Ou1K5rDQqiOXaQ11w=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] ppc/shutdown: Implement machine_{halt,restart}() Message-Id: Date: Mon, 22 Jul 2024 09:55:44 +0000 commit e44f33ccddc20079d9a22e1f0659c88fde0f4eb2 Author: Andrew Cooper AuthorDate: Fri Jul 5 18:56:48 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 10:50:03 2024 +0100 ppc/shutdown: Implement machine_{halt,restart}() OPAL has easy APIs for shutdown/reboot, so wire them up. Then, use machine_halt() rather than an infinite loop at the end of start_xen(). This avoids the Qemu smoke test needing to wait for the full timeout in order to succeed. (XEN) 8e011600000000c0 is the result of PTE map Enabled radix in LPCR Flushed TLB Hello, ppc64le! [ 6.341897656,5] OPAL: Shutdown request type 0x0... Signed-off-by: Andrew Cooper Reviewed-by: Shawn Anastasio --- xen/arch/ppc/Makefile | 1 + xen/arch/ppc/ppc64/opal-calls.S | 4 ++++ xen/arch/ppc/setup.c | 8 +++---- xen/arch/ppc/shutdown.c | 48 +++++++++++++++++++++++++++++++++++++++++ xen/arch/ppc/stubs.c | 12 ----------- 5 files changed, 56 insertions(+), 17 deletions(-) diff --git a/xen/arch/ppc/Makefile b/xen/arch/ppc/Makefile index 71feb5e2c4..655d212f66 100644 --- a/xen/arch/ppc/Makefile +++ b/xen/arch/ppc/Makefile @@ -4,6 +4,7 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.init.o obj-y += mm-radix.o obj-y += opal.o obj-y += setup.o +obj-y += shutdown.o obj-y += stubs.o obj-y += tlb-radix.o diff --git a/xen/arch/ppc/ppc64/opal-calls.S b/xen/arch/ppc/ppc64/opal-calls.S index cc5de75c8a..69d07909d1 100644 --- a/xen/arch/ppc/ppc64/opal-calls.S +++ b/xen/arch/ppc/ppc64/opal-calls.S @@ -79,3 +79,7 @@ opal_return_mmu: OPAL_CALL(opal_console_write, OPAL_CONSOLE_WRITE) OPAL_CALL(opal_console_flush, OPAL_CONSOLE_FLUSH) OPAL_CALL(opal_reinit_cpus, OPAL_REINIT_CPUS) + +OPAL_CALL(opal_cec_power_down, OPAL_CEC_POWER_DOWN) +OPAL_CALL(opal_cec_reboot, OPAL_CEC_REBOOT) +OPAL_CALL(opal_poll_events, OPAL_POLL_EVENTS) diff --git a/xen/arch/ppc/setup.c b/xen/arch/ppc/setup.c index 7fe06aa4bf..5fb5ab64e3 100644 --- a/xen/arch/ppc/setup.c +++ b/xen/arch/ppc/setup.c @@ -2,6 +2,8 @@ #include #include #include +#include + #include #include #include @@ -43,11 +45,7 @@ void __init noreturn start_xen(unsigned long r3, unsigned long r4, early_printk("Hello, ppc64le!\n"); - for ( ; ; ) - /* Set current hardware thread to very low priority */ - HMT_very_low(); - - unreachable(); + machine_halt(); } void arch_get_xen_caps(xen_capabilities_info_t *info) diff --git a/xen/arch/ppc/shutdown.c b/xen/arch/ppc/shutdown.c new file mode 100644 index 0000000000..6e49a095d8 --- /dev/null +++ b/xen/arch/ppc/shutdown.c @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#include + +#include + +int64_t opal_cec_power_down(uint64_t request); +int64_t opal_cec_reboot(void); +int64_t opal_poll_events(uint64_t *outstanding_event_mask); + +void machine_halt(void) +{ + int rc; + + /* TODO: mask any OPAL IRQs before shutting down */ + + do { + rc = opal_cec_power_down(0); + + if ( rc == OPAL_BUSY_EVENT ) + opal_poll_events(NULL); + + } while ( rc == OPAL_BUSY || rc == OPAL_BUSY_EVENT ); + + for ( ;; ) + opal_poll_events(NULL); +} + +void machine_restart(unsigned int delay_millisecs) +{ + int rc; + + /* + * TODO: mask any OPAL IRQs before shutting down + * TODO: mdelay(delay_millisecs); + */ + + do { + rc = opal_cec_reboot(); + + if ( rc == OPAL_BUSY_EVENT ) + opal_poll_events(NULL); + + } while ( rc == OPAL_BUSY || rc == OPAL_BUSY_EVENT ); + + for ( ;; ) + opal_poll_events(NULL); +} + diff --git a/xen/arch/ppc/stubs.c b/xen/arch/ppc/stubs.c index e743a86710..50e54d61c0 100644 --- a/xen/arch/ppc/stubs.c +++ b/xen/arch/ppc/stubs.c @@ -60,18 +60,6 @@ void vcpu_show_execution_state(struct vcpu *v) BUG_ON("unimplemented"); } -/* shutdown.c */ - -void machine_restart(unsigned int delay_millisecs) -{ - BUG_ON("unimplemented"); -} - -void machine_halt(void) -{ - BUG_ON("unimplemented"); -} - /* vm_event.c */ void vm_event_fill_regs(vm_event_request_t *req) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 10:55:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 10:55:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.761655.1171647 (Exim 4.92) (envelope-from ) id 1sVqh5-0000bS-9g; Mon, 22 Jul 2024 10:55:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 761655.1171647; Mon, 22 Jul 2024 10:55:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVqh5-0000bL-7C; Mon, 22 Jul 2024 10:55:03 +0000 Received: by outflank-mailman (input) for mailman id 761655; Mon, 22 Jul 2024 10:55:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVqh4-0000bF-5S for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 10:55:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVqh4-00044o-1G for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 10:55:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVqh4-0002BD-0I for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 10:55:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=nBmftOTZdadk7yeTYC0zRciSQfKJperQFVSWsf/VHg4=; b=q25kPnrfLSjU46JWV6o0tEaQhF OGgy3NeUfyGRsEnKz+3tejVSL1hOW1WSIpHYv8WS5/59jQms1pBgjSKjjDom3YIMT/k9L/27BmMmf BYUlpPHq6TovSa+qr4AUqNZ2gkWUZ52A8RbALLQgolWhPosEYakdSjSCyLWbPCG9Mjn8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [mini-os master] Mini-OS: add some macros for asm statements Message-Id: Date: Mon, 22 Jul 2024 10:55:02 +0000 commit 618e99105e7433913ca00a3da5373915d7e1343c Author: Juergen Gross AuthorDate: Mon Jul 22 12:46:43 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 12:46:43 2024 +0200 Mini-OS: add some macros for asm statements Instead of having #ifdefs sprinkled around in x86 code, add some macros defining constants for asm statements to address differences between 32- and 64-bit mode. Modify existing code to use those macros. While at it convert the assembler parts of run_idle_thread() to a more sane variant. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- arch/x86/sched.c | 34 ++++++++++------------------------ include/x86/os.h | 18 ++++++++++-------- 2 files changed, 20 insertions(+), 32 deletions(-) diff --git a/arch/x86/sched.c b/arch/x86/sched.c index dabe6fd..3c02647 100644 --- a/arch/x86/sched.c +++ b/arch/x86/sched.c @@ -60,16 +60,10 @@ void dump_stack(struct thread *thread) unsigned long *bottom = (unsigned long *)(thread->stack + STACK_SIZE); unsigned long *pointer = (unsigned long *)thread->sp; int count; - if(thread == current) - { -#ifdef __i386__ - asm("movl %%esp,%0" - : "=r"(pointer)); -#else - asm("movq %%rsp,%0" - : "=r"(pointer)); -#endif - } + + if ( thread == current ) + asm ( "mov %%"ASM_SP",%0" : "=r" (pointer) ); + printk("The stack for \"%s\"\n", thread->name); for(count = 0; count < 25 && pointer < bottom; count ++) { @@ -119,20 +113,12 @@ struct thread* arch_create_thread(char *name, void (*function)(void *), void run_idle_thread(void) { - /* Switch stacks and run the thread */ -#if defined(__i386__) - __asm__ __volatile__("mov %0,%%esp\n\t" - "push %1\n\t" - "ret" - :"=m" (idle_thread->sp) - :"m" (idle_thread->ip)); -#elif defined(__x86_64__) - __asm__ __volatile__("mov %0,%%rsp\n\t" - "push %1\n\t" - "ret" - :"=m" (idle_thread->sp) - :"m" (idle_thread->ip)); -#endif + /* Switch stacks and run the thread */ + asm volatile ( "mov %[sp], %%"ASM_SP"\n\t" + "jmp *%[ip]\n\t" + : + : [sp] "m" (idle_thread->sp), + [ip] "m" (idle_thread->ip) ); } unsigned long __local_irq_save(void) diff --git a/include/x86/os.h b/include/x86/os.h index ee34d78..0095be1 100644 --- a/include/x86/os.h +++ b/include/x86/os.h @@ -61,6 +61,16 @@ #define TRAP_deferred_nmi 31 #define TRAP_xen_callback 32 +#if defined(__i386__) +#define __SZ "l" +#define __REG "e" +#else +#define __SZ "q" +#define __REG "r" +#endif + +#define ASM_SP __REG"sp" + /* Everything below this point is not included by assembler (.S) files. */ #ifndef __ASSEMBLY__ @@ -141,14 +151,6 @@ do { \ #else -#if defined(__i386__) -#define __SZ "l" -#define __REG "e" -#else -#define __SZ "q" -#define __REG "r" -#endif - #define __cli() asm volatile ( "cli" : : : "memory" ) #define __sti() asm volatile ( "sti" : : : "memory" ) -- generated by git-patchbot for /home/xen/git/mini-os.git#master From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 15:33:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 15:33:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762219.1172341 (Exim 4.92) (envelope-from ) id 1sVv28-0002wy-My; Mon, 22 Jul 2024 15:33:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762219.1172341; Mon, 22 Jul 2024 15:33:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVv28-0002wq-KQ; Mon, 22 Jul 2024 15:33:04 +0000 Received: by outflank-mailman (input) for mailman id 762219; Mon, 22 Jul 2024 15:33:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVv27-0002wk-UY for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 15:33:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVv27-0001Ac-QT for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 15:33:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVv27-0005Do-Pc for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 15:33:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=MVZsa0WtHzSmS/gJUEgzDCiTQv7qz59It2e1bHYAm+s=; b=wLmkW7EbqauWtU1VynU7q1V38v L8/LcTfZdRh+KOTvzaznMcYBHLSwALsZU4JK/7oHhF2VExcEedy/aY7kv6ZeD/RNWOwWiEs8CO1zP Og4lT4DpexNbJ32f1Pw8V4SKpk69rGDP6OkrSsfHdMSh348cx6ti4+4o/nJHZ5jb58jk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen: Fix the figlet banner Message-Id: Date: Mon, 22 Jul 2024 15:33:03 +0000 commit 5bf3818c5e0321e4acdbd91a4c9456ecc40a400a Author: Andrew Cooper AuthorDate: Mon Jul 22 13:42:25 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 16:25:07 2024 +0100 xen: Fix the figlet banner 4.20 is just wide enough to cause figlet to split the banner onto two lines: __ __ \ \/ /___ _ __ \ // _ \ '_ \ / \ __/ | | | /_/\_\___|_| |_| _ _ ____ ___ _ _ _ | || | |___ \ / _ \ _ _ _ __ ___| |_ __ _| |__ | | ___ | || |_ __) | | | |__| | | | '_ \/ __| __/ _` | '_ \| |/ _ \ |__ _| / __/| |_| |__| |_| | | | \__ \ || (_| | |_) | | __/ |_|(_)_____|\___/ \__,_|_| |_|___/\__\__,_|_.__/|_|\___| Instruct figlet to use 100 column width, rather than 80, resulting in: __ __ _ _ ____ ___ _ _ _ \ \/ /___ _ __ | || | |___ \ / _ \ _ _ _ __ ___| |_ __ _| |__ | | ___ \ // _ \ '_ \ | || |_ __) | | | |__| | | | '_ \/ __| __/ _` | '_ \| |/ _ \ / \ __/ | | | |__ _| / __/| |_| |__| |_| | | | \__ \ || (_| | |_) | | __/ /_/\_\___|_| |_| |_|(_)_____|\___/ \__,_|_| |_|___/\__\__,_|_.__/|_|\___| While fixing this, also fix a rendering error in the non-figlet case; while a leading space looks better for figlet, it looks very wrong for the simple one-line case. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/build.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/build.mk b/xen/build.mk index 0f490ca71b..942ff3867f 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -1,9 +1,9 @@ quiet_cmd_banner = BANNER $@ define cmd_banner if command -v figlet >/dev/null 2>&1 ; then \ - echo " Xen $(XEN_FULLVERSION)" | figlet -f $< > $@.tmp; \ + echo " Xen $(XEN_FULLVERSION)" | figlet -w 100 -f $< > $@.tmp; \ else \ - echo " Xen $(XEN_FULLVERSION)" > $@.tmp; \ + echo "Xen $(XEN_FULLVERSION)" > $@.tmp; \ fi; \ mv -f $@.tmp $@ endef -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 15:33:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 15:33:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762221.1172346 (Exim 4.92) (envelope-from ) id 1sVv2I-0002zH-OI; Mon, 22 Jul 2024 15:33:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762221.1172346; Mon, 22 Jul 2024 15:33:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVv2I-0002z9-Lo; Mon, 22 Jul 2024 15:33:14 +0000 Received: by outflank-mailman (input) for mailman id 762221; Mon, 22 Jul 2024 15:33:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVv2H-0002yz-US for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 15:33:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVv2H-0001An-Ta for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 15:33:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVv2H-0005Fd-Sa for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 15:33:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=lUm2yI+HUQp0c+GZOFOOGCHB9mlc4fht3n/Vkvp09YU=; b=qHLXCEU3amg4YDA2967ZqYM6Sv VgVz8SbdyKLNwHzaPJYnfsqNJwe8SVchp9HMej6w6ibn3vDVvXOCw6lZtbPbTPFBRxZ+uiDC3nV2r CYNjMJmYF4B2w/std8r9oHVs6NMkdYi9WJMI1u5n+tmCaW+DQHAg3+pMD4u8B95/OkF4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] docs: Fix install-man$(1)-pages if no manpages are generated Message-Id: Date: Mon, 22 Jul 2024 15:33:13 +0000 commit 5aa152913cd0d71efed459cabb49ba055bb7776f Author: Andrew Cooper AuthorDate: Sat Jul 13 17:14:16 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 16:25:07 2024 +0100 docs: Fix install-man$(1)-pages if no manpages are generated All tools to build manpages are optional, and if none of them happen to be present, the intermediate working directory may not even be created. Treat this as non-fatal, bringing the behaviour in line with install-html. Like the html side, it needs to be not-or to avoid Make thinking the rule has failed. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index 966a104490..b30cc619f8 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -151,7 +151,7 @@ man$(1)-pages: $$(DOC_MAN$(1)) .PHONY: install-man$(1)-pages install-man$(1)-pages: man$(1)-pages $(INSTALL_DIR) $(DESTDIR)$(mandir) - cp -r man$(1) $(DESTDIR)$(mandir) + [ ! -d man$(1) ] || cp -r man$(1) $(DESTDIR)$(mandir) # Clean .PHONY: clean-man$(1)-pages -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 17:33:10 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 17:33:10 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762300.1172445 (Exim 4.92) (envelope-from ) id 1sVwuG-0000Im-Tv; Mon, 22 Jul 2024 17:33:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762300.1172445; Mon, 22 Jul 2024 17:33:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVwuG-0000Ie-RJ; Mon, 22 Jul 2024 17:33:04 +0000 Received: by outflank-mailman (input) for mailman id 762300; Mon, 22 Jul 2024 17:33:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVwuF-0000IY-VS for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 17:33:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVwuF-0003rg-Ok for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 17:33:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVwuF-000288-No for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 17:33:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=vE1QotD66Wa5X6KoQn/frXitXFCM0EbcBbBQdgL/sa8=; b=kt7jz7fWmB4Tx9+kvehTE//XM2 Cahbfl3Dgkx0Grd8C3dbMgjzh7Z5eMWwvm74eF9Gpa5O524K0Bxap6aJxL+ITCgeJk183xazG9x6F BhMp3khoM4YzKdc1oGEfdH7naUOMp3oFk1M6xrvSHiknxfFIjXp9Ree2QG++xfteHgtw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/mm: Drop duplicate l1_disallow_mask() calls Message-Id: Date: Mon, 22 Jul 2024 17:33:03 +0000 commit d834c3d24132366a0700363516b3e64cf0df1130 Author: Andrew Cooper AuthorDate: Thu Apr 28 18:09:39 2022 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 18:18:00 2024 +0100 x86/mm: Drop duplicate l1_disallow_mask() calls Even in release builds where the message is omitted, gdprintk() evalues its parameters for side effects, and l1_disallow_mask() is full of them. Calculate the disallow mask once and reuse the variable, resulting in better code generation: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-207 (-207) Function old new delta mod_l1_entry 1947 1860 -87 get_page_from_l1e 1391 1271 -120 Also, render the bad flags message with a 0x prefix. No practical change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/mm.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 648d6dd475..0ecea0f707 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -842,7 +842,7 @@ get_page_from_l1e( { unsigned long mfn = l1e_get_pfn(l1e); struct page_info *page = mfn_to_page(_mfn(mfn)); - uint32_t l1f = l1e_get_flags(l1e); + uint32_t l1f = l1e_get_flags(l1e), disallow; struct vcpu *curr = current; struct domain *real_pg_owner; bool write, valid; @@ -853,10 +853,10 @@ get_page_from_l1e( return 0; } - if ( unlikely(l1f & l1_disallow_mask(l1e_owner)) ) + disallow = l1_disallow_mask(l1e_owner); + if ( unlikely(l1f & disallow) ) { - gdprintk(XENLOG_WARNING, "Bad L1 flags %x\n", - l1f & l1_disallow_mask(l1e_owner)); + gdprintk(XENLOG_WARNING, "Bad L1 flags %#x\n", l1f & disallow); return -EINVAL; } @@ -2155,11 +2155,12 @@ static int mod_l1_entry(l1_pgentry_t *pl1e, l1_pgentry_t nl1e, if ( l1e_get_flags(nl1e) & _PAGE_PRESENT ) { struct page_info *page = NULL; + uint32_t disallow = l1_disallow_mask(pt_dom); - if ( unlikely(l1e_get_flags(nl1e) & l1_disallow_mask(pt_dom)) ) + if ( unlikely(l1e_get_flags(nl1e) & disallow) ) { - gdprintk(XENLOG_WARNING, "Bad L1 flags %x\n", - l1e_get_flags(nl1e) & l1_disallow_mask(pt_dom)); + gdprintk(XENLOG_WARNING, "Bad L1 flags %#x\n", + l1e_get_flags(nl1e) & disallow); return -EINVAL; } -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 17:33:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 17:33:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762301.1172449 (Exim 4.92) (envelope-from ) id 1sVwuQ-0000Kh-Vd; Mon, 22 Jul 2024 17:33:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762301.1172449; Mon, 22 Jul 2024 17:33:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVwuQ-0000KZ-Sh; Mon, 22 Jul 2024 17:33:14 +0000 Received: by outflank-mailman (input) for mailman id 762301; Mon, 22 Jul 2024 17:33:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVwuP-0000KL-TG for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 17:33:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVwuP-0003rq-SL for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 17:33:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVwuP-00029e-RG for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 17:33:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=0uILR9hrK/J9MfpGQKshL8sTCYTs4fnibSw49LirG9k=; b=unxWXEnjcPHRh4H0/ehDS2tiFS keZ4DSk2926aEf8EqvuxMkksisbIfXjGwhiFfLtBDCMFCeAeBPMUhhpw/sxh7yLdAY4FNHAOLOzEv hTuRrfFdiOTaP275aY2S3wmwirwNnNTP8nxXPnH+cANBGQkHkKy3vMM6JNYzr7/aDp+g=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/mm: Move base_disallow_mask into __ro_after_init Message-Id: Date: Mon, 22 Jul 2024 17:33:13 +0000 commit c2770e51b402d25fa1bdc9b9e3a12d23bbc11935 Author: Andrew Cooper AuthorDate: Thu Apr 28 18:00:41 2022 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 18:18:00 2024 +0100 x86/mm: Move base_disallow_mask into __ro_after_init base_disallow_mask is calculated once in arch_init_memory() and doesn't change thereafter. Write-protect it at runtime. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/mm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 0ecea0f707..95795567f2 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -150,7 +150,8 @@ bool __read_mostly machine_to_phys_mapping_valid; struct rangeset *__read_mostly mmio_ro_ranges; -static uint32_t base_disallow_mask; +static uint32_t __ro_after_init base_disallow_mask; + /* Global bit is allowed to be set on L1 PTEs. Intended for user mappings. */ #define L1_DISALLOW_MASK ((base_disallow_mask | _PAGE_GNTTAB) & ~_PAGE_GLOBAL) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 22 17:55:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 22 Jul 2024 17:55:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762324.1172482 (Exim 4.92) (envelope-from ) id 1sVxFa-00052K-4T; Mon, 22 Jul 2024 17:55:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762324.1172482; Mon, 22 Jul 2024 17:55:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVxFa-00052D-22; Mon, 22 Jul 2024 17:55:06 +0000 Received: by outflank-mailman (input) for mailman id 762324; Mon, 22 Jul 2024 17:55:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVxFY-000527-5M for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 17:55:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sVxFY-0004KA-19 for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 17:55:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sVxFX-0003uJ-W4 for xen-changelog@lists.xenproject.org; Mon, 22 Jul 2024 17:55:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=EFkoANpqInc16dINSxh8j+Fn5nkOUYFQ5bNhOFQDXBg=; b=hICb2IGpI6OwKot6SmX1SiV9sh vKFGoMvp3XqDBmvpgKwSQAlO/cQLkptTu/CAOdBmb1SqgtDlgSAyNLwpAEhRbWc48qmXuyIOVFJCZ 9x+8xNjZ4OdQM1IGakcyx6tIgMTXO+Io54/YYHsmkqaMNMeGWjaSmfHq7oPoiyZuLu94=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] automation: adjust paths to docker files in documentation Message-Id: Date: Mon, 22 Jul 2024 17:55:03 +0000 commit c4bdb14b80a1751ba622f3e48a4b91401c67867d Author: Olaf Hering AuthorDate: Wed Jul 17 12:12:32 2024 +0200 Commit: Andrew Cooper CommitDate: Mon Jul 22 18:50:49 2024 +0100 automation: adjust paths to docker files in documentation Use new location of dockerfiles. Signed-off-by: Olaf Hering Reviewed-by: Stefano Stabellini --- automation/build/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automation/build/README.md b/automation/build/README.md index 12a2b4af18..bd0c0e0418 100644 --- a/automation/build/README.md +++ b/automation/build/README.md @@ -100,12 +100,12 @@ such as openSUSE Tumbleweed. Login with the gitlab.com credentials. ``` docker login registry.gitlab.com/xen-project/xen -make -C automation/build suse/opensuse-tumbleweed +make -C automation/build opensuse/tumbleweed-x86_64 env CONTAINER_NO_PULL=1 \ CONTAINER=tumbleweed \ CONTAINER_ARGS='-e CC=gcc -e CXX=g++ -e debug=y' \ automation/scripts/containerize automation/scripts/build < /dev/null -make -C automation/build suse/opensuse-tumbleweed PUSH=1 +make -C automation/build opensuse/tumbleweed-x86_64 PUSH=1 ``` [BuildKit]: https://docs.docker.com/build/buildkit/ -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:22:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:22:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762578.1172742 (Exim 4.92) (envelope-from ) id 1sW72J-0007oT-R4; Tue, 23 Jul 2024 04:22:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762578.1172742; Tue, 23 Jul 2024 04:22:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72J-0007oL-Od; Tue, 23 Jul 2024 04:22:03 +0000 Received: by outflank-mailman (input) for mailman id 762578; Tue, 23 Jul 2024 04:22:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72I-0007oF-IC for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72I-0003oi-9L for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW72I-0005V2-7c for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=TASW8JyxZM6cLYLEX++A3isizt/KFNF8Ib1Q48iFo7I=; b=Riu/QZIPusAAtJn2uMk6DWtFWK IApZ0nYRrHwO9g1Abraph1owU4mSg4I4dw62l2dxt2+8WTwD8PhH8N5Sz6n5bLHbozc4kZGH8w5Gr 7/EI0GT2pBhaauYT869AucDJe+/CdwU4RkYLd61Pc7O4j686YR6F5WVsMO4uWv4cKF2A=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] MAINTAINERS: drop separate x86/mm section Message-Id: Date: Tue, 23 Jul 2024 04:22:02 +0000 commit 820034ef91675517901f48da2f26b77146b07a73 Author: Jan Beulich AuthorDate: Mon Jul 22 09:35:42 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:35:42 2024 +0200 MAINTAINERS: drop separate x86/mm section Let the subtree fall under general x86 maintainership instead, then also properly reflecting Roger's role there. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper Acked-by: Roger Pau Monné --- MAINTAINERS | 6 ------ 1 file changed, 6 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 2b0c894527..32facd7c47 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -594,12 +594,6 @@ F: tools/misc/xen-cpuid.c F: tools/tests/cpu-policy/ F: tools/tests/x86_emulator/ -X86 MEMORY MANAGEMENT -M: Jan Beulich -M: Andrew Cooper -S: Supported -F: xen/arch/x86/mm/ - X86 MEMORY PAGING S: Orphaned F: xen/arch/x86/mm/mem_paging.c -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:22:12 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:22:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762579.1172747 (Exim 4.92) (envelope-from ) id 1sW72S-0007qA-TD; Tue, 23 Jul 2024 04:22:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762579.1172747; Tue, 23 Jul 2024 04:22:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72S-0007pz-Q1; Tue, 23 Jul 2024 04:22:12 +0000 Received: by outflank-mailman (input) for mailman id 762579; Tue, 23 Jul 2024 04:22:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72S-0007pt-E1 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72S-0003p7-DA for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW72S-0005Vx-BS for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=ab7b2YTg2d/WxvPDIV0A+Acca/VogpHjUO0HSXJhAr4=; b=5kRIH0KfkbtLcFnDpUVkPDQmtv KtzV95EjtPWDir2JUi//nHoWo8isW9WqF8hdiBT2FS8H84lDA8COWmLyT3m6BwLHeABHa+AbPlgSe 28av41+2gzAAVqBhpa8B/LPY9DI9q78fX6cdbccjXkD9iRMhoQxwWbQG6EXpYLq0gIKM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] MAINTAINERS: drop CPU POOLS section Message-Id: Date: Tue, 23 Jul 2024 04:22:12 +0000 commit 7b6c1ba3b1c98dc17d076e058260167449a334b0 Author: Juergen Gross AuthorDate: Mon Jul 22 09:36:09 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:36:09 2024 +0200 MAINTAINERS: drop CPU POOLS section The CPU POOLS sections in MAINTAINERS can be dropped, as the SCHEDULING section has the same maintainers and it is covering the CPU POOLS files as well. Signed-off-by: Juergen Gross Acked-by: Jan Beulich Acked-by: Andrew Cooper --- MAINTAINERS | 6 ------ 1 file changed, 6 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 32facd7c47..fcec4377b1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -284,12 +284,6 @@ S: Supported F: .gitlab-ci.yml F: automation/ -CPU POOLS -M: Juergen Gross -M: Dario Faggioli -S: Supported -F: xen/common/sched/*cpupool.c - DEVICE TREE M: Stefano Stabellini M: Julien Grall -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:22:22 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:22:22 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762580.1172749 (Exim 4.92) (envelope-from ) id 1sW72c-0007tu-UE; Tue, 23 Jul 2024 04:22:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762580.1172749; Tue, 23 Jul 2024 04:22:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72c-0007tn-RS; Tue, 23 Jul 2024 04:22:22 +0000 Received: by outflank-mailman (input) for mailman id 762580; Tue, 23 Jul 2024 04:22:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72c-0007th-Hv for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72c-0003pO-GD for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW72c-0005Wv-FE for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=s2JSraOcPILedmMK+VlQ1FAiWKaAtNRcktXkerdM36I=; b=zDPjTRoJ77iWWVQzfIQqiCodZs tUiDuiRjqWaPhgOEC2FFMzrotyVuBygLFKczojtCoPG5ku7fUcjfygSCoDDiyy8y8VgOpcfYauVlk TFbHCECgQsRilJIhKpkF2GUeaNNDG754OaP3wDIdJ719ZYrhJate9Sc2EJh2iC9dTSkk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] SUPPORT.md: update Xen version Message-Id: Date: Tue, 23 Jul 2024 04:22:22 +0000 commit 8c000b8fd3caf9c1ff615fc15429e13271b26849 Author: Juergen Gross AuthorDate: Mon Jul 22 09:36:21 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:36:21 2024 +0200 SUPPORT.md: update Xen version Update the Xen version to 4.20 Signed-off-by: Juergen Gross Acked-by: Julien Grall --- SUPPORT.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SUPPORT.md b/SUPPORT.md index 77d2a7a7db..bd4316523d 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -9,7 +9,7 @@ for the definitions of the support status levels etc. # Release Support - Xen-Version: 4.19-rc + Xen-Version: 4.20-unstable Initial-Release: n/a Supported-Until: TBD Security-Support-Until: Unreleased - not yet security-supported -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:22:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:22:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762581.1172754 (Exim 4.92) (envelope-from ) id 1sW72n-0007wh-VZ; Tue, 23 Jul 2024 04:22:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762581.1172754; Tue, 23 Jul 2024 04:22:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72n-0007wa-T4; Tue, 23 Jul 2024 04:22:33 +0000 Received: by outflank-mailman (input) for mailman id 762581; Tue, 23 Jul 2024 04:22:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72m-0007w3-Jx for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72m-0003pX-J6 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW72m-0005Xt-II for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=o03SP22yn5vFK4HmQU7HNJZ5EkwO5RFtB60MdeEgJgE=; b=sovdEMErgqrmi3KBcm0D5O+JXc Bhlg1m5FeZEmXLLuGlZKLIb8VsJwow+76g4+wIqD4uctKcPFI2KBSA6GYVLoCEDcGm61Pe9XYQTJk 3W0DaCQDdJs1Ca2mwlUiXbPy7C60i7d+Ma0qrtNnp+Px/nT1IINXFZHoCxDvQj2zxxEE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/cpufreq: clean up stale powernow_cpufreq_init() Message-Id: Date: Tue, 23 Jul 2024 04:22:32 +0000 commit d3029dba8e13b36adc0a513581850bbc9b51feda Author: Sergiy Kibrik AuthorDate: Mon Jul 22 09:36:35 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:36:35 2024 +0200 x86/cpufreq: clean up stale powernow_cpufreq_init() Remove useless declaration, eliminating a MISRA C:2012 Rule 8.6 violation: The routine itself was removed by following commit long time ago: 222013114 x86: Fix RevF detection in powernow.c No functional change. Signed-off-by: Sergiy Kibrik Reviewed-by: Jan Beulich --- xen/include/acpi/cpufreq/processor_perf.h | 1 - 1 file changed, 1 deletion(-) diff --git a/xen/include/acpi/cpufreq/processor_perf.h b/xen/include/acpi/cpufreq/processor_perf.h index 5f48aceadb..301104e16f 100644 --- a/xen/include/acpi/cpufreq/processor_perf.h +++ b/xen/include/acpi/cpufreq/processor_perf.h @@ -7,7 +7,6 @@ #define XEN_PX_INIT 0x80000000U -int powernow_cpufreq_init(void); unsigned int powernow_register_driver(void); unsigned int get_measured_perf(unsigned int cpu, unsigned int flag); void cpufreq_residency_update(unsigned int cpu, uint8_t state); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:22:44 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:22:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762585.1172768 (Exim 4.92) (envelope-from ) id 1sW72y-0008HI-BE; Tue, 23 Jul 2024 04:22:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762585.1172768; Tue, 23 Jul 2024 04:22:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72y-0008HB-8h; Tue, 23 Jul 2024 04:22:44 +0000 Received: by outflank-mailman (input) for mailman id 762585; Tue, 23 Jul 2024 04:22:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72w-0008GP-Mj for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW72w-0003pr-Ly for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW72w-0005Yo-L7 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=ZTLURxM0GMDVqFy67Si+X+9x1drhJ/lPj1HGqLRdLNI=; b=2dXbE2iX6IhTIqU9RoEdbrzxO7 D5I5BFhAsPEfGMWjlqnCRAC1cFtpR/H5qOb6VHHnEe4NWGyzttCy7ygX5w365BykhZnswVwqCqfgb L+Ov8/2YyVXHRHoHec43B5oJWv+by5uYVCsTmy3HTDaXpSrU/qzFmi6VHmEqqd90Jm9I=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] public/sysctl: address violations of MISRA C: 2012 Rule 7.3 Message-Id: Date: Tue, 23 Jul 2024 04:22:42 +0000 commit c1059b4799d4ce3378b6722e01d66422f0b63977 Author: Alessandro Zucchelli AuthorDate: Mon Jul 22 09:37:11 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:37:11 2024 +0200 public/sysctl: address violations of MISRA C: 2012 Rule 7.3 This addresses violations of MISRA C:2012 Rule 7.3 which states as following: The lowercase character `l' shall not be used in a literal suffix. Changed moreover suffixes 'u' in 'U' for better readability next to the 'L's. No functional change. Signed-off-by: Alessandro Zucchelli Acked-by: Jan Beulich --- xen/include/public/sysctl.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/xen/include/public/sysctl.h b/xen/include/public/sysctl.h index 3a6e7d48f0..b2a5a724db 100644 --- a/xen/include/public/sysctl.h +++ b/xen/include/public/sysctl.h @@ -898,15 +898,15 @@ struct xen_sysctl_psr_alloc { * instruction for PV guests. */ struct xen_sysctl_cpu_levelling_caps { -#define XEN_SYSCTL_CPU_LEVELCAP_faulting (1ul << 0) /* CPUID faulting */ -#define XEN_SYSCTL_CPU_LEVELCAP_ecx (1ul << 1) /* 0x00000001.ecx */ -#define XEN_SYSCTL_CPU_LEVELCAP_edx (1ul << 2) /* 0x00000001.edx */ -#define XEN_SYSCTL_CPU_LEVELCAP_extd_ecx (1ul << 3) /* 0x80000001.ecx */ -#define XEN_SYSCTL_CPU_LEVELCAP_extd_edx (1ul << 4) /* 0x80000001.edx */ -#define XEN_SYSCTL_CPU_LEVELCAP_xsave_eax (1ul << 5) /* 0x0000000D:1.eax */ -#define XEN_SYSCTL_CPU_LEVELCAP_thermal_ecx (1ul << 6) /* 0x00000006.ecx */ -#define XEN_SYSCTL_CPU_LEVELCAP_l7s0_eax (1ul << 7) /* 0x00000007:0.eax */ -#define XEN_SYSCTL_CPU_LEVELCAP_l7s0_ebx (1ul << 8) /* 0x00000007:0.ebx */ +#define XEN_SYSCTL_CPU_LEVELCAP_faulting (1UL << 0) /* CPUID faulting */ +#define XEN_SYSCTL_CPU_LEVELCAP_ecx (1UL << 1) /* 0x00000001.ecx */ +#define XEN_SYSCTL_CPU_LEVELCAP_edx (1UL << 2) /* 0x00000001.edx */ +#define XEN_SYSCTL_CPU_LEVELCAP_extd_ecx (1UL << 3) /* 0x80000001.ecx */ +#define XEN_SYSCTL_CPU_LEVELCAP_extd_edx (1UL << 4) /* 0x80000001.edx */ +#define XEN_SYSCTL_CPU_LEVELCAP_xsave_eax (1UL << 5) /* 0x0000000D:1.eax */ +#define XEN_SYSCTL_CPU_LEVELCAP_thermal_ecx (1UL << 6) /* 0x00000006.ecx */ +#define XEN_SYSCTL_CPU_LEVELCAP_l7s0_eax (1UL << 7) /* 0x00000007:0.eax */ +#define XEN_SYSCTL_CPU_LEVELCAP_l7s0_ebx (1UL << 8) /* 0x00000007:0.ebx */ uint32_t caps; }; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:22:54 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:22:54 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762587.1172772 (Exim 4.92) (envelope-from ) id 1sW738-0008RE-Cs; Tue, 23 Jul 2024 04:22:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762587.1172772; Tue, 23 Jul 2024 04:22:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW738-0008R6-AE; Tue, 23 Jul 2024 04:22:54 +0000 Received: by outflank-mailman (input) for mailman id 762587; Tue, 23 Jul 2024 04:22:52 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW736-0008PI-Ps for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:52 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW736-0003py-P5 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:52 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW736-0005ZL-OI for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:22:52 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=slHV+1tQhZ7inS9f1sMWzGUDMd+UVbItgGs2R2VKEt8=; b=6X2FL3wrNdOZOiI3LoK1W42HxW esgSdJbtxfPRd9uLK4tFgQG4MNYQjG7tYixzMK5nDmTzvpptTXs0olQBvlpIvQhuO+7xDGpomfJRo wPgnJT+SiNLe3aZD7RZsSAlrsJJ6L+hzFrmA2Dbq17II1qYDORUAESpnfqziSHEDNsFI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] common/sched: address a violation of MISRA C Rule 8.7 Message-Id: Date: Tue, 23 Jul 2024 04:22:52 +0000 commit 4b09c30b0f778160523045396f7fff631a24bc1c Author: Victor Lira AuthorDate: Mon Jul 22 09:37:45 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:37:45 2024 +0200 common/sched: address a violation of MISRA C Rule 8.7 Rule 8.7: "Functions and objects should not be defined with external linkage if they are referenced in only one translation unit". This patch fixes this by adding the static specifier. No functional changes. Reported-by: Stewart Hildebrand stewart.hildebrand@amd.com Signed-off-by: Victor Lira Acked-by: George Dunlap --- xen/common/sched/credit2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c index 685929c290..b4e03e2a63 100644 --- a/xen/common/sched/credit2.c +++ b/xen/common/sched/credit2.c @@ -1476,8 +1476,8 @@ static inline void runq_remove(struct csched2_unit *svc) list_del_init(&svc->runq_elem); } -void burn_credits(struct csched2_runqueue_data *rqd, struct csched2_unit *svc, - s_time_t now); +static void burn_credits(struct csched2_runqueue_data *rqd, + struct csched2_unit *svc, s_time_t now); static inline void tickle_cpu(unsigned int cpu, struct csched2_runqueue_data *rqd) @@ -1855,8 +1855,8 @@ static void reset_credit(int cpu, s_time_t now, struct csched2_unit *snext) /* No need to resort runqueue, as everyone's order should be the same. */ } -void burn_credits(struct csched2_runqueue_data *rqd, - struct csched2_unit *svc, s_time_t now) +static void burn_credits(struct csched2_runqueue_data *rqd, + struct csched2_unit *svc, s_time_t now) { s_time_t delta; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:23:04 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:23:04 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762591.1172776 (Exim 4.92) (envelope-from ) id 1sW73I-00006V-Eg; Tue, 23 Jul 2024 04:23:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762591.1172776; Tue, 23 Jul 2024 04:23:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73I-00006N-Bk; Tue, 23 Jul 2024 04:23:04 +0000 Received: by outflank-mailman (input) for mailman id 762591; Tue, 23 Jul 2024 04:23:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73G-00005x-St for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73G-0003qN-Rz for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW73G-0005aD-RC for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=NQp7lgZq0qOb9iCiBQ+dZwWqHjwEXQbRyvI30Vjh+0s=; b=tJxnZlmc/2bLSKt48Skw0qhlfl Otj4WEUtFRl5Bp+xjdqQHh/UxODNK/LdHk1J0GweKV43FIiGDo8IB4k5sQ/DXf3vdiq87XQ6BLswt Nep5Ef3BUkM5Co4a4G4LUJdeImhEWJA+IMt1ifhL9SpImPPBq/5k1CnA/NBlWkvFRwa0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] Add libfuzzer target to fuzz/x86_instruction_emulator Message-Id: Date: Tue, 23 Jul 2024 04:23:02 +0000 commit af67ae49ce8f7298bf52345558490013a9d044b3 Author: Tamas K Lengyel AuthorDate: Mon Jul 22 09:38:28 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:38:28 2024 +0200 Add libfuzzer target to fuzz/x86_instruction_emulator This target enables integration into oss-fuzz. Changing invalid input return to -1 as values other then 0/-1 are reserved by libfuzzer. Also adding the missing __wrap_vsnprintf wrapper which is required for successful oss-fuzz build. Signed-off-by: Tamas K Lengyel Acked-by: Jan Beulich --- tools/fuzz/x86_instruction_emulator/Makefile | 11 +++++++++-- tools/fuzz/x86_instruction_emulator/fuzz-emul.c | 6 ++---- tools/tests/x86_emulator/wrappers.c | 11 +++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/tools/fuzz/x86_instruction_emulator/Makefile b/tools/fuzz/x86_instruction_emulator/Makefile index 1e4c6b37f5..8606c62c83 100644 --- a/tools/fuzz/x86_instruction_emulator/Makefile +++ b/tools/fuzz/x86_instruction_emulator/Makefile @@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk .PHONY: x86-insn-fuzz-all ifeq ($(CONFIG_X86_64),y) -x86-insn-fuzz-all: x86-insn-fuzzer.a fuzz-emul.o afl +x86-insn-fuzz-all: x86-insn-fuzzer.a fuzz-emul.o afl libfuzzer else x86-insn-fuzz-all: endif @@ -58,6 +58,9 @@ afl-harness: afl-harness.o $(OBJS) cpuid.o wrappers.o afl-harness-cov: afl-harness-cov.o $(patsubst %.o,%-cov.o,$(OBJS)) cpuid.o wrappers.o $(CC) $(CFLAGS) $(GCOV_FLAGS) $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@ +libfuzzer-harness: $(OBJS) cpuid.o wrappers.o + $(CC) $(CFLAGS) $(LIB_FUZZING_ENGINE) -fsanitize=fuzzer $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@ + # Common targets .PHONY: all all: x86-insn-fuzz-all @@ -67,7 +70,8 @@ distclean: clean .PHONY: clean clean: - rm -f *.a *.o $(DEPS_RM) afl-harness afl-harness-cov *.gcda *.gcno *.gcov + rm -f *.a *.o $(DEPS_RM) *.gcda *.gcno *.gcov + rm -f afl-harness afl-harness-cov libfuzzer-harness rm -rf x86_emulate x86-emulate.c x86-emulate.h wrappers.c cpuid.c .PHONY: install @@ -81,4 +85,7 @@ afl: afl-harness .PHONY: afl-cov afl-cov: afl-harness-cov +.PHONY: libfuzzer +libfuzzer: libfuzzer-harness + -include $(DEPS_INCLUDE) diff --git a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c index eeeb6931f4..2ba9ca9e0b 100644 --- a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c +++ b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c @@ -906,14 +906,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data_p, size_t size) if ( size <= DATA_OFFSET ) { - printf("Input too small\n"); - return 1; + return -1; } if ( size > FUZZ_CORPUS_SIZE ) { - printf("Input too large\n"); - return 1; + return -1; } memcpy(&input, data_p, size); diff --git a/tools/tests/x86_emulator/wrappers.c b/tools/tests/x86_emulator/wrappers.c index 3829a6f416..8f3bd1656f 100644 --- a/tools/tests/x86_emulator/wrappers.c +++ b/tools/tests/x86_emulator/wrappers.c @@ -91,6 +91,17 @@ int __wrap_snprintf(char *buf, size_t n, const char *fmt, ...) return rc; } +int __wrap_vsnprintf(char *buf, size_t n, const char *fmt, va_list varg) +{ + int rc; + + emul_save_fpu_state(); + rc = __real_vsnprintf(buf, n, fmt, varg); + emul_restore_fpu_state(); + + return rc; +} + char *__wrap_strstr(const char *s1, const char *s2) { char *s; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:23:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:23:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762592.1172780 (Exim 4.92) (envelope-from ) id 1sW73S-0000BS-G5; Tue, 23 Jul 2024 04:23:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762592.1172780; Tue, 23 Jul 2024 04:23:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73S-0000BL-DC; Tue, 23 Jul 2024 04:23:14 +0000 Received: by outflank-mailman (input) for mailman id 762592; Tue, 23 Jul 2024 04:23:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73Q-0000B9-Vh for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73Q-0003qp-Ux for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW73Q-0005b2-U8 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=P2NYQmLOOk744sDrTSlb9uF0Qo71ing9sebppVVlRc8=; b=uI14K3NJoBSQpJzQf0MeSXv+gs oOyp/qbgqA5/4VfVPc5xG0PNoudgQbXgRXeVhJioTQgMHlNYGAdJFjnagSjIidkfEaZVyLOmP96wI kliIVJT+ou3nN3Ok3HsH20rxiMJ87eWxFEpISDCuF4JikU+k42Rw02AS3x9bC75qvXb4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86: drop REX64_PREFIX Message-Id: Date: Tue, 23 Jul 2024 04:23:12 +0000 commit 0e3642514719c0659f2af44b1bbe8aba63d4a2ed Author: Jan Beulich AuthorDate: Mon Jul 22 09:39:40 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:39:40 2024 +0200 x86: drop REX64_PREFIX While we didn't copy the full Linux commentary, Linux commit 7180d4fb8308 ("x86_64: Fix 64bit FXSAVE encoding") is quite explicit about gas 2.16 supporting FXSAVEQ / FXRSTORQ. As that's presently our minimal required version, we can drop the workaround that was needed for yet older gas. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/i387.c | 15 ++++----------- xen/arch/x86/include/asm/asm_defns.h | 8 -------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/xen/arch/x86/i387.c b/xen/arch/x86/i387.c index fcdee10a6e..400c70114a 100644 --- a/xen/arch/x86/i387.c +++ b/xen/arch/x86/i387.c @@ -64,13 +64,12 @@ static inline void fpu_fxrstor(struct vcpu *v) { default: asm volatile ( - /* See below for why the operands/constraints are this way. */ - "1: " REX64_PREFIX "fxrstor (%2)\n" + "1: fxrstorq %0\n" ".section .fixup,\"ax\" \n" "2: push %%"__OP"ax \n" " push %%"__OP"cx \n" " push %%"__OP"di \n" - " mov %2,%%"__OP"di \n" + " lea %0,%%"__OP"di \n" " mov %1,%%ecx \n" " xor %%eax,%%eax \n" " rep ; stosl \n" @@ -81,7 +80,7 @@ static inline void fpu_fxrstor(struct vcpu *v) ".previous \n" _ASM_EXTABLE(1b, 2b) : - : "m" (*fpu_ctxt), "i" (sizeof(*fpu_ctxt) / 4), "R" (fpu_ctxt) ); + : "m" (*fpu_ctxt), "i" (sizeof(*fpu_ctxt) / 4) ); break; case 4: case 2: asm volatile ( @@ -157,13 +156,7 @@ static inline void fpu_fxsave(struct vcpu *v) if ( fip_width != 4 ) { - /* - * The only way to force fxsaveq on a wide range of gas versions. - * On older versions the rex64 prefix works only if we force an - * addressing mode that doesn't require extended registers. - */ - asm volatile ( REX64_PREFIX "fxsave (%1)" - : "=m" (*fpu_ctxt) : "R" (fpu_ctxt) ); + asm volatile ( "fxsaveq %0" : "=m" (*fpu_ctxt) ); /* * Some CPUs don't save/restore FDP/FIP/FOP unless an exception is diff --git a/xen/arch/x86/include/asm/asm_defns.h b/xen/arch/x86/include/asm/asm_defns.h index 0a3ff70566..92b4116a15 100644 --- a/xen/arch/x86/include/asm/asm_defns.h +++ b/xen/arch/x86/include/asm/asm_defns.h @@ -331,14 +331,6 @@ static always_inline void stac(void) #define safe_swapgs \ "mfence; swapgs;" -#ifdef __sun__ -#define REX64_PREFIX "rex64\\" -#elif defined(__clang__) -#define REX64_PREFIX ".byte 0x48; " -#else -#define REX64_PREFIX "rex64/" -#endif - #define ELFNOTE(name, type, desc) \ .pushsection .note.name, "a", @note ; \ .p2align 2 ; \ -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:23:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:23:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762594.1172784 (Exim 4.92) (envelope-from ) id 1sW73c-0000En-HE; Tue, 23 Jul 2024 04:23:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762594.1172784; Tue, 23 Jul 2024 04:23: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 1sW73c-0000Ef-Ee; Tue, 23 Jul 2024 04:23:24 +0000 Received: by outflank-mailman (input) for mailman id 762594; Tue, 23 Jul 2024 04:23:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73b-0000EM-2f for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73b-0003qy-1u for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW73b-0005d5-15 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=TAaXQtyAITb6+fHsgOPRCT8gNOagdWDY2yod+s0UCpE=; b=SVnFm+RGCn4tkZrxY+17d5mNtR 4Bm4T/izJVX1ki5T91VysPfdui0vCiKQmUUEF2PkXA7brZO6FC2spqCnuXCPwDIKSGcXC+2/M6BXX CDDUHwJp1NFje2mVYhVARs1H7MldA955tEMLvl1NgefQtMxgl5Jp8opblEZnBXCAkXbE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/mm: drop gfn_to_paddr() Message-Id: Date: Tue, 23 Jul 2024 04:23:23 +0000 commit 8d5dc7d7df92d8d7f9450cee0bab57dceefa26c5 Author: Jan Beulich AuthorDate: Mon Jul 22 09:40:24 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:40:24 2024 +0200 x86/mm: drop gfn_to_paddr() This really is gfn_to_gaddr() in disguise; no need to have two variants of the same logic. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/include/asm/guest_pt.h | 6 ------ xen/arch/x86/mm/shadow/multi.c | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/include/asm/guest_pt.h b/xen/arch/x86/include/asm/guest_pt.h index 7b0c9b005c..e01db4a671 100644 --- a/xen/arch/x86/include/asm/guest_pt.h +++ b/xen/arch/x86/include/asm/guest_pt.h @@ -20,12 +20,6 @@ #error GUEST_PAGING_LEVELS not defined #endif -static inline paddr_t -gfn_to_paddr(gfn_t gfn) -{ - return ((paddr_t)gfn_x(gfn)) << PAGE_SHIFT; -} - /* Override get_gfn to work with gfn_t */ #undef get_gfn #define get_gfn(d, g, t) get_gfn_type((d), gfn_x(g), (t), P2M_ALLOC) diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c index 8e0046ae69..376f6823cd 100644 --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -562,7 +562,7 @@ _sh_propagate(struct vcpu *v, if ( p2mt == p2m_mmio_direct ) sflags |= get_pat_flags(v, gflags, - gfn_to_paddr(target_gfn), + gfn_to_gaddr(target_gfn), mfn_to_maddr(target_mfn), X86_MT_UC); else if ( is_iommu_enabled(d) && iommu_snoop ) @@ -570,7 +570,7 @@ _sh_propagate(struct vcpu *v, else sflags |= get_pat_flags(v, gflags, - gfn_to_paddr(target_gfn), + gfn_to_gaddr(target_gfn), mfn_to_maddr(target_mfn), NO_HARDCODE_MEM_TYPE); } -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:23:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:23:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762595.1172787 (Exim 4.92) (envelope-from ) id 1sW73m-0000Ib-Ig; Tue, 23 Jul 2024 04:23:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762595.1172787; Tue, 23 Jul 2024 04:23:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73m-0000IF-G4; Tue, 23 Jul 2024 04:23:34 +0000 Received: by outflank-mailman (input) for mailman id 762595; Tue, 23 Jul 2024 04:23:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73l-0000Ht-5h for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73l-0003r7-4u for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW73l-0005dY-49 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=0k2BIyR/7HfojFTa7LYrV5IuG4bOHPC80qXlHdxsDKI=; b=HWJV68Vatlu7CACWI4/WLP2EUw B59qYHXpRqQQnAPnBkttcckHKnK3mkVqB3gsTffULd7BFwcadpP3sobg3hz8kc8Q9mIuCA4L+Zy3/ 9oi5ok0/G7PJPaDLvUcIA0PpdaEB+PJ4ls56fXwoQWjIUa9p9K4F4q9vKLKunvJuC/jc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86: don't open-code [gm]fn_to_[gm]addr() Message-Id: Date: Tue, 23 Jul 2024 04:23:33 +0000 commit c674c77f69684bfa57e3c61d6dbf404c13953f34 Author: Jan Beulich AuthorDate: Mon Jul 22 09:41:03 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 09:41:03 2024 +0200 x86: don't open-code [gm]fn_to_[gm]addr() At least in pure address calculation use the intended basic construct instead of opend-coded left-shifting by PAGE_SHIFT. Leave alone page table entry calculations for now, as those aren't really calculating addresses. No functional change. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/guest/xen/xen.c | 2 +- xen/arch/x86/include/asm/guest_pt.h | 2 +- xen/arch/x86/mm/hap/nested_hap.c | 2 +- xen/arch/x86/mm/p2m-ept.c | 7 +++---- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/guest/xen/xen.c b/xen/arch/x86/guest/xen/xen.c index 7484b3f73a..c17f5c447a 100644 --- a/xen/arch/x86/guest/xen/xen.c +++ b/xen/arch/x86/guest/xen/xen.c @@ -73,7 +73,7 @@ static void map_shared_info(void) if ( rc ) panic("failed to map shared_info page: %ld\n", rc); - set_fixmap(FIX_XEN_SHARED_INFO, mfn_x(mfn) << PAGE_SHIFT); + set_fixmap(FIX_XEN_SHARED_INFO, mfn_to_maddr(mfn)); /* Mask all upcalls */ for ( i = 0; i < ARRAY_SIZE(XEN_shared_info->evtchn_mask); i++ ) diff --git a/xen/arch/x86/include/asm/guest_pt.h b/xen/arch/x86/include/asm/guest_pt.h index e01db4a671..21473f9bbc 100644 --- a/xen/arch/x86/include/asm/guest_pt.h +++ b/xen/arch/x86/include/asm/guest_pt.h @@ -371,7 +371,7 @@ static inline paddr_t guest_walk_to_gpa(const walk_t *gw) if ( gfn_eq(gfn, INVALID_GFN) ) return INVALID_PADDR; - return (gfn_x(gfn) << PAGE_SHIFT) | (gw->va & ~PAGE_MASK); + return gfn_to_gaddr(gfn) | (gw->va & ~PAGE_MASK); } /* Given a walk_t from a successful walk, return the page-order of the diff --git a/xen/arch/x86/mm/hap/nested_hap.c b/xen/arch/x86/mm/hap/nested_hap.c index ee78a797d1..080b60adf0 100644 --- a/xen/arch/x86/mm/hap/nested_hap.c +++ b/xen/arch/x86/mm/hap/nested_hap.c @@ -134,7 +134,7 @@ static int nestedhap_walk_L0_p2m( rc = NESTEDHVM_PAGEFAULT_DONE; direct_mmio_out: - *L0_gpa = (mfn_x(mfn) << PAGE_SHIFT) + (L1_gpa & ~PAGE_MASK); + *L0_gpa = mfn_to_maddr(mfn) + (L1_gpa & ~PAGE_MASK); out: p2m_put_gfn(p2m, gaddr_to_gfn(L1_gpa)); return rc; diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index 469e27ee93..9925c560c1 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -565,11 +565,10 @@ int epte_get_entry_emt(struct domain *d, gfn_t gfn, mfn_t mfn, if ( gmtrr_mtype == -EADDRNOTAVAIL ) return -1; - gmtrr_mtype = v ? mtrr_get_type(&v->arch.hvm.mtrr, - gfn_x(gfn) << PAGE_SHIFT, order) + gmtrr_mtype = v ? mtrr_get_type(&v->arch.hvm.mtrr, gfn_to_gaddr(gfn), + order) : X86_MT_WB; - hmtrr_mtype = mtrr_get_type(&mtrr_state, mfn_x(mfn) << PAGE_SHIFT, - order); + hmtrr_mtype = mtrr_get_type(&mtrr_state, mfn_to_maddr(mfn), order); if ( gmtrr_mtype < 0 || hmtrr_mtype < 0 ) return -1; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:23:44 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:23:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762597.1172792 (Exim 4.92) (envelope-from ) id 1sW73w-0000Ln-Kf; Tue, 23 Jul 2024 04:23:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762597.1172792; Tue, 23 Jul 2024 04:23:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73w-0000Le-Hc; Tue, 23 Jul 2024 04:23:44 +0000 Received: by outflank-mailman (input) for mailman id 762597; Tue, 23 Jul 2024 04:23:43 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73v-0000LU-8c for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:43 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW73v-0003rO-7q for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:43 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW73v-0005e8-72 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:43 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=AvEtnPSVSdWCEiyVdBMQWdDxg1fug0Cq2IlkCbzaRxw=; b=e4z+rAqP0rCpRRzMtz2P3SHsqn BQEuK2PBUEkhm0z4ve/ML2RsiNuGEZ8J9mPe8fVVwRwcQ97MrwbTzJmmdjagPM6ujDAeQ53ZrbZWP ooObFAlSMHSiOq5BOTx9SQjExJK/3fa7PyAO57BgXSNIEy5hNlT7l45mpjIaqv08SKeM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] Revert "Add libfuzzer target to fuzz/x86_instruction_emulator" Message-Id: Date: Tue, 23 Jul 2024 04:23:43 +0000 commit ff652ed5dcd797a46c84258255dfd429ae68a2d6 Author: Jan Beulich AuthorDate: Mon Jul 22 11:17:17 2024 +0200 Commit: Jan Beulich CommitDate: Mon Jul 22 11:17:17 2024 +0200 Revert "Add libfuzzer target to fuzz/x86_instruction_emulator" This reverts commit af67ae49ce8f7298bf52345558490013a9d044b3 for breaking the build with at least older gcc. --- tools/fuzz/x86_instruction_emulator/Makefile | 11 ++--------- tools/fuzz/x86_instruction_emulator/fuzz-emul.c | 6 ++++-- tools/tests/x86_emulator/wrappers.c | 11 ----------- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/tools/fuzz/x86_instruction_emulator/Makefile b/tools/fuzz/x86_instruction_emulator/Makefile index 8606c62c83..1e4c6b37f5 100644 --- a/tools/fuzz/x86_instruction_emulator/Makefile +++ b/tools/fuzz/x86_instruction_emulator/Makefile @@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk .PHONY: x86-insn-fuzz-all ifeq ($(CONFIG_X86_64),y) -x86-insn-fuzz-all: x86-insn-fuzzer.a fuzz-emul.o afl libfuzzer +x86-insn-fuzz-all: x86-insn-fuzzer.a fuzz-emul.o afl else x86-insn-fuzz-all: endif @@ -58,9 +58,6 @@ afl-harness: afl-harness.o $(OBJS) cpuid.o wrappers.o afl-harness-cov: afl-harness-cov.o $(patsubst %.o,%-cov.o,$(OBJS)) cpuid.o wrappers.o $(CC) $(CFLAGS) $(GCOV_FLAGS) $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@ -libfuzzer-harness: $(OBJS) cpuid.o wrappers.o - $(CC) $(CFLAGS) $(LIB_FUZZING_ENGINE) -fsanitize=fuzzer $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@ - # Common targets .PHONY: all all: x86-insn-fuzz-all @@ -70,8 +67,7 @@ distclean: clean .PHONY: clean clean: - rm -f *.a *.o $(DEPS_RM) *.gcda *.gcno *.gcov - rm -f afl-harness afl-harness-cov libfuzzer-harness + rm -f *.a *.o $(DEPS_RM) afl-harness afl-harness-cov *.gcda *.gcno *.gcov rm -rf x86_emulate x86-emulate.c x86-emulate.h wrappers.c cpuid.c .PHONY: install @@ -85,7 +81,4 @@ afl: afl-harness .PHONY: afl-cov afl-cov: afl-harness-cov -.PHONY: libfuzzer -libfuzzer: libfuzzer-harness - -include $(DEPS_INCLUDE) diff --git a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c index 2ba9ca9e0b..eeeb6931f4 100644 --- a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c +++ b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c @@ -906,12 +906,14 @@ int LLVMFuzzerTestOneInput(const uint8_t *data_p, size_t size) if ( size <= DATA_OFFSET ) { - return -1; + printf("Input too small\n"); + return 1; } if ( size > FUZZ_CORPUS_SIZE ) { - return -1; + printf("Input too large\n"); + return 1; } memcpy(&input, data_p, size); diff --git a/tools/tests/x86_emulator/wrappers.c b/tools/tests/x86_emulator/wrappers.c index 8f3bd1656f..3829a6f416 100644 --- a/tools/tests/x86_emulator/wrappers.c +++ b/tools/tests/x86_emulator/wrappers.c @@ -91,17 +91,6 @@ int __wrap_snprintf(char *buf, size_t n, const char *fmt, ...) return rc; } -int __wrap_vsnprintf(char *buf, size_t n, const char *fmt, va_list varg) -{ - int rc; - - emul_save_fpu_state(); - rc = __real_vsnprintf(buf, n, fmt, varg); - emul_restore_fpu_state(); - - return rc; -} - char *__wrap_strstr(const char *s1, const char *s2) { char *s; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:23:54 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:23:54 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762598.1172795 (Exim 4.92) (envelope-from ) id 1sW746-0000P9-NF; Tue, 23 Jul 2024 04:23:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762598.1172795; Tue, 23 Jul 2024 04:23:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW746-0000P1-KS; Tue, 23 Jul 2024 04:23:54 +0000 Received: by outflank-mailman (input) for mailman id 762598; Tue, 23 Jul 2024 04:23:53 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW745-0000Oi-BX for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:53 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW745-0003rU-Ap for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:53 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW745-0005ef-A2 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:23:53 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=KiircWYB3rdW9JcEaopya2jwKdi3hbOcbzDdOzk17JE=; b=uEuyJ+PrOquE0JDQRH+GJo7VhK ImmNumiIjXrXpp9vk5bg4RtBxDb4JBU6XFCdZjgVavhueRm2wVJpctzsOVG7CympOObLHkFoSZ1iW UOHGScfobC/ERc3XUTVGYkXJtSXTAvSqfvq2Vc0GsMtq+sQ1LHPD3Np5KP16LWfaVP58=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/libxs: Drop XSTEST Message-Id: Date: Tue, 23 Jul 2024 04:23:53 +0000 commit ebc92622cf3e304d1a0a239e2a139187a4940b5d Author: Andrew Cooper AuthorDate: Fri Jun 28 15:56:39 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 10:50:03 2024 +0100 tools/libxs: Drop XSTEST This appears to been missed from the previous attempt in 2007. Fixes: fed194611785 ("xenstore: Remove broken and unmaintained test code") Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross --- tools/libs/store/xs.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 38a6ce3cf2..ec77379ab9 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -494,10 +494,6 @@ out_false: return false; } -#ifdef XSTEST -#define read_all read_all_choice -#define xs_write_all write_all_choice -#else /* Simple routine for writing to sockets, etc. */ bool xs_write_all(int fd, const void *data, unsigned int len) { @@ -515,7 +511,6 @@ bool xs_write_all(int fd, const void *data, unsigned int len) return true; } -#endif static int get_error(const char *errorstring) { -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:24:04 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:24:04 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762599.1172800 (Exim 4.92) (envelope-from ) id 1sW74G-0000S9-Ol; Tue, 23 Jul 2024 04:24:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762599.1172800; Tue, 23 Jul 2024 04:24:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW74G-0000S2-Ly; Tue, 23 Jul 2024 04:24:04 +0000 Received: by outflank-mailman (input) for mailman id 762599; Tue, 23 Jul 2024 04:24:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW74F-0000Rs-Fx for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:24:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW74F-0003rl-F9 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:24:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW74F-0005fj-EH for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:24:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=6awSCJZ69sDBl2i/fMMVi+JZCrbf8m23LniegJKnxOA=; b=xDDnNvtbtf9dab7L634tktwTyd fJ0cjP6GRheKsIwmJtQ6787iS2HpYCfmai0tCCFmstoUqio6PCYcpUwLJeFR76PSZRe5rLGXeodAK k3q0MkBipSr9sSdU3DnV7mzm5gQ71PxvKSMHONd/44Q77R5JlPQGclXugl7E47LyoT4k=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] xen/ppc: Avoid using the legacy __read_mostly/__ro_after_init definitions Message-Id: Date: Tue, 23 Jul 2024 04:24:03 +0000 commit 1d3034ac5bf1e3fe0b86994b242fb819f7a5d246 Author: Andrew Cooper AuthorDate: Fri Jun 21 19:23:11 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 10:50:03 2024 +0100 xen/ppc: Avoid using the legacy __read_mostly/__ro_after_init definitions RISC-V wants to introduce a full build of Xen without using the legacy definitions. PPC64 has the most minimal full build of Xen right now, so make it compile without the legacy definitions. Mostly this is just including xen/sections.h in a variety of common files. In a couple of cases, we can drop an inclusion of {xen,asm}/cache.h, but almost all files get the definitions transitively. No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich Reviewed-by: Oleksii Kurochko --- xen/arch/ppc/include/asm/cache.h | 3 --- xen/arch/ppc/mm-radix.c | 1 + xen/arch/ppc/stubs.c | 1 + xen/common/argo.c | 1 + xen/common/cpu.c | 1 + xen/common/debugtrace.c | 1 + xen/common/domain.c | 1 + xen/common/event_channel.c | 2 ++ xen/common/keyhandler.c | 1 + xen/common/memory.c | 1 + xen/common/page_alloc.c | 1 + xen/common/pdx.c | 1 + xen/common/radix-tree.c | 1 + xen/common/random.c | 2 +- xen/common/rcupdate.c | 1 + xen/common/sched/core.c | 1 + xen/common/sched/cpupool.c | 1 + xen/common/sched/credit.c | 1 + xen/common/sched/credit2.c | 1 + xen/common/shutdown.c | 1 + xen/common/spinlock.c | 1 + xen/common/timer.c | 1 + xen/common/version.c | 3 +-- xen/common/virtual_region.c | 1 + xen/common/vmap.c | 2 +- xen/drivers/char/console.c | 1 + xen/drivers/char/ns16550.c | 1 + xen/drivers/char/serial.c | 2 +- xen/include/xen/cache.h | 2 +- xen/include/xen/hypfs.h | 1 + 30 files changed, 30 insertions(+), 9 deletions(-) diff --git a/xen/arch/ppc/include/asm/cache.h b/xen/arch/ppc/include/asm/cache.h index 13c0bf3242..8a0a6b7b17 100644 --- a/xen/arch/ppc/include/asm/cache.h +++ b/xen/arch/ppc/include/asm/cache.h @@ -3,7 +3,4 @@ #ifndef _ASM_PPC_CACHE_H #define _ASM_PPC_CACHE_H -/* TODO: Phase out the use of this via cache.h */ -#define __read_mostly __section(".data.read_mostly") - #endif /* _ASM_PPC_CACHE_H */ diff --git a/xen/arch/ppc/mm-radix.c b/xen/arch/ppc/mm-radix.c index ab5a10695c..0a47959e64 100644 --- a/xen/arch/ppc/mm-radix.c +++ b/xen/arch/ppc/mm-radix.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include diff --git a/xen/arch/ppc/stubs.c b/xen/arch/ppc/stubs.c index 923f0e7b20..e743a86710 100644 --- a/xen/arch/ppc/stubs.c +++ b/xen/arch/ppc/stubs.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/argo.c b/xen/common/argo.c index 901f41eb2d..df19006744 100644 --- a/xen/common/argo.c +++ b/xen/common/argo.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include diff --git a/xen/common/cpu.c b/xen/common/cpu.c index 6e35b114c0..f09af0444b 100644 --- a/xen/common/cpu.c +++ b/xen/common/cpu.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include diff --git a/xen/common/debugtrace.c b/xen/common/debugtrace.c index a272e5e437..ca883ad919 100644 --- a/xen/common/debugtrace.c +++ b/xen/common/debugtrace.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/domain.c b/xen/common/domain.c index fb262dcec9..7b47696dd3 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index aac7d4b93f..13b97c94d7 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -26,6 +26,8 @@ #include #include #include +#include + #include #include diff --git a/xen/common/keyhandler.c b/xen/common/keyhandler.c index 127ca50696..674e7be39e 100644 --- a/xen/common/keyhandler.c +++ b/xen/common/keyhandler.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/memory.c b/xen/common/memory.c index de2cc7ad92..a6f2f6d1b3 100644 --- a/xen/common/memory.c +++ b/xen/common/memory.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/page_alloc.c b/xen/common/page_alloc.c index 054b7edb39..33c8c917d9 100644 --- a/xen/common/page_alloc.c +++ b/xen/common/page_alloc.c @@ -134,6 +134,7 @@ #include #include #include +#include #include #include diff --git a/xen/common/pdx.c b/xen/common/pdx.c index d3d63b0750..b8384e6189 100644 --- a/xen/common/pdx.c +++ b/xen/common/pdx.c @@ -19,6 +19,7 @@ #include #include #include +#include /** * Maximum (non-inclusive) usable pdx. Must be diff --git a/xen/common/radix-tree.c b/xen/common/radix-tree.c index adc3034222..fb283a9d52 100644 --- a/xen/common/radix-tree.c +++ b/xen/common/radix-tree.c @@ -21,6 +21,7 @@ #include #include #include +#include struct radix_tree_path { struct radix_tree_node *node; diff --git a/xen/common/random.c b/xen/common/random.c index a29f2fcb99..35a9f387fd 100644 --- a/xen/common/random.c +++ b/xen/common/random.c @@ -1,6 +1,6 @@ -#include #include #include +#include #include #include #include diff --git a/xen/common/rcupdate.c b/xen/common/rcupdate.c index 212a99acd8..fd5d3d7484 100644 --- a/xen/common/rcupdate.c +++ b/xen/common/rcupdate.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c index d84b65f197..1a3ff5ae4d 100644 --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/sched/cpupool.c b/xen/common/sched/cpupool.c index ad8f608462..57dfee26f2 100644 --- a/xen/common/sched/cpupool.c +++ b/xen/common/sched/cpupool.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include "private.h" diff --git a/xen/common/sched/credit.c b/xen/common/sched/credit.c index 020f44595e..a6bb321e7d 100644 --- a/xen/common/sched/credit.c +++ b/xen/common/sched/credit.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/sched/credit2.c b/xen/common/sched/credit2.c index b4e03e2a63..76a273d4f6 100644 --- a/xen/common/sched/credit2.c +++ b/xen/common/sched/credit2.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c index 5f8141edc6..f413f331af 100644 --- a/xen/common/shutdown.c +++ b/xen/common/shutdown.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/spinlock.c b/xen/common/spinlock.c index 28c6e9d3ac..0b87738445 100644 --- a/xen/common/spinlock.c +++ b/xen/common/spinlock.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/timer.c b/xen/common/timer.c index a21798b76f..da0d069cc6 100644 --- a/xen/common/timer.c +++ b/xen/common/timer.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/common/version.c b/xen/common/version.c index 80869430fc..b7d7d515a3 100644 --- a/xen/common/version.c +++ b/xen/common/version.c @@ -3,14 +3,13 @@ #include #include #include +#include #include #include #include #include #include -#include - const char *xen_compile_date(void) { return XEN_COMPILE_DATE; diff --git a/xen/common/virtual_region.c b/xen/common/virtual_region.c index 52405d84b2..1dc2e9f592 100644 --- a/xen/common/virtual_region.c +++ b/xen/common/virtual_region.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include diff --git a/xen/common/vmap.c b/xen/common/vmap.c index 966a7e763f..b3b4ddf653 100644 --- a/xen/common/vmap.c +++ b/xen/common/vmap.c @@ -1,6 +1,6 @@ #ifdef VMAP_VIRT_START #include -#include +#include #include #include #include diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c index 3a3a97bcbe..7da8c5296f 100644 --- a/xen/drivers/char/console.c +++ b/xen/drivers/char/console.c @@ -32,6 +32,7 @@ #include #include #include +#include #ifdef CONFIG_X86 #include diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c index 8f76bbe676..eaeb0e09d0 100644 --- a/xen/drivers/char/ns16550.c +++ b/xen/drivers/char/ns16550.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/xen/drivers/char/serial.c b/xen/drivers/char/serial.c index f28d8557c0..591a009008 100644 --- a/xen/drivers/char/serial.c +++ b/xen/drivers/char/serial.c @@ -10,8 +10,8 @@ #include #include #include +#include #include -#include #include diff --git a/xen/include/xen/cache.h b/xen/include/xen/cache.h index 82a3ba38e3..a19942fd63 100644 --- a/xen/include/xen/cache.h +++ b/xen/include/xen/cache.h @@ -15,7 +15,7 @@ #define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) #endif -#if defined(CONFIG_ARM) || defined(CONFIG_X86) || defined(CONFIG_PPC64) +#if defined(CONFIG_ARM) || defined(CONFIG_X86) /* TODO: Phase out the use of this via cache.h */ #define __ro_after_init __section(".data.ro_after_init") #endif diff --git a/xen/include/xen/hypfs.h b/xen/include/xen/hypfs.h index 1b65a9188c..d8fcac23b4 100644 --- a/xen/include/xen/hypfs.h +++ b/xen/include/xen/hypfs.h @@ -4,6 +4,7 @@ #ifdef CONFIG_HYPFS #include #include +#include #include #include -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:24:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:24:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762600.1172804 (Exim 4.92) (envelope-from ) id 1sW74Q-0000V2-QW; Tue, 23 Jul 2024 04:24:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762600.1172804; Tue, 23 Jul 2024 04:24:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW74Q-0000Uu-NZ; Tue, 23 Jul 2024 04:24:14 +0000 Received: by outflank-mailman (input) for mailman id 762600; Tue, 23 Jul 2024 04:24:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW74P-0000Ul-Il for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:24:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW74P-0003sB-I0 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:24:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW74P-0005gQ-HG for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:24:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=4rLjjAzzBu34j9jWWr+7Fy0NzeKg4J6WQPYWAC0c69U=; b=nwOcWEonVpqby9GCTv12+4NBBH LwwFe4M/ll8qLsb3dKHTp1DiLsAZmrq1bvef03z/kVK4ZKPh1z6eRuF8kG79dZJSAFaRxWRbcn28H 4UkKVxgzhB7fUNZyI+YuRS52iIEaPcxlkn3E8OQRMQNvo6RUGfoN/Jy7zd0Di3+4fuE4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] xen/shutdown: Fix build issue with shutdown.h on PowerPC Message-Id: Date: Tue, 23 Jul 2024 04:24:13 +0000 commit 10b9589e6d4dd5e09c3d863bbebd927fe3f9beac Author: Andrew Cooper AuthorDate: Fri Jul 5 18:59:24 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 10:50:03 2024 +0100 xen/shutdown: Fix build issue with shutdown.h on PowerPC The use of bool needs xen/types.h, which shutdown.h picks up by chance in all other architectures. While fixing this, swap u8 for unsigned char in hwdom_shutdown(), and move opt_noreboot into __ro_after_init. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/common/shutdown.c | 4 ++-- xen/include/xen/shutdown.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c index f413f331af..c47341b977 100644 --- a/xen/common/shutdown.c +++ b/xen/common/shutdown.c @@ -12,7 +12,7 @@ #include /* opt_noreboot: If true, machine will need manual reset on error. */ -bool __read_mostly opt_noreboot; +bool __ro_after_init opt_noreboot; boolean_param("noreboot", opt_noreboot); static void noreturn reboot_or_halt(void) @@ -30,7 +30,7 @@ static void noreturn reboot_or_halt(void) } } -void hwdom_shutdown(u8 reason) +void hwdom_shutdown(unsigned char reason) { switch ( reason ) { diff --git a/xen/include/xen/shutdown.h b/xen/include/xen/shutdown.h index 668aed0be5..c7fa23aec1 100644 --- a/xen/include/xen/shutdown.h +++ b/xen/include/xen/shutdown.h @@ -2,11 +2,12 @@ #define __XEN_SHUTDOWN_H__ #include +#include /* opt_noreboot: If true, machine will need manual reset on error. */ extern bool opt_noreboot; -void noreturn hwdom_shutdown(u8 reason); +void noreturn hwdom_shutdown(unsigned char reason); void noreturn machine_restart(unsigned int delay_millisecs); void noreturn machine_halt(void); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:24:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:24:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762601.1172808 (Exim 4.92) (envelope-from ) id 1sW74a-0000Xw-Rw; Tue, 23 Jul 2024 04:24:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762601.1172808; Tue, 23 Jul 2024 04:24: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 1sW74a-0000Xo-P5; Tue, 23 Jul 2024 04:24:24 +0000 Received: by outflank-mailman (input) for mailman id 762601; Tue, 23 Jul 2024 04:24:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW74Z-0000Xg-LT for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:24:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW74Z-0003sF-Kj for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:24:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW74Z-0005hB-K2 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:24:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Jot5OAUnC9Z0PXzCLemi5y14C/KdzNeBuyoUPfzfW8o=; b=H/t5hZ5LHzOOLgyWG3kjaqZCha CFaewhnhUVW46GV+ceEI15EMUqQmsaEtFw3TU0c7EaY7R7N0itt8UJU3J/+NBNgoUR+XGwY+jWR1Z /Uehk/Jxa0niM9yfYkBvWMRiDxMAe8hbz2R9Ju7loFk6/nb05UhBUM1LocWj56UH68Xw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/misc: xen-hvmcrash: Inject #DF instead of overwriting RIP Message-Id: Date: Tue, 23 Jul 2024 04:24:23 +0000 commit e42e4d8c3e2c391e8ce990e0a2c76d6e9a17aad6 Author: Matthew Barnes AuthorDate: Fri Jul 5 16:05:07 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 10:50:03 2024 +0100 tools/misc: xen-hvmcrash: Inject #DF instead of overwriting RIP xen-hvmcrash would previously save records, overwrite the instruction pointer with a bogus value, and then restore them to crash a domain just enough to cause the guest OS to memdump. This approach is found to be unreliable when tested on a guest running Windows 10 x64, with some executions doing nothing at all. Another approach would be to trigger NMIs. This approach is found to be unreliable when tested on Linux (Ubuntu 22.04), as Linux will ignore NMIs if it is not configured to handle such. Injecting a double fault abort to all vCPUs is found to be more reliable at crashing and invoking memdumps from Windows and Linux domains. This patch modifies the xen-hvmcrash tool to inject #DF to all vCPUs belonging to the specified domain, instead of overwriting RIP. Signed-off-by: Matthew Barnes Reviewed-by: Andrew Cooper --- tools/misc/Makefile | 2 +- tools/misc/xen-hvmcrash.c | 87 +++++++++++++---------------------------------- 2 files changed, 24 insertions(+), 65 deletions(-) diff --git a/tools/misc/Makefile b/tools/misc/Makefile index 66d0d6b090..c26e544e83 100644 --- a/tools/misc/Makefile +++ b/tools/misc/Makefile @@ -81,7 +81,7 @@ xen-hvmctx: xen-hvmctx.o $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS) xen-hvmcrash: xen-hvmcrash.o - $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS) + $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(LDLIBS_libxendevicemodel) $(APPEND_LDFLAGS) xen-memshare: xen-memshare.o $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS) diff --git a/tools/misc/xen-hvmcrash.c b/tools/misc/xen-hvmcrash.c index 1d058fa40a..5ae5bedb2b 100644 --- a/tools/misc/xen-hvmcrash.c +++ b/tools/misc/xen-hvmcrash.c @@ -1,7 +1,7 @@ /* * xen-hvmcrash.c * - * Attempt to crash an HVM guest by overwriting RIP/EIP with a bogus value + * Attempt to crash an HVM guest by injecting #DF to every vcpu * * Copyright (c) 2010 Citrix Systems, Inc. * @@ -24,36 +24,25 @@ * DEALINGS IN THE SOFTWARE. */ -#include #include #include -#include -#include -#include #include #include -#include - -#include -#include -#include #include -#include -#include -#include +#include + +#include int main(int argc, char **argv) { int domid; xc_interface *xch; + xendevicemodel_handle *dmod; xc_domaininfo_t dominfo; - int ret; - uint32_t len; - uint8_t *buf; - uint32_t off; - struct hvm_save_descriptor *descriptor; + int vcpu_id, ret; + bool injected = false; if (argc != 2 || !argv[1] || (domid = atoi(argv[1])) < 0) { fprintf(stderr, "usage: %s \n", argv[0]); @@ -83,59 +72,29 @@ main(int argc, char **argv) exit(-1); } - /* - * Calling with zero buffer length should return the buffer length - * required. - */ - ret = xc_domain_hvm_getcontext(xch, domid, 0, 0); - if (ret < 0) { - perror("xc_domain_hvm_getcontext"); - exit(1); - } - - len = ret; - buf = malloc(len); - if (buf == NULL) { - perror("malloc"); - exit(1); - } - - ret = xc_domain_hvm_getcontext(xch, domid, buf, len); - if (ret < 0) { - perror("xc_domain_hvm_getcontext"); - exit(1); - } - - off = 0; - - while (off < len) { - descriptor = (struct hvm_save_descriptor *)(buf + off); - - off += sizeof (struct hvm_save_descriptor); - - if (descriptor->typecode == HVM_SAVE_CODE(CPU)) { - HVM_SAVE_TYPE(CPU) *cpu; - - /* Overwrite EIP/RIP with some recognisable but bogus value */ - cpu = (HVM_SAVE_TYPE(CPU) *)(buf + off); - printf("CPU[%d]: RIP = %" PRIx64 "\n", descriptor->instance, cpu->rip); - cpu->rip = 0xf001; - } else if (descriptor->typecode == HVM_SAVE_CODE(END)) { - break; + dmod = xc_interface_dmod_handle(xch); + + for (vcpu_id = 0; vcpu_id <= dominfo.max_vcpu_id; vcpu_id++) { + printf("Injecting #DF to vcpu ID #%d...\n", vcpu_id); + ret = xendevicemodel_inject_event(dmod, domid, vcpu_id, + X86_EXC_DF, + XEN_DMOP_EVENT_hw_exc, 0, 0, 0); + if (ret < 0) { + fprintf(stderr, "Could not inject #DF to vcpu ID #%d: %s\n", + vcpu_id, strerror(errno)); + continue; } - - off += descriptor->length; + injected = true; } - ret = xc_domain_hvm_setcontext(xch, domid, buf, len); + ret = xc_domain_unpause(xch, domid); if (ret < 0) { - perror("xc_domain_hvm_setcontext"); + perror("xc_domain_unpause"); exit(1); } - ret = xc_domain_unpause(xch, domid); - if (ret < 0) { - perror("xc_domain_unpause"); + if (!injected) { + fprintf(stderr, "Could not inject #DF to any vcpu!\n"); exit(1); } -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 04:24:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 04:24:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.762602.1172811 (Exim 4.92) (envelope-from ) id 1sW74k-0000aV-TK; Tue, 23 Jul 2024 04:24:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 762602.1172811; Tue, 23 Jul 2024 04:24:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW74k-0000aN-QZ; Tue, 23 Jul 2024 04:24:34 +0000 Received: by outflank-mailman (input) for mailman id 762602; Tue, 23 Jul 2024 04:24:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW74j-0000a7-OL for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:24:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sW74j-0003sO-Nd for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:24:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sW74j-0005ht-Mt for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 04:24:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=XGCENRNArB5tHgI0W48th+IBhryNIPo0LzDXO6BBMNI=; b=SyjZDozXULXwajUWPmQ9uUycxG AGtRdeKwCLd5C/Vhi5FJFBWQPAdNS8zSvmE14LCK7YbRF/US3fSjKzDo1lcvesJUGIclKgzMe4dJM gqO/XSqOMD4pEwKHcnCO8HH5pSZE40oJv1/WsS+JKjrgYc63kN9reqUE9hAcws4K1Ou8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] ppc/shutdown: Implement machine_{halt,restart}() Message-Id: Date: Tue, 23 Jul 2024 04:24:33 +0000 commit e44f33ccddc20079d9a22e1f0659c88fde0f4eb2 Author: Andrew Cooper AuthorDate: Fri Jul 5 18:56:48 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 10:50:03 2024 +0100 ppc/shutdown: Implement machine_{halt,restart}() OPAL has easy APIs for shutdown/reboot, so wire them up. Then, use machine_halt() rather than an infinite loop at the end of start_xen(). This avoids the Qemu smoke test needing to wait for the full timeout in order to succeed. (XEN) 8e011600000000c0 is the result of PTE map Enabled radix in LPCR Flushed TLB Hello, ppc64le! [ 6.341897656,5] OPAL: Shutdown request type 0x0... Signed-off-by: Andrew Cooper Reviewed-by: Shawn Anastasio --- xen/arch/ppc/Makefile | 1 + xen/arch/ppc/ppc64/opal-calls.S | 4 ++++ xen/arch/ppc/setup.c | 8 +++---- xen/arch/ppc/shutdown.c | 48 +++++++++++++++++++++++++++++++++++++++++ xen/arch/ppc/stubs.c | 12 ----------- 5 files changed, 56 insertions(+), 17 deletions(-) diff --git a/xen/arch/ppc/Makefile b/xen/arch/ppc/Makefile index 71feb5e2c4..655d212f66 100644 --- a/xen/arch/ppc/Makefile +++ b/xen/arch/ppc/Makefile @@ -4,6 +4,7 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.init.o obj-y += mm-radix.o obj-y += opal.o obj-y += setup.o +obj-y += shutdown.o obj-y += stubs.o obj-y += tlb-radix.o diff --git a/xen/arch/ppc/ppc64/opal-calls.S b/xen/arch/ppc/ppc64/opal-calls.S index cc5de75c8a..69d07909d1 100644 --- a/xen/arch/ppc/ppc64/opal-calls.S +++ b/xen/arch/ppc/ppc64/opal-calls.S @@ -79,3 +79,7 @@ opal_return_mmu: OPAL_CALL(opal_console_write, OPAL_CONSOLE_WRITE) OPAL_CALL(opal_console_flush, OPAL_CONSOLE_FLUSH) OPAL_CALL(opal_reinit_cpus, OPAL_REINIT_CPUS) + +OPAL_CALL(opal_cec_power_down, OPAL_CEC_POWER_DOWN) +OPAL_CALL(opal_cec_reboot, OPAL_CEC_REBOOT) +OPAL_CALL(opal_poll_events, OPAL_POLL_EVENTS) diff --git a/xen/arch/ppc/setup.c b/xen/arch/ppc/setup.c index 7fe06aa4bf..5fb5ab64e3 100644 --- a/xen/arch/ppc/setup.c +++ b/xen/arch/ppc/setup.c @@ -2,6 +2,8 @@ #include #include #include +#include + #include #include #include @@ -43,11 +45,7 @@ void __init noreturn start_xen(unsigned long r3, unsigned long r4, early_printk("Hello, ppc64le!\n"); - for ( ; ; ) - /* Set current hardware thread to very low priority */ - HMT_very_low(); - - unreachable(); + machine_halt(); } void arch_get_xen_caps(xen_capabilities_info_t *info) diff --git a/xen/arch/ppc/shutdown.c b/xen/arch/ppc/shutdown.c new file mode 100644 index 0000000000..6e49a095d8 --- /dev/null +++ b/xen/arch/ppc/shutdown.c @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#include + +#include + +int64_t opal_cec_power_down(uint64_t request); +int64_t opal_cec_reboot(void); +int64_t opal_poll_events(uint64_t *outstanding_event_mask); + +void machine_halt(void) +{ + int rc; + + /* TODO: mask any OPAL IRQs before shutting down */ + + do { + rc = opal_cec_power_down(0); + + if ( rc == OPAL_BUSY_EVENT ) + opal_poll_events(NULL); + + } while ( rc == OPAL_BUSY || rc == OPAL_BUSY_EVENT ); + + for ( ;; ) + opal_poll_events(NULL); +} + +void machine_restart(unsigned int delay_millisecs) +{ + int rc; + + /* + * TODO: mask any OPAL IRQs before shutting down + * TODO: mdelay(delay_millisecs); + */ + + do { + rc = opal_cec_reboot(); + + if ( rc == OPAL_BUSY_EVENT ) + opal_poll_events(NULL); + + } while ( rc == OPAL_BUSY || rc == OPAL_BUSY_EVENT ); + + for ( ;; ) + opal_poll_events(NULL); +} + diff --git a/xen/arch/ppc/stubs.c b/xen/arch/ppc/stubs.c index e743a86710..50e54d61c0 100644 --- a/xen/arch/ppc/stubs.c +++ b/xen/arch/ppc/stubs.c @@ -60,18 +60,6 @@ void vcpu_show_execution_state(struct vcpu *v) BUG_ON("unimplemented"); } -/* shutdown.c */ - -void machine_restart(unsigned int delay_millisecs) -{ - BUG_ON("unimplemented"); -} - -void machine_halt(void) -{ - BUG_ON("unimplemented"); -} - /* vm_event.c */ void vm_event_fill_regs(vm_event_request_t *req) -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 11:44:10 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 11:44:10 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763090.1173317 (Exim 4.92) (envelope-from ) id 1sWDw2-0005bq-Nr; Tue, 23 Jul 2024 11:44:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763090.1173317; Tue, 23 Jul 2024 11:44:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDw2-0005bj-LT; Tue, 23 Jul 2024 11:44:02 +0000 Received: by outflank-mailman (input) for mailman id 763090; Tue, 23 Jul 2024 11:44:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDw2-0005bd-6J for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDw1-0004wX-Ov for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWDw1-00051g-Mi for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=JTB7QlFL64YxAoFRm17KaJTDW5KhMiQlRHsaABMt9CA=; b=JwloTIcaaM1tuSM2FkuLCQbh5K StJYdPRfF1+1fGQMFoExx+SQkxWDEksZQRoUgQH4UWRN8QUTDzWD28dxDZyOLgW+WsOArYuPbPqzR 1dTvOJlh4rZR6I/hqu81afORTWou2ys9yOTmaZmHM77clIn8peB7OE/onMorLebdc1Nk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] xen: Fix the figlet banner Message-Id: Date: Tue, 23 Jul 2024 11:44:01 +0000 commit 5bf3818c5e0321e4acdbd91a4c9456ecc40a400a Author: Andrew Cooper AuthorDate: Mon Jul 22 13:42:25 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 16:25:07 2024 +0100 xen: Fix the figlet banner 4.20 is just wide enough to cause figlet to split the banner onto two lines: __ __ \ \/ /___ _ __ \ // _ \ '_ \ / \ __/ | | | /_/\_\___|_| |_| _ _ ____ ___ _ _ _ | || | |___ \ / _ \ _ _ _ __ ___| |_ __ _| |__ | | ___ | || |_ __) | | | |__| | | | '_ \/ __| __/ _` | '_ \| |/ _ \ |__ _| / __/| |_| |__| |_| | | | \__ \ || (_| | |_) | | __/ |_|(_)_____|\___/ \__,_|_| |_|___/\__\__,_|_.__/|_|\___| Instruct figlet to use 100 column width, rather than 80, resulting in: __ __ _ _ ____ ___ _ _ _ \ \/ /___ _ __ | || | |___ \ / _ \ _ _ _ __ ___| |_ __ _| |__ | | ___ \ // _ \ '_ \ | || |_ __) | | | |__| | | | '_ \/ __| __/ _` | '_ \| |/ _ \ / \ __/ | | | |__ _| / __/| |_| |__| |_| | | | \__ \ || (_| | |_) | | __/ /_/\_\___|_| |_| |_|(_)_____|\___/ \__,_|_| |_|___/\__\__,_|_.__/|_|\___| While fixing this, also fix a rendering error in the non-figlet case; while a leading space looks better for figlet, it looks very wrong for the simple one-line case. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/build.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/build.mk b/xen/build.mk index 0f490ca71b..942ff3867f 100644 --- a/xen/build.mk +++ b/xen/build.mk @@ -1,9 +1,9 @@ quiet_cmd_banner = BANNER $@ define cmd_banner if command -v figlet >/dev/null 2>&1 ; then \ - echo " Xen $(XEN_FULLVERSION)" | figlet -f $< > $@.tmp; \ + echo " Xen $(XEN_FULLVERSION)" | figlet -w 100 -f $< > $@.tmp; \ else \ - echo " Xen $(XEN_FULLVERSION)" > $@.tmp; \ + echo "Xen $(XEN_FULLVERSION)" > $@.tmp; \ fi; \ mv -f $@.tmp $@ endef -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 11:44:12 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 11:44:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763091.1173322 (Exim 4.92) (envelope-from ) id 1sWDwC-0005di-PY; Tue, 23 Jul 2024 11:44:12 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763091.1173322; Tue, 23 Jul 2024 11:44:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDwC-0005da-My; Tue, 23 Jul 2024 11:44:12 +0000 Received: by outflank-mailman (input) for mailman id 763091; Tue, 23 Jul 2024 11:44:11 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDwB-0005dS-Th for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:11 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDwB-0004wq-Sp for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:11 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWDwB-00052U-RA for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:11 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=KoGnrMbtUCTYYIO5Bs4YRtpvS312RUXhly5GKaKvXYs=; b=49z9zTbXVM3h2HVP/SgkB4bNwo mNmBm0NJ2ToizK+/a+4KkTkXb9o6DcxLfzMm4ep9SnqQMmjT9D3bpvHtws7O+KpLE6JirPoocK93B FBj9ZdxDR8dFjbNmgTQplLhCYrDggf/q/LNd1miFB2tN4izvcUw4YJxl9lGA01Me+uhg=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] docs: Fix install-man$(1)-pages if no manpages are generated Message-Id: Date: Tue, 23 Jul 2024 11:44:11 +0000 commit 5aa152913cd0d71efed459cabb49ba055bb7776f Author: Andrew Cooper AuthorDate: Sat Jul 13 17:14:16 2024 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 16:25:07 2024 +0100 docs: Fix install-man$(1)-pages if no manpages are generated All tools to build manpages are optional, and if none of them happen to be present, the intermediate working directory may not even be created. Treat this as non-fatal, bringing the behaviour in line with install-html. Like the html side, it needs to be not-or to avoid Make thinking the rule has failed. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD --- docs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Makefile b/docs/Makefile index 966a104490..b30cc619f8 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -151,7 +151,7 @@ man$(1)-pages: $$(DOC_MAN$(1)) .PHONY: install-man$(1)-pages install-man$(1)-pages: man$(1)-pages $(INSTALL_DIR) $(DESTDIR)$(mandir) - cp -r man$(1) $(DESTDIR)$(mandir) + [ ! -d man$(1) ] || cp -r man$(1) $(DESTDIR)$(mandir) # Clean .PHONY: clean-man$(1)-pages -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 11:44:22 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 11:44:22 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763092.1173326 (Exim 4.92) (envelope-from ) id 1sWDwM-0005g6-RF; Tue, 23 Jul 2024 11:44:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763092.1173326; Tue, 23 Jul 2024 11:44:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDwM-0005fz-OS; Tue, 23 Jul 2024 11:44:22 +0000 Received: by outflank-mailman (input) for mailman id 763092; Tue, 23 Jul 2024 11:44:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDwM-0005ft-0b for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDwL-0004xH-W8 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:21 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWDwL-00052z-V9 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:21 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=91ODQHeW6mMMfm7DMLl2HmwSD3NvtgmZ00PEr+DoOYE=; b=hItqFdHK17SlZIB8Y/Gt5iE9oJ vw+Z3VejLleQHmbIIIBFhErRzqz84a1RThYg87jp87o4SR9Qc5RbbtQ/OYEdk32MUXQ3g/UqBCkka s57ofJcqr049alE3EKegJ7L+Qkc7JxGLMSHs9HTvkiYRavUJZVeTvdX3A22HjFT4+NU0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/mm: Drop duplicate l1_disallow_mask() calls Message-Id: Date: Tue, 23 Jul 2024 11:44:21 +0000 commit d834c3d24132366a0700363516b3e64cf0df1130 Author: Andrew Cooper AuthorDate: Thu Apr 28 18:09:39 2022 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 18:18:00 2024 +0100 x86/mm: Drop duplicate l1_disallow_mask() calls Even in release builds where the message is omitted, gdprintk() evalues its parameters for side effects, and l1_disallow_mask() is full of them. Calculate the disallow mask once and reuse the variable, resulting in better code generation: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-207 (-207) Function old new delta mod_l1_entry 1947 1860 -87 get_page_from_l1e 1391 1271 -120 Also, render the bad flags message with a 0x prefix. No practical change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/mm.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 648d6dd475..0ecea0f707 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -842,7 +842,7 @@ get_page_from_l1e( { unsigned long mfn = l1e_get_pfn(l1e); struct page_info *page = mfn_to_page(_mfn(mfn)); - uint32_t l1f = l1e_get_flags(l1e); + uint32_t l1f = l1e_get_flags(l1e), disallow; struct vcpu *curr = current; struct domain *real_pg_owner; bool write, valid; @@ -853,10 +853,10 @@ get_page_from_l1e( return 0; } - if ( unlikely(l1f & l1_disallow_mask(l1e_owner)) ) + disallow = l1_disallow_mask(l1e_owner); + if ( unlikely(l1f & disallow) ) { - gdprintk(XENLOG_WARNING, "Bad L1 flags %x\n", - l1f & l1_disallow_mask(l1e_owner)); + gdprintk(XENLOG_WARNING, "Bad L1 flags %#x\n", l1f & disallow); return -EINVAL; } @@ -2155,11 +2155,12 @@ static int mod_l1_entry(l1_pgentry_t *pl1e, l1_pgentry_t nl1e, if ( l1e_get_flags(nl1e) & _PAGE_PRESENT ) { struct page_info *page = NULL; + uint32_t disallow = l1_disallow_mask(pt_dom); - if ( unlikely(l1e_get_flags(nl1e) & l1_disallow_mask(pt_dom)) ) + if ( unlikely(l1e_get_flags(nl1e) & disallow) ) { - gdprintk(XENLOG_WARNING, "Bad L1 flags %x\n", - l1e_get_flags(nl1e) & l1_disallow_mask(pt_dom)); + gdprintk(XENLOG_WARNING, "Bad L1 flags %#x\n", + l1e_get_flags(nl1e) & disallow); return -EINVAL; } -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 11:44:32 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 11:44:32 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763093.1173329 (Exim 4.92) (envelope-from ) id 1sWDwW-0005in-Sa; Tue, 23 Jul 2024 11:44:32 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763093.1173329; Tue, 23 Jul 2024 11:44:32 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDwW-0005if-Q6; Tue, 23 Jul 2024 11:44:32 +0000 Received: by outflank-mailman (input) for mailman id 763093; Tue, 23 Jul 2024 11:44:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDwW-0005iR-4g for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDwW-0004xU-38 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWDwW-00054G-2C for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=zEZwG3FPsr1VtUdDwImMqtH3KDPapPRHSa+5dOmTmWk=; b=53RUuFf/Rowcrw8JNqUQz1Uqmt IytaW2TevZZChOrBDEzd6zMX7VtLmq1Gc3vOAdIgL9nlttqNmlu5X5xtAjGKxeO/GHhhOENshffFY 62JtXGm0RLgySPy9QGdaZ+iQ7ctsQWsObY35q4uOfpelXyo54NCPhDqA2Tamp+6ZWoKk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/mm: Move base_disallow_mask into __ro_after_init Message-Id: Date: Tue, 23 Jul 2024 11:44:32 +0000 commit c2770e51b402d25fa1bdc9b9e3a12d23bbc11935 Author: Andrew Cooper AuthorDate: Thu Apr 28 18:00:41 2022 +0100 Commit: Andrew Cooper CommitDate: Mon Jul 22 18:18:00 2024 +0100 x86/mm: Move base_disallow_mask into __ro_after_init base_disallow_mask is calculated once in arch_init_memory() and doesn't change thereafter. Write-protect it at runtime. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/mm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 0ecea0f707..95795567f2 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -150,7 +150,8 @@ bool __read_mostly machine_to_phys_mapping_valid; struct rangeset *__read_mostly mmio_ro_ranges; -static uint32_t base_disallow_mask; +static uint32_t __ro_after_init base_disallow_mask; + /* Global bit is allowed to be set on L1 PTEs. Intended for user mappings. */ #define L1_DISALLOW_MASK ((base_disallow_mask | _PAGE_GNTTAB) & ~_PAGE_GLOBAL) -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 11:44:43 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 11:44:43 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763094.1173333 (Exim 4.92) (envelope-from ) id 1sWDwg-0005lh-U7; Tue, 23 Jul 2024 11:44:42 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763094.1173333; Tue, 23 Jul 2024 11:44:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDwg-0005lZ-RW; Tue, 23 Jul 2024 11:44:42 +0000 Received: by outflank-mailman (input) for mailman id 763094; Tue, 23 Jul 2024 11:44:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDwg-0005lQ-7d for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWDwg-0004xd-6p for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWDwg-000550-58 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 11:44:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=RN4qCMO1mr3dRe8gmiRQSHJXuWQxHK0HDYGX49HHbMk=; b=KobuQjvSo7jowrzJufWGfqz5iM POcC/Qu9cM3hEKVii8+b5o0vKMfK6blDxJnDaMG/SwAH+h9yk5lIjjFJuHMFePFIhRHvH2tIi9y3R Fxu5a5s6B8uakHXDoFzjo9Mkck+5DxXdR9Ul88sjlj6DfGWponCGBDx0ZTzBPW7IitQI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] automation: adjust paths to docker files in documentation Message-Id: Date: Tue, 23 Jul 2024 11:44:42 +0000 commit c4bdb14b80a1751ba622f3e48a4b91401c67867d Author: Olaf Hering AuthorDate: Wed Jul 17 12:12:32 2024 +0200 Commit: Andrew Cooper CommitDate: Mon Jul 22 18:50:49 2024 +0100 automation: adjust paths to docker files in documentation Use new location of dockerfiles. Signed-off-by: Olaf Hering Reviewed-by: Stefano Stabellini --- automation/build/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/automation/build/README.md b/automation/build/README.md index 12a2b4af18..bd0c0e0418 100644 --- a/automation/build/README.md +++ b/automation/build/README.md @@ -100,12 +100,12 @@ such as openSUSE Tumbleweed. Login with the gitlab.com credentials. ``` docker login registry.gitlab.com/xen-project/xen -make -C automation/build suse/opensuse-tumbleweed +make -C automation/build opensuse/tumbleweed-x86_64 env CONTAINER_NO_PULL=1 \ CONTAINER=tumbleweed \ CONTAINER_ARGS='-e CC=gcc -e CXX=g++ -e debug=y' \ automation/scripts/containerize automation/scripts/build < /dev/null -make -C automation/build suse/opensuse-tumbleweed PUSH=1 +make -C automation/build opensuse/tumbleweed-x86_64 PUSH=1 ``` [BuildKit]: https://docs.docker.com/build/buildkit/ -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 12:11:08 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 12:11:08 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763129.1173357 (Exim 4.92) (envelope-from ) id 1sWEMD-0003PB-Gp; Tue, 23 Jul 2024 12:11:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763129.1173357; Tue, 23 Jul 2024 12:11:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEMD-0003P4-EB; Tue, 23 Jul 2024 12:11:05 +0000 Received: by outflank-mailman (input) for mailman id 763129; Tue, 23 Jul 2024 12:11:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEMC-0003Oy-1B for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEMB-0005Sa-PL for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWEMB-0007JO-Nr for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=cGteccaGnMxsTnBdE3dFEC9L5QpNwFKEtMJIOQSuYSY=; b=kuNpn6zIS22nte4h8pJ0F9M1IC nC7zmR9FJtYSnURA+AMXGFSf0/HD2mQ8io696no3MWqQdnu+RWplcamr5TK1SD4d8xOQ6EidiaX77 dVmp99VOjiZ4e64XLpuPESSsm2kWabrV2GRrJAvH+rBqWXLVX1Z7Xm2BVtVDeaOCXQTs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] Add libfuzzer target to fuzz/x86_instruction_emulator Message-Id: Date: Tue, 23 Jul 2024 12:11:03 +0000 commit b518013ca1ae5dc523f418509990dd5c65b14d44 Author: Tamas K Lengyel AuthorDate: Tue Jul 23 13:58:07 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 13:58:07 2024 +0200 Add libfuzzer target to fuzz/x86_instruction_emulator This target enables integration into oss-fuzz. Changing invalid input return to -1 as values other then 0/-1 are reserved by libfuzzer. Also adding the missing __wrap_vsnprintf wrapper which is required for successful oss-fuzz build. Signed-off-by: Tamas K Lengyel Acked-by: Jan Beulich --- tools/fuzz/x86_instruction_emulator/Makefile | 6 +++++- tools/fuzz/x86_instruction_emulator/fuzz-emul.c | 6 ++---- tools/tests/x86_emulator/wrappers.c | 11 +++++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/tools/fuzz/x86_instruction_emulator/Makefile b/tools/fuzz/x86_instruction_emulator/Makefile index 1e4c6b37f5..459743f4d9 100644 --- a/tools/fuzz/x86_instruction_emulator/Makefile +++ b/tools/fuzz/x86_instruction_emulator/Makefile @@ -58,6 +58,9 @@ afl-harness: afl-harness.o $(OBJS) cpuid.o wrappers.o afl-harness-cov: afl-harness-cov.o $(patsubst %.o,%-cov.o,$(OBJS)) cpuid.o wrappers.o $(CC) $(CFLAGS) $(GCOV_FLAGS) $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@ +libfuzzer-harness: $(OBJS) cpuid.o wrappers.o + $(CC) $(CFLAGS) $(LIB_FUZZING_ENGINE) -fsanitize=fuzzer $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@ + # Common targets .PHONY: all all: x86-insn-fuzz-all @@ -67,7 +70,8 @@ distclean: clean .PHONY: clean clean: - rm -f *.a *.o $(DEPS_RM) afl-harness afl-harness-cov *.gcda *.gcno *.gcov + rm -f *.a *.o $(DEPS_RM) *.gcda *.gcno *.gcov + rm -f afl-harness afl-harness-cov libfuzzer-harness rm -rf x86_emulate x86-emulate.c x86-emulate.h wrappers.c cpuid.c .PHONY: install diff --git a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c index eeeb6931f4..2ba9ca9e0b 100644 --- a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c +++ b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c @@ -906,14 +906,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data_p, size_t size) if ( size <= DATA_OFFSET ) { - printf("Input too small\n"); - return 1; + return -1; } if ( size > FUZZ_CORPUS_SIZE ) { - printf("Input too large\n"); - return 1; + return -1; } memcpy(&input, data_p, size); diff --git a/tools/tests/x86_emulator/wrappers.c b/tools/tests/x86_emulator/wrappers.c index 3829a6f416..8f3bd1656f 100644 --- a/tools/tests/x86_emulator/wrappers.c +++ b/tools/tests/x86_emulator/wrappers.c @@ -91,6 +91,17 @@ int __wrap_snprintf(char *buf, size_t n, const char *fmt, ...) return rc; } +int __wrap_vsnprintf(char *buf, size_t n, const char *fmt, va_list varg) +{ + int rc; + + emul_save_fpu_state(); + rc = __real_vsnprintf(buf, n, fmt, varg); + emul_restore_fpu_state(); + + return rc; +} + char *__wrap_strstr(const char *s1, const char *s2) { char *s; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 12:11:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 12:11:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763130.1173362 (Exim 4.92) (envelope-from ) id 1sWEMN-0003RC-IP; Tue, 23 Jul 2024 12:11:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763130.1173362; Tue, 23 Jul 2024 12:11:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEMN-0003R5-Fm; Tue, 23 Jul 2024 12:11:15 +0000 Received: by outflank-mailman (input) for mailman id 763130; Tue, 23 Jul 2024 12:11:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEML-0003Qx-U6 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEML-0005Si-TG for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWEML-0007Jv-RR for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=BNvTMJCZZXmSWnzcsMrmxkNHMvMBp/EdnDQrOg+Gh1A=; b=WWZr0kpWmezihR3MLj2OjyGTso jMIIeGuruk2tghNDgBmqZJd7BpmSrgGNWgEk5infpk/jD1zbLFtG40y4ZV+n6atc535a7aZwJpnQn E2oid65R4ijyAJR6eJbFXmGW5ECnWBw4UAllCs6orsSIKvi/fPZnraCzO2EPdbaZwsjg=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] Add tools/fuzz/oss-fuzz/build.sh Message-Id: Date: Tue, 23 Jul 2024 12:11:13 +0000 commit ad15a02e261d0fcb0d6466b2c8a21afa76256832 Author: Tamas K Lengyel AuthorDate: Tue Jul 23 13:58:54 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 13:58:54 2024 +0200 Add tools/fuzz/oss-fuzz/build.sh The build integration script for oss-fuzz targets. Future fuzzing targets can be added to this script and those targets will be automatically picked up by oss-fuzz without having to open separate PRs on the oss-fuzz repo. Signed-off-by: Tamas K Lengyel Acked-by: Jan Beulich --- LICENSES/Apache-2.0 | 215 +++++++++++++++++++++++++++++++++++++++++++ tools/fuzz/oss-fuzz/build.sh | 11 +++ 2 files changed, 226 insertions(+) diff --git a/LICENSES/Apache-2.0 b/LICENSES/Apache-2.0 new file mode 100644 index 0000000000..2d75bdecbb --- /dev/null +++ b/LICENSES/Apache-2.0 @@ -0,0 +1,215 @@ +Valid-License-Identifier: Apache-2.0 + +SPDX-URL: https://spdx.org/licenses/Apache-2.0.html + +Usage-Guide: + + To use this license in source code, put the following SPDX tag/value pair + into a comment according to the placement guidelines in the licensing rules + documentation: + SPDX-License-Identifier: Apache-2.0 + +License-Text: + + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/tools/fuzz/oss-fuzz/build.sh b/tools/fuzz/oss-fuzz/build.sh new file mode 100644 index 0000000000..08eeb66e4c --- /dev/null +++ b/tools/fuzz/oss-fuzz/build.sh @@ -0,0 +1,11 @@ +#!/bin/bash -eu +# Copyright 2024 Google LLC +# SPDX-License-Identifier: Apache-2.0 + +# This script is intended to be run only from the oss-fuzz docker framework +# See https://google.github.io/oss-fuzz/getting-started/new-project-guide/#buildsh +cd xen +./configure --disable-stubdom --disable-pvshim --disable-docs --disable-xen --with-system-qemu +make clang=y -C tools/include +make clang=y -C tools/fuzz/x86_instruction_emulator libfuzzer-harness +cp tools/fuzz/x86_instruction_emulator/libfuzzer-harness $OUT/x86_instruction_emulator -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 12:11:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 12:11:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763131.1173366 (Exim 4.92) (envelope-from ) id 1sWEMX-0003Tp-KK; Tue, 23 Jul 2024 12:11:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763131.1173366; Tue, 23 Jul 2024 12:11:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEMX-0003Th-HQ; Tue, 23 Jul 2024 12:11:25 +0000 Received: by outflank-mailman (input) for mailman id 763131; Tue, 23 Jul 2024 12:11:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEMW-0003TJ-29 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEMW-0005Um-1J for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWEMV-0007Kj-VQ for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=d2iqscoKPOE/5Ua0qScnvdvrfM7tREJ5atgiLTm/NUk=; b=ZagNS8ulth2t5Z18dJy2e65pVK 6M0xlRV1eALEvahn6GZQq7i2s0yPWVkjF5XKo/My/mbiI9/TeuenBjn7RX8XxQY1YdSMpgTCJc81w 9ap01rjE7d6j7FgT3hTj9vWL+qedchqfTZTS+JedYHN7SDF8Sqokn/SbN51ouG11vREo=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/list: add LIST_HEAD_RO_AFTER_INIT Message-Id: Date: Tue, 23 Jul 2024 12:11:23 +0000 commit 2e1e0504cc52901689d15517459163b4159c8110 Author: Marek Marczykowski-Górecki AuthorDate: Tue Jul 23 13:59:12 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 13:59:12 2024 +0200 xen/list: add LIST_HEAD_RO_AFTER_INIT Similar to LIST_HEAD_READ_MOSTLY. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Jan Beulich --- xen/include/xen/list.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/include/xen/list.h b/xen/include/xen/list.h index 6506ac4089..62169f4674 100644 --- a/xen/include/xen/list.h +++ b/xen/include/xen/list.h @@ -42,6 +42,9 @@ struct list_head { #define LIST_HEAD_READ_MOSTLY(name) \ struct list_head __read_mostly name = LIST_HEAD_INIT(name) +#define LIST_HEAD_RO_AFTER_INIT(name) \ + struct list_head __ro_after_init name = LIST_HEAD_INIT(name) + static inline void INIT_LIST_HEAD(struct list_head *list) { list->next = list; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 12:11:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 12:11:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763132.1173370 (Exim 4.92) (envelope-from ) id 1sWEMg-0003Wc-LX; Tue, 23 Jul 2024 12:11:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763132.1173370; Tue, 23 Jul 2024 12:11:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEMg-0003WS-Ip; Tue, 23 Jul 2024 12:11:34 +0000 Received: by outflank-mailman (input) for mailman id 763132; Tue, 23 Jul 2024 12:11:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEMg-0003WK-5p for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEMg-0005Ut-55 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWEMg-0007LU-3Q for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=4Kf2fBpJf86QPLEC6LCALns4ymEcIak3/WS+YAm2D10=; b=JzKB0R8QTx6Kb7I07NnSt7xWQX kjJIOdOT7XTFWJwFMs9lTUM2nl4/aeRysmwtkHHYWFFSws9kAUZy0YcfTDcawguWII8/vlcQI3+aO enfStPrwn/PdQJH5l3+gh+v8N78lcozDRTZpZedTGXk/Gm2vyOb7N3LpH5jz/z5PCS6U=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/altcall: fix clang code-gen when using altcall in loop constructs Message-Id: Date: Tue, 23 Jul 2024 12:11:34 +0000 commit d51b2f5ea1915fe058f730b0ec542cf84254fca0 Author: Roger Pau Monné AuthorDate: Tue Jul 23 13:59:30 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 13:59:30 2024 +0200 x86/altcall: fix clang code-gen when using altcall in loop constructs Yet another clang code generation issue when using altcalls. The issue this time is with using loop constructs around alternative_{,v}call instances using parameter types smaller than the register size. Given the following example code: static void bar(bool b) { unsigned int i; for ( i = 0; i < 10; i++ ) { int ret_; register union { bool e; unsigned long r; } di asm("rdi") = { .e = b }; register unsigned long si asm("rsi"); register unsigned long dx asm("rdx"); register unsigned long cx asm("rcx"); register unsigned long r8 asm("r8"); register unsigned long r9 asm("r9"); register unsigned long r10 asm("r10"); register unsigned long r11 asm("r11"); asm volatile ( "call %c[addr]" : "+r" (di), "=r" (si), "=r" (dx), "=r" (cx), "=r" (r8), "=r" (r9), "=r" (r10), "=r" (r11), "=a" (ret_) : [addr] "i" (&(func)), "g" (func) : "memory" ); } } See: https://godbolt.org/z/qvxMGd84q Clang will generate machine code that only resets the low 8 bits of %rdi between loop calls, leaving the rest of the register possibly containing garbage from the use of %rdi inside the called function. Note also that clang doesn't truncate the input parameters at the callee, thus breaking the psABI. Fix this by turning the `e` element in the anonymous union into an array that consumes the same space as an unsigned long, as this forces clang to reset the whole %rdi register instead of just the low 8 bits. Fixes: 2ce562b2a413 ('x86/altcall: use a union as register type for function parameters on clang') Suggested-by: Jan Beulich Signed-off-by: Roger Pau Monné --- xen/arch/x86/include/asm/alternative.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/include/asm/alternative.h b/xen/arch/x86/include/asm/alternative.h index 0d3697f1de..e63b459276 100644 --- a/xen/arch/x86/include/asm/alternative.h +++ b/xen/arch/x86/include/asm/alternative.h @@ -185,10 +185,10 @@ extern void alternative_branches(void); */ #define ALT_CALL_ARG(arg, n) \ register union { \ - typeof(arg) e; \ + typeof(arg) e[sizeof(long) / sizeof(arg)]; \ unsigned long r; \ } a ## n ## _ asm ( ALT_CALL_arg ## n ) = { \ - .e = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); }) \ + .e[0] = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); })\ } #else #define ALT_CALL_ARG(arg, n) \ -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 12:11:44 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 12:11:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763133.1173374 (Exim 4.92) (envelope-from ) id 1sWEMq-0003Z1-Ms; Tue, 23 Jul 2024 12:11:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763133.1173374; Tue, 23 Jul 2024 12:11:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEMq-0003Yr-KH; Tue, 23 Jul 2024 12:11:44 +0000 Received: by outflank-mailman (input) for mailman id 763133; Tue, 23 Jul 2024 12:11:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEMq-0003Yj-9P for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEMq-0005V2-8Y for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:44 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWEMq-0007M3-72 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:44 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=u2MisBanN+U8q2tnVkAcmYlB8AEov3y1HVv+4utchfE=; b=zj8MydGFURE1+UlKoo/2N4m6g5 TietfwhHexZulbq0hat0gl4Ixlm8aLcimmX2y5rs3gRC96MvjpLVwTUGHyg9ryQtFeJYkdLqajLDC 5HtDTm+2LIFGigzpACXgUqeFa09EVqA4q4mgF7ZRCsJJ6I2YFjmJS4JIuzjqmhQWc3sQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] common/softirq: address violation of MISRA C Rule 13.6 Message-Id: Date: Tue, 23 Jul 2024 12:11:44 +0000 commit daff80607a2e2e04578057bf66b0ef2a43864c4c Author: Alessandro Zucchelli AuthorDate: Tue Jul 23 14:00:27 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 14:00:27 2024 +0200 common/softirq: address violation of MISRA C Rule 13.6 In the file common/softirq macro set_bit is called with argument smp_processor_id. Once expanded this set_bit's argument is used in sizeof operations and thus 'smp_processor_id', being a macro that may expand to a function call with potential side effects, generates a violation. To address this violation the value of smp_processor_id is therefore stored in a variable called 'cpu' before passing it to macro set_bit. No functional change. Signed-off-by: Alessandro Zucchelli Reviewed-by: Stefano Stabellini --- xen/common/softirq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/common/softirq.c b/xen/common/softirq.c index bee4a82009..60f344e842 100644 --- a/xen/common/softirq.c +++ b/xen/common/softirq.c @@ -139,7 +139,9 @@ void cpu_raise_softirq_batch_finish(void) void raise_softirq(unsigned int nr) { - set_bit(nr, &softirq_pending(smp_processor_id())); + unsigned int cpu = smp_processor_id(); + + set_bit(nr, &softirq_pending(cpu)); } /* -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 12:11:54 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 12:11:54 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763134.1173377 (Exim 4.92) (envelope-from ) id 1sWEN0-0003cJ-Pc; Tue, 23 Jul 2024 12:11:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763134.1173377; Tue, 23 Jul 2024 12:11:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEN0-0003cB-N7; Tue, 23 Jul 2024 12:11:54 +0000 Received: by outflank-mailman (input) for mailman id 763134; Tue, 23 Jul 2024 12:11:54 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEN0-0003c5-C9 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:54 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWEN0-0005VG-BR for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:54 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWEN0-0007Me-Af for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:11:54 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Jxvqt6/cpAdFAXZnnR6XCM5+J/GAsmAsYHfshDnUdac=; b=LV9yJs1+qi8tbN7hDXAE/bZ0Np 4yQgHWFr2PyJgHa56From+B0S6/qXK8Xlg0jhYYFlBsgT5CN5hMDs63FRv81Kgdg8HWZOV6Jo1NtK HnCXYilxpb7AskT5xmQjLerNJX+rGOfJYZv4MJN0LwdtqJdsy9HKIgRAwiXrFWtxNiUU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/mctelem: address violations of MISRA C: 2012 Rule 5.3 Message-Id: Date: Tue, 23 Jul 2024 12:11:54 +0000 commit fa58fcdc8cc38b5b73a59209a630ea7170eac713 Author: Alessandro Zucchelli AuthorDate: Tue Jul 23 14:00:46 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 14:00:46 2024 +0200 x86/mctelem: address violations of MISRA C: 2012 Rule 5.3 This addresses violations of MISRA C:2012 Rule 5.3 which states as following: An identifier declared in an inner scope shall not hide an identifier declared in an outer scope. In this case the variable being shadowed is the file scope struct mctctl in this file, therefore the local variables are renamed to avoid this. No functional change. Signed-off-by: Alessandro Zucchelli Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/cpu/mcheck/mctelem.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/xen/arch/x86/cpu/mcheck/mctelem.c b/xen/arch/x86/cpu/mcheck/mctelem.c index b8d0368a7d..123e4102ad 100644 --- a/xen/arch/x86/cpu/mcheck/mctelem.c +++ b/xen/arch/x86/cpu/mcheck/mctelem.c @@ -168,28 +168,28 @@ static void mctelem_xchg_head(struct mctelem_ent **headp, void mctelem_defer(mctelem_cookie_t cookie, bool lmce) { struct mctelem_ent *tep = COOKIE2MCTE(cookie); - struct mc_telem_cpu_ctl *mctctl = &this_cpu(mctctl); + struct mc_telem_cpu_ctl *ctl = &this_cpu(mctctl); - ASSERT(mctctl->pending == NULL || mctctl->lmce_pending == NULL); + ASSERT(ctl->pending == NULL || ctl->lmce_pending == NULL); - if (mctctl->pending) - mctelem_xchg_head(&mctctl->pending, &tep->mcte_next, tep); + if (ctl->pending) + mctelem_xchg_head(&ctl->pending, &tep->mcte_next, tep); else if (lmce) - mctelem_xchg_head(&mctctl->lmce_pending, &tep->mcte_next, tep); + mctelem_xchg_head(&ctl->lmce_pending, &tep->mcte_next, tep); else { /* * LMCE is supported on Skylake-server and later CPUs, on * which mce_broadcast is always true. Therefore, non-empty - * mctctl->lmce_pending in this branch implies a broadcasting + * ctl->lmce_pending in this branch implies a broadcasting * MC# is being handled, every CPU is in the exception - * context, and no one is consuming mctctl->pending at this + * context, and no one is consuming ctl->pending at this * moment. As a result, the following two exchanges together * can be treated as atomic. */ - if (mctctl->lmce_pending) - mctelem_xchg_head(&mctctl->lmce_pending, - &mctctl->pending, NULL); - mctelem_xchg_head(&mctctl->pending, &tep->mcte_next, tep); + if (ctl->lmce_pending) + mctelem_xchg_head(&ctl->lmce_pending, + &ctl->pending, NULL); + mctelem_xchg_head(&ctl->pending, &tep->mcte_next, tep); } } @@ -213,7 +213,7 @@ void mctelem_process_deferred(unsigned int cpu, { struct mctelem_ent *tep; struct mctelem_ent *head, *prev; - struct mc_telem_cpu_ctl *mctctl = &per_cpu(mctctl, cpu); + struct mc_telem_cpu_ctl *ctl = &per_cpu(mctctl, cpu); int ret; /* @@ -232,7 +232,7 @@ void mctelem_process_deferred(unsigned int cpu, * Any MC# occurring after the following atomic exchange will be * handled by another round of MCE softirq. */ - mctelem_xchg_head(lmce ? &mctctl->lmce_pending : &mctctl->pending, + mctelem_xchg_head(lmce ? &ctl->lmce_pending : &ctl->pending, &this_cpu(mctctl.processing), NULL); head = this_cpu(mctctl.processing); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 12:12:05 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 12:12:05 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763135.1173382 (Exim 4.92) (envelope-from ) id 1sWENB-0003f3-RB; Tue, 23 Jul 2024 12:12:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763135.1173382; Tue, 23 Jul 2024 12:12:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWENB-0003ew-Oc; Tue, 23 Jul 2024 12:12:05 +0000 Received: by outflank-mailman (input) for mailman id 763135; Tue, 23 Jul 2024 12:12:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWENA-0003ei-Kn for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:12:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWENA-0005Vc-K4 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:12:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWENA-0007Og-IZ for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 12:12:04 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=KWF5YD50D3D+zRyANVagKRZHkv24vRnCk/faUF5Ag6s=; b=Ph5heJ+pA3Ei076vVtL0Pd58Rx C09JHzS1D2aIG76bG9NLYMnrUWuTR/FWJueeGg24J/tgKKeu5MYGndDIOj6nwOgcpZesJ/0aFDa8S sbQhTK9flOXEENPWWY8cCUKUxQxUb1QCUwQORyMQE4/QBaiwCUfmns4U1hX1cCI8usEM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.19] x86/altcall: fix clang code-gen when using altcall in loop constructs Message-Id: Date: Tue, 23 Jul 2024 12:12:04 +0000 commit 9d7f7e3444bcd85b73a8a152b26b22821275a156 Author: Roger Pau Monné AuthorDate: Tue Jul 23 14:07:54 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 14:07:54 2024 +0200 x86/altcall: fix clang code-gen when using altcall in loop constructs Yet another clang code generation issue when using altcalls. The issue this time is with using loop constructs around alternative_{,v}call instances using parameter types smaller than the register size. Given the following example code: static void bar(bool b) { unsigned int i; for ( i = 0; i < 10; i++ ) { int ret_; register union { bool e; unsigned long r; } di asm("rdi") = { .e = b }; register unsigned long si asm("rsi"); register unsigned long dx asm("rdx"); register unsigned long cx asm("rcx"); register unsigned long r8 asm("r8"); register unsigned long r9 asm("r9"); register unsigned long r10 asm("r10"); register unsigned long r11 asm("r11"); asm volatile ( "call %c[addr]" : "+r" (di), "=r" (si), "=r" (dx), "=r" (cx), "=r" (r8), "=r" (r9), "=r" (r10), "=r" (r11), "=a" (ret_) : [addr] "i" (&(func)), "g" (func) : "memory" ); } } See: https://godbolt.org/z/qvxMGd84q Clang will generate machine code that only resets the low 8 bits of %rdi between loop calls, leaving the rest of the register possibly containing garbage from the use of %rdi inside the called function. Note also that clang doesn't truncate the input parameters at the callee, thus breaking the psABI. Fix this by turning the `e` element in the anonymous union into an array that consumes the same space as an unsigned long, as this forces clang to reset the whole %rdi register instead of just the low 8 bits. Fixes: 2ce562b2a413 ('x86/altcall: use a union as register type for function parameters on clang') Suggested-by: Jan Beulich Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich Release-Acked-By: Oleksii Kurochko master commit: d51b2f5ea1915fe058f730b0ec542cf84254fca0 master date: 2024-07-23 13:59:30 +0200 --- xen/arch/x86/include/asm/alternative.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/include/asm/alternative.h b/xen/arch/x86/include/asm/alternative.h index 0d3697f1de..e63b459276 100644 --- a/xen/arch/x86/include/asm/alternative.h +++ b/xen/arch/x86/include/asm/alternative.h @@ -185,10 +185,10 @@ extern void alternative_branches(void); */ #define ALT_CALL_ARG(arg, n) \ register union { \ - typeof(arg) e; \ + typeof(arg) e[sizeof(long) / sizeof(arg)]; \ unsigned long r; \ } a ## n ## _ asm ( ALT_CALL_arg ## n ) = { \ - .e = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); }) \ + .e[0] = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); })\ } #else #define ALT_CALL_ARG(arg, n) \ -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.19 From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 14:33:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 14:33:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763308.1173566 (Exim 4.92) (envelope-from ) id 1sWGZc-0001rd-Ko; Tue, 23 Jul 2024 14:33:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763308.1173566; Tue, 23 Jul 2024 14:33:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGZc-0001rV-I9; Tue, 23 Jul 2024 14:33:04 +0000 Received: by outflank-mailman (input) for mailman id 763308; Tue, 23 Jul 2024 14:33:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGZb-0001r9-Cq for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGZb-0008Fi-7J for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWGZb-0001Gx-5r for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=R5QA+BjB6+dHdvFsASDDjGoRFavsfNm8QgGuQHqWkB0=; b=H8EsiCkrcj8GuHBoxhx2HpX+og IO5HrzFnCOZqC7JQI0vvfn/Nz8xZDD+AWVjxm85OWJulKuUSM8lUviglpdiSmNGe7+E+ES8xK7hp3 B2Zg9aDkISG0G4c9SHIkPIL0Wjdx6zVYePwY4XTm0iL0AhUx1tCYCNRrqJtYYjlakHeo=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/libxs: Fix length check in xs_talkv() Message-Id: Date: Tue, 23 Jul 2024 14:33:03 +0000 commit 42db2deb5e7617f0459b68cd73ab503938356186 Author: Andrew Cooper AuthorDate: Thu Jul 18 10:23:00 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 23 15:11:27 2024 +0100 tools/libxs: Fix length check in xs_talkv() If the sum of iov element lengths overflows, the XENSTORE_PAYLOAD_MAX can pass, after which we'll write 4G of data with a good-looking length field, and the remainder of the payload will be interpreted as subsequent commands. Check each iov element length for XENSTORE_PAYLOAD_MAX before accmulating it. Signed-off-by: Andrew Cooper Reviewed-by: Jason Andryuk Reviewed-by: Juergen Gross --- tools/libs/store/xs.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index ec77379ab9..68b14af877 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -571,21 +571,24 @@ static void *xs_talkv(struct xs_handle *h, xs_transaction_t t, struct xsd_sockmsg msg; void *ret = NULL; int saved_errno; - unsigned int i; + unsigned int i, msg_len; struct sigaction ignorepipe, oldact; msg.tx_id = t; msg.req_id = 0; msg.type = type; - msg.len = 0; - for (i = 0; i < num_vecs; i++) - msg.len += iovec[i].iov_len; - if (msg.len > XENSTORE_PAYLOAD_MAX) { - errno = E2BIG; - return 0; + /* Calculate the payload length by summing iovec elements */ + for (i = 0, msg_len = 0; i < num_vecs; i++) { + if ((iovec[i].iov_len > XENSTORE_PAYLOAD_MAX) || + ((msg_len += iovec[i].iov_len) > XENSTORE_PAYLOAD_MAX)) { + errno = E2BIG; + return NULL; + } } + msg.len = msg_len; + ignorepipe.sa_handler = SIG_IGN; sigemptyset(&ignorepipe.sa_mask); ignorepipe.sa_flags = 0; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 14:33:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 14:33:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763309.1173570 (Exim 4.92) (envelope-from ) id 1sWGZm-0001tc-MG; Tue, 23 Jul 2024 14:33:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763309.1173570; Tue, 23 Jul 2024 14:33:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGZm-0001tU-JV; Tue, 23 Jul 2024 14:33:14 +0000 Received: by outflank-mailman (input) for mailman id 763309; Tue, 23 Jul 2024 14:33:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGZl-0001tK-BI for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGZl-0008Fs-AS for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWGZl-0001IO-9U for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=pvewzM3h/1OSFYtgtqAPFfJpdtqpR0iQyY/rVe/yVzM=; b=BhzEvlJZQAyIkow4WKSgcgW/r7 Fk5QEGzSpLMZOo+EEjnN0/PS6nYTnQMZ28xjztdQfGLzWDH08bGqaL15atgzVc+GC9l+7PhEVQEY8 /an6844R3DffXyDHJs685Mmojq6sQfO0BrTDum8FXmxnfWCzYmTihKGldkA2vpM3lHJw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/libxs: Rework xs_talkv() to take xsd_sockmsg within the iovec Message-Id: Date: Tue, 23 Jul 2024 14:33:13 +0000 commit e2a93bed8b9e0f0c4779dcd4b10dc7ba2a959fbc Author: Andrew Cooper AuthorDate: Thu Jul 18 10:13:04 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 23 15:11:27 2024 +0100 tools/libxs: Rework xs_talkv() to take xsd_sockmsg within the iovec We would like to writev() the whole outgoing message, but this is hard given the current need to prepend the locally-constructed xsd_sockmsg. Instead, have the caller provide xsd_sockmsg in iovec[0]. This in turn drops the 't' and 'type' parameters from xs_talkv(). Note that xs_talkv() may alter the iovec structure. This may happen when writev() is really used under the covers, and it's preferable to having the lower levels need to duplicate the iovec to edit it upon encountering a short write. xs_directory_part() is the only function impacted by this, and it's easy to rearrange to be compatible. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/libs/store/xs.c | 187 +++++++++++++++++++++++++++++--------------------- 1 file changed, 107 insertions(+), 80 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 68b14af877..0ff27ef023 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -561,25 +561,32 @@ static void *read_reply( return body; } -/* Send message to xs, get malloc'ed reply. NULL and set errno on error. */ -static void *xs_talkv(struct xs_handle *h, xs_transaction_t t, - enum xsd_sockmsg_type type, - const struct iovec *iovec, +/* + * Send message to xenstore, get malloc'ed reply. NULL and set errno on error. + * + * @iovec describes the entire outgoing message, starting with the xsd_sockmsg + * header. xs_talkv() calculates the outgoing message length, updating + * xsd_sockmsg in element 0. xs_talkv() might edit the iovec structure in + * place (e.g. following short writes). + */ +static void *xs_talkv(struct xs_handle *h, + struct iovec *iovec, unsigned int num_vecs, unsigned int *len) { - struct xsd_sockmsg msg; + struct xsd_sockmsg *msg = iovec[0].iov_base; + enum xsd_sockmsg_type reply_type; void *ret = NULL; int saved_errno; unsigned int i, msg_len; struct sigaction ignorepipe, oldact; - msg.tx_id = t; - msg.req_id = 0; - msg.type = type; + /* Element 0 must be xsd_sockmsg */ + assert(num_vecs >= 1); + assert(iovec[0].iov_len == sizeof(*msg)); /* Calculate the payload length by summing iovec elements */ - for (i = 0, msg_len = 0; i < num_vecs; i++) { + for (i = 1, msg_len = 0; i < num_vecs; i++) { if ((iovec[i].iov_len > XENSTORE_PAYLOAD_MAX) || ((msg_len += iovec[i].iov_len) > XENSTORE_PAYLOAD_MAX)) { errno = E2BIG; @@ -587,7 +594,7 @@ static void *xs_talkv(struct xs_handle *h, xs_transaction_t t, } } - msg.len = msg_len; + msg->len = msg_len; ignorepipe.sa_handler = SIG_IGN; sigemptyset(&ignorepipe.sa_mask); @@ -596,28 +603,25 @@ static void *xs_talkv(struct xs_handle *h, xs_transaction_t t, mutex_lock(&h->request_mutex); - if (!xs_write_all(h->fd, &msg, sizeof(msg))) - goto fail; - for (i = 0; i < num_vecs; i++) if (!xs_write_all(h->fd, iovec[i].iov_base, iovec[i].iov_len)) goto fail; - ret = read_reply(h, &msg.type, len); + ret = read_reply(h, &reply_type, len); if (!ret) goto fail; mutex_unlock(&h->request_mutex); sigaction(SIGPIPE, &oldact, NULL); - if (msg.type == XS_ERROR) { + if (reply_type == XS_ERROR) { saved_errno = get_error(ret); free(ret); errno = saved_errno; return NULL; } - if (msg.type != type) { + if (reply_type != msg->type) { free(ret); saved_errno = EBADF; goto close_fd; @@ -650,11 +654,15 @@ static void *xs_single(struct xs_handle *h, xs_transaction_t t, const char *string, unsigned int *len) { - struct iovec iovec; + struct xsd_sockmsg msg = { .type = type, .tx_id = t }; + struct iovec iov[2]; + + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = (void *)string; + iov[1].iov_len = strlen(string) + 1; - iovec.iov_base = (void *)string; - iovec.iov_len = strlen(string) + 1; - return xs_talkv(h, t, type, &iovec, 1, len); + return xs_talkv(h, iov, ARRAY_SIZE(iov), len); } static bool xs_bool(char *reply) @@ -691,21 +699,25 @@ static char **xs_directory_common(char *strings, unsigned int len, static char **xs_directory_part(struct xs_handle *h, xs_transaction_t t, const char *path, unsigned int *num) { + struct xsd_sockmsg msg = { .type = XS_DIRECTORY_PART, .tx_id = t }; unsigned int off, result_len; char gen[24], offstr[8]; - struct iovec iovec[2]; + struct iovec iov[3]; char *result = NULL, *strings = NULL; memset(gen, 0, sizeof(gen)); - iovec[0].iov_base = (void *)path; - iovec[0].iov_len = strlen(path) + 1; for (off = 0;;) { snprintf(offstr, sizeof(offstr), "%u", off); - iovec[1].iov_base = (void *)offstr; - iovec[1].iov_len = strlen(offstr) + 1; - result = xs_talkv(h, t, XS_DIRECTORY_PART, iovec, 2, - &result_len); + + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = (void *)path; + iov[1].iov_len = strlen(path) + 1; + iov[2].iov_base = (void *)offstr; + iov[2].iov_len = strlen(offstr) + 1; + + result = xs_talkv(h, iov, ARRAY_SIZE(iov), &result_len); /* If XS_DIRECTORY_PART isn't supported return E2BIG. */ if (!result) { @@ -774,15 +786,17 @@ void *xs_read(struct xs_handle *h, xs_transaction_t t, bool xs_write(struct xs_handle *h, xs_transaction_t t, const char *path, const void *data, unsigned int len) { - struct iovec iovec[2]; + struct xsd_sockmsg msg = { .type = XS_WRITE, .tx_id = t }; + struct iovec iov[3]; - iovec[0].iov_base = (void *)path; - iovec[0].iov_len = strlen(path) + 1; - iovec[1].iov_base = (void *)data; - iovec[1].iov_len = len; + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = (void *)path; + iov[1].iov_len = strlen(path) + 1; + iov[2].iov_base = (void *)data; + iov[2].iov_len = len; - return xs_bool(xs_talkv(h, t, XS_WRITE, iovec, - ARRAY_SIZE(iovec), NULL)); + return xs_bool(xs_talkv(h, iov, ARRAY_SIZE(iov), NULL)); } /* Create a new directory. @@ -846,34 +860,37 @@ bool xs_set_permissions(struct xs_handle *h, struct xs_permissions *perms, unsigned int num_perms) { + struct xsd_sockmsg msg = { .type = XS_SET_PERMS, .tx_id = t }; unsigned int i; - struct iovec iov[1+num_perms]; + struct iovec iov[2 + num_perms]; + + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = (void *)path; + iov[1].iov_len = strlen(path) + 1; - iov[0].iov_base = (void *)path; - iov[0].iov_len = strlen(path) + 1; - for (i = 0; i < num_perms; i++) { char buffer[MAX_STRLEN(unsigned int)+1]; if (!xenstore_perm_to_string(&perms[i], buffer, sizeof(buffer))) goto unwind; - iov[i+1].iov_base = strdup(buffer); - iov[i+1].iov_len = strlen(buffer) + 1; + iov[i + 2].iov_base = strdup(buffer); + iov[i + 2].iov_len = strlen(buffer) + 1; if (!iov[i+1].iov_base) goto unwind; } - if (!xs_bool(xs_talkv(h, t, XS_SET_PERMS, iov, 1+num_perms, NULL))) + if (!xs_bool(xs_talkv(h, iov, ARRAY_SIZE(iov), NULL))) goto unwind; for (i = 0; i < num_perms; i++) - free(iov[i+1].iov_base); + free(iov[i + 2].iov_base); return true; unwind: num_perms = i; for (i = 0; i < num_perms; i++) - free_no_errno(iov[i+1].iov_base); + free_no_errno(iov[i + 2].iov_base); return false; } @@ -890,7 +907,8 @@ bool xs_restrict(struct xs_handle *h, unsigned domid) */ bool xs_watch(struct xs_handle *h, const char *path, const char *token) { - struct iovec iov[2]; + struct xsd_sockmsg msg = { .type = XS_WATCH }; + struct iovec iov[3]; #ifdef USE_PTHREAD #define DEFAULT_THREAD_STACKSIZE (16 * 1024) @@ -948,13 +966,14 @@ bool xs_watch(struct xs_handle *h, const char *path, const char *token) mutex_unlock(&h->request_mutex); #endif - iov[0].iov_base = (void *)path; - iov[0].iov_len = strlen(path) + 1; - iov[1].iov_base = (void *)token; - iov[1].iov_len = strlen(token) + 1; + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = (void *)path; + iov[1].iov_len = strlen(path) + 1; + iov[2].iov_base = (void *)token; + iov[2].iov_len = strlen(token) + 1; - return xs_bool(xs_talkv(h, XBT_NULL, XS_WATCH, iov, - ARRAY_SIZE(iov), NULL)); + return xs_bool(xs_talkv(h, iov, ARRAY_SIZE(iov), NULL)); } @@ -1067,20 +1086,22 @@ char **xs_read_watch(struct xs_handle *h, unsigned int *num) */ bool xs_unwatch(struct xs_handle *h, const char *path, const char *token) { - struct iovec iov[2]; + struct xsd_sockmsg sockmsg = { .type = XS_UNWATCH }; + struct iovec iov[3]; struct xs_stored_msg *msg, *tmsg; bool res; char *s, *p; unsigned int i; char *l_token, *l_path; - iov[0].iov_base = (char *)path; - iov[0].iov_len = strlen(path) + 1; - iov[1].iov_base = (char *)token; - iov[1].iov_len = strlen(token) + 1; + iov[0].iov_base = &sockmsg; + iov[0].iov_len = sizeof(sockmsg); + iov[1].iov_base = (char *)path; + iov[1].iov_len = strlen(path) + 1; + iov[2].iov_base = (char *)token; + iov[2].iov_len = strlen(token) + 1; - res = xs_bool(xs_talkv(h, XBT_NULL, XS_UNWATCH, iov, - ARRAY_SIZE(iov), NULL)); + res = xs_bool(xs_talkv(h, iov, ARRAY_SIZE(iov), NULL)); if (!h->unwatch_filter) /* Don't filter the watch list */ return res; @@ -1173,43 +1194,47 @@ bool xs_introduce_domain(struct xs_handle *h, unsigned int domid, unsigned long mfn, unsigned int eventchn) { + struct xsd_sockmsg msg = { .type = XS_INTRODUCE }; char domid_str[MAX_STRLEN(domid)]; char mfn_str[MAX_STRLEN(mfn)]; char eventchn_str[MAX_STRLEN(eventchn)]; - struct iovec iov[3]; + struct iovec iov[4]; snprintf(domid_str, sizeof(domid_str), "%u", domid); snprintf(mfn_str, sizeof(mfn_str), "%lu", mfn); snprintf(eventchn_str, sizeof(eventchn_str), "%u", eventchn); - iov[0].iov_base = domid_str; - iov[0].iov_len = strlen(domid_str) + 1; - iov[1].iov_base = mfn_str; - iov[1].iov_len = strlen(mfn_str) + 1; - iov[2].iov_base = eventchn_str; - iov[2].iov_len = strlen(eventchn_str) + 1; + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = domid_str; + iov[1].iov_len = strlen(domid_str) + 1; + iov[2].iov_base = mfn_str; + iov[2].iov_len = strlen(mfn_str) + 1; + iov[3].iov_base = eventchn_str; + iov[3].iov_len = strlen(eventchn_str) + 1; - return xs_bool(xs_talkv(h, XBT_NULL, XS_INTRODUCE, iov, - ARRAY_SIZE(iov), NULL)); + return xs_bool(xs_talkv(h, iov, ARRAY_SIZE(iov), NULL)); } bool xs_set_target(struct xs_handle *h, unsigned int domid, unsigned int target) { + struct xsd_sockmsg msg = { .type = XS_SET_TARGET }; char domid_str[MAX_STRLEN(domid)]; char target_str[MAX_STRLEN(target)]; - struct iovec iov[2]; + struct iovec iov[3]; snprintf(domid_str, sizeof(domid_str), "%u", domid); snprintf(target_str, sizeof(target_str), "%u", target); - iov[0].iov_base = domid_str; - iov[0].iov_len = strlen(domid_str) + 1; - iov[1].iov_base = target_str; - iov[1].iov_len = strlen(target_str) + 1; + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = domid_str; + iov[1].iov_len = strlen(domid_str) + 1; + iov[2].iov_base = target_str; + iov[2].iov_len = strlen(target_str) + 1; - return xs_bool(xs_talkv(h, XBT_NULL, XS_SET_TARGET, iov, - ARRAY_SIZE(iov), NULL)); + return xs_bool(xs_talkv(h, iov, ARRAY_SIZE(iov), NULL)); } static void * single_with_domid(struct xs_handle *h, @@ -1305,15 +1330,17 @@ out: char *xs_control_command(struct xs_handle *h, const char *cmd, void *data, unsigned int len) { - struct iovec iov[2]; + struct xsd_sockmsg msg = { .type = XS_CONTROL }; + struct iovec iov[3]; - iov[0].iov_base = (void *)cmd; - iov[0].iov_len = strlen(cmd) + 1; - iov[1].iov_base = data; - iov[1].iov_len = len; + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = (void *)cmd; + iov[1].iov_len = strlen(cmd) + 1; + iov[2].iov_base = data; + iov[2].iov_len = len; - return xs_talkv(h, XBT_NULL, XS_CONTROL, iov, - ARRAY_SIZE(iov), NULL); + return xs_talkv(h, iov, ARRAY_SIZE(iov), NULL); } char *xs_debug_command(struct xs_handle *h, const char *cmd, -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 14:33:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 14:33:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763310.1173574 (Exim 4.92) (envelope-from ) id 1sWGZw-0001wQ-Ni; Tue, 23 Jul 2024 14:33:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763310.1173574; Tue, 23 Jul 2024 14:33: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 1sWGZw-0001wI-L0; Tue, 23 Jul 2024 14:33:24 +0000 Received: by outflank-mailman (input) for mailman id 763310; Tue, 23 Jul 2024 14:33:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGZv-0001w6-Fh for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGZv-0008GK-Ej for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWGZv-0001KU-Cc for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=oYlCybRjJUPuO0IDDovKFQlaeYTPCSHDa4SaRoT7oUI=; b=K7nE0BZ7Rag3F/cvIM9prCfVz1 ugOMVSX23Xw7GOM5fy+kF2ycGoKOVNmBC3MvbUKGrEEpmHu8XkfZM2nipdNTAMyfz6tuvrGvwcQNo gDI+6EOHxrw3BszJvz8i8l63XFH7l0TT8SkinY8/K1/12gl4dJSuYo/4nit//KVXjmI8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/libxs: Rationalise the definition of struct xs_handle Message-Id: Date: Tue, 23 Jul 2024 14:33:23 +0000 commit f050c03ce2ad0095ff0bec5f9ec673bb2026cf16 Author: Andrew Cooper AuthorDate: Thu Jul 18 12:03:03 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 23 15:11:27 2024 +0100 tools/libxs: Rationalise the definition of struct xs_handle Right now there are two completely different struct xs_handle definitions, depend on #ifdef USE_PTHREAD. One is quite well hidden, and often escapes updates. Rework struct xs_handle using some interior ifdefary. It's slightly longer, but much easier to follow. Importanly, this makes it much harder to forget the !PTHREAD case when adding a "common" variable. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/libs/store/xs.c | 77 +++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 0ff27ef023..60f83ff198 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -40,6 +40,14 @@ #include #include +#ifdef USE_PTHREAD +# include +#endif + +#ifdef USE_DLSYM +# include +#endif + #ifndef O_CLOEXEC #define O_CLOEXEC 0 #endif @@ -54,14 +62,6 @@ struct xs_stored_msg { char *body; }; -#ifdef USE_PTHREAD - -#include - -#ifdef USE_DLSYM -#include -#endif - struct xs_handle { /* Communications channel to xenstore daemon. */ int fd; @@ -71,16 +71,20 @@ struct xs_handle { * A read thread which pulls messages off the comms channel and * signals waiters. */ +#ifdef USE_PTHREAD pthread_t read_thr; int read_thr_exists; +#endif /* * A list of fired watch messages, protected by a mutex. Users can * wait on the conditional variable until a watch is pending. */ XEN_TAILQ_HEAD(, struct xs_stored_msg) watch_list; +#ifdef USE_PTHREAD pthread_mutex_t watch_mutex; pthread_cond_t watch_condvar; +#endif /* Clients can select() on this pipe to wait for a watch to fire. */ int watch_pipe[2]; @@ -93,6 +97,7 @@ struct xs_handle { * conditional variable for its response. */ XEN_TAILQ_HEAD(, struct xs_stored_msg) reply_list; +#ifdef USE_PTHREAD pthread_mutex_t reply_mutex; pthread_cond_t reply_condvar; @@ -112,55 +117,47 @@ struct xs_handle { * reply_mutex * watch_mutex */ +#endif }; -#define mutex_lock(m) pthread_mutex_lock(m) -#define mutex_unlock(m) pthread_mutex_unlock(m) -#define condvar_signal(c) pthread_cond_signal(c) -#define condvar_wait(c,m) pthread_cond_wait(c,m) -#define cleanup_push(f, a) \ - pthread_cleanup_push((void (*)(void *))(f), (void *)(a)) + +#ifdef USE_PTHREAD + +# define mutex_lock(m) pthread_mutex_lock(m) +# define mutex_unlock(m) pthread_mutex_unlock(m) +# define condvar_signal(c) pthread_cond_signal(c) +# define condvar_wait(c, m) pthread_cond_wait(c, m) +# define cleanup_push(f, a) pthread_cleanup_push((void (*)(void *))(f), (void *)(a)) /* * Some definitions of pthread_cleanup_pop() are a macro starting with an * end-brace. GCC then complains if we immediately precede that with a label. * Hence we insert a dummy statement to appease the compiler in this situation. */ -#define cleanup_pop(run) ((void)0); pthread_cleanup_pop(run) +# define cleanup_pop(run) ((void)0); pthread_cleanup_pop(run) -#define read_thread_exists(h) (h->read_thr_exists) +# define read_thread_exists(h) ((h)->read_thr_exists) /* Because pthread_cleanup_p* are not available when USE_PTHREAD is * disabled, use these macros which convert appropriately. */ -#define cleanup_push_heap(p) cleanup_push(free, p) -#define cleanup_pop_heap(run, p) cleanup_pop((run)) +# define cleanup_push_heap(p) cleanup_push(free, p) +# define cleanup_pop_heap(run, p) cleanup_pop((run)) static void *read_thread(void *arg); -#else /* !defined(USE_PTHREAD) */ +#else /* USE_PTHREAD */ -struct xs_handle { - int fd; - Xentoolcore__Active_Handle tc_ah; /* for restrict */ - XEN_TAILQ_HEAD(, struct xs_stored_msg) reply_list; - XEN_TAILQ_HEAD(, struct xs_stored_msg) watch_list; - /* Clients can select() on this pipe to wait for a watch to fire. */ - int watch_pipe[2]; - /* Filtering watch event in unwatch function? */ - bool unwatch_filter; -}; +# define mutex_lock(m) ((void)0) +# define mutex_unlock(m) ((void)0) +# define condvar_signal(c) ((void)0) +# define condvar_wait(c, m) ((void)0) +# define cleanup_push(f, a) ((void)0) +# define cleanup_pop(run) ((void)0) +# define read_thread_exists(h) (0) +# define cleanup_push_heap(p) ((void)0) +# define cleanup_pop_heap(run, p) do { if ((run)) free(p); } while(0) -#define mutex_lock(m) ((void)0) -#define mutex_unlock(m) ((void)0) -#define condvar_signal(c) ((void)0) -#define condvar_wait(c,m) ((void)0) -#define cleanup_push(f, a) ((void)0) -#define cleanup_pop(run) ((void)0) -#define read_thread_exists(h) (0) +#endif /* !USE_PTHREAD */ -#define cleanup_push_heap(p) ((void)0) -#define cleanup_pop_heap(run, p) do { if ((run)) free(p); } while(0) - -#endif static int read_message(struct xs_handle *h, int nonblocking); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 14:33:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 14:33:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763311.1173578 (Exim 4.92) (envelope-from ) id 1sWGa6-0001zc-Qz; Tue, 23 Jul 2024 14:33:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763311.1173578; Tue, 23 Jul 2024 14:33:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGa6-0001zU-OF; Tue, 23 Jul 2024 14:33:34 +0000 Received: by outflank-mailman (input) for mailman id 763311; Tue, 23 Jul 2024 14:33:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGa5-0001zM-Ih for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGa5-0008GS-Hp for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWGa5-0001L5-Gv for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Pi1UKOFNMsZ+HCQFWjdFUKWXjTwxPv9kTphHP4C4YwA=; b=YNP7J7kO2zrn9mLqrT4Zftpc6N wP7Pu1JD/MBlSOzFU4Jlz4jdP4bsBgXu+EOs1/wyDMww5yeMvhJXv7zLa1hjb3UR/7EwsmkCvpypI bXMp5IpRTpJmtwiNZ22pq4xLwrsaWo/PmUlbBWzYedwVWflt9pwEAZr6SmdOMofSyLW0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/libxs: Track whether we're using a socket or file Message-Id: Date: Tue, 23 Jul 2024 14:33:33 +0000 commit 046efe529e82b8b999d8453d4ea49cb817c3f9b5 Author: Andrew Cooper AuthorDate: Fri Jun 28 19:40:27 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 23 15:11:27 2024 +0100 tools/libxs: Track whether we're using a socket or file It will determine whether to use writev() or sendmsg(). Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/libs/store/xs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 60f83ff198..3b3ee3d780 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -65,6 +65,9 @@ struct xs_stored_msg { struct xs_handle { /* Communications channel to xenstore daemon. */ int fd; + + bool is_socket; /* is @fd a file or socket? */ + Xentoolcore__Active_Handle tc_ah; /* for restrict */ /* @@ -297,7 +300,9 @@ static struct xs_handle *get_handle(const char *connect_to) if (stat(connect_to, &buf) != 0) goto err; - if (S_ISSOCK(buf.st_mode)) + h->is_socket = S_ISSOCK(buf.st_mode); + + if (h->is_socket) h->fd = get_socket(connect_to); else h->fd = get_dev(connect_to); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 14:33:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 14:33:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763312.1173581 (Exim 4.92) (envelope-from ) id 1sWGaH-00022L-S7; Tue, 23 Jul 2024 14:33:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763312.1173581; Tue, 23 Jul 2024 14:33:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGaH-00022E-Pj; Tue, 23 Jul 2024 14:33:45 +0000 Received: by outflank-mailman (input) for mailman id 763312; Tue, 23 Jul 2024 14:33:43 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGaF-00021r-Mu for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:43 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGaF-0008Gb-LG for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:43 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWGaF-0001LY-Jw for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:43 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=JQZE6pMlrZQcH4Fs7tP9uj++auZ8IeCO5nnmXbubSNE=; b=CUYXCo+8tLzZXL5AulDEEMMYCt SKeIWPF5SRpZtMgVhr2Du8uKkXOM7TpWrhJtUeJQ79KPKO7YNrzI/AjPCaZon/SAQ3jH7wkzpNO60 1tvHSpsTc+0bUMycEOIWi/BUGEP79r+/0rdEBzs/ODHcq9n9iBaX0pAj55IEmRZlZbDU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/libxs: Use writev()/sendmsg() instead of write() Message-Id: Date: Tue, 23 Jul 2024 14:33:43 +0000 commit ebaeb0c64a6d363313e213eb9995f48307604ebb Author: Andrew Cooper AuthorDate: Thu Jul 18 12:55:48 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 23 15:11:27 2024 +0100 tools/libxs: Use writev()/sendmsg() instead of write() With the input data now conveniently arranged, use writev()/sendmsg() instead of decomposing it into write() calls. This causes all requests to be submitted with a single system call, rather than at least two. While in principle short writes can occur, the chances of it happening are slim given that most xenbus comms are only a handful of bytes. Nevertheless, provide {writev,sendmsg}_exact() wrappers which take care of resubmitting on EINTR or short write. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/libs/store/xs.c | 88 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 3 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 3b3ee3d780..1dd9539717 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -563,6 +563,89 @@ static void *read_reply( return body; } +/* + * Update an iov/nr pair after an incomplete writev()/sendmsg(). + * + * Awkwardly, nr has different widths and signs between writev() and + * sendmsg(), so we take it and return it by value, rather than by pointer. + */ +static size_t update_iov(struct iovec **p_iov, size_t nr, size_t res) +{ + struct iovec *iov = *p_iov; + + /* Skip fully complete elements, including empty elements. */ + while (nr && res >= iov->iov_len) { + res -= iov->iov_len; + nr--; + iov++; + } + + /* Partial element, adjust base/len. */ + if (res) { + iov->iov_len -= res; + iov->iov_base += res; + } + + *p_iov = iov; + + return nr; +} + +/* + * Wrapper around sendmsg() to resubmit on EINTR or short write. Returns + * @true if all data was transmitted, or @false with errno for an error. + * Note: May alter @iov in place on resubmit. + */ +static bool sendmsg_exact(int fd, struct iovec *iov, unsigned int nr) +{ + struct msghdr hdr = { + .msg_iov = iov, + .msg_iovlen = nr, + }; + + while (hdr.msg_iovlen) { + ssize_t res = sendmsg(fd, &hdr, 0); + + if (res < 0 && errno == EINTR) + continue; + if (res <= 0) + return false; + + hdr.msg_iovlen = update_iov(&hdr.msg_iov, hdr.msg_iovlen, res); + } + + return true; +} + +/* + * Wrapper around sendmsg() to resubmit on EINTR or short write. Returns + * @true if all data was transmitted, or @false with errno for an error. + * Note: May alter @iov in place on resubmit. + */ +static bool writev_exact(int fd, struct iovec *iov, unsigned int nr) +{ + while (nr) { + ssize_t res = writev(fd, iov, nr); + + if (res < 0 && errno == EINTR) + continue; + if (res <= 0) + return false; + + nr = update_iov(&iov, nr, res); + } + + return true; +} + +static bool write_request(struct xs_handle *h, struct iovec *iov, unsigned int nr) +{ + if (h->is_socket) + return sendmsg_exact(h->fd, iov, nr); + else + return writev_exact(h->fd, iov, nr); +} + /* * Send message to xenstore, get malloc'ed reply. NULL and set errno on error. * @@ -605,9 +688,8 @@ static void *xs_talkv(struct xs_handle *h, mutex_lock(&h->request_mutex); - for (i = 0; i < num_vecs; i++) - if (!xs_write_all(h->fd, iovec[i].iov_base, iovec[i].iov_len)) - goto fail; + if (!write_request(h, iovec, num_vecs)) + goto fail; ret = read_reply(h, &reply_type, len); if (!ret) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 23 14:33:54 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 23 Jul 2024 14:33:54 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763313.1173585 (Exim 4.92) (envelope-from ) id 1sWGaQ-00024i-Te; Tue, 23 Jul 2024 14:33:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763313.1173585; Tue, 23 Jul 2024 14:33:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGaQ-00024a-R7; Tue, 23 Jul 2024 14:33:54 +0000 Received: by outflank-mailman (input) for mailman id 763313; Tue, 23 Jul 2024 14:33:53 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGaP-00024O-Pj for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:53 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWGaP-0008Gi-O3 for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:53 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWGaP-0001M5-NN for xen-changelog@lists.xenproject.org; Tue, 23 Jul 2024 14:33:53 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=69FsPB7Nal/EUAneMwYEv+XO3RiCjGihHSyepOTMjPg=; b=VxmdQk8nFUyBsyIWyHoNPlkXO6 WwJYRjKUqiJbeU1d7kAEo5RpINfDcyvn1fmIg/Z+GhM9wYaA5dI0hh/HFdZ5W1a4N+l3OnQPS4u4n jFe262uKJPM0LC5FsLLr6lSnV9UKBtegFe9rDdODfMqZhOzrDGMZAY7peHTFHOV5iagw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/libxs: Stop playing with SIGPIPE Message-Id: Date: Tue, 23 Jul 2024 14:33:53 +0000 commit a17b6db9b00784b409c35e3017dc45aed1ec2bfb Author: Andrew Cooper AuthorDate: Fri Jun 28 16:33:56 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 23 15:11:27 2024 +0100 tools/libxs: Stop playing with SIGPIPE It's very rude for a library to play with signals behind the back of the application, no matter ones views on the default behaviour of SIGPIPE under POSIX. Even if the application doesn't care about the xenstored socket, it my care about others. This logic has existed since xenstore/xenstored was originally added in commit 29c9e570b1ed ("Add xenstore daemon and library") in 2005. It's also unnecessary. Pass MSG_NOSIGNAL when talking to xenstored over a pipe (to avoid sucumbing to SIGPIPE if xenstored has crashed), and forgo any playing with the signal disposition. This has a side benefit of saving 2 syscalls per xenstore request. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/libs/store/xs.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 1dd9539717..5d9c7151e8 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -604,7 +604,7 @@ static bool sendmsg_exact(int fd, struct iovec *iov, unsigned int nr) }; while (hdr.msg_iovlen) { - ssize_t res = sendmsg(fd, &hdr, 0); + ssize_t res = sendmsg(fd, &hdr, MSG_NOSIGNAL); if (res < 0 && errno == EINTR) continue; @@ -664,7 +664,6 @@ static void *xs_talkv(struct xs_handle *h, void *ret = NULL; int saved_errno; unsigned int i, msg_len; - struct sigaction ignorepipe, oldact; /* Element 0 must be xsd_sockmsg */ assert(num_vecs >= 1); @@ -681,11 +680,6 @@ static void *xs_talkv(struct xs_handle *h, msg->len = msg_len; - ignorepipe.sa_handler = SIG_IGN; - sigemptyset(&ignorepipe.sa_mask); - ignorepipe.sa_flags = 0; - sigaction(SIGPIPE, &ignorepipe, &oldact); - mutex_lock(&h->request_mutex); if (!write_request(h, iovec, num_vecs)) @@ -697,7 +691,6 @@ static void *xs_talkv(struct xs_handle *h, mutex_unlock(&h->request_mutex); - sigaction(SIGPIPE, &oldact, NULL); if (reply_type == XS_ERROR) { saved_errno = get_error(ret); free(ret); @@ -716,7 +709,6 @@ fail: /* We're in a bad state, so close fd. */ saved_errno = errno; mutex_unlock(&h->request_mutex); - sigaction(SIGPIPE, &oldact, NULL); close_fd: close(h->fd); h->fd = -1; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 00:55:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 00:55:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763667.1173949 (Exim 4.92) (envelope-from ) id 1sWQHX-00083a-M7; Wed, 24 Jul 2024 00:55:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763667.1173949; Wed, 24 Jul 2024 00:55:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWQHX-00083T-Jf; Wed, 24 Jul 2024 00:55:03 +0000 Received: by outflank-mailman (input) for mailman id 763667; Wed, 24 Jul 2024 00:55:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWQHW-00083N-9X for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 00:55:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWQHW-0005AN-0B for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 00:55:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWQHV-0006Qo-V6 for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 00:55:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=povWZqenSYZVkfOUXeVieTqzVw9TMfBf4KeJ+0oCMQc=; b=yyRMHG1WCyRuJtze++zXDabKNc x1N1E04c0X68MotFVI1qqOYS96TC7YRahRKMA3TyQvigNinsdpeFPUywuPF9MM1HuYtt9jM5ewAB2 v2RI9UjHfZHiJRdVz3y1yf94iK7ljK7ok7eckDuXrhjGGGxDTIAWZas/E0j3h8SGzZIQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.19] x86/altcall: fix clang code-gen when using altcall in loop constructs Message-Id: Date: Wed, 24 Jul 2024 00:55:01 +0000 commit 9d7f7e3444bcd85b73a8a152b26b22821275a156 Author: Roger Pau Monné AuthorDate: Tue Jul 23 14:07:54 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 14:07:54 2024 +0200 x86/altcall: fix clang code-gen when using altcall in loop constructs Yet another clang code generation issue when using altcalls. The issue this time is with using loop constructs around alternative_{,v}call instances using parameter types smaller than the register size. Given the following example code: static void bar(bool b) { unsigned int i; for ( i = 0; i < 10; i++ ) { int ret_; register union { bool e; unsigned long r; } di asm("rdi") = { .e = b }; register unsigned long si asm("rsi"); register unsigned long dx asm("rdx"); register unsigned long cx asm("rcx"); register unsigned long r8 asm("r8"); register unsigned long r9 asm("r9"); register unsigned long r10 asm("r10"); register unsigned long r11 asm("r11"); asm volatile ( "call %c[addr]" : "+r" (di), "=r" (si), "=r" (dx), "=r" (cx), "=r" (r8), "=r" (r9), "=r" (r10), "=r" (r11), "=a" (ret_) : [addr] "i" (&(func)), "g" (func) : "memory" ); } } See: https://godbolt.org/z/qvxMGd84q Clang will generate machine code that only resets the low 8 bits of %rdi between loop calls, leaving the rest of the register possibly containing garbage from the use of %rdi inside the called function. Note also that clang doesn't truncate the input parameters at the callee, thus breaking the psABI. Fix this by turning the `e` element in the anonymous union into an array that consumes the same space as an unsigned long, as this forces clang to reset the whole %rdi register instead of just the low 8 bits. Fixes: 2ce562b2a413 ('x86/altcall: use a union as register type for function parameters on clang') Suggested-by: Jan Beulich Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich Release-Acked-By: Oleksii Kurochko master commit: d51b2f5ea1915fe058f730b0ec542cf84254fca0 master date: 2024-07-23 13:59:30 +0200 --- xen/arch/x86/include/asm/alternative.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/include/asm/alternative.h b/xen/arch/x86/include/asm/alternative.h index 0d3697f1de..e63b459276 100644 --- a/xen/arch/x86/include/asm/alternative.h +++ b/xen/arch/x86/include/asm/alternative.h @@ -185,10 +185,10 @@ extern void alternative_branches(void); */ #define ALT_CALL_ARG(arg, n) \ register union { \ - typeof(arg) e; \ + typeof(arg) e[sizeof(long) / sizeof(arg)]; \ unsigned long r; \ } a ## n ## _ asm ( ALT_CALL_arg ## n ) = { \ - .e = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); }) \ + .e[0] = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); })\ } #else #define ALT_CALL_ARG(arg, n) \ -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.19 From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 04:55:10 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 04:55:10 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763704.1173985 (Exim 4.92) (envelope-from ) id 1sWU1n-0005Kw-P5; Wed, 24 Jul 2024 04:55:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763704.1173985; Wed, 24 Jul 2024 04:55:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU1n-0005Ko-LP; Wed, 24 Jul 2024 04:55:03 +0000 Received: by outflank-mailman (input) for mailman id 763704; Wed, 24 Jul 2024 04:55:01 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU1l-0005Ka-PP for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:01 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU1l-0004ke-OX for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWU1l-0005dc-Mh for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=sDcKVd+BEhNSsesRFnZsietOS5p/pJb9ssnalGkvTqc=; b=kZWcknZqOiqDMOre4Xb97yfxe0 vGi2Bn1iGWqd9PKaofDqczzskCmI5kqPSNxI0RqjxUY6IQvKtYlb7w+sRkqK1o5LbLB3Y1I8uwoqw 6/diODPaP0WSUr1kFRR0jdbla1Z3+pzaqnkNSzfRm7dtsmDH79BadkCoR2MQfsDmmPhA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] Add libfuzzer target to fuzz/x86_instruction_emulator Message-Id: Date: Wed, 24 Jul 2024 04:55:01 +0000 commit b518013ca1ae5dc523f418509990dd5c65b14d44 Author: Tamas K Lengyel AuthorDate: Tue Jul 23 13:58:07 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 13:58:07 2024 +0200 Add libfuzzer target to fuzz/x86_instruction_emulator This target enables integration into oss-fuzz. Changing invalid input return to -1 as values other then 0/-1 are reserved by libfuzzer. Also adding the missing __wrap_vsnprintf wrapper which is required for successful oss-fuzz build. Signed-off-by: Tamas K Lengyel Acked-by: Jan Beulich --- tools/fuzz/x86_instruction_emulator/Makefile | 6 +++++- tools/fuzz/x86_instruction_emulator/fuzz-emul.c | 6 ++---- tools/tests/x86_emulator/wrappers.c | 11 +++++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/tools/fuzz/x86_instruction_emulator/Makefile b/tools/fuzz/x86_instruction_emulator/Makefile index 1e4c6b37f5..459743f4d9 100644 --- a/tools/fuzz/x86_instruction_emulator/Makefile +++ b/tools/fuzz/x86_instruction_emulator/Makefile @@ -58,6 +58,9 @@ afl-harness: afl-harness.o $(OBJS) cpuid.o wrappers.o afl-harness-cov: afl-harness-cov.o $(patsubst %.o,%-cov.o,$(OBJS)) cpuid.o wrappers.o $(CC) $(CFLAGS) $(GCOV_FLAGS) $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@ +libfuzzer-harness: $(OBJS) cpuid.o wrappers.o + $(CC) $(CFLAGS) $(LIB_FUZZING_ENGINE) -fsanitize=fuzzer $(addprefix -Wl$(comma)--wrap=,$(WRAPPED)) $^ -o $@ + # Common targets .PHONY: all all: x86-insn-fuzz-all @@ -67,7 +70,8 @@ distclean: clean .PHONY: clean clean: - rm -f *.a *.o $(DEPS_RM) afl-harness afl-harness-cov *.gcda *.gcno *.gcov + rm -f *.a *.o $(DEPS_RM) *.gcda *.gcno *.gcov + rm -f afl-harness afl-harness-cov libfuzzer-harness rm -rf x86_emulate x86-emulate.c x86-emulate.h wrappers.c cpuid.c .PHONY: install diff --git a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c index eeeb6931f4..2ba9ca9e0b 100644 --- a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c +++ b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c @@ -906,14 +906,12 @@ int LLVMFuzzerTestOneInput(const uint8_t *data_p, size_t size) if ( size <= DATA_OFFSET ) { - printf("Input too small\n"); - return 1; + return -1; } if ( size > FUZZ_CORPUS_SIZE ) { - printf("Input too large\n"); - return 1; + return -1; } memcpy(&input, data_p, size); diff --git a/tools/tests/x86_emulator/wrappers.c b/tools/tests/x86_emulator/wrappers.c index 3829a6f416..8f3bd1656f 100644 --- a/tools/tests/x86_emulator/wrappers.c +++ b/tools/tests/x86_emulator/wrappers.c @@ -91,6 +91,17 @@ int __wrap_snprintf(char *buf, size_t n, const char *fmt, ...) return rc; } +int __wrap_vsnprintf(char *buf, size_t n, const char *fmt, va_list varg) +{ + int rc; + + emul_save_fpu_state(); + rc = __real_vsnprintf(buf, n, fmt, varg); + emul_restore_fpu_state(); + + return rc; +} + char *__wrap_strstr(const char *s1, const char *s2) { char *s; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 04:55:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 04:55:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763705.1173987 (Exim 4.92) (envelope-from ) id 1sWU1x-0005NO-PN; Wed, 24 Jul 2024 04:55:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763705.1173987; Wed, 24 Jul 2024 04:55:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU1x-0005NH-Mu; Wed, 24 Jul 2024 04:55:13 +0000 Received: by outflank-mailman (input) for mailman id 763705; Wed, 24 Jul 2024 04:55:11 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU1v-0005Mj-Tk for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:11 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU1v-0004kk-S0 for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:11 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWU1v-0005eW-Qk for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:11 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=rl6vjoi6zapKuuAcES/nbP/33Ajkqu4HqIiqWaMQUTE=; b=AxtYJI3eesDAU/KsWh4ckzL/1t CN8qHNYP6nv5Kdigz6iAbWYXMbDGt2lWGxMHW+kYF4YBizwLSHa/PwTj0LufiU4Lme/CGrwr3CIYg Pp151WBiihcO92OqTIPGClYNuXUpQdPLRXvpExr4In4yiAwHEdi9uNIdNATv0ysW6HcQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] Add tools/fuzz/oss-fuzz/build.sh Message-Id: Date: Wed, 24 Jul 2024 04:55:11 +0000 commit ad15a02e261d0fcb0d6466b2c8a21afa76256832 Author: Tamas K Lengyel AuthorDate: Tue Jul 23 13:58:54 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 13:58:54 2024 +0200 Add tools/fuzz/oss-fuzz/build.sh The build integration script for oss-fuzz targets. Future fuzzing targets can be added to this script and those targets will be automatically picked up by oss-fuzz without having to open separate PRs on the oss-fuzz repo. Signed-off-by: Tamas K Lengyel Acked-by: Jan Beulich --- LICENSES/Apache-2.0 | 215 +++++++++++++++++++++++++++++++++++++++++++ tools/fuzz/oss-fuzz/build.sh | 11 +++ 2 files changed, 226 insertions(+) diff --git a/LICENSES/Apache-2.0 b/LICENSES/Apache-2.0 new file mode 100644 index 0000000000..2d75bdecbb --- /dev/null +++ b/LICENSES/Apache-2.0 @@ -0,0 +1,215 @@ +Valid-License-Identifier: Apache-2.0 + +SPDX-URL: https://spdx.org/licenses/Apache-2.0.html + +Usage-Guide: + + To use this license in source code, put the following SPDX tag/value pair + into a comment according to the placement guidelines in the licensing rules + documentation: + SPDX-License-Identifier: Apache-2.0 + +License-Text: + + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/tools/fuzz/oss-fuzz/build.sh b/tools/fuzz/oss-fuzz/build.sh new file mode 100644 index 0000000000..08eeb66e4c --- /dev/null +++ b/tools/fuzz/oss-fuzz/build.sh @@ -0,0 +1,11 @@ +#!/bin/bash -eu +# Copyright 2024 Google LLC +# SPDX-License-Identifier: Apache-2.0 + +# This script is intended to be run only from the oss-fuzz docker framework +# See https://google.github.io/oss-fuzz/getting-started/new-project-guide/#buildsh +cd xen +./configure --disable-stubdom --disable-pvshim --disable-docs --disable-xen --with-system-qemu +make clang=y -C tools/include +make clang=y -C tools/fuzz/x86_instruction_emulator libfuzzer-harness +cp tools/fuzz/x86_instruction_emulator/libfuzzer-harness $OUT/x86_instruction_emulator -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 04:55:23 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 04:55:23 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763706.1173992 (Exim 4.92) (envelope-from ) id 1sWU27-0005R5-T0; Wed, 24 Jul 2024 04:55:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763706.1173992; Wed, 24 Jul 2024 04:55:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU27-0005Qs-QA; Wed, 24 Jul 2024 04:55:23 +0000 Received: by outflank-mailman (input) for mailman id 763706; Wed, 24 Jul 2024 04:55:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU26-0005Qe-0V for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU25-0004lE-Ux for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:21 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWU25-0005fY-UA for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:21 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=ACWw1nqdcIX12tBw5oALH3WHSnSZAZ3Ubm0VlNJkSno=; b=QJgn2/VZQX2bOyDpwPcReiCrP6 9DpzC201Xt8ABfxXX7PAeiVxkQD7TYdpf41QEF4UG4Fd7J3d2DrIl4mMmn9vdtsPhPu3bw9GNglul IILFmaV7HsBeO/Wu/mDeTHPPR3cu5pJhNyNbQHWPrCrHgQgHwVJr4BLmx0YWizFn7jiY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] xen/list: add LIST_HEAD_RO_AFTER_INIT Message-Id: Date: Wed, 24 Jul 2024 04:55:21 +0000 commit 2e1e0504cc52901689d15517459163b4159c8110 Author: Marek Marczykowski-Górecki AuthorDate: Tue Jul 23 13:59:12 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 13:59:12 2024 +0200 xen/list: add LIST_HEAD_RO_AFTER_INIT Similar to LIST_HEAD_READ_MOSTLY. Signed-off-by: Marek Marczykowski-Górecki Acked-by: Jan Beulich --- xen/include/xen/list.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/include/xen/list.h b/xen/include/xen/list.h index 6506ac4089..62169f4674 100644 --- a/xen/include/xen/list.h +++ b/xen/include/xen/list.h @@ -42,6 +42,9 @@ struct list_head { #define LIST_HEAD_READ_MOSTLY(name) \ struct list_head __read_mostly name = LIST_HEAD_INIT(name) +#define LIST_HEAD_RO_AFTER_INIT(name) \ + struct list_head __ro_after_init name = LIST_HEAD_INIT(name) + static inline void INIT_LIST_HEAD(struct list_head *list) { list->next = list; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 04:55:33 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 04:55:33 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763707.1173997 (Exim 4.92) (envelope-from ) id 1sWU2H-0005Tz-Ur; Wed, 24 Jul 2024 04:55:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763707.1173997; Wed, 24 Jul 2024 04:55:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU2H-0005Tr-Rc; Wed, 24 Jul 2024 04:55:33 +0000 Received: by outflank-mailman (input) for mailman id 763707; Wed, 24 Jul 2024 04:55:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU2G-0005Tg-3a for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU2G-0004m2-2N for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWU2G-0005gW-0j for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=EX6kisxLNqEisQPQYk6uwU5xuq82W1vYes/43kS5sDo=; b=xkUUyvMWOiqxbFObCnaOT3bBdw anmAAQ0f2Ufcssaar5fwwL0BsGlfxsRDrGaBVs17fdLQSHrMQzkjBGmyIlNkEqlOik5Gu0ECdXZNd GzF/afGzhgn8KoQ07/ID340SUrh5g6ByvExgHFWkfWUl5ZFNQMSSQsYBJZnBUOcsqOaU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/altcall: fix clang code-gen when using altcall in loop constructs Message-Id: Date: Wed, 24 Jul 2024 04:55:32 +0000 commit d51b2f5ea1915fe058f730b0ec542cf84254fca0 Author: Roger Pau Monné AuthorDate: Tue Jul 23 13:59:30 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 13:59:30 2024 +0200 x86/altcall: fix clang code-gen when using altcall in loop constructs Yet another clang code generation issue when using altcalls. The issue this time is with using loop constructs around alternative_{,v}call instances using parameter types smaller than the register size. Given the following example code: static void bar(bool b) { unsigned int i; for ( i = 0; i < 10; i++ ) { int ret_; register union { bool e; unsigned long r; } di asm("rdi") = { .e = b }; register unsigned long si asm("rsi"); register unsigned long dx asm("rdx"); register unsigned long cx asm("rcx"); register unsigned long r8 asm("r8"); register unsigned long r9 asm("r9"); register unsigned long r10 asm("r10"); register unsigned long r11 asm("r11"); asm volatile ( "call %c[addr]" : "+r" (di), "=r" (si), "=r" (dx), "=r" (cx), "=r" (r8), "=r" (r9), "=r" (r10), "=r" (r11), "=a" (ret_) : [addr] "i" (&(func)), "g" (func) : "memory" ); } } See: https://godbolt.org/z/qvxMGd84q Clang will generate machine code that only resets the low 8 bits of %rdi between loop calls, leaving the rest of the register possibly containing garbage from the use of %rdi inside the called function. Note also that clang doesn't truncate the input parameters at the callee, thus breaking the psABI. Fix this by turning the `e` element in the anonymous union into an array that consumes the same space as an unsigned long, as this forces clang to reset the whole %rdi register instead of just the low 8 bits. Fixes: 2ce562b2a413 ('x86/altcall: use a union as register type for function parameters on clang') Suggested-by: Jan Beulich Signed-off-by: Roger Pau Monné --- xen/arch/x86/include/asm/alternative.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/include/asm/alternative.h b/xen/arch/x86/include/asm/alternative.h index 0d3697f1de..e63b459276 100644 --- a/xen/arch/x86/include/asm/alternative.h +++ b/xen/arch/x86/include/asm/alternative.h @@ -185,10 +185,10 @@ extern void alternative_branches(void); */ #define ALT_CALL_ARG(arg, n) \ register union { \ - typeof(arg) e; \ + typeof(arg) e[sizeof(long) / sizeof(arg)]; \ unsigned long r; \ } a ## n ## _ asm ( ALT_CALL_arg ## n ) = { \ - .e = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); }) \ + .e[0] = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); })\ } #else #define ALT_CALL_ARG(arg, n) \ -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 04:55:44 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 04:55:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763708.1173999 (Exim 4.92) (envelope-from ) id 1sWU2R-0005Wp-Va; Wed, 24 Jul 2024 04:55:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763708.1173999; Wed, 24 Jul 2024 04:55:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU2R-0005Wi-TB; Wed, 24 Jul 2024 04:55:43 +0000 Received: by outflank-mailman (input) for mailman id 763708; Wed, 24 Jul 2024 04:55:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU2Q-0005WW-6g for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU2Q-0004mZ-5t for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWU2Q-0005hT-4R for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=T4g3jVkYkpZXV9Q0eByuo6Iz9ePf93MhcrmdBETbXV8=; b=CU8ddYNdDWdDHlfJtTtCs+muGx Sh5E5Q1zaNHTVGL8UbvmGzFV+5br6/2BRmYszVdWwtBfs4N7tE/mWwC3XUZ1rjr5N4TvdA20q2cHD dhLBee3hR/hQh5Fx60mRcgsttnRgnjTWy6f3TGLg/NcnRnTKo5ebFJ2kvOw7Qk1Vb2sA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] common/softirq: address violation of MISRA C Rule 13.6 Message-Id: Date: Wed, 24 Jul 2024 04:55:42 +0000 commit daff80607a2e2e04578057bf66b0ef2a43864c4c Author: Alessandro Zucchelli AuthorDate: Tue Jul 23 14:00:27 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 14:00:27 2024 +0200 common/softirq: address violation of MISRA C Rule 13.6 In the file common/softirq macro set_bit is called with argument smp_processor_id. Once expanded this set_bit's argument is used in sizeof operations and thus 'smp_processor_id', being a macro that may expand to a function call with potential side effects, generates a violation. To address this violation the value of smp_processor_id is therefore stored in a variable called 'cpu' before passing it to macro set_bit. No functional change. Signed-off-by: Alessandro Zucchelli Reviewed-by: Stefano Stabellini --- xen/common/softirq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/common/softirq.c b/xen/common/softirq.c index bee4a82009..60f344e842 100644 --- a/xen/common/softirq.c +++ b/xen/common/softirq.c @@ -139,7 +139,9 @@ void cpu_raise_softirq_batch_finish(void) void raise_softirq(unsigned int nr) { - set_bit(nr, &softirq_pending(smp_processor_id())); + unsigned int cpu = smp_processor_id(); + + set_bit(nr, &softirq_pending(cpu)); } /* -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 04:55:54 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 04:55:54 +0000 Received: from list by lists.xenproject.org with outflank-mailman.763709.1174004 (Exim 4.92) (envelope-from ) id 1sWU2c-0005ZU-0x; Wed, 24 Jul 2024 04:55:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 763709.1174004; Wed, 24 Jul 2024 04:55:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU2b-0005ZM-Uf; Wed, 24 Jul 2024 04:55:53 +0000 Received: by outflank-mailman (input) for mailman id 763709; Wed, 24 Jul 2024 04:55:52 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU2a-0005ZG-9N for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:52 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWU2a-0004ms-8b for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:52 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWU2a-0005i5-82 for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 04:55:52 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=B+eZAAbVEORRceGX7N9YyxpT4NQlhTOQpQ6+eaEPqnU=; b=cujhV71KTd0HN+tjy4yzcH+1c1 IP5rE+t3tbSAh6bVVUeuUiKcbs0pWV9X2Nnst4u1TmWpovruIitm/kwzKcSTrXBqR2WPc7FTbH0tO xwOyukKILd0obld9UwawLqQiIPLyvjNLTah6LhAjVdBI1JXLWaazKWw7+wZMRXf6TlMw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/mctelem: address violations of MISRA C: 2012 Rule 5.3 Message-Id: Date: Wed, 24 Jul 2024 04:55:52 +0000 commit fa58fcdc8cc38b5b73a59209a630ea7170eac713 Author: Alessandro Zucchelli AuthorDate: Tue Jul 23 14:00:46 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 23 14:00:46 2024 +0200 x86/mctelem: address violations of MISRA C: 2012 Rule 5.3 This addresses violations of MISRA C:2012 Rule 5.3 which states as following: An identifier declared in an inner scope shall not hide an identifier declared in an outer scope. In this case the variable being shadowed is the file scope struct mctctl in this file, therefore the local variables are renamed to avoid this. No functional change. Signed-off-by: Alessandro Zucchelli Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/cpu/mcheck/mctelem.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/xen/arch/x86/cpu/mcheck/mctelem.c b/xen/arch/x86/cpu/mcheck/mctelem.c index b8d0368a7d..123e4102ad 100644 --- a/xen/arch/x86/cpu/mcheck/mctelem.c +++ b/xen/arch/x86/cpu/mcheck/mctelem.c @@ -168,28 +168,28 @@ static void mctelem_xchg_head(struct mctelem_ent **headp, void mctelem_defer(mctelem_cookie_t cookie, bool lmce) { struct mctelem_ent *tep = COOKIE2MCTE(cookie); - struct mc_telem_cpu_ctl *mctctl = &this_cpu(mctctl); + struct mc_telem_cpu_ctl *ctl = &this_cpu(mctctl); - ASSERT(mctctl->pending == NULL || mctctl->lmce_pending == NULL); + ASSERT(ctl->pending == NULL || ctl->lmce_pending == NULL); - if (mctctl->pending) - mctelem_xchg_head(&mctctl->pending, &tep->mcte_next, tep); + if (ctl->pending) + mctelem_xchg_head(&ctl->pending, &tep->mcte_next, tep); else if (lmce) - mctelem_xchg_head(&mctctl->lmce_pending, &tep->mcte_next, tep); + mctelem_xchg_head(&ctl->lmce_pending, &tep->mcte_next, tep); else { /* * LMCE is supported on Skylake-server and later CPUs, on * which mce_broadcast is always true. Therefore, non-empty - * mctctl->lmce_pending in this branch implies a broadcasting + * ctl->lmce_pending in this branch implies a broadcasting * MC# is being handled, every CPU is in the exception - * context, and no one is consuming mctctl->pending at this + * context, and no one is consuming ctl->pending at this * moment. As a result, the following two exchanges together * can be treated as atomic. */ - if (mctctl->lmce_pending) - mctelem_xchg_head(&mctctl->lmce_pending, - &mctctl->pending, NULL); - mctelem_xchg_head(&mctctl->pending, &tep->mcte_next, tep); + if (ctl->lmce_pending) + mctelem_xchg_head(&ctl->lmce_pending, + &ctl->pending, NULL); + mctelem_xchg_head(&ctl->pending, &tep->mcte_next, tep); } } @@ -213,7 +213,7 @@ void mctelem_process_deferred(unsigned int cpu, { struct mctelem_ent *tep; struct mctelem_ent *head, *prev; - struct mc_telem_cpu_ctl *mctctl = &per_cpu(mctctl, cpu); + struct mc_telem_cpu_ctl *ctl = &per_cpu(mctctl, cpu); int ret; /* @@ -232,7 +232,7 @@ void mctelem_process_deferred(unsigned int cpu, * Any MC# occurring after the following atomic exchange will be * handled by another round of MCE softirq. */ - mctelem_xchg_head(lmce ? &mctctl->lmce_pending : &mctctl->pending, + mctelem_xchg_head(lmce ? &ctl->lmce_pending : &ctl->pending, &this_cpu(mctctl.processing), NULL); head = this_cpu(mctctl.processing); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 09:44:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 09:44:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764036.1174306 (Exim 4.92) (envelope-from ) id 1sWYXV-0005mD-9L; Wed, 24 Jul 2024 09:44:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764036.1174306; Wed, 24 Jul 2024 09:44:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYXV-0005m6-6r; Wed, 24 Jul 2024 09:44:05 +0000 Received: by outflank-mailman (input) for mailman id 764036; Wed, 24 Jul 2024 09:44:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYXU-0005m0-8w for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYXT-0002pg-Tj for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYXT-0002XR-Re for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=CFmCVqlYbsNl5Lkt5X+mkTiStCrh/BAv+3o8iL8q6w0=; b=jYPaaSw9JPOlsRCOtlZUupjXMT eTdQiJZ/ZXdMzohmdQ0O3FhV85c8gE2Ii+0uzTdeG2Jaz3S+HNDX+Q8fqi8UcpENbxpdeqNP4jik3 KA2hoJS8aqH7HBvfl1uN/Et4a9m8LN55377TKaSmxUPAiEb7fL0h8PjSaHpWIF+UN220=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] hotplug: Restore block-tap phy compatibility (again) Message-Id: Date: Wed, 24 Jul 2024 09:44:03 +0000 commit e4c7c2148afd5a02c36193c79e8ab62c86c5f0b0 Author: Jason Andryuk AuthorDate: Wed Jul 24 11:36:04 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:36:04 2024 +0200 hotplug: Restore block-tap phy compatibility (again) "$dev" needs to be set correctly for backendtype=phy as well as backendtype=tap. Move the setting into the conditional, so it can be handled properly for each. (dev could be captured during tap-ctl allocate for blktap module, but it would not be set properly for the find_device case. The backendtype=tap case would need to be handled regardless.) Fixes: f16ac12bd418 ("hotplug: Restore block-tap phy compatibility") Fixes: 76a484193dbb ("hotplug: Update block-tap") Signed-off-by: Jason Andryuk Reviewed-by: Anthony PERARD --- tools/hotplug/Linux/block-tap | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/hotplug/Linux/block-tap b/tools/hotplug/Linux/block-tap index 8661ce77e3..95970a61f6 100755 --- a/tools/hotplug/Linux/block-tap +++ b/tools/hotplug/Linux/block-tap @@ -204,13 +204,13 @@ add() tap_create fi - # Create nbd unix path. find_device/tap_create set pid & minor - dev=$( printf "/run/blktap-control/nbd%ld.%d" "$pid" "$minor" ) - xenstore_write "$XENBUS_PATH/pid" "$pid" xenstore_write "$XENBUS_PATH/minor" "$minor" if [ "$XENBUS_TYPE" = "vbd3" ] ; then + # Create nbd unix path. find_device/tap_create set pid & minor + dev=$( printf "/run/blktap-control/nbd%ld.%d" "$pid" "$minor" ) + # $dev, as a unix socket, has major:minor 0:0. If write_dev writes # physical-device, tapback would use that incorrect minor 0. So don't # write physical-device. @@ -218,6 +218,9 @@ add() success else + # Construct dev path from minor + dev="/dev/xen/blktap-2/tapdev$minor" + [ -b "$dev" ] || fatal "blktap \"$dev\" is not a block dev" write_dev "$dev" fi -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 09:44:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 09:44:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764037.1174310 (Exim 4.92) (envelope-from ) id 1sWYXf-0005nt-As; Wed, 24 Jul 2024 09:44:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764037.1174310; Wed, 24 Jul 2024 09:44:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYXf-0005nl-8G; Wed, 24 Jul 2024 09:44:15 +0000 Received: by outflank-mailman (input) for mailman id 764037; Wed, 24 Jul 2024 09:44:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYXe-0005nf-1e for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYXe-0002pk-0a for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYXd-0002ZZ-Vv for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=1TEHZ85QOkvwNWtiSAO9B7ZXAxzzy3AngEEVcqYo8ow=; b=p5dPqvv7GJ7vicsByvbSB/qN7+ U/ePyBIZdxCTBssEmnsE+RL2dFYP0ElN+fRQkkH+Or9rk+D5p/umQDbdp+XX+hFGpS41InCAccKsf 9LHG6T0jehuoQmCy5YOvhGcySaPmO7HMC6zz9ssImBuYnXWA6Dhi7Xf9227sDkKEw9zc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/riscv: introduce ANDN_INSN Message-Id: Date: Wed, 24 Jul 2024 09:44:13 +0000 commit 73c4a3fc94ca6cf9fbf51dc1417a2ea5d9cf5aaf Author: Oleksii Kurochko AuthorDate: Wed Jul 24 11:36:21 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:36:21 2024 +0200 xen/riscv: introduce ANDN_INSN RISC-V does a conditional toolchain for the Zbb extension (xen/arch/riscv/rules.mk), but unconditionally uses the ANDN instruction in emulate_xchg_1_2(). Fixes: 51dabd6312c ("xen/riscv: introduce cmpxchg.h") Suggested-by: Andrew Cooper Suggested-By: Jan Beulich Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich --- xen/arch/riscv/include/asm/cmpxchg.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/xen/arch/riscv/include/asm/cmpxchg.h b/xen/arch/riscv/include/asm/cmpxchg.h index d5e678c036..47d5299e62 100644 --- a/xen/arch/riscv/include/asm/cmpxchg.h +++ b/xen/arch/riscv/include/asm/cmpxchg.h @@ -18,6 +18,19 @@ : "r" (new) \ : "memory" ); +/* + * To not face an issue that gas doesn't understand ANDN instruction + * it is encoded using .insn directive. + */ +#ifdef __riscv_zbb +#define ANDN_INSN(rd, rs1, rs2) \ + ".insn r OP, 0x7, 0x20, " rd ", " rs1 ", " rs2 "\n" +#else +#define ANDN_INSN(rd, rs1, rs2) \ + "not " rd ", " rs2 "\n" \ + "and " rd ", " rs1 ", " rd "\n" +#endif + /* * For LR and SC, the A extension requires that the address held in rs1 be * naturally aligned to the size of the operand (i.e., eight-byte aligned @@ -48,7 +61,7 @@ \ asm volatile ( \ "0: lr.w" lr_sfx " %[old], %[ptr_]\n" \ - " andn %[scratch], %[old], %[mask]\n" \ + ANDN_INSN("%[scratch]", "%[old]", "%[mask]") \ " or %[scratch], %[scratch], %z[new_]\n" \ " sc.w" sc_sfx " %[scratch], %[scratch], %[ptr_]\n" \ " bnez %[scratch], 0b\n" \ -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 09:44:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 09:44:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764038.1174314 (Exim 4.92) (envelope-from ) id 1sWYXp-0005qy-CH; Wed, 24 Jul 2024 09:44:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764038.1174314; Wed, 24 Jul 2024 09:44:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYXp-0005qq-9i; Wed, 24 Jul 2024 09:44:25 +0000 Received: by outflank-mailman (input) for mailman id 764038; Wed, 24 Jul 2024 09:44:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYXo-0005qd-4m for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYXo-0002pw-3T for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYXo-0002aR-2g for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=/qBSA3ncHZFkEmBcYjKlx79gEODkyOnSuTZ1MaLPjtM=; b=48q8znG4sSwa749V12Z/F1VYWU N7/IMSTorYzS9PDdULeIVLtuO1Uyfws0lUqpODaQf8VQoA3IOZnuTjlzTqjjVZ2w+cwF2qDDtkY5c SkW3DQvXYAOD3hrk5WPxASgWT1SYDu0J0Pg79K/HbqCJ5pV+mL6MyODFO84waufuBdm4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/xstate: Use compression check helper in xstate_all() Message-Id: Date: Wed, 24 Jul 2024 09:44:24 +0000 commit b3f1cb51cf1d032021dabf3a9ae873ce9fb0e14b Author: Alejandro Vallejo AuthorDate: Wed Jul 24 11:36:55 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:36:55 2024 +0200 x86/xstate: Use compression check helper in xstate_all() Minor refactor to make xstate_all() use a helper rather than poking directly into the XSAVE header. No functional change Signed-off-by: Alejandro Vallejo Acked-by: Jan Beulich --- xen/arch/x86/include/asm/xstate.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/include/asm/xstate.h b/xen/arch/x86/include/asm/xstate.h index f4a8e5f814..f0eeb13b87 100644 --- a/xen/arch/x86/include/asm/xstate.h +++ b/xen/arch/x86/include/asm/xstate.h @@ -122,6 +122,12 @@ static inline uint64_t xgetbv(unsigned int index) return lo | ((uint64_t)hi << 32); } +static inline bool __nonnull(1) +xsave_area_compressed(const struct xsave_struct *xsave_area) +{ + return xsave_area->xsave_hdr.xcomp_bv & XSTATE_COMPACTION_ENABLED; +} + static inline bool xstate_all(const struct vcpu *v) { /* @@ -129,15 +135,8 @@ static inline bool xstate_all(const struct vcpu *v) * (in the legacy region of xsave area) are fixed, so saving * XSTATE_FP_SSE will not cause overwriting problem with XSAVES/XSAVEC. */ - return (v->arch.xsave_area->xsave_hdr.xcomp_bv & - XSTATE_COMPACTION_ENABLED) && + return xsave_area_compressed(v->arch.xsave_area) && (v->arch.xcr0_accum & XSTATE_LAZY & ~XSTATE_FP_SSE); } -static inline bool __nonnull(1) -xsave_area_compressed(const struct xsave_struct *xsave_area) -{ - return xsave_area->xsave_hdr.xcomp_bv & XSTATE_COMPACTION_ENABLED; -} - #endif /* __ASM_XSTATE_H */ -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 09:44:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 09:44:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764039.1174318 (Exim 4.92) (envelope-from ) id 1sWYXz-0005uX-FX; Wed, 24 Jul 2024 09:44:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764039.1174318; Wed, 24 Jul 2024 09:44:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYXz-0005uP-CS; Wed, 24 Jul 2024 09:44:35 +0000 Received: by outflank-mailman (input) for mailman id 764039; Wed, 24 Jul 2024 09:44:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYXy-0005u8-7P for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYXy-0002qQ-6U for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYXy-0002eR-5l for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=/ceivygFL20UAcpD9IVlReKFXW2MHQG0/JTIQ6bGihk=; b=gkKkzryvle/A22BSx2rYvXE8FS KVnWUBZrVJ9LPxwaDpowumZrJ4QeMMO6HL5fTellDndma6rOeG3giTp4WOIYUzREp2FPao+weXbB7 GOOmBHCbdfTWKNA1e0aS3L/K9XWrVUrpAaoA7VqeI8YFxz0lT6GInwhAzW1VqSfmF//0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/p2m: guard altp2m routines Message-Id: Date: Wed, 24 Jul 2024 09:44:34 +0000 commit 5e1a1ef4eb54aa16be21df0926bd6ee9f4a4e721 Author: Sergiy Kibrik AuthorDate: Wed Jul 24 11:37:34 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:37:34 2024 +0200 x86/p2m: guard altp2m routines Initialize and bring down altp2m only when it is supported by the platform, e.g. VMX. Also guard p2m_altp2m_propagate_change(). The purpose of that is the possibility to disable altp2m support and exclude its code from the build completely, when it's not supported by the target platform. Here hvm_altp2m_supported() is being used to check for ALTP2M availability, which is only defined if HVM enabled, so a stub for that routine added for !HVM configuration as well. Signed-off-by: Sergiy Kibrik Acked-by: Jan Beulich --- xen/arch/x86/include/asm/hvm/hvm.h | 5 +++++ xen/arch/x86/mm/p2m-basic.c | 9 +++++---- xen/arch/x86/mm/p2m-ept.c | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/include/asm/hvm/hvm.h b/xen/arch/x86/include/asm/hvm/hvm.h index 1c01e22c8e..277648dd18 100644 --- a/xen/arch/x86/include/asm/hvm/hvm.h +++ b/xen/arch/x86/include/asm/hvm/hvm.h @@ -828,6 +828,11 @@ static inline bool hvm_hap_supported(void) return false; } +static inline bool hvm_altp2m_supported(void) +{ + return false; +} + static inline bool hvm_nested_virt_supported(void) { return false; diff --git a/xen/arch/x86/mm/p2m-basic.c b/xen/arch/x86/mm/p2m-basic.c index 25d27a0a9f..08007a687c 100644 --- a/xen/arch/x86/mm/p2m-basic.c +++ b/xen/arch/x86/mm/p2m-basic.c @@ -128,7 +128,7 @@ int p2m_init(struct domain *d) return rc; } - rc = p2m_init_altp2m(d); + rc = hvm_altp2m_supported() ? p2m_init_altp2m(d) : 0; if ( rc ) { p2m_teardown_hostp2m(d); @@ -197,11 +197,12 @@ void p2m_final_teardown(struct domain *d) { if ( is_hvm_domain(d) ) { + if ( hvm_altp2m_supported() ) + p2m_teardown_altp2m(d); /* - * We must tear down both of them unconditionally because - * we initialise them unconditionally. + * We must tear down nestedp2m unconditionally because + * we initialise it unconditionally. */ - p2m_teardown_altp2m(d); p2m_teardown_nestedp2m(d); } diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index 9925c560c1..2ea574ca6a 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -990,7 +990,7 @@ out: if ( is_epte_present(&old_entry) ) ept_free_entry(p2m, &old_entry, target); - if ( entry_written && p2m_is_hostp2m(p2m) ) + if ( hvm_altp2m_supported() && entry_written && p2m_is_hostp2m(p2m) ) { ret = p2m_altp2m_propagate_change(d, _gfn(gfn), mfn, order, p2mt, p2ma); if ( !rc ) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 09:44:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 09:44:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764040.1174322 (Exim 4.92) (envelope-from ) id 1sWYY9-0005xA-GW; Wed, 24 Jul 2024 09:44:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764040.1174322; Wed, 24 Jul 2024 09:44:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYY9-0005x2-Dw; Wed, 24 Jul 2024 09:44:45 +0000 Received: by outflank-mailman (input) for mailman id 764040; Wed, 24 Jul 2024 09:44:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYY8-0005wu-BH for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYY8-0002qX-AP for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:44 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYY8-0002jW-8q for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:44 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=vqUWGL4lK2cBkwyfAH+5tF7U2CTVGBgCW2HrSXjX2To=; b=3f49dtCSdZs5rX7hj3fwQlWI1R GBpX6Uy3OmBjDsVC5u98aXzBG5UuH2aH+2HVMIt1Ab8J5xy6xT2SbTFGST8kXizf0B7FxOQa/Y6Bo ieBHKEUJGC3y5njvGu5AruQsmB05FPEpwXAyoYbwPjPmzABKnB5lAbnPotm/mYS3TkWc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] MAINTAINERS: Add me and Bertrand as device tree maintainers Message-Id: Date: Wed, 24 Jul 2024 09:44:44 +0000 commit 832cdad6c9cbf53239047d1f1522d87b3b4046a8 Author: Michal Orzel AuthorDate: Wed Jul 24 11:38:13 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:38:13 2024 +0200 MAINTAINERS: Add me and Bertrand as device tree maintainers With Arm port being the major recipient of dt related patches and the future need of incorporating dt support into other ports, we'd like to keep an eye on these changes. Signed-off-by: Michal Orzel Acked-by: Bertrand Marquis Acked-by: Stefano Stabellini --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index fcec4377b1..7c524a8a93 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -287,6 +287,8 @@ F: automation/ DEVICE TREE M: Stefano Stabellini M: Julien Grall +M: Bertrand Marquis +M: Michal Orzel S: Supported F: xen/common/libfdt/ F: xen/common/device_tree.c -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 09:44:55 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 09:44:55 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764041.1174326 (Exim 4.92) (envelope-from ) id 1sWYYJ-0005zt-I5; Wed, 24 Jul 2024 09:44:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764041.1174326; Wed, 24 Jul 2024 09:44:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYYJ-0005zl-FT; Wed, 24 Jul 2024 09:44:55 +0000 Received: by outflank-mailman (input) for mailman id 764041; Wed, 24 Jul 2024 09:44:54 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYYI-0005zc-Fh for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:54 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYYI-0002qg-E7 for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:54 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYYI-0002kG-CW for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:44:54 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=t5oHkTB8QStesuy1H3WBkJTzwbUkshSMaM8pJGRe+wE=; b=vF8R/DJBFYkZo68EqCsQzTTHfe 8Wh9M5CEh1IJOccDQJyJdyLSX7KM+jWP6Tle8vVWTWw6j4M1PlxtZ0T+CNUIYX0gEKgWT/ZJs0IQl S2cJpExc1VVx+DqknI6BKAnxJoM8rOrBGjgEDwCpIB61htK8pB/vTsW063rcYejwHi/o=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/cpuid: use fallthrough pseudo keyword Message-Id: Date: Wed, 24 Jul 2024 09:44:54 +0000 commit 9d3c8dc1c030bdaf8429fa71310c4c135dd8e1d9 Author: Federico Serafini AuthorDate: Wed Jul 24 11:42:53 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:42:53 2024 +0200 x86/cpuid: use fallthrough pseudo keyword The current comment making explicit the fallthrough intention does not follow the agreed syntax: replace it with the pseduo keyword. No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/cpuid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c index a822e80c7e..2a777436ee 100644 --- a/xen/arch/x86/cpuid.c +++ b/xen/arch/x86/cpuid.c @@ -97,9 +97,8 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf, if ( is_viridian_domain(d) ) return cpuid_viridian_leaves(v, leaf, subleaf, res); + fallthrough; /* - * Fallthrough. - * * Intel reserve up until 0x4fffffff for hypervisor use. AMD reserve * only until 0x400000ff, but we already use double that. */ -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 09:45:05 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 09:45:05 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764042.1174330 (Exim 4.92) (envelope-from ) id 1sWYYT-00062b-JT; Wed, 24 Jul 2024 09:45:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764042.1174330; Wed, 24 Jul 2024 09:45:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYYT-00062T-Gs; Wed, 24 Jul 2024 09:45:05 +0000 Received: by outflank-mailman (input) for mailman id 764042; Wed, 24 Jul 2024 09:45:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYYS-00062G-Ij for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:45:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYYS-0002rH-Hv for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:45:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYYS-0002lU-GK for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:45:04 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=+CpDl3yDjstCo8YStf4eIeuBlcavezjmwcyxxAiOipc=; b=jGdTJimv+VQoG97we2VUFbwiL9 8jgmCjS+nmCdBrESNtBsuo5IgSWLr85zHK19kkPWGbxS27Ym35CLLG08Q9toluqUnLHfaIqeUXdJY Tap5QvCc99KJAJTeeo3jrLGIqvnnO6WPSy4Ttx30oDLbTIxyLl++ky2Ae74Nkd7WMiEY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/domctl: address a violation of MISRA C Rule 16.3 Message-Id: Date: Wed, 24 Jul 2024 09:45:04 +0000 commit c6661e89102065d3e04799b9baa9f928a1fc40da Author: Federico Serafini AuthorDate: Wed Jul 24 11:43:18 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:43:18 2024 +0200 x86/domctl: address a violation of MISRA C Rule 16.3 Add missing break statement to address a violation of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/domctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index 9190e11faa..68b5b46d1a 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -517,6 +517,7 @@ long arch_do_domctl( default: ret = -ENOSYS; + break; } break; } -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 09:55:08 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 09:55:08 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764049.1174344 (Exim 4.92) (envelope-from ) id 1sWYi9-0007rn-FQ; Wed, 24 Jul 2024 09:55:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764049.1174344; Wed, 24 Jul 2024 09:55:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYi9-0007rg-Cu; Wed, 24 Jul 2024 09:55:05 +0000 Received: by outflank-mailman (input) for mailman id 764049; Wed, 24 Jul 2024 09:55:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYi7-0007ra-PI for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:55:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYi7-00031w-FG for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:55:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYi7-0003Lw-EO for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 09:55:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=b/q4x1Aj2toQFjZS9mRXwA6toSKDeM+Qy6C+JwMxmTo=; b=yicNhkhxYY+577auHWMVsBuurx W+2AVGljf1OTmcM0ZdEebsYfYKTyPJxk4W8AvJ3H3WIRWhMaCNnr1rbfH62/DygPZ19KHsSxd/zbi +/8TFGcz3caqGMfE/LJzDkSjIt8PCBejl1mBxR+BNjhIFl1RL+XegjBodtb/DZK2NqRI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.19] hotplug: Restore block-tap phy compatibility (again) Message-Id: Date: Wed, 24 Jul 2024 09:55:03 +0000 commit 2d7b6170cc69f8a1a60c52d87ba61f6b1f180132 Author: Jason Andryuk AuthorDate: Wed Jul 24 11:53:04 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:53:04 2024 +0200 hotplug: Restore block-tap phy compatibility (again) "$dev" needs to be set correctly for backendtype=phy as well as backendtype=tap. Move the setting into the conditional, so it can be handled properly for each. (dev could be captured during tap-ctl allocate for blktap module, but it would not be set properly for the find_device case. The backendtype=tap case would need to be handled regardless.) Fixes: f16ac12bd418 ("hotplug: Restore block-tap phy compatibility") Fixes: 76a484193dbb ("hotplug: Update block-tap") Signed-off-by: Jason Andryuk Reviewed-by: Anthony PERARD Release-Acked-by: Oleksii Kurochko master commit: e4c7c2148afd5a02c36193c79e8ab62c86c5f0b0 master date: 2024-07-24 11:36:04 +0200 --- tools/hotplug/Linux/block-tap | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/hotplug/Linux/block-tap b/tools/hotplug/Linux/block-tap index 8661ce77e3..95970a61f6 100755 --- a/tools/hotplug/Linux/block-tap +++ b/tools/hotplug/Linux/block-tap @@ -204,13 +204,13 @@ add() tap_create fi - # Create nbd unix path. find_device/tap_create set pid & minor - dev=$( printf "/run/blktap-control/nbd%ld.%d" "$pid" "$minor" ) - xenstore_write "$XENBUS_PATH/pid" "$pid" xenstore_write "$XENBUS_PATH/minor" "$minor" if [ "$XENBUS_TYPE" = "vbd3" ] ; then + # Create nbd unix path. find_device/tap_create set pid & minor + dev=$( printf "/run/blktap-control/nbd%ld.%d" "$pid" "$minor" ) + # $dev, as a unix socket, has major:minor 0:0. If write_dev writes # physical-device, tapback would use that incorrect minor 0. So don't # write physical-device. @@ -218,6 +218,9 @@ add() success else + # Construct dev path from minor + dev="/dev/xen/blktap-2/tapdev$minor" + [ -b "$dev" ] || fatal "blktap \"$dev\" is not a block dev" write_dev "$dev" fi -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.19 From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 10:11:10 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 10:11:10 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764079.1174397 (Exim 4.92) (envelope-from ) id 1sWYxc-0004RJ-Ou; Wed, 24 Jul 2024 10:11:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764079.1174397; Wed, 24 Jul 2024 10:11:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYxc-0004RB-MF; Wed, 24 Jul 2024 10:11:04 +0000 Received: by outflank-mailman (input) for mailman id 764079; Wed, 24 Jul 2024 10:11:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYxb-0004QL-0L for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYxa-0003PO-M9 for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYxa-0004h9-LI for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=y+0wDwCVcmh0xOhNqODptOyGZTDS7uc6u9TM7IucBG0=; b=Hs+bGaWghSzzQ8HErZakcEtSFm bfv385fgc39KEuLFv1GJBoy1DWWj04EbyPBkWmMuYoed8ErWvzz+LGI8yKc9u7lmBNYWUzleyuxQ/ GuosvQ/qDs57fCfcjfwZGmXFa60CKB8MWGjkNqy9iZIQHXd9RQNQ5RJpWDKaQLPP992g=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [mini-os master] mini-os: apply coding style to arch/x86/time.c Message-Id: Date: Wed, 24 Jul 2024 10:11:02 +0000 commit 6890a9153f7bd503111620da590fe1444cc1f4e4 Author: Juergen Gross AuthorDate: Wed Jul 24 12:01:52 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 12:01:52 2024 +0200 mini-os: apply coding style to arch/x86/time.c Apply the preferred coding style to arch/x86/time.c. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- arch/x86/time.c | 194 +++++++++++++++++++++++++++----------------------------- 1 file changed, 93 insertions(+), 101 deletions(-) diff --git a/arch/x86/time.c b/arch/x86/time.c index 332c026..a473a9e 100644 --- a/arch/x86/time.c +++ b/arch/x86/time.c @@ -1,7 +1,7 @@ /* -*- Mode:C; c-basic-offset:4; tab-width:4 -*- **************************************************************************** * (C) 2003 - Rolf Neugebauer - Intel Research Cambridge - * (C) 2002-2003 - Keir Fraser - University of Cambridge + * (C) 2002-2003 - Keir Fraser - University of Cambridge * (C) 2005 - Grzegorz Milos - Intel Research Cambridge * (C) 2006 - Robert Kaiser - FH Wiesbaden **************************************************************************** @@ -18,20 +18,19 @@ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ - #include #include #include @@ -46,44 +45,43 @@ /* These are peridically updated in shared_info, and then copied here. */ struct shadow_time_info { - uint64_t tsc_timestamp; /* TSC at last update of time vals. */ - uint64_t system_timestamp; /* Time, in nanosecs, since boot. */ - uint32_t tsc_to_nsec_mul; - uint32_t tsc_to_usec_mul; - int tsc_shift; - uint32_t version; + uint64_t tsc_timestamp; /* TSC at last update of time vals. */ + uint64_t system_timestamp; /* Time, in nanosecs, since boot. */ + uint32_t tsc_to_nsec_mul; + uint32_t tsc_to_usec_mul; + int tsc_shift; + uint32_t version; }; static struct timespec shadow_ts; static uint32_t shadow_ts_version; static struct shadow_time_info shadow; - #ifndef rmb -#define rmb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory") +#define rmb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory") #endif -#define HANDLE_USEC_OVERFLOW(_tv) \ - do { \ +#define HANDLE_USEC_OVERFLOW(_tv) \ + do { \ while ( (_tv)->tv_usec >= 1000000 ) \ - { \ + { \ (_tv)->tv_usec -= 1000000; \ (_tv)->tv_sec++; \ - } \ + } \ } while ( 0 ) static inline int time_values_up_to_date(void) { - struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_info[0].time; + struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_info[0].time; - return (shadow.version == src->version); + return shadow.version == src->version; } static inline int wc_values_up_to_date(void) { - shared_info_t *s= HYPERVISOR_shared_info; + shared_info_t *s = HYPERVISOR_shared_info; - return (shadow_ts_version == s->wc_version); + return shadow_ts_version == s->wc_version; } /* @@ -92,109 +90,104 @@ static inline int wc_values_up_to_date(void) */ static inline uint64_t scale_delta(uint64_t delta, uint32_t mul_frac, int shift) { - uint64_t product; + uint64_t product; #ifdef __i386__ - uint32_t tmp1, tmp2; + uint32_t tmp1, tmp2; #endif - if ( shift < 0 ) - delta >>= -shift; - else - delta <<= shift; + if ( shift < 0 ) + delta >>= -shift; + else + delta <<= shift; #ifdef __i386__ - __asm__ ( - "mul %5 ; " - "mov %4,%%eax ; " - "mov %%edx,%4 ; " - "mul %5 ; " - "add %4,%%eax ; " - "xor %5,%5 ; " - "adc %5,%%edx ; " - : "=A" (product), "=r" (tmp1), "=r" (tmp2) - : "a" ((uint32_t)delta), "1" ((uint32_t)(delta >> 32)), "2" (mul_frac) ); + __asm__ ( + "mul %5 ; " + "mov %4,%%eax ; " + "mov %%edx,%4 ; " + "mul %5 ; " + "add %4,%%eax ; " + "xor %5,%5 ; " + "adc %5,%%edx ; " + : "=A" (product), "=r" (tmp1), "=r" (tmp2) + : "a" ((uint32_t)delta), "1" ((uint32_t)(delta >> 32)), "2" (mul_frac) ); #else - __asm__ ( - "mul %%rdx ; shrd $32,%%rdx,%%rax" - : "=a" (product) : "0" (delta), "d" ((uint64_t)mul_frac) ); + __asm__ ( + "mul %%rdx ; shrd $32,%%rdx,%%rax" + : "=a" (product) : "0" (delta), "d" ((uint64_t)mul_frac) ); #endif - return product; + return product; } - static unsigned long get_nsec_offset(void) { - uint64_t now, delta; - rdtscll(now); - delta = now - shadow.tsc_timestamp; - return scale_delta(delta, shadow.tsc_to_nsec_mul, shadow.tsc_shift); -} + uint64_t now, delta; + rdtscll(now); + delta = now - shadow.tsc_timestamp; + + return scale_delta(delta, shadow.tsc_to_nsec_mul, shadow.tsc_shift); +} static void get_time_values_from_xen(void) { - struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_info[0].time; - - do { - shadow.version = src->version; - rmb(); - shadow.tsc_timestamp = src->tsc_timestamp; - shadow.system_timestamp = src->system_time; - shadow.tsc_to_nsec_mul = src->tsc_to_system_mul; - shadow.tsc_shift = src->tsc_shift; - rmb(); - } - while ((src->version & 1) | (shadow.version ^ src->version)); - - shadow.tsc_to_usec_mul = shadow.tsc_to_nsec_mul / 1000; + struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_info[0].time; + + do { + shadow.version = src->version; + rmb(); + shadow.tsc_timestamp = src->tsc_timestamp; + shadow.system_timestamp = src->system_time; + shadow.tsc_to_nsec_mul = src->tsc_to_system_mul; + shadow.tsc_shift = src->tsc_shift; + rmb(); + } while ( (src->version & 1) | (shadow.version ^ src->version) ); + + shadow.tsc_to_usec_mul = shadow.tsc_to_nsec_mul / 1000; } - - - -/* monotonic_clock(): returns # of nanoseconds passed since time_init() - * Note: This function is required to return accurate - * time even in the absence of multiple timer ticks. +/* + * monotonic_clock(): returns # of nanoseconds passed since time_init() + * Note: This function is required to return accurate + * time even in the absence of multiple timer ticks. */ uint64_t monotonic_clock(void) { - uint64_t time; - uint32_t local_time_version; - - do { - local_time_version = shadow.version; - rmb(); - time = shadow.system_timestamp + get_nsec_offset(); - if (!time_values_up_to_date()) - get_time_values_from_xen(); - rmb(); - } while (local_time_version != shadow.version); - - return time; + uint64_t time; + uint32_t local_time_version; + + do { + local_time_version = shadow.version; + rmb(); + time = shadow.system_timestamp + get_nsec_offset(); + if ( !time_values_up_to_date() ) + get_time_values_from_xen(); + rmb(); + } while ( local_time_version != shadow.version ); + + return time; } static void update_wallclock(void) { - shared_info_t *s = HYPERVISOR_shared_info; - - do { - shadow_ts_version = s->wc_version; - rmb(); - shadow_ts.tv_sec = s->wc_sec; - shadow_ts.tv_nsec = s->wc_nsec; - rmb(); - } - while ((s->wc_version & 1) | (shadow_ts_version ^ s->wc_version)); + shared_info_t *s = HYPERVISOR_shared_info; + + do { + shadow_ts_version = s->wc_version; + rmb(); + shadow_ts.tv_sec = s->wc_sec; + shadow_ts.tv_nsec = s->wc_nsec; + rmb(); + } while ( (s->wc_version & 1) | (shadow_ts_version ^ s->wc_version) ); } - int gettimeofday(struct timeval *tv, void *tz) { uint64_t nsec = monotonic_clock(); - if (!wc_values_up_to_date()) - update_wallclock(); + if ( !wc_values_up_to_date() ) + update_wallclock(); nsec += shadow_ts.tv_nsec; @@ -209,7 +202,7 @@ EXPORT_SYMBOL(gettimeofday); void block_domain(s_time_t until) { ASSERT(irqs_disabled()); - if(monotonic_clock() < until) + if ( monotonic_clock() < until ) { HYPERVISOR_set_timer_op(until); #ifdef CONFIG_PARAVIRT @@ -228,9 +221,8 @@ static void timer_handler(evtchn_port_t ev, struct pt_regs *regs, void *ign) HYPERVISOR_set_timer_op(monotonic_clock() + MILLISECS(1)); } - - static evtchn_port_t port; + void init_time(void) { port = bind_virq(VIRQ_TIMER, &timer_handler, NULL); -- generated by git-patchbot for /home/xen/git/mini-os.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 10:11:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 10:11:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764083.1174403 (Exim 4.92) (envelope-from ) id 1sWYxl-0004bs-Sf; Wed, 24 Jul 2024 10:11:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764083.1174403; Wed, 24 Jul 2024 10:11:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYxl-0004bk-Pq; Wed, 24 Jul 2024 10:11:13 +0000 Received: by outflank-mailman (input) for mailman id 764083; Wed, 24 Jul 2024 10:11:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYxk-0004bU-Q1 for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYxk-0003PY-PA for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYxk-0004iL-OF for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=nzMht9XSyZOeCUjACk2UH5zUyomfoPeWb7FUnq8Vu/E=; b=CRrFWR6PQ7qDI/8Mq0hpkH/F4D sOe6oaSdQJBxbN1lWMJJW/RNpOZnN9V6VoO60e0nVaTINN6ALpI7xURlpOO6Y5zJ5qywQgK9maQBe tAHB2YzDS4Vhv78Z0G3HzOiY6JaGkiuvFrqItjcR7iRTeHa070SEt80V1hsmcCfoNTrQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [mini-os master] mini-os: remove some not needed stuff from arch/x86/time.c Message-Id: Date: Wed, 24 Jul 2024 10:11:12 +0000 commit e390b45fe38967e2f321420959fc86efb7abbb54 Author: Juergen Gross AuthorDate: Wed Jul 24 12:02:07 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 12:02:07 2024 +0200 mini-os: remove some not needed stuff from arch/x86/time.c Remove unused or not needed stuff from arch/x86/time.c. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- arch/x86/time.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/arch/x86/time.c b/arch/x86/time.c index a473a9e..7fd7abe 100644 --- a/arch/x86/time.c +++ b/arch/x86/time.c @@ -48,7 +48,6 @@ struct shadow_time_info { uint64_t tsc_timestamp; /* TSC at last update of time vals. */ uint64_t system_timestamp; /* Time, in nanosecs, since boot. */ uint32_t tsc_to_nsec_mul; - uint32_t tsc_to_usec_mul; int tsc_shift; uint32_t version; }; @@ -57,19 +56,6 @@ static uint32_t shadow_ts_version; static struct shadow_time_info shadow; -#ifndef rmb -#define rmb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)" : : : "memory") -#endif - -#define HANDLE_USEC_OVERFLOW(_tv) \ - do { \ - while ( (_tv)->tv_usec >= 1000000 ) \ - { \ - (_tv)->tv_usec -= 1000000; \ - (_tv)->tv_sec++; \ - } \ - } while ( 0 ) - static inline int time_values_up_to_date(void) { struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_info[0].time; @@ -143,8 +129,6 @@ static void get_time_values_from_xen(void) shadow.tsc_shift = src->tsc_shift; rmb(); } while ( (src->version & 1) | (shadow.version ^ src->version) ); - - shadow.tsc_to_usec_mul = shadow.tsc_to_nsec_mul / 1000; } /* -- generated by git-patchbot for /home/xen/git/mini-os.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 10:11:23 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 10:11:23 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764084.1174406 (Exim 4.92) (envelope-from ) id 1sWYxv-0004hc-Tw; Wed, 24 Jul 2024 10:11:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764084.1174406; Wed, 24 Jul 2024 10:11:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYxv-0004hU-RJ; Wed, 24 Jul 2024 10:11:23 +0000 Received: by outflank-mailman (input) for mailman id 764084; Wed, 24 Jul 2024 10:11:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYxu-0004hF-Td for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYxu-0003RJ-S5 for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYxu-0004iy-RF for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=WbiNe96ZAPYvVvm/z3ldnX0L4b5FY7rPAxRe22BLK6E=; b=2B8k8aQBKUHYyl3PZNXpdu4ZcF yyqPnlnj/uNyD+eLkkpTNflzfeWWyKf33XnKVGVdi0/krUewIVgdc/XmwRGY+RQ6r9ZDc1JJPQCrp 124+yAfE8srH0gg3jJWObd6mEeVuIEAVgh8VDHXAi2uf6ZKTO8glE1EGTopR1mxHdKl8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [mini-os master] mini-os: simplify monotonic_clock() Message-Id: Date: Wed, 24 Jul 2024 10:11:22 +0000 commit 4f019908a03883492ac232559dbeb33469946b3b Author: Juergen Gross AuthorDate: Wed Jul 24 12:02:25 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 12:02:25 2024 +0200 mini-os: simplify monotonic_clock() monotonic_clock() in arch/x86/time.c is more complex than needed: it has basically two nested loops making sure the time data obtained from Xen are valid. Simplify that by merging some of the used sub-functions into the main function and using only a single loop. Further simplify the code by using struct vcpu_time_info for the local instance instead of defining a similar structure in the code. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- arch/x86/time.c | 58 ++++++++++++++++----------------------------------------- 1 file changed, 16 insertions(+), 42 deletions(-) diff --git a/arch/x86/time.c b/arch/x86/time.c index 7fd7abe..52916e1 100644 --- a/arch/x86/time.c +++ b/arch/x86/time.c @@ -44,24 +44,10 @@ *************************************************************************/ /* These are peridically updated in shared_info, and then copied here. */ -struct shadow_time_info { - uint64_t tsc_timestamp; /* TSC at last update of time vals. */ - uint64_t system_timestamp; /* Time, in nanosecs, since boot. */ - uint32_t tsc_to_nsec_mul; - int tsc_shift; - uint32_t version; -}; static struct timespec shadow_ts; static uint32_t shadow_ts_version; -static struct shadow_time_info shadow; - -static inline int time_values_up_to_date(void) -{ - struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_info[0].time; - - return shadow.version == src->version; -} +static struct vcpu_time_info shadow; static inline int wc_values_up_to_date(void) { @@ -113,22 +99,7 @@ static unsigned long get_nsec_offset(void) rdtscll(now); delta = now - shadow.tsc_timestamp; - return scale_delta(delta, shadow.tsc_to_nsec_mul, shadow.tsc_shift); -} - -static void get_time_values_from_xen(void) -{ - struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_info[0].time; - - do { - shadow.version = src->version; - rmb(); - shadow.tsc_timestamp = src->tsc_timestamp; - shadow.system_timestamp = src->system_time; - shadow.tsc_to_nsec_mul = src->tsc_to_system_mul; - shadow.tsc_shift = src->tsc_shift; - rmb(); - } while ( (src->version & 1) | (shadow.version ^ src->version) ); + return scale_delta(delta, shadow.tsc_to_system_mul, shadow.tsc_shift); } /* @@ -138,19 +109,22 @@ static void get_time_values_from_xen(void) */ uint64_t monotonic_clock(void) { - uint64_t time; - uint32_t local_time_version; + struct vcpu_time_info *src = &HYPERVISOR_shared_info->vcpu_info[0].time; - do { - local_time_version = shadow.version; - rmb(); - time = shadow.system_timestamp + get_nsec_offset(); - if ( !time_values_up_to_date() ) - get_time_values_from_xen(); - rmb(); - } while ( local_time_version != shadow.version ); + if ( shadow.version != src->version ) + { + do { + shadow.version = src->version; + rmb(); + shadow.tsc_timestamp = src->tsc_timestamp; + shadow.system_time = src->system_time; + shadow.tsc_to_system_mul = src->tsc_to_system_mul; + shadow.tsc_shift = src->tsc_shift; + rmb(); + } while ( (src->version & 1) || (shadow.version != src->version) ); + } - return time; + return shadow.system_time + get_nsec_offset(); } static void update_wallclock(void) -- generated by git-patchbot for /home/xen/git/mini-os.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 10:11:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 10:11:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764085.1174410 (Exim 4.92) (envelope-from ) id 1sWYy6-0004ku-Vc; Wed, 24 Jul 2024 10:11:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764085.1174410; Wed, 24 Jul 2024 10:11:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYy6-0004km-Sn; Wed, 24 Jul 2024 10:11:34 +0000 Received: by outflank-mailman (input) for mailman id 764085; Wed, 24 Jul 2024 10:11:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYy5-0004kQ-0z for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYy5-0003Rl-0D for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYy4-0004jh-UA for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=YVIqJ0+2oyc+9+ScZhbdI4qOmj0lKqEUtD+oRdClDeQ=; b=a3kjw1CYbUEyxnJWKd/uz9/c2F omPKKifEaty10k84DDgI175071udf7vEx4KH8Aowq127Wyq0+cHbGF9XuOoOwG6CgrLK9EZYyRRu3 If6CE3LYKsQs+YrgCeXEC9+BGfxyDCEoayuKJkRVwZzZmEP2L1eHccvFHlTjAtiUyiA0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [mini-os master] mini-os: make mm.c coding style compliant Message-Id: Date: Wed, 24 Jul 2024 10:11:32 +0000 commit abf801ac1c430179179a7cbda3567897c1654520 Author: Juergen Gross AuthorDate: Wed Jul 24 12:02:43 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 12:02:43 2024 +0200 mini-os: make mm.c coding style compliant Apply the coding style to mm.c. No functional change. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- mm.c | 191 ++++++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 96 insertions(+), 95 deletions(-) diff --git a/mm.c b/mm.c index eb0e34d..df8055b 100644 --- a/mm.c +++ b/mm.c @@ -1,4 +1,4 @@ -/* +/* **************************************************************************** * (C) 2003 - Rolf Neugebauer - Intel Research Cambridge * (C) 2005 - Grzegorz Milos - Intel Research Cambridge @@ -7,9 +7,9 @@ * File: mm.c * Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk) * Changes: Grzegorz Milos - * + * * Date: Aug 2003, chages Aug 2005 - * + * * Environment: Xen Minimal OS * Description: memory management related functions * contains buddy page allocator from Xen. @@ -21,16 +21,16 @@ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ @@ -45,7 +45,7 @@ #include #include -/********************* +/* * ALLOCATION BITMAP * One bit per page of memory. Bit set => page is allocated. */ @@ -55,7 +55,7 @@ unsigned long mm_alloc_bitmap_size; #define PAGES_PER_MAPWORD (sizeof(unsigned long) * 8) -#define allocated_in_map(_pn) \ +#define allocated_in_map(_pn) \ (mm_alloc_bitmap[(_pn) / PAGES_PER_MAPWORD] & \ (1UL << ((_pn) & (PAGES_PER_MAPWORD - 1)))) @@ -63,8 +63,8 @@ unsigned long nr_free_pages; /* * Hint regarding bitwise arithmetic in map_{alloc,free}: - * -(1<= n. - * (1<= n. + * (1 << n) - 1 sets all bits < n. * Variable names in map_{alloc,free}: * *_idx == Index into `mm_alloc_bitmap' array. * *_off == Bit offset within an element of the `mm_alloc_bitmap' array. @@ -75,53 +75,52 @@ static void map_alloc(unsigned long first_page, unsigned long nr_pages) unsigned long start_off, end_off, curr_idx, end_idx; curr_idx = first_page / PAGES_PER_MAPWORD; - start_off = first_page & (PAGES_PER_MAPWORD-1); + start_off = first_page & (PAGES_PER_MAPWORD - 1); end_idx = (first_page + nr_pages) / PAGES_PER_MAPWORD; - end_off = (first_page + nr_pages) & (PAGES_PER_MAPWORD-1); + end_off = (first_page + nr_pages) & (PAGES_PER_MAPWORD - 1); if ( curr_idx == end_idx ) { - mm_alloc_bitmap[curr_idx] |= ((1UL<next == NULL) @@ -163,14 +162,14 @@ static void init_page_allocator(unsigned long min, unsigned long max) free_tail[i].next = NULL; } - min = round_pgup (min); + min = round_pgup(min); max = round_pgdown(max); /* Allocate space for the allocation bitmap. */ - mm_alloc_bitmap_size = (max + 1) >> (PAGE_SHIFT + 3); - mm_alloc_bitmap_size = round_pgup(mm_alloc_bitmap_size); + mm_alloc_bitmap_size = (max + 1) >> (PAGE_SHIFT + 3); + mm_alloc_bitmap_size = round_pgup(mm_alloc_bitmap_size); mm_alloc_bitmap = (unsigned long *)to_virt(min); - min += mm_alloc_bitmap_size; + min += mm_alloc_bitmap_size; /* All allocated by default. */ memset(mm_alloc_bitmap, ~0, mm_alloc_bitmap_size); @@ -208,7 +207,10 @@ static void init_page_allocator(unsigned long min, unsigned long max) * must not be bigger than remaining range. */ for ( i = PAGE_SHIFT; (1UL << (i + 1)) <= range; i++ ) - if ( r_min & (1UL << i) ) break; + { + if ( r_min & (1UL << i) ) + break; + } ch = (chunk_head_t *)r_min; r_min += 1UL << i; @@ -227,7 +229,6 @@ static void init_page_allocator(unsigned long min, unsigned long max) mm_alloc_bitmap_remap(); } - /* Allocate 2^@order contiguous pages. Returns a VIRTUAL address. */ unsigned long alloc_pages(int order) { @@ -239,13 +240,15 @@ unsigned long alloc_pages(int order) goto no_memory; /* Find smallest order which can satisfy the request. */ - for ( i = order; i < FREELIST_SIZE; i++ ) { - if ( !FREELIST_EMPTY(free_head[i]) ) - break; + for ( i = order; i < FREELIST_SIZE; i++ ) + { + if ( !FREELIST_EMPTY(free_head[i]) ) + break; } - if ( i == FREELIST_SIZE ) goto no_memory; - + if ( i == FREELIST_SIZE ) + goto no_memory; + /* Unlink a chunk. */ alloc_ch = free_head[i]; free_head[i] = alloc_ch->next; @@ -256,8 +259,10 @@ unsigned long alloc_pages(int order) { /* Split into two equal parts. */ i--; - spare_ch = (chunk_head_t *)((char *)alloc_ch + (1UL<<(i+PAGE_SHIFT))); - spare_ct = (chunk_tail_t *)((char *)spare_ch + (1UL<<(i+PAGE_SHIFT)))-1; + spare_ch = (chunk_head_t *)((char *)alloc_ch + + (1UL << (i + PAGE_SHIFT))); + spare_ct = (chunk_tail_t *)((char *)spare_ch + + (1UL << (i + PAGE_SHIFT))) - 1; /* Create new header for spare chunk. */ spare_ch->level = i; @@ -269,13 +274,12 @@ unsigned long alloc_pages(int order) spare_ch->next->pprev = &spare_ch->next; free_head[i] = spare_ch; } - - map_alloc(PHYS_PFN(to_phys(alloc_ch)), 1UL<level != order) + if ( allocated_in_map(virt_to_pfn(to_merge_ch)) || + to_merge_ch->level != order ) break; - + /* Merge with predecessor */ - freed_ch = to_merge_ch; + freed_ch = to_merge_ch; } - else + else { to_merge_ch = (chunk_head_t *)((char *)freed_ch + mask); - if(allocated_in_map(virt_to_pfn(to_merge_ch)) || - to_merge_ch->level != order) + if ( allocated_in_map(virt_to_pfn(to_merge_ch)) || + to_merge_ch->level != order ) break; - + /* Merge with successor */ freed_ct = (chunk_tail_t *)((char *)to_merge_ch + mask) - 1; } - - /* We are commited to merging, unlink the chunk */ + + /* We are committed to merging, unlink the chunk */ *(to_merge_ch->pprev) = to_merge_ch->next; to_merge_ch->next->pprev = to_merge_ch->pprev; - + order++; } @@ -332,10 +337,10 @@ void free_pages(void *pointer, int order) freed_ch->next = free_head[order]; freed_ch->pprev = &free_head[order]; freed_ct->level = order; - + freed_ch->next->pprev = &freed_ch->next; - free_head[order] = freed_ch; - + free_head[order] = freed_ch; + } EXPORT_SYMBOL(free_pages); @@ -347,6 +352,7 @@ int free_physical_pages(xen_pfn_t *mfns, int n) reservation.nr_extents = n; reservation.extent_order = 0; reservation.domid = DOMID_SELF; + return HYPERVISOR_memory_op(XENMEM_decrease_reservation, &reservation); } @@ -362,16 +368,15 @@ void *sbrk(ptrdiff_t increment) unsigned long old_brk = brk; unsigned long new_brk = old_brk + increment; - if (new_brk > heap_end) { - printk("Heap exhausted: %lx + %lx = %p > %p\n", - old_brk, - (unsigned long) increment, - (void *) new_brk, - (void *) heap_end); - return NULL; + if ( new_brk > heap_end ) + { + printk("Heap exhausted: %lx + %lx = %p > %p\n", old_brk, + (unsigned long) increment, (void *)new_brk, (void *)heap_end); + return NULL; } - - if (new_brk > heap_mapped) { + + if ( new_brk > heap_mapped ) + { unsigned long n = (new_brk - heap_mapped + PAGE_SIZE - 1) / PAGE_SIZE; if ( !chk_free_pages(n) ) @@ -386,16 +391,13 @@ void *sbrk(ptrdiff_t increment) brk = new_brk; - return (void *) old_brk; + return (void *)old_brk; } EXPORT_SYMBOL(sbrk); #endif - - void init_mm(void) { - unsigned long start_pfn, max_pfn; printk("MM: Init\n"); @@ -403,14 +405,12 @@ void init_mm(void) arch_init_mm(&start_pfn, &max_pfn); get_max_pages(); - /* - * now we can initialise the page allocator - */ + /* Now we can initialise the page allocator. */ init_page_allocator(PFN_PHYS(start_pfn), PFN_PHYS(max_pfn)); printk("MM: done\n"); arch_init_p2m(max_pfn); - + arch_init_demand_mapping_area(); } @@ -423,14 +423,15 @@ void sanity_check(void) int x; chunk_head_t *head; - for (x = 0; x < FREELIST_SIZE; x++) { - for (head = free_head[x]; !FREELIST_EMPTY(head); head = head->next) { + for ( x = 0; x < FREELIST_SIZE; x++ ) + { + for ( head = free_head[x]; !FREELIST_EMPTY(head); head = head->next ) + { ASSERT(!allocated_in_map(virt_to_pfn(head))); - if (head->next) + if ( head->next ) ASSERT(head->next->pprev == &head->next); } - if (free_head[x]) { + if ( free_head[x] ) ASSERT(free_head[x]->pprev == &free_head[x]); - } } } -- generated by git-patchbot for /home/xen/git/mini-os.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 10:11:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 10:11:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764086.1174414 (Exim 4.92) (envelope-from ) id 1sWYyH-0004nx-0r; Wed, 24 Jul 2024 10:11:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764086.1174414; Wed, 24 Jul 2024 10:11:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYyG-0004np-UF; Wed, 24 Jul 2024 10:11:44 +0000 Received: by outflank-mailman (input) for mailman id 764086; Wed, 24 Jul 2024 10:11:43 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYyF-0004nY-3o for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:43 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYyF-0003S3-31 for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:43 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYyF-0004kd-2H for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:43 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=gRbj/5zBP54plDHPSFqzlu4lJ/fnY7AT9oczN5ir8RE=; b=nsClYIlqy95fgsg4kT8DzvYTbG evCPE7MONp+6leKWBkcs+k3teRwO1inTS8LUiFylMXAeowWHY2Af5TMOHJcgHFk8BuO8W3UtDBM+r XQrAoT4P2Ak1rjxl6wIrRiQCn8Wr0be6Wm6nfXhhxiT/E7RLAyAI02PBn2K/nTTmRh+Q=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [mini-os master] mini-os: mm: remove not needed struct chunk_tail_st Message-Id: Date: Wed, 24 Jul 2024 10:11:43 +0000 commit e42c5b6b7cac61fca5afc9427789786b94a3d670 Author: Juergen Gross AuthorDate: Wed Jul 24 12:03:00 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 12:03:00 2024 +0200 mini-os: mm: remove not needed struct chunk_tail_st The struct chunk_tail_st isn't really used other than writing to it. Remove it in order to simplify the code. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- mm.c | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/mm.c b/mm.c index df8055b..e194249 100644 --- a/mm.c +++ b/mm.c @@ -123,7 +123,6 @@ static void map_free(unsigned long first_page, unsigned long nr_pages) /* BINARY BUDDY ALLOCATOR */ typedef struct chunk_head_st chunk_head_t; -typedef struct chunk_tail_st chunk_tail_t; struct chunk_head_st { chunk_head_t *next; @@ -131,10 +130,6 @@ struct chunk_head_st { int level; }; -struct chunk_tail_st { - int level; -}; - /* Linked lists of free chunks of different powers-of-two in size. */ #define FREELIST_SIZE ((sizeof(void *) << 3) - PAGE_SHIFT) static chunk_head_t *free_head[FREELIST_SIZE]; @@ -151,7 +146,6 @@ static void init_page_allocator(unsigned long min, unsigned long max) unsigned long range; unsigned long r_min, r_max; chunk_head_t *ch; - chunk_tail_t *ct; printk("MM: Initialise page allocator for %lx(%lx)-%lx(%lx)\n", (u_long)to_virt(min), min, (u_long)to_virt(max), max); @@ -215,14 +209,12 @@ static void init_page_allocator(unsigned long min, unsigned long max) ch = (chunk_head_t *)r_min; r_min += 1UL << i; range -= 1UL << i; - ct = (chunk_tail_t *)r_min - 1; i -= PAGE_SHIFT; ch->level = i; ch->next = free_head[i]; ch->pprev = &free_head[i]; ch->next->pprev = &ch->next; free_head[i] = ch; - ct->level = i; } } @@ -234,7 +226,6 @@ unsigned long alloc_pages(int order) { int i; chunk_head_t *alloc_ch, *spare_ch; - chunk_tail_t *spare_ct; if ( !chk_free_pages(1UL << order) ) goto no_memory; @@ -261,14 +252,11 @@ unsigned long alloc_pages(int order) i--; spare_ch = (chunk_head_t *)((char *)alloc_ch + (1UL << (i + PAGE_SHIFT))); - spare_ct = (chunk_tail_t *)((char *)spare_ch + - (1UL << (i + PAGE_SHIFT))) - 1; /* Create new header for spare chunk. */ spare_ch->level = i; spare_ch->next = free_head[i]; spare_ch->pprev = &free_head[i]; - spare_ct->level = i; /* Link in the spare chunk. */ spare_ch->next->pprev = &spare_ch->next; @@ -289,7 +277,6 @@ EXPORT_SYMBOL(alloc_pages); void free_pages(void *pointer, int order) { chunk_head_t *freed_ch, *to_merge_ch; - chunk_tail_t *freed_ct; unsigned long mask; /* First free the chunk */ @@ -297,8 +284,6 @@ void free_pages(void *pointer, int order) /* Create free chunk */ freed_ch = (chunk_head_t *)pointer; - freed_ct = (chunk_tail_t *)((char *)pointer + - (1UL << (order + PAGE_SHIFT))) - 1; /* Now, possibly we can conseal chunks together */ while ( order < FREELIST_SIZE ) @@ -320,9 +305,6 @@ void free_pages(void *pointer, int order) if ( allocated_in_map(virt_to_pfn(to_merge_ch)) || to_merge_ch->level != order ) break; - - /* Merge with successor */ - freed_ct = (chunk_tail_t *)((char *)to_merge_ch + mask) - 1; } /* We are committed to merging, unlink the chunk */ @@ -336,8 +318,6 @@ void free_pages(void *pointer, int order) freed_ch->level = order; freed_ch->next = free_head[order]; freed_ch->pprev = &free_head[order]; - freed_ct->level = order; - freed_ch->next->pprev = &freed_ch->next; free_head[order] = freed_ch; -- generated by git-patchbot for /home/xen/git/mini-os.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 10:11:55 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 10:11:55 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764087.1174418 (Exim 4.92) (envelope-from ) id 1sWYyR-0004rr-3g; Wed, 24 Jul 2024 10:11:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764087.1174418; Wed, 24 Jul 2024 10:11:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYyR-0004rj-0p; Wed, 24 Jul 2024 10:11:55 +0000 Received: by outflank-mailman (input) for mailman id 764087; Wed, 24 Jul 2024 10:11:53 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYyP-0004rT-83 for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:53 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYyP-0003SH-6h for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:53 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYyP-0004lK-57 for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:11:53 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=XbrOVp0QCYOOUBMY/uX5Sipz7qF8kwrct+kHnKwlHDM=; b=dYUsYyXuQfuhxhrPwZdHCU+rlj /XWB3uBFxxN+90Cszpjwb2XrY/BWgselSK1rkdrGuBsOpVSyIezKNQL0dP+QdplGrNEDNqCB/jdE5 6v2AYTMsIHh1MIPBKgsWu0L/QzwdKypXLH4pAXe13KPlsRsHxNAucLsZeRvXPUGcBYkM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [mini-os master] mini-os: mm: reduce buddy allocator list administration data Message-Id: Date: Wed, 24 Jul 2024 10:11:53 +0000 commit b12961e9044e249750d9640910d3aa769accc8c6 Author: Juergen Gross AuthorDate: Wed Jul 24 12:03:13 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 12:03:13 2024 +0200 mini-os: mm: reduce buddy allocator list administration data Today the administration data for the buddy allocator's lists consists of 2 arrays: one pointer array and one list element array for easier handling of the lists' tails. Those arrays can be combined into one by dropping the pointer array and using a different list end indicator. Add enqueue and dequeue helpers for better readability. Change the level member type to unsigned int. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- mm.c | 73 ++++++++++++++++++++++++++++++++------------------------------------ 1 file changed, 34 insertions(+), 39 deletions(-) diff --git a/mm.c b/mm.c index e194249..4aa0c6c 100644 --- a/mm.c +++ b/mm.c @@ -125,16 +125,30 @@ static void map_free(unsigned long first_page, unsigned long nr_pages) typedef struct chunk_head_st chunk_head_t; struct chunk_head_st { - chunk_head_t *next; - chunk_head_t **pprev; - int level; + chunk_head_t *next; + chunk_head_t *prev; + unsigned int level; }; /* Linked lists of free chunks of different powers-of-two in size. */ #define FREELIST_SIZE ((sizeof(void *) << 3) - PAGE_SHIFT) -static chunk_head_t *free_head[FREELIST_SIZE]; -static chunk_head_t free_tail[FREELIST_SIZE]; -#define FREELIST_EMPTY(_l) ((_l)->next == NULL) +static chunk_head_t free_list[FREELIST_SIZE]; +#define FREELIST_EMPTY(_l) ((_l)->level == FREELIST_SIZE) + +static void enqueue_elem(chunk_head_t *elem, unsigned int level) +{ + elem->level = level; + elem->next = free_list[level].next; + elem->prev = &free_list[level]; + elem->next->prev = elem; + free_list[level].next = elem; +} + +static void dequeue_elem(chunk_head_t *elem) +{ + elem->prev->next = elem->next; + elem->next->prev = elem->prev; +} /* * Initialise allocator, placing addresses [@min,@max] in free pool. @@ -151,9 +165,9 @@ static void init_page_allocator(unsigned long min, unsigned long max) (u_long)to_virt(min), min, (u_long)to_virt(max), max); for ( i = 0; i < FREELIST_SIZE; i++ ) { - free_head[i] = &free_tail[i]; - free_tail[i].pprev = &free_head[i]; - free_tail[i].next = NULL; + free_list[i].next = &free_list[i]; + free_list[i].prev = &free_list[i]; + free_list[i].level = FREELIST_SIZE; } min = round_pgup(min); @@ -209,12 +223,7 @@ static void init_page_allocator(unsigned long min, unsigned long max) ch = (chunk_head_t *)r_min; r_min += 1UL << i; range -= 1UL << i; - i -= PAGE_SHIFT; - ch->level = i; - ch->next = free_head[i]; - ch->pprev = &free_head[i]; - ch->next->pprev = &ch->next; - free_head[i] = ch; + enqueue_elem(ch, i - PAGE_SHIFT); } } @@ -233,17 +242,16 @@ unsigned long alloc_pages(int order) /* Find smallest order which can satisfy the request. */ for ( i = order; i < FREELIST_SIZE; i++ ) { - if ( !FREELIST_EMPTY(free_head[i]) ) + if ( !FREELIST_EMPTY(free_list[i].next) ) break; } - if ( i == FREELIST_SIZE ) + if ( i >= FREELIST_SIZE ) goto no_memory; /* Unlink a chunk. */ - alloc_ch = free_head[i]; - free_head[i] = alloc_ch->next; - alloc_ch->next->pprev = alloc_ch->pprev; + alloc_ch = free_list[i].next; + dequeue_elem(alloc_ch); /* We may have to break the chunk a number of times. */ while ( i != order ) @@ -254,13 +262,7 @@ unsigned long alloc_pages(int order) (1UL << (i + PAGE_SHIFT))); /* Create new header for spare chunk. */ - spare_ch->level = i; - spare_ch->next = free_head[i]; - spare_ch->pprev = &free_head[i]; - - /* Link in the spare chunk. */ - spare_ch->next->pprev = &spare_ch->next; - free_head[i] = spare_ch; + enqueue_elem(spare_ch, i); } map_alloc(PHYS_PFN(to_phys(alloc_ch)), 1UL << order); @@ -308,18 +310,13 @@ void free_pages(void *pointer, int order) } /* We are committed to merging, unlink the chunk */ - *(to_merge_ch->pprev) = to_merge_ch->next; - to_merge_ch->next->pprev = to_merge_ch->pprev; + dequeue_elem(to_merge_ch); order++; } /* Link the new chunk */ - freed_ch->level = order; - freed_ch->next = free_head[order]; - freed_ch->pprev = &free_head[order]; - freed_ch->next->pprev = &freed_ch->next; - free_head[order] = freed_ch; + enqueue_elem(freed_ch, order); } EXPORT_SYMBOL(free_pages); @@ -405,13 +402,11 @@ void sanity_check(void) for ( x = 0; x < FREELIST_SIZE; x++ ) { - for ( head = free_head[x]; !FREELIST_EMPTY(head); head = head->next ) + for ( head = free_list[x].next; !FREELIST_EMPTY(head); + head = head->next ) { ASSERT(!allocated_in_map(virt_to_pfn(head))); - if ( head->next ) - ASSERT(head->next->pprev == &head->next); + ASSERT(head->next->prev == head); } - if ( free_head[x] ) - ASSERT(free_head[x]->pprev == &free_head[x]); } } -- generated by git-patchbot for /home/xen/git/mini-os.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 10:12:05 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 10:12:05 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764088.1174421 (Exim 4.92) (envelope-from ) id 1sWYyb-0004us-4m; Wed, 24 Jul 2024 10:12:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764088.1174421; Wed, 24 Jul 2024 10:12:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYyb-0004uk-2D; Wed, 24 Jul 2024 10:12:05 +0000 Received: by outflank-mailman (input) for mailman id 764088; Wed, 24 Jul 2024 10:12:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYyZ-0004uT-Ak for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:12:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWYyZ-0003Sc-9Y for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:12:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWYyZ-0004mb-8m for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 10:12:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=4PoCSn3ge1PBJDTXoWFtFortuuJrS0vhoB18xOMVujY=; b=h/6JbfnYUNDs7KZD0T6QkPn9fe E8lAjjQE1cn8NiH+k6PRh89YsrdAuRiWleu8NFz9eTQZebSI1H+XpG9z/8Tsyh5tIDcPZnbzSQHay Rgb84Qzp1ISyBgMUFCxuI4r0dxvip4ckUy0ljcpTxSU5jWZ6vEsds9N3GkGLna1zFnSw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [mini-os master] mini-os: mm: don't have two large arrays of the same kind Message-Id: Date: Wed, 24 Jul 2024 10:12:03 +0000 commit 27782562cb0558ce651031b4921931c33e6f7c71 Author: Juergen Gross AuthorDate: Wed Jul 24 12:03:26 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 12:03:26 2024 +0200 mini-os: mm: don't have two large arrays of the same kind In the CONFIG_PARAVIRT case there are two identical static arrays of more than 8kB size with function scope. As the two functions never nest, a single array of file scope can replace the two existing instances. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- arch/x86/mm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm.c b/arch/x86/mm.c index be1cf0c..7ddf16e 100644 --- a/arch/x86/mm.c +++ b/arch/x86/mm.c @@ -198,6 +198,10 @@ static void new_pt_frame(unsigned long *pt_pfn, unsigned long prev_l_mfn, *pt_pfn += 1; } +#ifdef CONFIG_PARAVIRT +static mmu_update_t mmu_updates[L1_PAGETABLE_ENTRIES + 1]; +#endif + /* * Build the initial pagetable. */ @@ -209,7 +213,6 @@ static void build_pagetable(unsigned long *start_pfn, unsigned long *max_pfn) unsigned long pt_mfn = pfn_to_mfn(virt_to_pfn(pt_base)); unsigned long offset; #ifdef CONFIG_PARAVIRT - static mmu_update_t mmu_updates[L1_PAGETABLE_ENTRIES + 1]; int count = 0; int rc; #endif @@ -323,7 +326,6 @@ static void set_readonly(void *text, void *etext) unsigned long offset; unsigned long page_size = PAGE_SIZE; #ifdef CONFIG_PARAVIRT - static mmu_update_t mmu_updates[L1_PAGETABLE_ENTRIES + 1]; int count = 0; int rc; #endif -- generated by git-patchbot for /home/xen/git/mini-os.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 12:11:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 12:11:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764155.1174485 (Exim 4.92) (envelope-from ) id 1sWapl-0005jq-FY; Wed, 24 Jul 2024 12:11:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764155.1174485; Wed, 24 Jul 2024 12:11:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWapl-0005jj-Ce; Wed, 24 Jul 2024 12:11:05 +0000 Received: by outflank-mailman (input) for mailman id 764155; Wed, 24 Jul 2024 12:11:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWapj-0005jd-I0 for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 12:11:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWapj-0005pE-Bf for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 12:11:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWapj-0004ZD-9f for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 12:11:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=mS0SHAGLVNS82+WlJguHoHYht4eBYDbphfomaSHe+Qg=; b=HiRNXu2pKEhWzIt+4bcy0q6T3g oQHFzABJ1ODgYiNOnQVmoYFoCN/7+56ld4FVpWLGOgTDI1XIZgSwzjKD//WkEgeczJNB/m/XdaxVf +bOtE95g/QKTrBW37mXQnxPXaZ5CwTcWdEbZDAELheR5eLM3tjcKiH2akUMm3FEHKI3Y=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/IO-APIC: Improve APIC_TMR accesses Message-Id: Date: Wed, 24 Jul 2024 12:11:03 +0000 commit 90ac0e4f2f30ca8a4fca74751815e90d423aa612 Author: Andrew Cooper AuthorDate: Tue Jul 23 17:32:26 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 24 12:18:44 2024 +0100 x86/IO-APIC: Improve APIC_TMR accesses XenServer's instance of Coverity complains of OVERFLOW_BEFORE_WIDEN in mask_and_ack_level_ioapic_irq(), which is ultimately because of v being unsigned long, and (1U << ...) being 32 bits. The reasoning isn't correct. (1U << (x & 0x1f)) can't overflow, but the complaint is really about having to expand the RHS. While this can be fixed by changing v to be unsigned int, take the opportunity to do better still. Introduce a apic_tmr_read() helper like we already have for ISR and IRR, and use it to remove the opencoded logic. Introduce an is_level boolean to improve the legibility of the surrounding logic. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/include/asm/apic.h | 5 +++++ xen/arch/x86/io_apic.c | 15 +++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/include/asm/apic.h b/xen/arch/x86/include/asm/apic.h index 7bd66dc6e1..a254e49dd1 100644 --- a/xen/arch/x86/include/asm/apic.h +++ b/xen/arch/x86/include/asm/apic.h @@ -132,6 +132,11 @@ static inline bool apic_isr_read(uint8_t vector) (vector & 0x1f)) & 1; } +static inline bool apic_tmr_read(unsigned int vector) +{ + return apic_read(APIC_TMR + (vector / 32 * 0x10)) & (1U << (vector % 32)); +} + static inline bool apic_irr_read(unsigned int vector) { return apic_read(APIC_IRR + (vector / 32 * 0x10)) & (1U << (vector % 32)); diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index d2a313c4ac..7744b43f24 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1652,8 +1652,7 @@ static bool io_apic_level_ack_pending(unsigned int irq) static void cf_check mask_and_ack_level_ioapic_irq(struct irq_desc *desc) { - unsigned long v; - int i; + bool is_level; irq_complete_move(desc); @@ -1679,9 +1678,8 @@ static void cf_check mask_and_ack_level_ioapic_irq(struct irq_desc *desc) * operation to prevent an edge-triggered interrupt escaping meanwhile. * The idea is from Manfred Spraul. --macro */ - i = desc->arch.vector; - v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1)); + is_level = apic_tmr_read(desc->arch.vector); ack_APIC_irq(); @@ -1692,7 +1690,7 @@ static void cf_check mask_and_ack_level_ioapic_irq(struct irq_desc *desc) !io_apic_level_ack_pending(desc->irq)) move_masked_irq(desc); - if ( !(v & (1U << (i & 0x1f))) ) + if ( !is_level ) { spin_lock(&ioapic_lock); __edge_IO_APIC_irq(desc->irq); @@ -1743,13 +1741,14 @@ static void cf_check end_level_ioapic_irq_new(struct irq_desc *desc, u8 vector) * operation to prevent an edge-triggered interrupt escaping meanwhile. * The idea is from Manfred Spraul. --macro */ - unsigned int v, i = desc->arch.vector; + unsigned int i = desc->arch.vector; + bool is_level; /* Manually EOI the old vector if we are moving to the new */ if ( vector && i != vector ) eoi_IO_APIC_irq(desc); - v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1)); + is_level = apic_tmr_read(i); end_nonmaskable_irq(desc, vector); @@ -1757,7 +1756,7 @@ static void cf_check end_level_ioapic_irq_new(struct irq_desc *desc, u8 vector) !io_apic_level_ack_pending(desc->irq) ) move_native_irq(desc); - if ( !(v & (1U << (i & 0x1f))) ) + if ( !is_level ) { spin_lock(&ioapic_lock); __mask_IO_APIC_irq(desc->irq); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 12:11:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 12:11:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764156.1174490 (Exim 4.92) (envelope-from ) id 1sWapu-0005lW-H2; Wed, 24 Jul 2024 12:11:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764156.1174490; Wed, 24 Jul 2024 12:11:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWapu-0005lO-EM; Wed, 24 Jul 2024 12:11:14 +0000 Received: by outflank-mailman (input) for mailman id 764156; Wed, 24 Jul 2024 12:11:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWapt-0005lE-Ft for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 12:11:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWapt-0005pL-Et for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 12:11:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWapt-0004Zu-Dv for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 12:11:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=5pDnMzfEKyIlN3c2Ey6rV8hAnYRyb/4mPUD++qxLeLk=; b=FxhgMn11v1qUXLacO4MSUHoaud 4XK6QuXPj6m6k2CDeGiXbDcfcHUcUJeF025SzbETIDbC0cEieJMG4YTyonVkJYnZIUiVVq0z0g6zg +038TkR3/92Nbqf9Ne0f54qesv6zVoXOVYmcTDDuLX6BQd8SjoeZ8hVNrLU0vEmzXeAw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/APIC: Change APIC reg types to unsigned int Message-Id: Date: Wed, 24 Jul 2024 12:11:13 +0000 commit c29f6ee94df34ce7391d0d9fabc32e5fe683b89e Author: Andrew Cooper AuthorDate: Tue Jul 23 20:28:24 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 24 12:18:44 2024 +0100 x86/APIC: Change APIC reg types to unsigned int They're all within a 12 bit range of their respective bases, and this prevents all the x2APIC MSR addresses being calculated in %rcx. Also swap two u32's for uint32_t. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/include/asm/apic.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/include/asm/apic.h b/xen/arch/x86/include/asm/apic.h index a254e49dd1..509a6683a1 100644 --- a/xen/arch/x86/include/asm/apic.h +++ b/xen/arch/x86/include/asm/apic.h @@ -49,12 +49,12 @@ const struct genapic *apic_x2apic_probe(void); * Basic functions accessing APICs. */ -static inline void apic_mem_write(unsigned long reg, u32 v) +static inline void apic_mem_write(unsigned int reg, uint32_t v) { *((volatile u32 *)(APIC_BASE+reg)) = v; } -static inline u32 apic_mem_read(unsigned long reg) +static inline u32 apic_mem_read(unsigned int reg) { return *((volatile u32 *)(APIC_BASE+reg)); } @@ -63,7 +63,7 @@ static inline u32 apic_mem_read(unsigned long reg) * access the 64-bit ICR register. */ -static inline void apic_wrmsr(unsigned long reg, uint64_t msr_content) +static inline void apic_wrmsr(unsigned int reg, uint64_t msr_content) { if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR || reg == APIC_LVR) @@ -72,7 +72,7 @@ static inline void apic_wrmsr(unsigned long reg, uint64_t msr_content) wrmsrl(MSR_X2APIC_FIRST + (reg >> 4), msr_content); } -static inline uint64_t apic_rdmsr(unsigned long reg) +static inline uint64_t apic_rdmsr(unsigned int reg) { uint64_t msr_content; @@ -83,7 +83,7 @@ static inline uint64_t apic_rdmsr(unsigned long reg) return msr_content; } -static inline void apic_write(unsigned long reg, u32 v) +static inline void apic_write(unsigned int reg, uint32_t v) { if ( x2apic_enabled ) @@ -92,7 +92,7 @@ static inline void apic_write(unsigned long reg, u32 v) apic_mem_write(reg, v); } -static inline u32 apic_read(unsigned long reg) +static inline u32 apic_read(unsigned int reg) { if ( x2apic_enabled ) return apic_rdmsr(reg); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 12:11:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 12:11:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764157.1174494 (Exim 4.92) (envelope-from ) id 1sWaq4-0005oI-IZ; Wed, 24 Jul 2024 12:11:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764157.1174494; Wed, 24 Jul 2024 12:11: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 1sWaq4-0005o8-Fp; Wed, 24 Jul 2024 12:11:24 +0000 Received: by outflank-mailman (input) for mailman id 764157; Wed, 24 Jul 2024 12:11:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWaq3-0005nv-JT for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 12:11:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWaq3-0005r6-Id for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 12:11:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWaq3-0004av-H1 for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 12:11:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=5fcn+Xhih5zgz0KDzIzn3YW5Epav9UAgAs3vbMjsMQ8=; b=jBXM4r+B4bTtpo9bYnHAnDNUM6 EiKi+ttNQxj6A0LJMhG7okfkt09efriSWg9xFZZ0FKtu0AdJuh9f3MXsAOn6ySMWGOvC0EAXm74C5 Uf0++DXUlME/Zs+9nDNMKg+/yg0/aZG/wlwlFt+94gYjeIngSpdS0nW/cWxMXtjUft+o=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/APIC: Rewrite apic_isr_read() to match apic_{tmr,irr}_read() Message-Id: Date: Wed, 24 Jul 2024 12:11:23 +0000 commit 5795a0bf5493d411155093180ed16e4ba63d37bf Author: Andrew Cooper AuthorDate: Tue Jul 23 20:21:02 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 24 12:18:44 2024 +0100 x86/APIC: Rewrite apic_isr_read() to match apic_{tmr,irr}_read() This allows for marginally better code generation including the use of BT rather than SHR/TEST. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/include/asm/apic.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/apic.h b/xen/arch/x86/include/asm/apic.h index 509a6683a1..a7798de029 100644 --- a/xen/arch/x86/include/asm/apic.h +++ b/xen/arch/x86/include/asm/apic.h @@ -126,10 +126,9 @@ static inline void apic_icr_write(u32 low, u32 dest) } } -static inline bool apic_isr_read(uint8_t vector) +static inline bool apic_isr_read(unsigned int vector) { - return (apic_read(APIC_ISR + ((vector & ~0x1f) >> 1)) >> - (vector & 0x1f)) & 1; + return apic_read(APIC_ISR + (vector / 32 * 0x10)) & (1U << (vector % 32)); } static inline bool apic_tmr_read(unsigned int vector) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 24 17:33:10 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 24 Jul 2024 17:33:10 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764452.1174897 (Exim 4.92) (envelope-from ) id 1sWfrM-0005pK-QN; Wed, 24 Jul 2024 17:33:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764452.1174897; Wed, 24 Jul 2024 17:33:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWfrM-0005pC-Na; Wed, 24 Jul 2024 17:33:04 +0000 Received: by outflank-mailman (input) for mailman id 764452; Wed, 24 Jul 2024 17:33:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWfrL-0005p3-Nh for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 17:33:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWfrL-0004KH-A1 for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 17:33:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWfrL-0007ik-7t for xen-changelog@lists.xenproject.org; Wed, 24 Jul 2024 17:33:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=RqHxL5v6Mri9PVmQsIdOcwyvWMwrOgMKzMjTZJCZSCU=; b=F7yUNzJbUEU5bsLFNWivy5LsP1 ChnDfEE3H5lyFG6iQ63+AwnSOIwtu9+l0oZM/37mRlf0oFPqPBlwyFQRNpOt50W+3C5r/B3QtmBpf 8UKwpsJ/fak5CGRj9WpF+hmt/yKMRcXzg9JtFtLinU/CSvv5iD+clc781U6cZoA1T9AM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] hvmloader: Use fastcall everywhere Message-Id: Date: Wed, 24 Jul 2024 17:33:03 +0000 commit b25b28ede1cba43eda1e0b84ad967683b8196847 Author: Andrew Cooper AuthorDate: Thu May 9 18:52:59 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 24 18:24:56 2024 +0100 hvmloader: Use fastcall everywhere HVMLoader is a single freestanding 32bit program with no external dependencies. Use the fastcall calling convetion (up to 3 parameters in registers) globally, which is more efficient than passing all parameters on the stack. Some bloat-o-meter highlights are: add/remove: 0/0 grow/shrink: 3/118 up/down: 8/-3004 (-2996) Function old new delta ... hvmloader_acpi_build_tables 1125 961 -164 acpi_build_tables 1277 1081 -196 pci_setup 4756 4516 -240 construct_secondary_tables 1689 1447 -242 No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- tools/firmware/hvmloader/Makefile | 2 +- tools/firmware/hvmloader/smp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile index 84cba171cd..c7bc400657 100644 --- a/tools/firmware/hvmloader/Makefile +++ b/tools/firmware/hvmloader/Makefile @@ -25,7 +25,7 @@ ld-option = $(shell if $(LD) -v $(1) >/dev/null 2>&1; then echo y; else echo n; # SMBIOS spec requires format mm/dd/yyyy SMBIOS_REL_DATE ?= $(shell date +%m/%d/%Y) -CFLAGS += $(CFLAGS_xeninclude) -fno-pic +CFLAGS += $(CFLAGS_xeninclude) -fno-pic -mregparm=3 # We mustn't use tools-only public interfaces. CFLAGS += -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__ diff --git a/tools/firmware/hvmloader/smp.c b/tools/firmware/hvmloader/smp.c index 5d46eee1c5..1b940cefd0 100644 --- a/tools/firmware/hvmloader/smp.c +++ b/tools/firmware/hvmloader/smp.c @@ -31,7 +31,7 @@ static int ap_callin; -static void __attribute__((regparm(1))) cpu_setup(unsigned int cpu) +static void cpu_setup(unsigned int cpu) { printf(" - CPU%d ... ", cpu); cacheattr_init(); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 03:00:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 03:00:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764603.1175087 (Exim 4.92) (envelope-from ) id 1sWoi3-0006Wb-0A; Thu, 25 Jul 2024 03:00:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764603.1175087; Thu, 25 Jul 2024 03:00:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWoi2-0006WA-TT; Thu, 25 Jul 2024 03:00:02 +0000 Received: by outflank-mailman (input) for mailman id 764603; Thu, 25 Jul 2024 03:00:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWoi2-0006Lf-5q for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 03:00:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWoi1-0002m7-RY for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 03:00:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWoi1-0005bX-Pl for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 03:00:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=T7q6IiLWSteDJUZx1yQ/Gf8OlU3HLZLvXI1KKaZbw50=; b=VrA6hYDgVhToMDsfz9CXLRCbXO +a6h2YpyGPhIpZ98+qOmLUMl8CIcc9lEPw881azWz03X6RMqIK9WixhEPuREprFTOytowb1baaqwp 1CrX/ipBVL5KzJztcNiYC2lA0SbFWjPshAeqQ7QqJZGQASdtBjBmiZ9yb8hFhhlKp4pw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.19] hotplug: Restore block-tap phy compatibility (again) Message-Id: Date: Thu, 25 Jul 2024 03:00:01 +0000 commit 2d7b6170cc69f8a1a60c52d87ba61f6b1f180132 Author: Jason Andryuk AuthorDate: Wed Jul 24 11:53:04 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:53:04 2024 +0200 hotplug: Restore block-tap phy compatibility (again) "$dev" needs to be set correctly for backendtype=phy as well as backendtype=tap. Move the setting into the conditional, so it can be handled properly for each. (dev could be captured during tap-ctl allocate for blktap module, but it would not be set properly for the find_device case. The backendtype=tap case would need to be handled regardless.) Fixes: f16ac12bd418 ("hotplug: Restore block-tap phy compatibility") Fixes: 76a484193dbb ("hotplug: Update block-tap") Signed-off-by: Jason Andryuk Reviewed-by: Anthony PERARD Release-Acked-by: Oleksii Kurochko master commit: e4c7c2148afd5a02c36193c79e8ab62c86c5f0b0 master date: 2024-07-24 11:36:04 +0200 --- tools/hotplug/Linux/block-tap | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/hotplug/Linux/block-tap b/tools/hotplug/Linux/block-tap index 8661ce77e3..95970a61f6 100755 --- a/tools/hotplug/Linux/block-tap +++ b/tools/hotplug/Linux/block-tap @@ -204,13 +204,13 @@ add() tap_create fi - # Create nbd unix path. find_device/tap_create set pid & minor - dev=$( printf "/run/blktap-control/nbd%ld.%d" "$pid" "$minor" ) - xenstore_write "$XENBUS_PATH/pid" "$pid" xenstore_write "$XENBUS_PATH/minor" "$minor" if [ "$XENBUS_TYPE" = "vbd3" ] ; then + # Create nbd unix path. find_device/tap_create set pid & minor + dev=$( printf "/run/blktap-control/nbd%ld.%d" "$pid" "$minor" ) + # $dev, as a unix socket, has major:minor 0:0. If write_dev writes # physical-device, tapback would use that incorrect minor 0. So don't # write physical-device. @@ -218,6 +218,9 @@ add() success else + # Construct dev path from minor + dev="/dev/xen/blktap-2/tapdev$minor" + [ -b "$dev" ] || fatal "blktap \"$dev\" is not a block dev" write_dev "$dev" fi -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.19 From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 07:44:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 07:44:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764763.1175270 (Exim 4.92) (envelope-from ) id 1sWt8u-0006P1-54; Thu, 25 Jul 2024 07:44:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764763.1175270; Thu, 25 Jul 2024 07:44:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt8u-0006Ot-2X; Thu, 25 Jul 2024 07:44:04 +0000 Received: by outflank-mailman (input) for mailman id 764763; Thu, 25 Jul 2024 07:44:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt8s-0006On-IO for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt8s-0008Sg-5x for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWt8s-0002Un-51 for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=iudmyqjLbWy/C3oSg5TppOhaazdOs4fE4dedVOrH1Zc=; b=zXMFPtaP6Hw/epAxsDDrcLLvib YmL45f35eggYatnRQT5XCDv50SLAnrZrF2klyXMSYs/1jUATLHvuJFRS0hIftyMboj9F30+TkJufa WiBX6UsGkIunjztXSG4FArYRpKNWJnk9IcLAwOyqqbqnw4MghIL/exTJANYtHmG5yHx0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/libxs: Fix length check in xs_talkv() Message-Id: Date: Thu, 25 Jul 2024 07:44:02 +0000 commit 42db2deb5e7617f0459b68cd73ab503938356186 Author: Andrew Cooper AuthorDate: Thu Jul 18 10:23:00 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 23 15:11:27 2024 +0100 tools/libxs: Fix length check in xs_talkv() If the sum of iov element lengths overflows, the XENSTORE_PAYLOAD_MAX can pass, after which we'll write 4G of data with a good-looking length field, and the remainder of the payload will be interpreted as subsequent commands. Check each iov element length for XENSTORE_PAYLOAD_MAX before accmulating it. Signed-off-by: Andrew Cooper Reviewed-by: Jason Andryuk Reviewed-by: Juergen Gross --- tools/libs/store/xs.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index ec77379ab9..68b14af877 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -571,21 +571,24 @@ static void *xs_talkv(struct xs_handle *h, xs_transaction_t t, struct xsd_sockmsg msg; void *ret = NULL; int saved_errno; - unsigned int i; + unsigned int i, msg_len; struct sigaction ignorepipe, oldact; msg.tx_id = t; msg.req_id = 0; msg.type = type; - msg.len = 0; - for (i = 0; i < num_vecs; i++) - msg.len += iovec[i].iov_len; - if (msg.len > XENSTORE_PAYLOAD_MAX) { - errno = E2BIG; - return 0; + /* Calculate the payload length by summing iovec elements */ + for (i = 0, msg_len = 0; i < num_vecs; i++) { + if ((iovec[i].iov_len > XENSTORE_PAYLOAD_MAX) || + ((msg_len += iovec[i].iov_len) > XENSTORE_PAYLOAD_MAX)) { + errno = E2BIG; + return NULL; + } } + msg.len = msg_len; + ignorepipe.sa_handler = SIG_IGN; sigemptyset(&ignorepipe.sa_mask); ignorepipe.sa_flags = 0; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 07:44:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 07:44:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764764.1175277 (Exim 4.92) (envelope-from ) id 1sWt94-0006Qm-7T; Thu, 25 Jul 2024 07:44:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764764.1175277; Thu, 25 Jul 2024 07:44:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt94-0006Qc-3v; Thu, 25 Jul 2024 07:44:14 +0000 Received: by outflank-mailman (input) for mailman id 764764; Thu, 25 Jul 2024 07:44:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt92-0006QK-AC for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt92-0008Sk-9H for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWt92-0002VT-8I for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=xlZawNzFqm6y0809wqc686HdOcS0ukOn0klMzr4bdrc=; b=WEvTmYQMqgOSEkb3G2X0jlI6uX Hx5qJlSE2GqtBZ9RWm8bRGFCezB/TWa8ZzJqUqycXuvQ2mJLTvGocvDonN46+MegCGK6563A25Wzw 7lQ+NQutnNHbzY+usAq/xqaQFW1I8CAVzlYN/Eu1jnaH8vJHwhu3rK2zaJUkcFAV/WU4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/libxs: Rework xs_talkv() to take xsd_sockmsg within the iovec Message-Id: Date: Thu, 25 Jul 2024 07:44:12 +0000 commit e2a93bed8b9e0f0c4779dcd4b10dc7ba2a959fbc Author: Andrew Cooper AuthorDate: Thu Jul 18 10:13:04 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 23 15:11:27 2024 +0100 tools/libxs: Rework xs_talkv() to take xsd_sockmsg within the iovec We would like to writev() the whole outgoing message, but this is hard given the current need to prepend the locally-constructed xsd_sockmsg. Instead, have the caller provide xsd_sockmsg in iovec[0]. This in turn drops the 't' and 'type' parameters from xs_talkv(). Note that xs_talkv() may alter the iovec structure. This may happen when writev() is really used under the covers, and it's preferable to having the lower levels need to duplicate the iovec to edit it upon encountering a short write. xs_directory_part() is the only function impacted by this, and it's easy to rearrange to be compatible. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/libs/store/xs.c | 187 +++++++++++++++++++++++++++++--------------------- 1 file changed, 107 insertions(+), 80 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 68b14af877..0ff27ef023 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -561,25 +561,32 @@ static void *read_reply( return body; } -/* Send message to xs, get malloc'ed reply. NULL and set errno on error. */ -static void *xs_talkv(struct xs_handle *h, xs_transaction_t t, - enum xsd_sockmsg_type type, - const struct iovec *iovec, +/* + * Send message to xenstore, get malloc'ed reply. NULL and set errno on error. + * + * @iovec describes the entire outgoing message, starting with the xsd_sockmsg + * header. xs_talkv() calculates the outgoing message length, updating + * xsd_sockmsg in element 0. xs_talkv() might edit the iovec structure in + * place (e.g. following short writes). + */ +static void *xs_talkv(struct xs_handle *h, + struct iovec *iovec, unsigned int num_vecs, unsigned int *len) { - struct xsd_sockmsg msg; + struct xsd_sockmsg *msg = iovec[0].iov_base; + enum xsd_sockmsg_type reply_type; void *ret = NULL; int saved_errno; unsigned int i, msg_len; struct sigaction ignorepipe, oldact; - msg.tx_id = t; - msg.req_id = 0; - msg.type = type; + /* Element 0 must be xsd_sockmsg */ + assert(num_vecs >= 1); + assert(iovec[0].iov_len == sizeof(*msg)); /* Calculate the payload length by summing iovec elements */ - for (i = 0, msg_len = 0; i < num_vecs; i++) { + for (i = 1, msg_len = 0; i < num_vecs; i++) { if ((iovec[i].iov_len > XENSTORE_PAYLOAD_MAX) || ((msg_len += iovec[i].iov_len) > XENSTORE_PAYLOAD_MAX)) { errno = E2BIG; @@ -587,7 +594,7 @@ static void *xs_talkv(struct xs_handle *h, xs_transaction_t t, } } - msg.len = msg_len; + msg->len = msg_len; ignorepipe.sa_handler = SIG_IGN; sigemptyset(&ignorepipe.sa_mask); @@ -596,28 +603,25 @@ static void *xs_talkv(struct xs_handle *h, xs_transaction_t t, mutex_lock(&h->request_mutex); - if (!xs_write_all(h->fd, &msg, sizeof(msg))) - goto fail; - for (i = 0; i < num_vecs; i++) if (!xs_write_all(h->fd, iovec[i].iov_base, iovec[i].iov_len)) goto fail; - ret = read_reply(h, &msg.type, len); + ret = read_reply(h, &reply_type, len); if (!ret) goto fail; mutex_unlock(&h->request_mutex); sigaction(SIGPIPE, &oldact, NULL); - if (msg.type == XS_ERROR) { + if (reply_type == XS_ERROR) { saved_errno = get_error(ret); free(ret); errno = saved_errno; return NULL; } - if (msg.type != type) { + if (reply_type != msg->type) { free(ret); saved_errno = EBADF; goto close_fd; @@ -650,11 +654,15 @@ static void *xs_single(struct xs_handle *h, xs_transaction_t t, const char *string, unsigned int *len) { - struct iovec iovec; + struct xsd_sockmsg msg = { .type = type, .tx_id = t }; + struct iovec iov[2]; + + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = (void *)string; + iov[1].iov_len = strlen(string) + 1; - iovec.iov_base = (void *)string; - iovec.iov_len = strlen(string) + 1; - return xs_talkv(h, t, type, &iovec, 1, len); + return xs_talkv(h, iov, ARRAY_SIZE(iov), len); } static bool xs_bool(char *reply) @@ -691,21 +699,25 @@ static char **xs_directory_common(char *strings, unsigned int len, static char **xs_directory_part(struct xs_handle *h, xs_transaction_t t, const char *path, unsigned int *num) { + struct xsd_sockmsg msg = { .type = XS_DIRECTORY_PART, .tx_id = t }; unsigned int off, result_len; char gen[24], offstr[8]; - struct iovec iovec[2]; + struct iovec iov[3]; char *result = NULL, *strings = NULL; memset(gen, 0, sizeof(gen)); - iovec[0].iov_base = (void *)path; - iovec[0].iov_len = strlen(path) + 1; for (off = 0;;) { snprintf(offstr, sizeof(offstr), "%u", off); - iovec[1].iov_base = (void *)offstr; - iovec[1].iov_len = strlen(offstr) + 1; - result = xs_talkv(h, t, XS_DIRECTORY_PART, iovec, 2, - &result_len); + + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = (void *)path; + iov[1].iov_len = strlen(path) + 1; + iov[2].iov_base = (void *)offstr; + iov[2].iov_len = strlen(offstr) + 1; + + result = xs_talkv(h, iov, ARRAY_SIZE(iov), &result_len); /* If XS_DIRECTORY_PART isn't supported return E2BIG. */ if (!result) { @@ -774,15 +786,17 @@ void *xs_read(struct xs_handle *h, xs_transaction_t t, bool xs_write(struct xs_handle *h, xs_transaction_t t, const char *path, const void *data, unsigned int len) { - struct iovec iovec[2]; + struct xsd_sockmsg msg = { .type = XS_WRITE, .tx_id = t }; + struct iovec iov[3]; - iovec[0].iov_base = (void *)path; - iovec[0].iov_len = strlen(path) + 1; - iovec[1].iov_base = (void *)data; - iovec[1].iov_len = len; + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = (void *)path; + iov[1].iov_len = strlen(path) + 1; + iov[2].iov_base = (void *)data; + iov[2].iov_len = len; - return xs_bool(xs_talkv(h, t, XS_WRITE, iovec, - ARRAY_SIZE(iovec), NULL)); + return xs_bool(xs_talkv(h, iov, ARRAY_SIZE(iov), NULL)); } /* Create a new directory. @@ -846,34 +860,37 @@ bool xs_set_permissions(struct xs_handle *h, struct xs_permissions *perms, unsigned int num_perms) { + struct xsd_sockmsg msg = { .type = XS_SET_PERMS, .tx_id = t }; unsigned int i; - struct iovec iov[1+num_perms]; + struct iovec iov[2 + num_perms]; + + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = (void *)path; + iov[1].iov_len = strlen(path) + 1; - iov[0].iov_base = (void *)path; - iov[0].iov_len = strlen(path) + 1; - for (i = 0; i < num_perms; i++) { char buffer[MAX_STRLEN(unsigned int)+1]; if (!xenstore_perm_to_string(&perms[i], buffer, sizeof(buffer))) goto unwind; - iov[i+1].iov_base = strdup(buffer); - iov[i+1].iov_len = strlen(buffer) + 1; + iov[i + 2].iov_base = strdup(buffer); + iov[i + 2].iov_len = strlen(buffer) + 1; if (!iov[i+1].iov_base) goto unwind; } - if (!xs_bool(xs_talkv(h, t, XS_SET_PERMS, iov, 1+num_perms, NULL))) + if (!xs_bool(xs_talkv(h, iov, ARRAY_SIZE(iov), NULL))) goto unwind; for (i = 0; i < num_perms; i++) - free(iov[i+1].iov_base); + free(iov[i + 2].iov_base); return true; unwind: num_perms = i; for (i = 0; i < num_perms; i++) - free_no_errno(iov[i+1].iov_base); + free_no_errno(iov[i + 2].iov_base); return false; } @@ -890,7 +907,8 @@ bool xs_restrict(struct xs_handle *h, unsigned domid) */ bool xs_watch(struct xs_handle *h, const char *path, const char *token) { - struct iovec iov[2]; + struct xsd_sockmsg msg = { .type = XS_WATCH }; + struct iovec iov[3]; #ifdef USE_PTHREAD #define DEFAULT_THREAD_STACKSIZE (16 * 1024) @@ -948,13 +966,14 @@ bool xs_watch(struct xs_handle *h, const char *path, const char *token) mutex_unlock(&h->request_mutex); #endif - iov[0].iov_base = (void *)path; - iov[0].iov_len = strlen(path) + 1; - iov[1].iov_base = (void *)token; - iov[1].iov_len = strlen(token) + 1; + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = (void *)path; + iov[1].iov_len = strlen(path) + 1; + iov[2].iov_base = (void *)token; + iov[2].iov_len = strlen(token) + 1; - return xs_bool(xs_talkv(h, XBT_NULL, XS_WATCH, iov, - ARRAY_SIZE(iov), NULL)); + return xs_bool(xs_talkv(h, iov, ARRAY_SIZE(iov), NULL)); } @@ -1067,20 +1086,22 @@ char **xs_read_watch(struct xs_handle *h, unsigned int *num) */ bool xs_unwatch(struct xs_handle *h, const char *path, const char *token) { - struct iovec iov[2]; + struct xsd_sockmsg sockmsg = { .type = XS_UNWATCH }; + struct iovec iov[3]; struct xs_stored_msg *msg, *tmsg; bool res; char *s, *p; unsigned int i; char *l_token, *l_path; - iov[0].iov_base = (char *)path; - iov[0].iov_len = strlen(path) + 1; - iov[1].iov_base = (char *)token; - iov[1].iov_len = strlen(token) + 1; + iov[0].iov_base = &sockmsg; + iov[0].iov_len = sizeof(sockmsg); + iov[1].iov_base = (char *)path; + iov[1].iov_len = strlen(path) + 1; + iov[2].iov_base = (char *)token; + iov[2].iov_len = strlen(token) + 1; - res = xs_bool(xs_talkv(h, XBT_NULL, XS_UNWATCH, iov, - ARRAY_SIZE(iov), NULL)); + res = xs_bool(xs_talkv(h, iov, ARRAY_SIZE(iov), NULL)); if (!h->unwatch_filter) /* Don't filter the watch list */ return res; @@ -1173,43 +1194,47 @@ bool xs_introduce_domain(struct xs_handle *h, unsigned int domid, unsigned long mfn, unsigned int eventchn) { + struct xsd_sockmsg msg = { .type = XS_INTRODUCE }; char domid_str[MAX_STRLEN(domid)]; char mfn_str[MAX_STRLEN(mfn)]; char eventchn_str[MAX_STRLEN(eventchn)]; - struct iovec iov[3]; + struct iovec iov[4]; snprintf(domid_str, sizeof(domid_str), "%u", domid); snprintf(mfn_str, sizeof(mfn_str), "%lu", mfn); snprintf(eventchn_str, sizeof(eventchn_str), "%u", eventchn); - iov[0].iov_base = domid_str; - iov[0].iov_len = strlen(domid_str) + 1; - iov[1].iov_base = mfn_str; - iov[1].iov_len = strlen(mfn_str) + 1; - iov[2].iov_base = eventchn_str; - iov[2].iov_len = strlen(eventchn_str) + 1; + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = domid_str; + iov[1].iov_len = strlen(domid_str) + 1; + iov[2].iov_base = mfn_str; + iov[2].iov_len = strlen(mfn_str) + 1; + iov[3].iov_base = eventchn_str; + iov[3].iov_len = strlen(eventchn_str) + 1; - return xs_bool(xs_talkv(h, XBT_NULL, XS_INTRODUCE, iov, - ARRAY_SIZE(iov), NULL)); + return xs_bool(xs_talkv(h, iov, ARRAY_SIZE(iov), NULL)); } bool xs_set_target(struct xs_handle *h, unsigned int domid, unsigned int target) { + struct xsd_sockmsg msg = { .type = XS_SET_TARGET }; char domid_str[MAX_STRLEN(domid)]; char target_str[MAX_STRLEN(target)]; - struct iovec iov[2]; + struct iovec iov[3]; snprintf(domid_str, sizeof(domid_str), "%u", domid); snprintf(target_str, sizeof(target_str), "%u", target); - iov[0].iov_base = domid_str; - iov[0].iov_len = strlen(domid_str) + 1; - iov[1].iov_base = target_str; - iov[1].iov_len = strlen(target_str) + 1; + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = domid_str; + iov[1].iov_len = strlen(domid_str) + 1; + iov[2].iov_base = target_str; + iov[2].iov_len = strlen(target_str) + 1; - return xs_bool(xs_talkv(h, XBT_NULL, XS_SET_TARGET, iov, - ARRAY_SIZE(iov), NULL)); + return xs_bool(xs_talkv(h, iov, ARRAY_SIZE(iov), NULL)); } static void * single_with_domid(struct xs_handle *h, @@ -1305,15 +1330,17 @@ out: char *xs_control_command(struct xs_handle *h, const char *cmd, void *data, unsigned int len) { - struct iovec iov[2]; + struct xsd_sockmsg msg = { .type = XS_CONTROL }; + struct iovec iov[3]; - iov[0].iov_base = (void *)cmd; - iov[0].iov_len = strlen(cmd) + 1; - iov[1].iov_base = data; - iov[1].iov_len = len; + iov[0].iov_base = &msg; + iov[0].iov_len = sizeof(msg); + iov[1].iov_base = (void *)cmd; + iov[1].iov_len = strlen(cmd) + 1; + iov[2].iov_base = data; + iov[2].iov_len = len; - return xs_talkv(h, XBT_NULL, XS_CONTROL, iov, - ARRAY_SIZE(iov), NULL); + return xs_talkv(h, iov, ARRAY_SIZE(iov), NULL); } char *xs_debug_command(struct xs_handle *h, const char *cmd, -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 07:44:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 07:44:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764765.1175279 (Exim 4.92) (envelope-from ) id 1sWt9E-0006Ty-A7; Thu, 25 Jul 2024 07:44:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764765.1175279; Thu, 25 Jul 2024 07:44: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 1sWt9E-0006Tq-7D; Thu, 25 Jul 2024 07:44:24 +0000 Received: by outflank-mailman (input) for mailman id 764765; Thu, 25 Jul 2024 07:44:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9C-0006Ta-DA for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9C-0008Sx-CL for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWt9C-0002WG-BU for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=vDHkQSLBPdPD4pBuYVICWKpFMp2l/ZNJiSA3Z2BEG2E=; b=iSuetbNlC0vuFqEWxeCsyFcxqc 1qlbQO6Q/BXO22honqObqZQ+tHm8lGBMIUDGMDzSn69w3eTB62ht5OKJ88d+yDjjpRxuusWAr+ieD 4TpS1SFZufw5QgkX4iWf2+jmoZ3Q2MNirk1ND5FujnkHpbJiz6uzlRMRojfbOGmYQfiI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/libxs: Rationalise the definition of struct xs_handle Message-Id: Date: Thu, 25 Jul 2024 07:44:22 +0000 commit f050c03ce2ad0095ff0bec5f9ec673bb2026cf16 Author: Andrew Cooper AuthorDate: Thu Jul 18 12:03:03 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 23 15:11:27 2024 +0100 tools/libxs: Rationalise the definition of struct xs_handle Right now there are two completely different struct xs_handle definitions, depend on #ifdef USE_PTHREAD. One is quite well hidden, and often escapes updates. Rework struct xs_handle using some interior ifdefary. It's slightly longer, but much easier to follow. Importanly, this makes it much harder to forget the !PTHREAD case when adding a "common" variable. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/libs/store/xs.c | 77 +++++++++++++++++++++++++-------------------------- 1 file changed, 37 insertions(+), 40 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 0ff27ef023..60f83ff198 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -40,6 +40,14 @@ #include #include +#ifdef USE_PTHREAD +# include +#endif + +#ifdef USE_DLSYM +# include +#endif + #ifndef O_CLOEXEC #define O_CLOEXEC 0 #endif @@ -54,14 +62,6 @@ struct xs_stored_msg { char *body; }; -#ifdef USE_PTHREAD - -#include - -#ifdef USE_DLSYM -#include -#endif - struct xs_handle { /* Communications channel to xenstore daemon. */ int fd; @@ -71,16 +71,20 @@ struct xs_handle { * A read thread which pulls messages off the comms channel and * signals waiters. */ +#ifdef USE_PTHREAD pthread_t read_thr; int read_thr_exists; +#endif /* * A list of fired watch messages, protected by a mutex. Users can * wait on the conditional variable until a watch is pending. */ XEN_TAILQ_HEAD(, struct xs_stored_msg) watch_list; +#ifdef USE_PTHREAD pthread_mutex_t watch_mutex; pthread_cond_t watch_condvar; +#endif /* Clients can select() on this pipe to wait for a watch to fire. */ int watch_pipe[2]; @@ -93,6 +97,7 @@ struct xs_handle { * conditional variable for its response. */ XEN_TAILQ_HEAD(, struct xs_stored_msg) reply_list; +#ifdef USE_PTHREAD pthread_mutex_t reply_mutex; pthread_cond_t reply_condvar; @@ -112,55 +117,47 @@ struct xs_handle { * reply_mutex * watch_mutex */ +#endif }; -#define mutex_lock(m) pthread_mutex_lock(m) -#define mutex_unlock(m) pthread_mutex_unlock(m) -#define condvar_signal(c) pthread_cond_signal(c) -#define condvar_wait(c,m) pthread_cond_wait(c,m) -#define cleanup_push(f, a) \ - pthread_cleanup_push((void (*)(void *))(f), (void *)(a)) + +#ifdef USE_PTHREAD + +# define mutex_lock(m) pthread_mutex_lock(m) +# define mutex_unlock(m) pthread_mutex_unlock(m) +# define condvar_signal(c) pthread_cond_signal(c) +# define condvar_wait(c, m) pthread_cond_wait(c, m) +# define cleanup_push(f, a) pthread_cleanup_push((void (*)(void *))(f), (void *)(a)) /* * Some definitions of pthread_cleanup_pop() are a macro starting with an * end-brace. GCC then complains if we immediately precede that with a label. * Hence we insert a dummy statement to appease the compiler in this situation. */ -#define cleanup_pop(run) ((void)0); pthread_cleanup_pop(run) +# define cleanup_pop(run) ((void)0); pthread_cleanup_pop(run) -#define read_thread_exists(h) (h->read_thr_exists) +# define read_thread_exists(h) ((h)->read_thr_exists) /* Because pthread_cleanup_p* are not available when USE_PTHREAD is * disabled, use these macros which convert appropriately. */ -#define cleanup_push_heap(p) cleanup_push(free, p) -#define cleanup_pop_heap(run, p) cleanup_pop((run)) +# define cleanup_push_heap(p) cleanup_push(free, p) +# define cleanup_pop_heap(run, p) cleanup_pop((run)) static void *read_thread(void *arg); -#else /* !defined(USE_PTHREAD) */ +#else /* USE_PTHREAD */ -struct xs_handle { - int fd; - Xentoolcore__Active_Handle tc_ah; /* for restrict */ - XEN_TAILQ_HEAD(, struct xs_stored_msg) reply_list; - XEN_TAILQ_HEAD(, struct xs_stored_msg) watch_list; - /* Clients can select() on this pipe to wait for a watch to fire. */ - int watch_pipe[2]; - /* Filtering watch event in unwatch function? */ - bool unwatch_filter; -}; +# define mutex_lock(m) ((void)0) +# define mutex_unlock(m) ((void)0) +# define condvar_signal(c) ((void)0) +# define condvar_wait(c, m) ((void)0) +# define cleanup_push(f, a) ((void)0) +# define cleanup_pop(run) ((void)0) +# define read_thread_exists(h) (0) +# define cleanup_push_heap(p) ((void)0) +# define cleanup_pop_heap(run, p) do { if ((run)) free(p); } while(0) -#define mutex_lock(m) ((void)0) -#define mutex_unlock(m) ((void)0) -#define condvar_signal(c) ((void)0) -#define condvar_wait(c,m) ((void)0) -#define cleanup_push(f, a) ((void)0) -#define cleanup_pop(run) ((void)0) -#define read_thread_exists(h) (0) +#endif /* !USE_PTHREAD */ -#define cleanup_push_heap(p) ((void)0) -#define cleanup_pop_heap(run, p) do { if ((run)) free(p); } while(0) - -#endif static int read_message(struct xs_handle *h, int nonblocking); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 07:44:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 07:44:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764766.1175283 (Exim 4.92) (envelope-from ) id 1sWt9O-0006XK-BQ; Thu, 25 Jul 2024 07:44:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764766.1175283; Thu, 25 Jul 2024 07:44:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9O-0006XC-8m; Thu, 25 Jul 2024 07:44:34 +0000 Received: by outflank-mailman (input) for mailman id 764766; Thu, 25 Jul 2024 07:44:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9M-0006Ww-H8 for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9M-0008TC-GF for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWt9M-0002XB-EX for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=szGEWNBkZEYLiJEy1lvvgdrgQhx/UQkvc6l7di7LsBo=; b=fx9uehEsiLOy4PRPry/uotOCks HrIpF5fFcZUipU4DZZCMdPGhHOxQQ+GE3hF7Z5ebZzJhhAwBgfkv48OFU/+Y6vReZKUIUANFWxP6D NW2ZbZg9XhKZnWOErpDd4MOOHUcobyyFEPbgpZuoVbcF4XRz7qUYverDyJPJpO6F6Lt8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/libxs: Track whether we're using a socket or file Message-Id: Date: Thu, 25 Jul 2024 07:44:32 +0000 commit 046efe529e82b8b999d8453d4ea49cb817c3f9b5 Author: Andrew Cooper AuthorDate: Fri Jun 28 19:40:27 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 23 15:11:27 2024 +0100 tools/libxs: Track whether we're using a socket or file It will determine whether to use writev() or sendmsg(). Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/libs/store/xs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 60f83ff198..3b3ee3d780 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -65,6 +65,9 @@ struct xs_stored_msg { struct xs_handle { /* Communications channel to xenstore daemon. */ int fd; + + bool is_socket; /* is @fd a file or socket? */ + Xentoolcore__Active_Handle tc_ah; /* for restrict */ /* @@ -297,7 +300,9 @@ static struct xs_handle *get_handle(const char *connect_to) if (stat(connect_to, &buf) != 0) goto err; - if (S_ISSOCK(buf.st_mode)) + h->is_socket = S_ISSOCK(buf.st_mode); + + if (h->is_socket) h->fd = get_socket(connect_to); else h->fd = get_dev(connect_to); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 07:44:44 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 07:44:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764768.1175286 (Exim 4.92) (envelope-from ) id 1sWt9Y-0006aB-Ct; Thu, 25 Jul 2024 07:44:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764768.1175286; Thu, 25 Jul 2024 07:44:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9Y-0006a4-AD; Thu, 25 Jul 2024 07:44:44 +0000 Received: by outflank-mailman (input) for mailman id 764768; Thu, 25 Jul 2024 07:44:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9W-0006Zs-Kp for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9W-0008TJ-JC for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWt9W-0002Xf-IQ for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=N6Zg1wXXordrWhIwk6yvE9V6nwqZFdFwBGYIFKmIpBo=; b=4xwIraNlwbaTOe/XxeN9YlH/X6 eJMma9RTJZ5Z2zqDsOo5hF6dj6JVdsqedgnc3jdW/6lBiKRVrncp2T+wDBpoUkUl5EOXjlKS3PpDO fK6POEKnvsO5RQl2Ie67JQ3sOTZJrr0ecECCbqgHFUrXPRQZKq1MfaBOikT19NOyd+g4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/libxs: Use writev()/sendmsg() instead of write() Message-Id: Date: Thu, 25 Jul 2024 07:44:42 +0000 commit ebaeb0c64a6d363313e213eb9995f48307604ebb Author: Andrew Cooper AuthorDate: Thu Jul 18 12:55:48 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 23 15:11:27 2024 +0100 tools/libxs: Use writev()/sendmsg() instead of write() With the input data now conveniently arranged, use writev()/sendmsg() instead of decomposing it into write() calls. This causes all requests to be submitted with a single system call, rather than at least two. While in principle short writes can occur, the chances of it happening are slim given that most xenbus comms are only a handful of bytes. Nevertheless, provide {writev,sendmsg}_exact() wrappers which take care of resubmitting on EINTR or short write. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/libs/store/xs.c | 88 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 3 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 3b3ee3d780..1dd9539717 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -563,6 +563,89 @@ static void *read_reply( return body; } +/* + * Update an iov/nr pair after an incomplete writev()/sendmsg(). + * + * Awkwardly, nr has different widths and signs between writev() and + * sendmsg(), so we take it and return it by value, rather than by pointer. + */ +static size_t update_iov(struct iovec **p_iov, size_t nr, size_t res) +{ + struct iovec *iov = *p_iov; + + /* Skip fully complete elements, including empty elements. */ + while (nr && res >= iov->iov_len) { + res -= iov->iov_len; + nr--; + iov++; + } + + /* Partial element, adjust base/len. */ + if (res) { + iov->iov_len -= res; + iov->iov_base += res; + } + + *p_iov = iov; + + return nr; +} + +/* + * Wrapper around sendmsg() to resubmit on EINTR or short write. Returns + * @true if all data was transmitted, or @false with errno for an error. + * Note: May alter @iov in place on resubmit. + */ +static bool sendmsg_exact(int fd, struct iovec *iov, unsigned int nr) +{ + struct msghdr hdr = { + .msg_iov = iov, + .msg_iovlen = nr, + }; + + while (hdr.msg_iovlen) { + ssize_t res = sendmsg(fd, &hdr, 0); + + if (res < 0 && errno == EINTR) + continue; + if (res <= 0) + return false; + + hdr.msg_iovlen = update_iov(&hdr.msg_iov, hdr.msg_iovlen, res); + } + + return true; +} + +/* + * Wrapper around sendmsg() to resubmit on EINTR or short write. Returns + * @true if all data was transmitted, or @false with errno for an error. + * Note: May alter @iov in place on resubmit. + */ +static bool writev_exact(int fd, struct iovec *iov, unsigned int nr) +{ + while (nr) { + ssize_t res = writev(fd, iov, nr); + + if (res < 0 && errno == EINTR) + continue; + if (res <= 0) + return false; + + nr = update_iov(&iov, nr, res); + } + + return true; +} + +static bool write_request(struct xs_handle *h, struct iovec *iov, unsigned int nr) +{ + if (h->is_socket) + return sendmsg_exact(h->fd, iov, nr); + else + return writev_exact(h->fd, iov, nr); +} + /* * Send message to xenstore, get malloc'ed reply. NULL and set errno on error. * @@ -605,9 +688,8 @@ static void *xs_talkv(struct xs_handle *h, mutex_lock(&h->request_mutex); - for (i = 0; i < num_vecs; i++) - if (!xs_write_all(h->fd, iovec[i].iov_base, iovec[i].iov_len)) - goto fail; + if (!write_request(h, iovec, num_vecs)) + goto fail; ret = read_reply(h, &reply_type, len); if (!ret) -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 07:44:53 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 07:44:53 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764769.1175291 (Exim 4.92) (envelope-from ) id 1sWt9h-0006ck-El; Thu, 25 Jul 2024 07:44:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764769.1175291; Thu, 25 Jul 2024 07:44:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9h-0006cc-Bn; Thu, 25 Jul 2024 07:44:53 +0000 Received: by outflank-mailman (input) for mailman id 764769; Thu, 25 Jul 2024 07:44:52 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9g-0006cW-NA for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:52 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9g-0008Ti-MH for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:52 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWt9g-0002YK-LS for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:44:52 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=D40EjlUETGYCyWz5GUdIdBJuCAUEEQn8VO6FhrWwOrQ=; b=Mew4uhK5QfATVDZHYMAmoJYW2q Vi7Fk5wh/+9XLPNoJHJ58cFofqPa5fFhoB/g7JHdKDkLyk7t9eO1lhr1J7t5o4BkN3T+1kGwPWmx0 Z+DyD7ZpSxlO0dchrak9mI6PRlj1asfyEv5qibDLopnm+P1q3SmkNLpala0NTcFZmjdM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/libxs: Stop playing with SIGPIPE Message-Id: Date: Thu, 25 Jul 2024 07:44:52 +0000 commit a17b6db9b00784b409c35e3017dc45aed1ec2bfb Author: Andrew Cooper AuthorDate: Fri Jun 28 16:33:56 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 23 15:11:27 2024 +0100 tools/libxs: Stop playing with SIGPIPE It's very rude for a library to play with signals behind the back of the application, no matter ones views on the default behaviour of SIGPIPE under POSIX. Even if the application doesn't care about the xenstored socket, it my care about others. This logic has existed since xenstore/xenstored was originally added in commit 29c9e570b1ed ("Add xenstore daemon and library") in 2005. It's also unnecessary. Pass MSG_NOSIGNAL when talking to xenstored over a pipe (to avoid sucumbing to SIGPIPE if xenstored has crashed), and forgo any playing with the signal disposition. This has a side benefit of saving 2 syscalls per xenstore request. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/libs/store/xs.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 1dd9539717..5d9c7151e8 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -604,7 +604,7 @@ static bool sendmsg_exact(int fd, struct iovec *iov, unsigned int nr) }; while (hdr.msg_iovlen) { - ssize_t res = sendmsg(fd, &hdr, 0); + ssize_t res = sendmsg(fd, &hdr, MSG_NOSIGNAL); if (res < 0 && errno == EINTR) continue; @@ -664,7 +664,6 @@ static void *xs_talkv(struct xs_handle *h, void *ret = NULL; int saved_errno; unsigned int i, msg_len; - struct sigaction ignorepipe, oldact; /* Element 0 must be xsd_sockmsg */ assert(num_vecs >= 1); @@ -681,11 +680,6 @@ static void *xs_talkv(struct xs_handle *h, msg->len = msg_len; - ignorepipe.sa_handler = SIG_IGN; - sigemptyset(&ignorepipe.sa_mask); - ignorepipe.sa_flags = 0; - sigaction(SIGPIPE, &ignorepipe, &oldact); - mutex_lock(&h->request_mutex); if (!write_request(h, iovec, num_vecs)) @@ -697,7 +691,6 @@ static void *xs_talkv(struct xs_handle *h, mutex_unlock(&h->request_mutex); - sigaction(SIGPIPE, &oldact, NULL); if (reply_type == XS_ERROR) { saved_errno = get_error(ret); free(ret); @@ -716,7 +709,6 @@ fail: /* We're in a bad state, so close fd. */ saved_errno = errno; mutex_unlock(&h->request_mutex); - sigaction(SIGPIPE, &oldact, NULL); close_fd: close(h->fd); h->fd = -1; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 07:45:03 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 07:45:03 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764770.1175295 (Exim 4.92) (envelope-from ) id 1sWt9r-0006fb-Fk; Thu, 25 Jul 2024 07:45:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764770.1175295; Thu, 25 Jul 2024 07:45:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9r-0006fU-DD; Thu, 25 Jul 2024 07:45:03 +0000 Received: by outflank-mailman (input) for mailman id 764770; Thu, 25 Jul 2024 07:45:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9q-0006fE-Q9 for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWt9q-0008UF-PM for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWt9q-0002Z6-OP for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=J/jfH/MknD62S7FqwF/mIJZbxUBN54qdAs+6sYxI0fQ=; b=BDD47Ug+H7tw8vhmQRAcs8dnqI ivXSyMGO0BX3fA6Xoe/mnKKTQ/njIvxwXlWfyMz4b/SSI1kLFIFtqpTnmtwaM3y1+tVabbSVqW5BL DMD40fgpKrLNFIbGR3FLGYtyaU+AhM29fE2vJyOGqar25u8prUgMR1w9LaI1XoEIGbU8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] hotplug: Restore block-tap phy compatibility (again) Message-Id: Date: Thu, 25 Jul 2024 07:45:02 +0000 commit e4c7c2148afd5a02c36193c79e8ab62c86c5f0b0 Author: Jason Andryuk AuthorDate: Wed Jul 24 11:36:04 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:36:04 2024 +0200 hotplug: Restore block-tap phy compatibility (again) "$dev" needs to be set correctly for backendtype=phy as well as backendtype=tap. Move the setting into the conditional, so it can be handled properly for each. (dev could be captured during tap-ctl allocate for blktap module, but it would not be set properly for the find_device case. The backendtype=tap case would need to be handled regardless.) Fixes: f16ac12bd418 ("hotplug: Restore block-tap phy compatibility") Fixes: 76a484193dbb ("hotplug: Update block-tap") Signed-off-by: Jason Andryuk Reviewed-by: Anthony PERARD --- tools/hotplug/Linux/block-tap | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/hotplug/Linux/block-tap b/tools/hotplug/Linux/block-tap index 8661ce77e3..95970a61f6 100755 --- a/tools/hotplug/Linux/block-tap +++ b/tools/hotplug/Linux/block-tap @@ -204,13 +204,13 @@ add() tap_create fi - # Create nbd unix path. find_device/tap_create set pid & minor - dev=$( printf "/run/blktap-control/nbd%ld.%d" "$pid" "$minor" ) - xenstore_write "$XENBUS_PATH/pid" "$pid" xenstore_write "$XENBUS_PATH/minor" "$minor" if [ "$XENBUS_TYPE" = "vbd3" ] ; then + # Create nbd unix path. find_device/tap_create set pid & minor + dev=$( printf "/run/blktap-control/nbd%ld.%d" "$pid" "$minor" ) + # $dev, as a unix socket, has major:minor 0:0. If write_dev writes # physical-device, tapback would use that incorrect minor 0. So don't # write physical-device. @@ -218,6 +218,9 @@ add() success else + # Construct dev path from minor + dev="/dev/xen/blktap-2/tapdev$minor" + [ -b "$dev" ] || fatal "blktap \"$dev\" is not a block dev" write_dev "$dev" fi -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 07:45:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 07:45:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764771.1175299 (Exim 4.92) (envelope-from ) id 1sWtA1-0006hx-HN; Thu, 25 Jul 2024 07:45:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764771.1175299; Thu, 25 Jul 2024 07:45:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtA1-0006hq-Ef; Thu, 25 Jul 2024 07:45:13 +0000 Received: by outflank-mailman (input) for mailman id 764771; Thu, 25 Jul 2024 07:45:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtA0-0006hg-Sz for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtA0-0008UM-SF for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWtA0-0002Zs-RV for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=VnJBwvYpYw6QjGvlVHcvH23NsF3GU6gO8WhZUJmG6D8=; b=r1mSFi9XDqxMKzRriD8R5WMF9Z J0l98M8PcyqcfF17ynfNFoy2NKBvZwgnZ5CVMxfT0EEEXLbzRLeJjd7Ws573FGso3ggV38jcEfqT2 ffFqVEbUvZC9X77B+dSY7rdm8ksDUSdOdcYbHe6YffB7+FQnJd5m/Y/7zsMSM+Yz6d4Q=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] xen/riscv: introduce ANDN_INSN Message-Id: Date: Thu, 25 Jul 2024 07:45:12 +0000 commit 73c4a3fc94ca6cf9fbf51dc1417a2ea5d9cf5aaf Author: Oleksii Kurochko AuthorDate: Wed Jul 24 11:36:21 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:36:21 2024 +0200 xen/riscv: introduce ANDN_INSN RISC-V does a conditional toolchain for the Zbb extension (xen/arch/riscv/rules.mk), but unconditionally uses the ANDN instruction in emulate_xchg_1_2(). Fixes: 51dabd6312c ("xen/riscv: introduce cmpxchg.h") Suggested-by: Andrew Cooper Suggested-By: Jan Beulich Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich --- xen/arch/riscv/include/asm/cmpxchg.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/xen/arch/riscv/include/asm/cmpxchg.h b/xen/arch/riscv/include/asm/cmpxchg.h index d5e678c036..47d5299e62 100644 --- a/xen/arch/riscv/include/asm/cmpxchg.h +++ b/xen/arch/riscv/include/asm/cmpxchg.h @@ -18,6 +18,19 @@ : "r" (new) \ : "memory" ); +/* + * To not face an issue that gas doesn't understand ANDN instruction + * it is encoded using .insn directive. + */ +#ifdef __riscv_zbb +#define ANDN_INSN(rd, rs1, rs2) \ + ".insn r OP, 0x7, 0x20, " rd ", " rs1 ", " rs2 "\n" +#else +#define ANDN_INSN(rd, rs1, rs2) \ + "not " rd ", " rs2 "\n" \ + "and " rd ", " rs1 ", " rd "\n" +#endif + /* * For LR and SC, the A extension requires that the address held in rs1 be * naturally aligned to the size of the operand (i.e., eight-byte aligned @@ -48,7 +61,7 @@ \ asm volatile ( \ "0: lr.w" lr_sfx " %[old], %[ptr_]\n" \ - " andn %[scratch], %[old], %[mask]\n" \ + ANDN_INSN("%[scratch]", "%[old]", "%[mask]") \ " or %[scratch], %[scratch], %z[new_]\n" \ " sc.w" sc_sfx " %[scratch], %[scratch], %[ptr_]\n" \ " bnez %[scratch], 0b\n" \ -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 07:45:23 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 07:45:23 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764772.1175303 (Exim 4.92) (envelope-from ) id 1sWtAB-0006kc-JG; Thu, 25 Jul 2024 07:45:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764772.1175303; Thu, 25 Jul 2024 07:45:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAB-0006kU-GJ; Thu, 25 Jul 2024 07:45:23 +0000 Received: by outflank-mailman (input) for mailman id 764772; Thu, 25 Jul 2024 07:45:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAA-0006kO-W1 for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAA-0008UW-VB for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWtAA-0002aS-UO for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=6hTSUmSbRCoQSBT8pZzfLsonqsRr3s3Z8MJxetC9uJE=; b=kOVX66Rt0Qc7UST2w16lVzCkvC DlDDD6l4Qw9rtM5W9VecG9cOiMLafUTNYGx+mIfnZwf3eIgcyFd/srw+NcN7z0zhEDxUqsBBVKj7k D+KjNkt+OtDNCh4/TohwQ7ZmA1MCecT4ae02F3a3mo2rE+9CSI2GdnS1w1Dkd6ed+u4w=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/xstate: Use compression check helper in xstate_all() Message-Id: Date: Thu, 25 Jul 2024 07:45:22 +0000 commit b3f1cb51cf1d032021dabf3a9ae873ce9fb0e14b Author: Alejandro Vallejo AuthorDate: Wed Jul 24 11:36:55 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:36:55 2024 +0200 x86/xstate: Use compression check helper in xstate_all() Minor refactor to make xstate_all() use a helper rather than poking directly into the XSAVE header. No functional change Signed-off-by: Alejandro Vallejo Acked-by: Jan Beulich --- xen/arch/x86/include/asm/xstate.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/include/asm/xstate.h b/xen/arch/x86/include/asm/xstate.h index f4a8e5f814..f0eeb13b87 100644 --- a/xen/arch/x86/include/asm/xstate.h +++ b/xen/arch/x86/include/asm/xstate.h @@ -122,6 +122,12 @@ static inline uint64_t xgetbv(unsigned int index) return lo | ((uint64_t)hi << 32); } +static inline bool __nonnull(1) +xsave_area_compressed(const struct xsave_struct *xsave_area) +{ + return xsave_area->xsave_hdr.xcomp_bv & XSTATE_COMPACTION_ENABLED; +} + static inline bool xstate_all(const struct vcpu *v) { /* @@ -129,15 +135,8 @@ static inline bool xstate_all(const struct vcpu *v) * (in the legacy region of xsave area) are fixed, so saving * XSTATE_FP_SSE will not cause overwriting problem with XSAVES/XSAVEC. */ - return (v->arch.xsave_area->xsave_hdr.xcomp_bv & - XSTATE_COMPACTION_ENABLED) && + return xsave_area_compressed(v->arch.xsave_area) && (v->arch.xcr0_accum & XSTATE_LAZY & ~XSTATE_FP_SSE); } -static inline bool __nonnull(1) -xsave_area_compressed(const struct xsave_struct *xsave_area) -{ - return xsave_area->xsave_hdr.xcomp_bv & XSTATE_COMPACTION_ENABLED; -} - #endif /* __ASM_XSTATE_H */ -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 07:45:33 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 07:45:33 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764773.1175307 (Exim 4.92) (envelope-from ) id 1sWtAL-0006o8-Ls; Thu, 25 Jul 2024 07:45:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764773.1175307; Thu, 25 Jul 2024 07:45:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAL-0006o0-JH; Thu, 25 Jul 2024 07:45:33 +0000 Received: by outflank-mailman (input) for mailman id 764773; Thu, 25 Jul 2024 07:45:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAL-0006ns-2r for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAL-0008Ud-26 for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWtAL-0002bg-1E for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=SgTCpGV+b/K/CmVO8NNFGzFy/Fjp5NeoIl/G6bVzwBU=; b=gUu6294NfH0bWM8OWrr2UpahuD I45QfV8W2ENBDvQpL9WCXaYtM2uQURBijfgi2p4Gg58PFrCIBTzHrIjftUNfQADseXnYw2ccsRLzA pN/g8PtoO7exSjOLgPlwP+UqsG8B8S8PiLiQiA1T2uHrvh2vR9lhyKRX8h6/mU/j5dFs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/p2m: guard altp2m routines Message-Id: Date: Thu, 25 Jul 2024 07:45:33 +0000 commit 5e1a1ef4eb54aa16be21df0926bd6ee9f4a4e721 Author: Sergiy Kibrik AuthorDate: Wed Jul 24 11:37:34 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:37:34 2024 +0200 x86/p2m: guard altp2m routines Initialize and bring down altp2m only when it is supported by the platform, e.g. VMX. Also guard p2m_altp2m_propagate_change(). The purpose of that is the possibility to disable altp2m support and exclude its code from the build completely, when it's not supported by the target platform. Here hvm_altp2m_supported() is being used to check for ALTP2M availability, which is only defined if HVM enabled, so a stub for that routine added for !HVM configuration as well. Signed-off-by: Sergiy Kibrik Acked-by: Jan Beulich --- xen/arch/x86/include/asm/hvm/hvm.h | 5 +++++ xen/arch/x86/mm/p2m-basic.c | 9 +++++---- xen/arch/x86/mm/p2m-ept.c | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/include/asm/hvm/hvm.h b/xen/arch/x86/include/asm/hvm/hvm.h index 1c01e22c8e..277648dd18 100644 --- a/xen/arch/x86/include/asm/hvm/hvm.h +++ b/xen/arch/x86/include/asm/hvm/hvm.h @@ -828,6 +828,11 @@ static inline bool hvm_hap_supported(void) return false; } +static inline bool hvm_altp2m_supported(void) +{ + return false; +} + static inline bool hvm_nested_virt_supported(void) { return false; diff --git a/xen/arch/x86/mm/p2m-basic.c b/xen/arch/x86/mm/p2m-basic.c index 25d27a0a9f..08007a687c 100644 --- a/xen/arch/x86/mm/p2m-basic.c +++ b/xen/arch/x86/mm/p2m-basic.c @@ -128,7 +128,7 @@ int p2m_init(struct domain *d) return rc; } - rc = p2m_init_altp2m(d); + rc = hvm_altp2m_supported() ? p2m_init_altp2m(d) : 0; if ( rc ) { p2m_teardown_hostp2m(d); @@ -197,11 +197,12 @@ void p2m_final_teardown(struct domain *d) { if ( is_hvm_domain(d) ) { + if ( hvm_altp2m_supported() ) + p2m_teardown_altp2m(d); /* - * We must tear down both of them unconditionally because - * we initialise them unconditionally. + * We must tear down nestedp2m unconditionally because + * we initialise it unconditionally. */ - p2m_teardown_altp2m(d); p2m_teardown_nestedp2m(d); } diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c index 9925c560c1..2ea574ca6a 100644 --- a/xen/arch/x86/mm/p2m-ept.c +++ b/xen/arch/x86/mm/p2m-ept.c @@ -990,7 +990,7 @@ out: if ( is_epte_present(&old_entry) ) ept_free_entry(p2m, &old_entry, target); - if ( entry_written && p2m_is_hostp2m(p2m) ) + if ( hvm_altp2m_supported() && entry_written && p2m_is_hostp2m(p2m) ) { ret = p2m_altp2m_propagate_change(d, _gfn(gfn), mfn, order, p2mt, p2ma); if ( !rc ) -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 07:45:43 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 07:45:43 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764775.1175311 (Exim 4.92) (envelope-from ) id 1sWtAV-0006qn-NV; Thu, 25 Jul 2024 07:45:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764775.1175311; Thu, 25 Jul 2024 07:45:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAV-0006qf-Ki; Thu, 25 Jul 2024 07:45:43 +0000 Received: by outflank-mailman (input) for mailman id 764775; Thu, 25 Jul 2024 07:45:43 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAV-0006qS-6C for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:43 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAV-0008Up-4z for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:43 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWtAV-0002cC-4E for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:43 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=JH4JWybsa7816cZXnZh4NXyOzrAEthDAOH/H3eODSnY=; b=smEPt4bo8ANYXvubbSI+pskBwD 6w425eMtUKQpnyUT3ITnX/ce4kWCadauq1g5q/vgai7oNBmVAtL8nhTZQN6xX5BnTbFCM/g5SXQMN 2fv4GLqC2c6azFrJPDS4Zaw78OjPdN6/EPNN5SFv6nf4fxmbZDj/FZ9GA3xx0A2CED3A=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] MAINTAINERS: Add me and Bertrand as device tree maintainers Message-Id: Date: Thu, 25 Jul 2024 07:45:43 +0000 commit 832cdad6c9cbf53239047d1f1522d87b3b4046a8 Author: Michal Orzel AuthorDate: Wed Jul 24 11:38:13 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:38:13 2024 +0200 MAINTAINERS: Add me and Bertrand as device tree maintainers With Arm port being the major recipient of dt related patches and the future need of incorporating dt support into other ports, we'd like to keep an eye on these changes. Signed-off-by: Michal Orzel Acked-by: Bertrand Marquis Acked-by: Stefano Stabellini --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index fcec4377b1..7c524a8a93 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -287,6 +287,8 @@ F: automation/ DEVICE TREE M: Stefano Stabellini M: Julien Grall +M: Bertrand Marquis +M: Michal Orzel S: Supported F: xen/common/libfdt/ F: xen/common/device_tree.c -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 07:45:53 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 07:45:53 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764776.1175315 (Exim 4.92) (envelope-from ) id 1sWtAf-0006tY-Op; Thu, 25 Jul 2024 07:45:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764776.1175315; Thu, 25 Jul 2024 07:45:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAf-0006tQ-M7; Thu, 25 Jul 2024 07:45:53 +0000 Received: by outflank-mailman (input) for mailman id 764776; Thu, 25 Jul 2024 07:45:53 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAf-0006tH-8j for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:53 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAf-0008VG-7x for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:53 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWtAf-0002ce-7E for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:45:53 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=HpvFklU8ESQpejjb4GWs7PBaaoDHkRRkhl8zlBCTOqk=; b=jABuodk8kEOxC9gsLAFOIsb7oI RWjQnGnbPhI8UpACyky6F7khlyxpIBp5DEmmeNLg8itif8cdQwuj3ivSsSCkMRsukeaJmwt6EEuCb 4tzTNGn45SIlokrd4NUmj87wY6SFoRd8VCGnZ69KJsgbzicP7IhV/UN8g6NxxmrCwVvw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/cpuid: use fallthrough pseudo keyword Message-Id: Date: Thu, 25 Jul 2024 07:45:53 +0000 commit 9d3c8dc1c030bdaf8429fa71310c4c135dd8e1d9 Author: Federico Serafini AuthorDate: Wed Jul 24 11:42:53 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:42:53 2024 +0200 x86/cpuid: use fallthrough pseudo keyword The current comment making explicit the fallthrough intention does not follow the agreed syntax: replace it with the pseduo keyword. No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/cpuid.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c index a822e80c7e..2a777436ee 100644 --- a/xen/arch/x86/cpuid.c +++ b/xen/arch/x86/cpuid.c @@ -97,9 +97,8 @@ void guest_cpuid(const struct vcpu *v, uint32_t leaf, if ( is_viridian_domain(d) ) return cpuid_viridian_leaves(v, leaf, subleaf, res); + fallthrough; /* - * Fallthrough. - * * Intel reserve up until 0x4fffffff for hypervisor use. AMD reserve * only until 0x400000ff, but we already use double that. */ -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 07:46:04 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 07:46:04 +0000 Received: from list by lists.xenproject.org with outflank-mailman.764777.1175319 (Exim 4.92) (envelope-from ) id 1sWtAq-0006wF-Q9; Thu, 25 Jul 2024 07:46:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 764777.1175319; Thu, 25 Jul 2024 07:46:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAq-0006w7-Na; Thu, 25 Jul 2024 07:46:04 +0000 Received: by outflank-mailman (input) for mailman id 764777; Thu, 25 Jul 2024 07:46:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAp-0006vu-Bl for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:46:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWtAp-0008Vd-Aw for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:46:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWtAp-0002db-A8 for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 07:46:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=bgcmSVXjKIFP7diyzVgq8XQx67BH/QdpFr/p2HLAKkw=; b=p6zoi7mt0jSEY6T4SymEe8NPb0 hrFGIZ/K7qEz4CLqnssjJppTsp5G/qfcbFm0c+pT4HZFK/2F7tcgDV0tYVFuA3/t5eGtuHH8BFLyp t0O3E0SqaUEXTPksB/rMgzlRwIBGvL6LKv2RtE290JX+fquKGTvwAwRW1vR7TKfKl4zo=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/domctl: address a violation of MISRA C Rule 16.3 Message-Id: Date: Thu, 25 Jul 2024 07:46:03 +0000 commit c6661e89102065d3e04799b9baa9f928a1fc40da Author: Federico Serafini AuthorDate: Wed Jul 24 11:43:18 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 24 11:43:18 2024 +0200 x86/domctl: address a violation of MISRA C Rule 16.3 Add missing break statement to address a violation of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/domctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c index 9190e11faa..68b5b46d1a 100644 --- a/xen/arch/x86/domctl.c +++ b/xen/arch/x86/domctl.c @@ -517,6 +517,7 @@ long arch_do_domctl( default: ret = -ENOSYS; + break; } break; } -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 14:33:12 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 14:33:12 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765031.1175583 (Exim 4.92) (envelope-from ) id 1sWzWi-0004Kt-O3; Thu, 25 Jul 2024 14:33:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765031.1175583; Thu, 25 Jul 2024 14:33:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzWi-0004Kl-LM; Thu, 25 Jul 2024 14:33:04 +0000 Received: by outflank-mailman (input) for mailman id 765031; Thu, 25 Jul 2024 14:33:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzWh-0004Kf-Ln for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzWh-0000Dy-Fr for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWzWh-0007Pa-EZ for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=5zO9ADplk6yRXMvLUgWlRdoYq3uZKATeHIsM2psB/DY=; b=CxdIdYi3JCHZRtZXKbACMW++yZ +aV6sorHjMyN36+0XagxpZwK9R+8JrRtrW77MH+eZ/B9x0zaXKxdxVNCXSQ0dZiw71jIaKDsaAZvK JhaD/tJ1IHpdzE8JtU571637P2gn+/yy0sd79bThEOuz121SCn5OYXBojGwJ7pNtHZvA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] x86/physdev: Return pirq that irq was already mapped to Message-Id: Date: Thu, 25 Jul 2024 14:33:03 +0000 commit f9f3062f11e144438fac9e9da6aa4cb41a6009b1 Author: Jiqian Chen AuthorDate: Thu Jul 25 16:20:17 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 25 16:20:17 2024 +0200 x86/physdev: Return pirq that irq was already mapped to Fix bug introduced by 0762e2502f1f ("x86/physdev: factor out the code to allocate and map a pirq"). After that re-factoring, when pirq<0 and current_pirq>0, it means caller want to allocate a free pirq for irq but irq already has a mapped pirq, then it returns the negative pirq, so it fails. However, the logic before that re-factoring is different, it should return the current_pirq that irq was already mapped to and make the call success. Fixes: 0762e2502f1f ("x86/physdev: factor out the code to allocate and map a pirq") Signed-off-by: Jiqian Chen Signed-off-by: Huang Rui Signed-off-by: Jiqian Chen Reviewed-by: Jan Beulich master commit: 0d2b87b5adfc19e87e9027d996db204c66a47f30 master date: 2024-07-08 14:46:12 +0100 --- xen/arch/x86/irq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 5dae8bd1b9..6b1f338eae 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2914,6 +2914,7 @@ static int allocate_pirq(struct domain *d, int index, int pirq, int irq, d->domain_id, index, pirq, current_pirq); if ( current_pirq < 0 ) return -EBUSY; + pirq = current_pirq; } else if ( type == MAP_PIRQ_TYPE_MULTI_MSI ) { -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 14:33:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 14:33:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765032.1175586 (Exim 4.92) (envelope-from ) id 1sWzWs-0004Mg-PN; Thu, 25 Jul 2024 14:33:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765032.1175586; Thu, 25 Jul 2024 14:33:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzWs-0004MZ-Mm; Thu, 25 Jul 2024 14:33:14 +0000 Received: by outflank-mailman (input) for mailman id 765032; Thu, 25 Jul 2024 14:33:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzWr-0004ML-LL for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzWr-0000E4-Jh for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWzWr-0007S0-I0 for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=lVwKCzbgJMq02/dqEPtzbuRgVhvrhbzBdUu1756SYOg=; b=aUkdAGecpucyhMMHvLDhqvbPeE sgMisol/VRNhjWHVb1b9aU9SE992znMorPKO92H+vJT5rx/zqB1qqnhkt1jkDIWJQrFvomiI6BUAJ qa4sq7LzGoPUxbFYqy+BG2PH2GTfTgYfACZhYQgz23Wz2SZ5phknBNHy2elQbFfJcNfs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] tools/libxs: Fix fcntl() invocation in set_cloexec() Message-Id: Date: Thu, 25 Jul 2024 14:33:13 +0000 commit 81f1e807fadb8111d71b78191e01ca688d74eac7 Author: Andrew Cooper AuthorDate: Thu Jul 25 16:20:53 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 25 16:20:53 2024 +0200 tools/libxs: Fix fcntl() invocation in set_cloexec() set_cloexec() had a bit too much copy&pate from setnonblock(), and insufficient testing on ancient versions of Linux... As written (emulating ancient linux by undef'ing O_CLOEXEC), strace shows: open("/dev/xen/xenbus", O_RDWR) = 3 fcntl(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) fcntl(3, 0x8003 /* F_??? */, 0x7ffe4a771d90) = -1 EINVAL (Invalid argument) close(3) = 0 which is obviously nonsense. Switch F_GETFL -> F_GETFD, and fix the second invocation to use F_SETFD. With this, strace is rather happer: open("/dev/xen/xenbus", O_RDWR) = 3 fcntl(3, F_GETFD) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 Fixes: bf7c1464706a ("tools/libxs: Fix CLOEXEC handling in get_dev()") Reported-by: Ross Lagerwall Signed-off-by: Andrew Cooper Reviewed-by: Ross Lagerwall Reviewed-by: Juergen Gross master commit: 37810b52d003f8a04af41d7b1f85eff24af9f804 master date: 2024-07-09 15:32:18 +0100 --- tools/libs/store/xs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index c8845b69e2..38a6ce3cf2 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -182,12 +182,12 @@ static bool setnonblock(int fd, int nonblock) { static bool set_cloexec(int fd) { - int flags = fcntl(fd, F_GETFL); + int flags = fcntl(fd, F_GETFD); if (flags < 0) return false; - return fcntl(fd, flags | FD_CLOEXEC) >= 0; + return fcntl(fd, F_SETFD, flags | FD_CLOEXEC) >= 0; } static int pipe_cloexec(int fds[2]) -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 14:33:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 14:33:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765033.1175590 (Exim 4.92) (envelope-from ) id 1sWzX2-0004Ph-QZ; Thu, 25 Jul 2024 14:33:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765033.1175590; Thu, 25 Jul 2024 14:33: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 1sWzX2-0004Pa-O8; Thu, 25 Jul 2024 14:33:24 +0000 Received: by outflank-mailman (input) for mailman id 765033; Thu, 25 Jul 2024 14:33:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzX1-0004PA-P6 for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzX1-0000EJ-OD for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWzX1-0007Tb-Lo for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=vsV7BMGXlLSMOmNV24JGYL40md6tMhoKBZrm4g71njk=; b=vdoDEWBsZ0IL+2OGpUDHmcdXKG Pxblje8LdiRmFEryq/4VecD6lRPXV7pHs8hBzql4hk3eKusEYJT4Tupy+mktzPsNWKU5jm98oy9Au 9qlnRqULlpSr04/P/bR9jNAOxuu1trzMYhT3Fdmh2jRvkeuIptphRDvQOaBe++x4B6NU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.18] x86/altcall: fix clang code-gen when using altcall in loop constructs Message-Id: Date: Thu, 25 Jul 2024 14:33:23 +0000 commit d078d0aa86e9e3b937f673dc89306b3afd09d560 Author: Roger Pau Monné AuthorDate: Thu Jul 25 16:21:17 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 25 16:21:17 2024 +0200 x86/altcall: fix clang code-gen when using altcall in loop constructs Yet another clang code generation issue when using altcalls. The issue this time is with using loop constructs around alternative_{,v}call instances using parameter types smaller than the register size. Given the following example code: static void bar(bool b) { unsigned int i; for ( i = 0; i < 10; i++ ) { int ret_; register union { bool e; unsigned long r; } di asm("rdi") = { .e = b }; register unsigned long si asm("rsi"); register unsigned long dx asm("rdx"); register unsigned long cx asm("rcx"); register unsigned long r8 asm("r8"); register unsigned long r9 asm("r9"); register unsigned long r10 asm("r10"); register unsigned long r11 asm("r11"); asm volatile ( "call %c[addr]" : "+r" (di), "=r" (si), "=r" (dx), "=r" (cx), "=r" (r8), "=r" (r9), "=r" (r10), "=r" (r11), "=a" (ret_) : [addr] "i" (&(func)), "g" (func) : "memory" ); } } See: https://godbolt.org/z/qvxMGd84q Clang will generate machine code that only resets the low 8 bits of %rdi between loop calls, leaving the rest of the register possibly containing garbage from the use of %rdi inside the called function. Note also that clang doesn't truncate the input parameters at the callee, thus breaking the psABI. Fix this by turning the `e` element in the anonymous union into an array that consumes the same space as an unsigned long, as this forces clang to reset the whole %rdi register instead of just the low 8 bits. Fixes: 2ce562b2a413 ('x86/altcall: use a union as register type for function parameters on clang') Suggested-by: Jan Beulich Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich master commit: d51b2f5ea1915fe058f730b0ec542cf84254fca0 master date: 2024-07-23 13:59:30 +0200 --- xen/arch/x86/include/asm/alternative.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/include/asm/alternative.h b/xen/arch/x86/include/asm/alternative.h index 0d3697f1de..e63b459276 100644 --- a/xen/arch/x86/include/asm/alternative.h +++ b/xen/arch/x86/include/asm/alternative.h @@ -185,10 +185,10 @@ extern void alternative_branches(void); */ #define ALT_CALL_ARG(arg, n) \ register union { \ - typeof(arg) e; \ + typeof(arg) e[sizeof(long) / sizeof(arg)]; \ unsigned long r; \ } a ## n ## _ asm ( ALT_CALL_arg ## n ) = { \ - .e = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); }) \ + .e[0] = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); })\ } #else #define ALT_CALL_ARG(arg, n) \ -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.18 From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 14:33:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 14:33:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765034.1175595 (Exim 4.92) (envelope-from ) id 1sWzXD-0004Sg-S4; Thu, 25 Jul 2024 14:33:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765034.1175595; Thu, 25 Jul 2024 14:33:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzXD-0004SY-PY; Thu, 25 Jul 2024 14:33:35 +0000 Received: by outflank-mailman (input) for mailman id 765034; Thu, 25 Jul 2024 14:33:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzXC-0004S5-6K for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzXC-0000EV-5P for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWzXC-0007Uj-3o for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=FLkl2oouSj5k/vIO7SOZAQuGPFmRFkWsexdjkvO0N9w=; b=aChEDDqnKHaOCO/SLSdxj1FOcm E10XgBNDqrgXSOJeiFDCXv44ejwn9pOg9QwGDYuKW3OAqXb6Qmcklyo6Uz8PXVCrEt1UBXQ9uDxLm hIpspc++3MyHrx6IaRMltbDtx5DdcWPit4QF1dvNtQVsFmMrawU95HlgsFKPABbHbFQg=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] x86/physdev: Return pirq that irq was already mapped to Message-Id: Date: Thu, 25 Jul 2024 14:33:34 +0000 commit c5c2ce0b7f892187e40ebc863648fbe1855c6cb8 Author: Jiqian Chen AuthorDate: Thu Jul 25 16:22:15 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 25 16:22:15 2024 +0200 x86/physdev: Return pirq that irq was already mapped to Fix bug introduced by 0762e2502f1f ("x86/physdev: factor out the code to allocate and map a pirq"). After that re-factoring, when pirq<0 and current_pirq>0, it means caller want to allocate a free pirq for irq but irq already has a mapped pirq, then it returns the negative pirq, so it fails. However, the logic before that re-factoring is different, it should return the current_pirq that irq was already mapped to and make the call success. Fixes: 0762e2502f1f ("x86/physdev: factor out the code to allocate and map a pirq") Signed-off-by: Jiqian Chen Signed-off-by: Huang Rui Signed-off-by: Jiqian Chen Reviewed-by: Jan Beulich master commit: 0d2b87b5adfc19e87e9027d996db204c66a47f30 master date: 2024-07-08 14:46:12 +0100 --- xen/arch/x86/irq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 98654ba784..0ef3a2ca37 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2914,6 +2914,7 @@ static int allocate_pirq(struct domain *d, int index, int pirq, int irq, d->domain_id, index, pirq, current_pirq); if ( current_pirq < 0 ) return -EBUSY; + pirq = current_pirq; } else if ( type == MAP_PIRQ_TYPE_MULTI_MSI ) { -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 14:33:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 14:33:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765035.1175598 (Exim 4.92) (envelope-from ) id 1sWzXN-0004VD-TP; Thu, 25 Jul 2024 14:33:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765035.1175598; Thu, 25 Jul 2024 14:33:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzXN-0004V5-Qw; Thu, 25 Jul 2024 14:33:45 +0000 Received: by outflank-mailman (input) for mailman id 765035; Thu, 25 Jul 2024 14:33:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzXM-0004Ux-BG for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzXM-0000Eg-AI for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:44 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWzXM-0007VT-7Z for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:44 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=1VVwE6rN94WX8NIiy70mqmELsIUa9k4uicGzuNMI6t4=; b=nJ9svCRWt4ka4m/YIi6YX2ABky 08G3bHYEE8nAKDEF78tOSy9c4NxnWcXM6EIF+djcRKL3fRN7Kf7mLE3L17AXM4jc+iyFGJNEaWPG8 5YCpe333Mhr+0KsKMHspjvZ0OJAJnY3tfuH7n41x0bY9WYVOTr/jpJC5fPub6lEuywV0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] tools/libxs: Fix fcntl() invocation in set_cloexec() Message-Id: Date: Thu, 25 Jul 2024 14:33:44 +0000 commit 3b7672193ae1199b02a6b73f8d6450d02a20c222 Author: Andrew Cooper AuthorDate: Thu Jul 25 16:22:46 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 25 16:22:46 2024 +0200 tools/libxs: Fix fcntl() invocation in set_cloexec() set_cloexec() had a bit too much copy&pate from setnonblock(), and insufficient testing on ancient versions of Linux... As written (emulating ancient linux by undef'ing O_CLOEXEC), strace shows: open("/dev/xen/xenbus", O_RDWR) = 3 fcntl(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) fcntl(3, 0x8003 /* F_??? */, 0x7ffe4a771d90) = -1 EINVAL (Invalid argument) close(3) = 0 which is obviously nonsense. Switch F_GETFL -> F_GETFD, and fix the second invocation to use F_SETFD. With this, strace is rather happer: open("/dev/xen/xenbus", O_RDWR) = 3 fcntl(3, F_GETFD) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 Fixes: bf7c1464706a ("tools/libxs: Fix CLOEXEC handling in get_dev()") Reported-by: Ross Lagerwall Signed-off-by: Andrew Cooper Reviewed-by: Ross Lagerwall Reviewed-by: Juergen Gross master commit: 37810b52d003f8a04af41d7b1f85eff24af9f804 master date: 2024-07-09 15:32:18 +0100 --- tools/libs/store/xs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 3f723bff5a..03f06e614e 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -182,12 +182,12 @@ static bool setnonblock(int fd, int nonblock) { static bool set_cloexec(int fd) { - int flags = fcntl(fd, F_GETFL); + int flags = fcntl(fd, F_GETFD); if (flags < 0) return false; - return fcntl(fd, flags | FD_CLOEXEC) >= 0; + return fcntl(fd, F_SETFD, flags | FD_CLOEXEC) >= 0; } static int pipe_cloexec(int fds[2]) -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 14:33:55 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 14:33:55 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765036.1175602 (Exim 4.92) (envelope-from ) id 1sWzXX-0004Xi-Uv; Thu, 25 Jul 2024 14:33:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765036.1175602; Thu, 25 Jul 2024 14:33:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzXX-0004Xa-SP; Thu, 25 Jul 2024 14:33:55 +0000 Received: by outflank-mailman (input) for mailman id 765036; Thu, 25 Jul 2024 14:33:54 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzXW-0004XO-E4 for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:54 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sWzXW-0000FC-DG for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:54 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sWzXW-0007Wd-CK for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 14:33:54 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=r2ENqunlmrDHy9uuFHxu6oyeDW+8yQr1sBbm+L2OEnA=; b=Nyuvodduw6GvJNwFo4AOkrGpV1 gJZDeKc4OkqIbxG8iTKeUKsu+SzW/EGDXc70zcUEyOo8bzKKNtfbWWVs9D65d5FZhG1gwekKJM0en FO7votaXgjku7bWUhDsppF3Ujzsxs37/jBrJDubtS/bBVV098Ia15ffnebAzQ50DhmeU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.17] x86/altcall: fix clang code-gen when using altcall in loop constructs Message-Id: Date: Thu, 25 Jul 2024 14:33:54 +0000 commit 6c4e415656d68d905550070d7aa0f3fe219e4422 Author: Roger Pau Monné AuthorDate: Thu Jul 25 16:23:06 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 25 16:23:06 2024 +0200 x86/altcall: fix clang code-gen when using altcall in loop constructs Yet another clang code generation issue when using altcalls. The issue this time is with using loop constructs around alternative_{,v}call instances using parameter types smaller than the register size. Given the following example code: static void bar(bool b) { unsigned int i; for ( i = 0; i < 10; i++ ) { int ret_; register union { bool e; unsigned long r; } di asm("rdi") = { .e = b }; register unsigned long si asm("rsi"); register unsigned long dx asm("rdx"); register unsigned long cx asm("rcx"); register unsigned long r8 asm("r8"); register unsigned long r9 asm("r9"); register unsigned long r10 asm("r10"); register unsigned long r11 asm("r11"); asm volatile ( "call %c[addr]" : "+r" (di), "=r" (si), "=r" (dx), "=r" (cx), "=r" (r8), "=r" (r9), "=r" (r10), "=r" (r11), "=a" (ret_) : [addr] "i" (&(func)), "g" (func) : "memory" ); } } See: https://godbolt.org/z/qvxMGd84q Clang will generate machine code that only resets the low 8 bits of %rdi between loop calls, leaving the rest of the register possibly containing garbage from the use of %rdi inside the called function. Note also that clang doesn't truncate the input parameters at the callee, thus breaking the psABI. Fix this by turning the `e` element in the anonymous union into an array that consumes the same space as an unsigned long, as this forces clang to reset the whole %rdi register instead of just the low 8 bits. Fixes: 2ce562b2a413 ('x86/altcall: use a union as register type for function parameters on clang') Suggested-by: Jan Beulich Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich master commit: d51b2f5ea1915fe058f730b0ec542cf84254fca0 master date: 2024-07-23 13:59:30 +0200 --- xen/arch/x86/include/asm/alternative.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/include/asm/alternative.h b/xen/arch/x86/include/asm/alternative.h index fa04481316..b54a970e70 100644 --- a/xen/arch/x86/include/asm/alternative.h +++ b/xen/arch/x86/include/asm/alternative.h @@ -185,10 +185,10 @@ extern void alternative_branches(void); */ #define ALT_CALL_ARG(arg, n) \ register union { \ - typeof(arg) e; \ + typeof(arg) e[sizeof(long) / sizeof(arg)]; \ unsigned long r; \ } a ## n ## _ asm ( ALT_CALL_arg ## n ) = { \ - .e = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); }) \ + .e[0] = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); })\ } #else #define ALT_CALL_ARG(arg, n) \ -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.17 From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 17:11:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 17:11:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765084.1175657 (Exim 4.92) (envelope-from ) id 1sX1za-0001BY-TT; Thu, 25 Jul 2024 17:11:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765084.1175657; Thu, 25 Jul 2024 17:11:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sX1za-0001BR-Qj; Thu, 25 Jul 2024 17:11:02 +0000 Received: by outflank-mailman (input) for mailman id 765084; Thu, 25 Jul 2024 17:11:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sX1za-0001BL-1q for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 17:11:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sX1zZ-00043i-Ud for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 17:11:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sX1zZ-00066h-Td for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 17:11:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=7pxaK8MrUxb4TyY5aPlowo6nKDvbbndm43Iw59aKxCw=; b=bUKAbiHg80JxLgqIEXBDBCjL1w 0r/rfsRKeIAoTzgG3baI3CnsQq0bpQkIHHLQoh+JfZ7bbIMk7InwQxvyJ3cuzLBIPr0L9Jlm+imZ8 0pn7YuwCdP++6hmYUDAPHA8Jywu2i8rbHnKtMkueWdfTa3RBSKw76bzE9juxoENlGq+Q=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/IO-APIC: Improve APIC_TMR accesses Message-Id: Date: Thu, 25 Jul 2024 17:11:01 +0000 commit 90ac0e4f2f30ca8a4fca74751815e90d423aa612 Author: Andrew Cooper AuthorDate: Tue Jul 23 17:32:26 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 24 12:18:44 2024 +0100 x86/IO-APIC: Improve APIC_TMR accesses XenServer's instance of Coverity complains of OVERFLOW_BEFORE_WIDEN in mask_and_ack_level_ioapic_irq(), which is ultimately because of v being unsigned long, and (1U << ...) being 32 bits. The reasoning isn't correct. (1U << (x & 0x1f)) can't overflow, but the complaint is really about having to expand the RHS. While this can be fixed by changing v to be unsigned int, take the opportunity to do better still. Introduce a apic_tmr_read() helper like we already have for ISR and IRR, and use it to remove the opencoded logic. Introduce an is_level boolean to improve the legibility of the surrounding logic. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/include/asm/apic.h | 5 +++++ xen/arch/x86/io_apic.c | 15 +++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/include/asm/apic.h b/xen/arch/x86/include/asm/apic.h index 7bd66dc6e1..a254e49dd1 100644 --- a/xen/arch/x86/include/asm/apic.h +++ b/xen/arch/x86/include/asm/apic.h @@ -132,6 +132,11 @@ static inline bool apic_isr_read(uint8_t vector) (vector & 0x1f)) & 1; } +static inline bool apic_tmr_read(unsigned int vector) +{ + return apic_read(APIC_TMR + (vector / 32 * 0x10)) & (1U << (vector % 32)); +} + static inline bool apic_irr_read(unsigned int vector) { return apic_read(APIC_IRR + (vector / 32 * 0x10)) & (1U << (vector % 32)); diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index d2a313c4ac..7744b43f24 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1652,8 +1652,7 @@ static bool io_apic_level_ack_pending(unsigned int irq) static void cf_check mask_and_ack_level_ioapic_irq(struct irq_desc *desc) { - unsigned long v; - int i; + bool is_level; irq_complete_move(desc); @@ -1679,9 +1678,8 @@ static void cf_check mask_and_ack_level_ioapic_irq(struct irq_desc *desc) * operation to prevent an edge-triggered interrupt escaping meanwhile. * The idea is from Manfred Spraul. --macro */ - i = desc->arch.vector; - v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1)); + is_level = apic_tmr_read(desc->arch.vector); ack_APIC_irq(); @@ -1692,7 +1690,7 @@ static void cf_check mask_and_ack_level_ioapic_irq(struct irq_desc *desc) !io_apic_level_ack_pending(desc->irq)) move_masked_irq(desc); - if ( !(v & (1U << (i & 0x1f))) ) + if ( !is_level ) { spin_lock(&ioapic_lock); __edge_IO_APIC_irq(desc->irq); @@ -1743,13 +1741,14 @@ static void cf_check end_level_ioapic_irq_new(struct irq_desc *desc, u8 vector) * operation to prevent an edge-triggered interrupt escaping meanwhile. * The idea is from Manfred Spraul. --macro */ - unsigned int v, i = desc->arch.vector; + unsigned int i = desc->arch.vector; + bool is_level; /* Manually EOI the old vector if we are moving to the new */ if ( vector && i != vector ) eoi_IO_APIC_irq(desc); - v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1)); + is_level = apic_tmr_read(i); end_nonmaskable_irq(desc, vector); @@ -1757,7 +1756,7 @@ static void cf_check end_level_ioapic_irq_new(struct irq_desc *desc, u8 vector) !io_apic_level_ack_pending(desc->irq) ) move_native_irq(desc); - if ( !(v & (1U << (i & 0x1f))) ) + if ( !is_level ) { spin_lock(&ioapic_lock); __mask_IO_APIC_irq(desc->irq); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 17:11:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 17:11:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765085.1175661 (Exim 4.92) (envelope-from ) id 1sX1zl-0001EA-06; Thu, 25 Jul 2024 17:11:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765085.1175661; Thu, 25 Jul 2024 17:11:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sX1zk-0001E2-Td; Thu, 25 Jul 2024 17:11:12 +0000 Received: by outflank-mailman (input) for mailman id 765085; Thu, 25 Jul 2024 17:11:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sX1zk-0001Ds-2g for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 17:11:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sX1zk-00043w-1O for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 17:11:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sX1zk-00067O-0S for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 17:11:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=TQbC7cx3vRrPrg+WgWs6dTeUNGS9oxWwWt2wSqEXKco=; b=ASHxJy0rBYKdYnuDiKiFvh07pi c1BAfznfHpVlJNvK7pRb7466tIAxetExHMLPR9IxviOOklK5toMCxB4aOq7Zf/Kc7dTzWR3Oulmi5 z5HG2GSuy6cXxuhDmTyBPPNxAx6FsRB7O5jwQUZPLpoKEqUrAmswKkd/yYieUeAW1AeA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/APIC: Change APIC reg types to unsigned int Message-Id: Date: Thu, 25 Jul 2024 17:11:12 +0000 commit c29f6ee94df34ce7391d0d9fabc32e5fe683b89e Author: Andrew Cooper AuthorDate: Tue Jul 23 20:28:24 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 24 12:18:44 2024 +0100 x86/APIC: Change APIC reg types to unsigned int They're all within a 12 bit range of their respective bases, and this prevents all the x2APIC MSR addresses being calculated in %rcx. Also swap two u32's for uint32_t. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/include/asm/apic.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/include/asm/apic.h b/xen/arch/x86/include/asm/apic.h index a254e49dd1..509a6683a1 100644 --- a/xen/arch/x86/include/asm/apic.h +++ b/xen/arch/x86/include/asm/apic.h @@ -49,12 +49,12 @@ const struct genapic *apic_x2apic_probe(void); * Basic functions accessing APICs. */ -static inline void apic_mem_write(unsigned long reg, u32 v) +static inline void apic_mem_write(unsigned int reg, uint32_t v) { *((volatile u32 *)(APIC_BASE+reg)) = v; } -static inline u32 apic_mem_read(unsigned long reg) +static inline u32 apic_mem_read(unsigned int reg) { return *((volatile u32 *)(APIC_BASE+reg)); } @@ -63,7 +63,7 @@ static inline u32 apic_mem_read(unsigned long reg) * access the 64-bit ICR register. */ -static inline void apic_wrmsr(unsigned long reg, uint64_t msr_content) +static inline void apic_wrmsr(unsigned int reg, uint64_t msr_content) { if (reg == APIC_DFR || reg == APIC_ID || reg == APIC_LDR || reg == APIC_LVR) @@ -72,7 +72,7 @@ static inline void apic_wrmsr(unsigned long reg, uint64_t msr_content) wrmsrl(MSR_X2APIC_FIRST + (reg >> 4), msr_content); } -static inline uint64_t apic_rdmsr(unsigned long reg) +static inline uint64_t apic_rdmsr(unsigned int reg) { uint64_t msr_content; @@ -83,7 +83,7 @@ static inline uint64_t apic_rdmsr(unsigned long reg) return msr_content; } -static inline void apic_write(unsigned long reg, u32 v) +static inline void apic_write(unsigned int reg, uint32_t v) { if ( x2apic_enabled ) @@ -92,7 +92,7 @@ static inline void apic_write(unsigned long reg, u32 v) apic_mem_write(reg, v); } -static inline u32 apic_read(unsigned long reg) +static inline u32 apic_read(unsigned int reg) { if ( x2apic_enabled ) return apic_rdmsr(reg); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 17:11:23 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 17:11:23 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765086.1175664 (Exim 4.92) (envelope-from ) id 1sX1zv-0001H5-1M; Thu, 25 Jul 2024 17:11:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765086.1175664; Thu, 25 Jul 2024 17:11:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sX1zu-0001Gy-V2; Thu, 25 Jul 2024 17:11:22 +0000 Received: by outflank-mailman (input) for mailman id 765086; Thu, 25 Jul 2024 17:11:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sX1zu-0001Gq-5l for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 17:11:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sX1zu-000462-4s for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 17:11:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sX1zu-000681-3T for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 17:11:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=AFBCkotl0e5fS12e1M591Tv4C9p44GrnzFjWu3tCXso=; b=D16U0ngWplFHKFIpsVoBzaE+bD eY9uBXbTHwTzkiR26lN7UHBCsr3WeMdNbvKPS0nxxJnDpYsOVJR3XPolNVHMim6l9O8FeANJlbbj/ GngUJd7/06Nw4tMHfZWKVdNPHDfZ+DcUyExNJPcXlWQMYK4ZPUZisXh7XMZoqGRW0TsA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/APIC: Rewrite apic_isr_read() to match apic_{tmr,irr}_read() Message-Id: Date: Thu, 25 Jul 2024 17:11:22 +0000 commit 5795a0bf5493d411155093180ed16e4ba63d37bf Author: Andrew Cooper AuthorDate: Tue Jul 23 20:21:02 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 24 12:18:44 2024 +0100 x86/APIC: Rewrite apic_isr_read() to match apic_{tmr,irr}_read() This allows for marginally better code generation including the use of BT rather than SHR/TEST. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/include/asm/apic.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/apic.h b/xen/arch/x86/include/asm/apic.h index 509a6683a1..a7798de029 100644 --- a/xen/arch/x86/include/asm/apic.h +++ b/xen/arch/x86/include/asm/apic.h @@ -126,10 +126,9 @@ static inline void apic_icr_write(u32 low, u32 dest) } } -static inline bool apic_isr_read(uint8_t vector) +static inline bool apic_isr_read(unsigned int vector) { - return (apic_read(APIC_ISR + ((vector & ~0x1f) >> 1)) >> - (vector & 0x1f)) & 1; + return apic_read(APIC_ISR + (vector / 32 * 0x10)) & (1U << (vector % 32)); } static inline bool apic_tmr_read(unsigned int vector) -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Thu Jul 25 17:11:33 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Thu, 25 Jul 2024 17:11:33 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765087.1175668 (Exim 4.92) (envelope-from ) id 1sX205-0001Ja-2t; Thu, 25 Jul 2024 17:11:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765087.1175668; Thu, 25 Jul 2024 17:11:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sX205-0001JO-0D; Thu, 25 Jul 2024 17:11:33 +0000 Received: by outflank-mailman (input) for mailman id 765087; Thu, 25 Jul 2024 17:11:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sX204-0001JE-8S for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 17:11:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sX204-00046U-7h for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 17:11:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sX204-00068m-6w for xen-changelog@lists.xenproject.org; Thu, 25 Jul 2024 17:11:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=/WDtjSSi+zFQ5JjN+M7ga1ffcFkUyMBBMkblE9JZ9Cs=; b=LJvX9O9WI14Q0tYGvsuXXkodLi cpWXe4ibL9EEZrMVftg5uxxRDfmBzLhCunlbHV4Px+Ago61Fsp5IWWS2x7iLc6tpo6BwnPAzYdHAo OQStaCZxCztAwXWmeC/Ipm3MrBhPqHs52lzzx6i3kZOwdWMeMKMnQ8J5EiOvIZ95h7nI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] hvmloader: Use fastcall everywhere Message-Id: Date: Thu, 25 Jul 2024 17:11:32 +0000 commit b25b28ede1cba43eda1e0b84ad967683b8196847 Author: Andrew Cooper AuthorDate: Thu May 9 18:52:59 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 24 18:24:56 2024 +0100 hvmloader: Use fastcall everywhere HVMLoader is a single freestanding 32bit program with no external dependencies. Use the fastcall calling convetion (up to 3 parameters in registers) globally, which is more efficient than passing all parameters on the stack. Some bloat-o-meter highlights are: add/remove: 0/0 grow/shrink: 3/118 up/down: 8/-3004 (-2996) Function old new delta ... hvmloader_acpi_build_tables 1125 961 -164 acpi_build_tables 1277 1081 -196 pci_setup 4756 4516 -240 construct_secondary_tables 1689 1447 -242 No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- tools/firmware/hvmloader/Makefile | 2 +- tools/firmware/hvmloader/smp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/firmware/hvmloader/Makefile b/tools/firmware/hvmloader/Makefile index 84cba171cd..c7bc400657 100644 --- a/tools/firmware/hvmloader/Makefile +++ b/tools/firmware/hvmloader/Makefile @@ -25,7 +25,7 @@ ld-option = $(shell if $(LD) -v $(1) >/dev/null 2>&1; then echo y; else echo n; # SMBIOS spec requires format mm/dd/yyyy SMBIOS_REL_DATE ?= $(shell date +%m/%d/%Y) -CFLAGS += $(CFLAGS_xeninclude) -fno-pic +CFLAGS += $(CFLAGS_xeninclude) -fno-pic -mregparm=3 # We mustn't use tools-only public interfaces. CFLAGS += -D__XEN_INTERFACE_VERSION__=__XEN_LATEST_INTERFACE_VERSION__ diff --git a/tools/firmware/hvmloader/smp.c b/tools/firmware/hvmloader/smp.c index 5d46eee1c5..1b940cefd0 100644 --- a/tools/firmware/hvmloader/smp.c +++ b/tools/firmware/hvmloader/smp.c @@ -31,7 +31,7 @@ static int ap_callin; -static void __attribute__((regparm(1))) cpu_setup(unsigned int cpu) +static void cpu_setup(unsigned int cpu) { printf(" - CPU%d ... ", cpu); cacheattr_init(); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Fri Jul 26 09:44:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 26 Jul 2024 09:44:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765364.1175943 (Exim 4.92) (envelope-from ) id 1sXHUY-0001AX-V9; Fri, 26 Jul 2024 09:44:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765364.1175943; Fri, 26 Jul 2024 09:44:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXHUY-0001AP-SV; Fri, 26 Jul 2024 09:44:02 +0000 Received: by outflank-mailman (input) for mailman id 765364; Fri, 26 Jul 2024 09:44:01 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXHUX-0001AJ-IT for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 09:44:01 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXHUX-0005DK-Gh for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 09:44:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sXHUX-000481-Ew for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 09:44:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=KYHe4OsJH94qwetBXhslTWEr3Ja6FztfMljggVKUZXg=; b=1L2AF2MOf6+6KOt4s4MWCzAsCk 16Xy4Hc029m/oZTxSWV4yyAEfixebeg+qTb3OE2GW5GQl9H394n65/wPZyrox86VIUcMXWWWbqIlr k52vxFhCnkIc0pWW6w255Zt+/Xyn6kUD1H0cru5n/lLrGvtXb8FbK1N8lPf0hDQVNqyw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] x86/physdev: Return pirq that irq was already mapped to Message-Id: Date: Fri, 26 Jul 2024 09:44:01 +0000 commit f9f3062f11e144438fac9e9da6aa4cb41a6009b1 Author: Jiqian Chen AuthorDate: Thu Jul 25 16:20:17 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 25 16:20:17 2024 +0200 x86/physdev: Return pirq that irq was already mapped to Fix bug introduced by 0762e2502f1f ("x86/physdev: factor out the code to allocate and map a pirq"). After that re-factoring, when pirq<0 and current_pirq>0, it means caller want to allocate a free pirq for irq but irq already has a mapped pirq, then it returns the negative pirq, so it fails. However, the logic before that re-factoring is different, it should return the current_pirq that irq was already mapped to and make the call success. Fixes: 0762e2502f1f ("x86/physdev: factor out the code to allocate and map a pirq") Signed-off-by: Jiqian Chen Signed-off-by: Huang Rui Signed-off-by: Jiqian Chen Reviewed-by: Jan Beulich master commit: 0d2b87b5adfc19e87e9027d996db204c66a47f30 master date: 2024-07-08 14:46:12 +0100 --- xen/arch/x86/irq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 5dae8bd1b9..6b1f338eae 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2914,6 +2914,7 @@ static int allocate_pirq(struct domain *d, int index, int pirq, int irq, d->domain_id, index, pirq, current_pirq); if ( current_pirq < 0 ) return -EBUSY; + pirq = current_pirq; } else if ( type == MAP_PIRQ_TYPE_MULTI_MSI ) { -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 26 09:44:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 26 Jul 2024 09:44:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765365.1175948 (Exim 4.92) (envelope-from ) id 1sXHUj-0001CN-0m; Fri, 26 Jul 2024 09:44:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765365.1175948; Fri, 26 Jul 2024 09:44:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXHUi-0001CF-Ts; Fri, 26 Jul 2024 09:44:12 +0000 Received: by outflank-mailman (input) for mailman id 765365; Fri, 26 Jul 2024 09:44:11 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXHUh-0001C2-L5 for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 09:44:11 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXHUh-0005ER-KH for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 09:44:11 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sXHUh-00048i-It for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 09:44:11 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=lBXMPkbM1rJVR4GxCWOOYDApHmga324pv/HJ782we8A=; b=ov3kNYiW8AJqJRDSlmDn3PK56G jjqA7ztgIFP1xRrNAIA3q2FEoTLdLhKdqkfa5MPpMqezX9wsohdpfsauwSdyIYyYXJUTiUTfE9enm Glk0wZTDnw4R9f5eECniVgfX5dMHmODsxqvtOKUjeN6OMoz9qDcM3bHWmn8oH0T+L/OA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] tools/libxs: Fix fcntl() invocation in set_cloexec() Message-Id: Date: Fri, 26 Jul 2024 09:44:11 +0000 commit 81f1e807fadb8111d71b78191e01ca688d74eac7 Author: Andrew Cooper AuthorDate: Thu Jul 25 16:20:53 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 25 16:20:53 2024 +0200 tools/libxs: Fix fcntl() invocation in set_cloexec() set_cloexec() had a bit too much copy&pate from setnonblock(), and insufficient testing on ancient versions of Linux... As written (emulating ancient linux by undef'ing O_CLOEXEC), strace shows: open("/dev/xen/xenbus", O_RDWR) = 3 fcntl(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) fcntl(3, 0x8003 /* F_??? */, 0x7ffe4a771d90) = -1 EINVAL (Invalid argument) close(3) = 0 which is obviously nonsense. Switch F_GETFL -> F_GETFD, and fix the second invocation to use F_SETFD. With this, strace is rather happer: open("/dev/xen/xenbus", O_RDWR) = 3 fcntl(3, F_GETFD) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 Fixes: bf7c1464706a ("tools/libxs: Fix CLOEXEC handling in get_dev()") Reported-by: Ross Lagerwall Signed-off-by: Andrew Cooper Reviewed-by: Ross Lagerwall Reviewed-by: Juergen Gross master commit: 37810b52d003f8a04af41d7b1f85eff24af9f804 master date: 2024-07-09 15:32:18 +0100 --- tools/libs/store/xs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index c8845b69e2..38a6ce3cf2 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -182,12 +182,12 @@ static bool setnonblock(int fd, int nonblock) { static bool set_cloexec(int fd) { - int flags = fcntl(fd, F_GETFL); + int flags = fcntl(fd, F_GETFD); if (flags < 0) return false; - return fcntl(fd, flags | FD_CLOEXEC) >= 0; + return fcntl(fd, F_SETFD, flags | FD_CLOEXEC) >= 0; } static int pipe_cloexec(int fds[2]) -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 26 09:44:23 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 26 Jul 2024 09:44:23 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765366.1175951 (Exim 4.92) (envelope-from ) id 1sXHUt-0001Ex-1w; Fri, 26 Jul 2024 09:44:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765366.1175951; Fri, 26 Jul 2024 09:44:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXHUs-0001Ep-VV; Fri, 26 Jul 2024 09:44:22 +0000 Received: by outflank-mailman (input) for mailman id 765366; Fri, 26 Jul 2024 09:44:21 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXHUr-0001EV-Nz for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 09:44:21 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXHUr-0005F8-NC for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 09:44:21 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sXHUr-00049I-MK for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 09:44:21 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=XnUztD1/ghwIXLmbstj52/XKxdbQ+XnguljoHT0mHOY=; b=gJ08LsA8nG1VGPZzjxHqZ9ykjK cb4kJyYtwPv46n69sutey9W/9mMr4Lo6XLKhdv4tZkwdQAjuJynqr1vz6YZh4iFtHWzr8qZOB3HyR VSgKorK+E2X1mBbtRp5SzAfbullptF1GjSVocP8vnzPjiMA97sGOmJb8sVX8EX4bz1s4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.18] x86/altcall: fix clang code-gen when using altcall in loop constructs Message-Id: Date: Fri, 26 Jul 2024 09:44:21 +0000 commit d078d0aa86e9e3b937f673dc89306b3afd09d560 Author: Roger Pau Monné AuthorDate: Thu Jul 25 16:21:17 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 25 16:21:17 2024 +0200 x86/altcall: fix clang code-gen when using altcall in loop constructs Yet another clang code generation issue when using altcalls. The issue this time is with using loop constructs around alternative_{,v}call instances using parameter types smaller than the register size. Given the following example code: static void bar(bool b) { unsigned int i; for ( i = 0; i < 10; i++ ) { int ret_; register union { bool e; unsigned long r; } di asm("rdi") = { .e = b }; register unsigned long si asm("rsi"); register unsigned long dx asm("rdx"); register unsigned long cx asm("rcx"); register unsigned long r8 asm("r8"); register unsigned long r9 asm("r9"); register unsigned long r10 asm("r10"); register unsigned long r11 asm("r11"); asm volatile ( "call %c[addr]" : "+r" (di), "=r" (si), "=r" (dx), "=r" (cx), "=r" (r8), "=r" (r9), "=r" (r10), "=r" (r11), "=a" (ret_) : [addr] "i" (&(func)), "g" (func) : "memory" ); } } See: https://godbolt.org/z/qvxMGd84q Clang will generate machine code that only resets the low 8 bits of %rdi between loop calls, leaving the rest of the register possibly containing garbage from the use of %rdi inside the called function. Note also that clang doesn't truncate the input parameters at the callee, thus breaking the psABI. Fix this by turning the `e` element in the anonymous union into an array that consumes the same space as an unsigned long, as this forces clang to reset the whole %rdi register instead of just the low 8 bits. Fixes: 2ce562b2a413 ('x86/altcall: use a union as register type for function parameters on clang') Suggested-by: Jan Beulich Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich master commit: d51b2f5ea1915fe058f730b0ec542cf84254fca0 master date: 2024-07-23 13:59:30 +0200 --- xen/arch/x86/include/asm/alternative.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/include/asm/alternative.h b/xen/arch/x86/include/asm/alternative.h index 0d3697f1de..e63b459276 100644 --- a/xen/arch/x86/include/asm/alternative.h +++ b/xen/arch/x86/include/asm/alternative.h @@ -185,10 +185,10 @@ extern void alternative_branches(void); */ #define ALT_CALL_ARG(arg, n) \ register union { \ - typeof(arg) e; \ + typeof(arg) e[sizeof(long) / sizeof(arg)]; \ unsigned long r; \ } a ## n ## _ asm ( ALT_CALL_arg ## n ) = { \ - .e = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); }) \ + .e[0] = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); })\ } #else #define ALT_CALL_ARG(arg, n) \ -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.18 From xen-changelog-bounces@lists.xenproject.org Fri Jul 26 10:33:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 26 Jul 2024 10:33:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765381.1175964 (Exim 4.92) (envelope-from ) id 1sXIFz-0007Yt-Gd; Fri, 26 Jul 2024 10:33:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765381.1175964; Fri, 26 Jul 2024 10:33:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXIFz-0007Ym-EB; Fri, 26 Jul 2024 10:33:03 +0000 Received: by outflank-mailman (input) for mailman id 765381; Fri, 26 Jul 2024 10:33:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXIFx-0007Yg-Un for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 10:33:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXIFx-0008Q9-MD for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 10:33:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sXIFx-0008Ic-KD for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 10:33:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=dl1BIrEVpywrkQ/hDe8WOF+Z5sSS+D2fBq/ADyW2xUE=; b=oe/JT6mdIxVEd8c4XGgAtwEzbM WY8ohDLdmIBKdDnkdsN6kBbbsjFujXcxZV74uEdOO5joGvDPf8VfKAOtBDB9UwnsSf+RHj+5EHQ96 muAP1RBEshWqWMBEg5NLGIasgNNddCDKgprcSAiIGco/UKcH0Ub0zyDmxYXxLtmzjAXM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] x86/physdev: Return pirq that irq was already mapped to Message-Id: Date: Fri, 26 Jul 2024 10:33:01 +0000 commit c5c2ce0b7f892187e40ebc863648fbe1855c6cb8 Author: Jiqian Chen AuthorDate: Thu Jul 25 16:22:15 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 25 16:22:15 2024 +0200 x86/physdev: Return pirq that irq was already mapped to Fix bug introduced by 0762e2502f1f ("x86/physdev: factor out the code to allocate and map a pirq"). After that re-factoring, when pirq<0 and current_pirq>0, it means caller want to allocate a free pirq for irq but irq already has a mapped pirq, then it returns the negative pirq, so it fails. However, the logic before that re-factoring is different, it should return the current_pirq that irq was already mapped to and make the call success. Fixes: 0762e2502f1f ("x86/physdev: factor out the code to allocate and map a pirq") Signed-off-by: Jiqian Chen Signed-off-by: Huang Rui Signed-off-by: Jiqian Chen Reviewed-by: Jan Beulich master commit: 0d2b87b5adfc19e87e9027d996db204c66a47f30 master date: 2024-07-08 14:46:12 +0100 --- xen/arch/x86/irq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 98654ba784..0ef3a2ca37 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -2914,6 +2914,7 @@ static int allocate_pirq(struct domain *d, int index, int pirq, int irq, d->domain_id, index, pirq, current_pirq); if ( current_pirq < 0 ) return -EBUSY; + pirq = current_pirq; } else if ( type == MAP_PIRQ_TYPE_MULTI_MSI ) { -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 26 10:33:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 26 Jul 2024 10:33:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765382.1175969 (Exim 4.92) (envelope-from ) id 1sXIG9-0007ae-I6; Fri, 26 Jul 2024 10:33:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765382.1175969; Fri, 26 Jul 2024 10:33:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXIG9-0007aW-Fb; Fri, 26 Jul 2024 10:33:13 +0000 Received: by outflank-mailman (input) for mailman id 765382; Fri, 26 Jul 2024 10:33:11 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXIG7-0007aI-Qq for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 10:33:11 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXIG7-0008Qw-Q1 for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 10:33:11 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sXIG7-0008M6-OH for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 10:33:11 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=XmoN4hOnPRUE8gpgW1CiDtoZTiu4pDT1IX4us8/g70s=; b=Bb3t3ua8mxYNKf1RQBButjzLBJ gwvx3zvsQy8q3pCpcDlU7i4VRio7k+8ZTMS/HwlQWqvT5/lMyHeempYFz/OVNayaeItPoCf6sGDeO Ep8umCyzKRqecEs/W1R4Cv2n0xwuYF3/zncNeW9OP4z1tLHC9rh4z+b+hw7FBNeSyTkE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] tools/libxs: Fix fcntl() invocation in set_cloexec() Message-Id: Date: Fri, 26 Jul 2024 10:33:11 +0000 commit 3b7672193ae1199b02a6b73f8d6450d02a20c222 Author: Andrew Cooper AuthorDate: Thu Jul 25 16:22:46 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 25 16:22:46 2024 +0200 tools/libxs: Fix fcntl() invocation in set_cloexec() set_cloexec() had a bit too much copy&pate from setnonblock(), and insufficient testing on ancient versions of Linux... As written (emulating ancient linux by undef'ing O_CLOEXEC), strace shows: open("/dev/xen/xenbus", O_RDWR) = 3 fcntl(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE) fcntl(3, 0x8003 /* F_??? */, 0x7ffe4a771d90) = -1 EINVAL (Invalid argument) close(3) = 0 which is obviously nonsense. Switch F_GETFL -> F_GETFD, and fix the second invocation to use F_SETFD. With this, strace is rather happer: open("/dev/xen/xenbus", O_RDWR) = 3 fcntl(3, F_GETFD) = 0 fcntl(3, F_SETFD, FD_CLOEXEC) = 0 Fixes: bf7c1464706a ("tools/libxs: Fix CLOEXEC handling in get_dev()") Reported-by: Ross Lagerwall Signed-off-by: Andrew Cooper Reviewed-by: Ross Lagerwall Reviewed-by: Juergen Gross master commit: 37810b52d003f8a04af41d7b1f85eff24af9f804 master date: 2024-07-09 15:32:18 +0100 --- tools/libs/store/xs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/libs/store/xs.c b/tools/libs/store/xs.c index 3f723bff5a..03f06e614e 100644 --- a/tools/libs/store/xs.c +++ b/tools/libs/store/xs.c @@ -182,12 +182,12 @@ static bool setnonblock(int fd, int nonblock) { static bool set_cloexec(int fd) { - int flags = fcntl(fd, F_GETFL); + int flags = fcntl(fd, F_GETFD); if (flags < 0) return false; - return fcntl(fd, flags | FD_CLOEXEC) >= 0; + return fcntl(fd, F_SETFD, flags | FD_CLOEXEC) >= 0; } static int pipe_cloexec(int fds[2]) -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Fri Jul 26 10:33:23 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Fri, 26 Jul 2024 10:33:23 +0000 Received: from list by lists.xenproject.org with outflank-mailman.765383.1175973 (Exim 4.92) (envelope-from ) id 1sXIGJ-0007dv-LA; Fri, 26 Jul 2024 10:33:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 765383.1175973; Fri, 26 Jul 2024 10:33:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXIGJ-0007dn-I9; Fri, 26 Jul 2024 10:33:23 +0000 Received: by outflank-mailman (input) for mailman id 765383; Fri, 26 Jul 2024 10:33:21 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXIGH-0007dM-UK for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 10:33:21 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sXIGH-0008Rc-TT for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 10:33:21 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sXIGH-0008R3-S0 for xen-changelog@lists.xenproject.org; Fri, 26 Jul 2024 10:33:21 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=pzdAUqw4mzAv3c9kiwZKdGsxYrgdO4Y9YV5inWCaigM=; b=GMtyCVF5VbPgaxgeXwBuJ51YLi OkFTXgMnXNoW9ikKcyCxog7WNCm5YZOuIVfr6QYXE2Vha4Q62Xae/v7PoZMFMps99xQq/IS4J0U7l P1rb+nFyDrGpylyAdeK+xOb9H5fOKEOcY92j0THpAjjdLvfRujMUXZiTj0kM4wyzC2Jc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.17] x86/altcall: fix clang code-gen when using altcall in loop constructs Message-Id: Date: Fri, 26 Jul 2024 10:33:21 +0000 commit 6c4e415656d68d905550070d7aa0f3fe219e4422 Author: Roger Pau Monné AuthorDate: Thu Jul 25 16:23:06 2024 +0200 Commit: Jan Beulich CommitDate: Thu Jul 25 16:23:06 2024 +0200 x86/altcall: fix clang code-gen when using altcall in loop constructs Yet another clang code generation issue when using altcalls. The issue this time is with using loop constructs around alternative_{,v}call instances using parameter types smaller than the register size. Given the following example code: static void bar(bool b) { unsigned int i; for ( i = 0; i < 10; i++ ) { int ret_; register union { bool e; unsigned long r; } di asm("rdi") = { .e = b }; register unsigned long si asm("rsi"); register unsigned long dx asm("rdx"); register unsigned long cx asm("rcx"); register unsigned long r8 asm("r8"); register unsigned long r9 asm("r9"); register unsigned long r10 asm("r10"); register unsigned long r11 asm("r11"); asm volatile ( "call %c[addr]" : "+r" (di), "=r" (si), "=r" (dx), "=r" (cx), "=r" (r8), "=r" (r9), "=r" (r10), "=r" (r11), "=a" (ret_) : [addr] "i" (&(func)), "g" (func) : "memory" ); } } See: https://godbolt.org/z/qvxMGd84q Clang will generate machine code that only resets the low 8 bits of %rdi between loop calls, leaving the rest of the register possibly containing garbage from the use of %rdi inside the called function. Note also that clang doesn't truncate the input parameters at the callee, thus breaking the psABI. Fix this by turning the `e` element in the anonymous union into an array that consumes the same space as an unsigned long, as this forces clang to reset the whole %rdi register instead of just the low 8 bits. Fixes: 2ce562b2a413 ('x86/altcall: use a union as register type for function parameters on clang') Suggested-by: Jan Beulich Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich master commit: d51b2f5ea1915fe058f730b0ec542cf84254fca0 master date: 2024-07-23 13:59:30 +0200 --- xen/arch/x86/include/asm/alternative.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/include/asm/alternative.h b/xen/arch/x86/include/asm/alternative.h index fa04481316..b54a970e70 100644 --- a/xen/arch/x86/include/asm/alternative.h +++ b/xen/arch/x86/include/asm/alternative.h @@ -185,10 +185,10 @@ extern void alternative_branches(void); */ #define ALT_CALL_ARG(arg, n) \ register union { \ - typeof(arg) e; \ + typeof(arg) e[sizeof(long) / sizeof(arg)]; \ unsigned long r; \ } a ## n ## _ asm ( ALT_CALL_arg ## n ) = { \ - .e = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); }) \ + .e[0] = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); })\ } #else #define ALT_CALL_ARG(arg, n) \ -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.17 From xen-changelog-bounces@lists.xenproject.org Mon Jul 29 15:44:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 29 Jul 2024 15:44:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.766938.1177470 (Exim 4.92) (envelope-from ) id 1sYSXc-0008ES-OZ; Mon, 29 Jul 2024 15:44:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 766938.1177470; Mon, 29 Jul 2024 15:44:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYSXc-0008EK-M3; Mon, 29 Jul 2024 15:44:04 +0000 Received: by outflank-mailman (input) for mailman id 766938; Mon, 29 Jul 2024 15:44:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYSXb-0008EE-GM for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 15:44:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYSXb-0000rV-9h for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 15:44:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYSXb-00017W-7H for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 15:44:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=IGjWePUBBFMpiRNxyXrAJpKiJ0yjOLBz93/uMN1iRZw=; b=tYnyncp5d1t/FxI2USKgZwgE9P MG6AieNbnJCL+640hqqTKYAuVtSEwnzqaJsJV/otH4CCFu0pW1n7u8NWsyCq0yeks12g57DIn3cNU j8x/1Bq9bNDD37ZgmVI3GjhPy5ywBb60K2SzUg+JOyoOgQiSuw4LMGZKLRAvBL72qS/0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] CHANGELOG.md: Finalize changes in 4.19 release cycle Message-Id: Date: Mon, 29 Jul 2024 15:44:03 +0000 commit 8b5016e28737f140926619b14b8ca291dc4c5e62 Author: Oleksii Kurochko AuthorDate: Mon Jul 29 13:52:36 2024 +0200 Commit: Julien Grall CommitDate: Mon Jul 29 16:34:57 2024 +0100 CHANGELOG.md: Finalize changes in 4.19 release cycle Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3b788df61..92f5825bff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,11 +31,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) using a standalone library implementation. - xenalyze no longer requires `--svm-mode` when analyzing traces generated on AMD CPUs + - Code symbol annotations and MISRA compliance improvements. + - CI updates: + - Minimum fixes to rebuild the containers, following the HEREDOC problems. + - Rebuild containers to have testing with up-to-date LTS distros. + - Few build system checks, and strip the obsolete contents of + the build containers. ### Added - On x86: - Introduce a new x2APIC driver that uses Cluster Logical addressing mode for IPIs and Physical addressing mode for external interrupts. + - On Arm: + - FF-A notification support. + - Introduction of dynamic node programming using overlay dtbo. - Add a new 9pfs backend running as a daemon in dom0. First user is Xenstore-stubdom now being able to support full Xenstore trace capability. - libxl support for backendtype=tap with tapback. -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Mon Jul 29 15:44:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 29 Jul 2024 15:44:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.766939.1177474 (Exim 4.92) (envelope-from ) id 1sYSXm-0008GC-Pv; Mon, 29 Jul 2024 15:44:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 766939.1177474; Mon, 29 Jul 2024 15:44:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYSXm-0008G4-NV; Mon, 29 Jul 2024 15:44:14 +0000 Received: by outflank-mailman (input) for mailman id 766939; Mon, 29 Jul 2024 15:44:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYSXl-0008Fv-NC for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 15:44:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYSXl-0000rZ-MD for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 15:44:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYSXl-00018s-LL for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 15:44:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=C74cdgQ/sCzs3LOLKfJ1/uwlyIXoM7EwyEZOSw2VcIU=; b=RtkFONJBzci9+ZpS5cblesYUSg 884ttd+Pi5Sz1/r4mbVbwdNXMpxEWMM3dDlTwXiOXe8ynoXeuMcG5mtfHRtdjdeivYxq0MXQJRCmJ xdEu2kItl9Z3nM3FDOSPY/kpoWXOocZaYdC1NoksSjFoZgJcJGdKW/bb62KSFbsqFSAc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.19] SUPPORT.md: Define support lifetime Message-Id: Date: Mon, 29 Jul 2024 15:44:13 +0000 commit 6ce22ee4ba70a2ce6b983925629fa5844340e98c Author: Julien Grall AuthorDate: Sat Jul 27 11:45:46 2024 +0100 Commit: Julien Grall CommitDate: Mon Jul 29 16:36:29 2024 +0100 SUPPORT.md: Define support lifetime Signed-off-by: Julien Grall Release-Acked-By: Oleksii Kurochko --- SUPPORT.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SUPPORT.md b/SUPPORT.md index 77d2a7a7db..8b998d9bc7 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -9,13 +9,13 @@ for the definitions of the support status levels etc. # Release Support - Xen-Version: 4.19-rc - Initial-Release: n/a - Supported-Until: TBD - Security-Support-Until: Unreleased - not yet security-supported + Xen-Version: 4.19 + Initial-Release: 2024-07-29 + Supported-Until: 2026-01-29 + Security-Support-Until: 2027-07-29 Release Notes -: RN +: RN # Feature Support -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.19 From xen-changelog-bounces@lists.xenproject.org Mon Jul 29 15:44:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 29 Jul 2024 15:44:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.766940.1177477 (Exim 4.92) (envelope-from ) id 1sYSXw-0008Ix-RP; Mon, 29 Jul 2024 15:44:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 766940.1177477; Mon, 29 Jul 2024 15:44: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 1sYSXw-0008Ip-Ot; Mon, 29 Jul 2024 15:44:24 +0000 Received: by outflank-mailman (input) for mailman id 766940; Mon, 29 Jul 2024 15:44:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYSXv-0008Id-R7 for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 15:44:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYSXv-0000ro-P9 for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 15:44:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYSXv-00019P-OH for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 15:44:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=v4sxxxcEwMiqpyzh5EFycDyDiYQE93EguA4qNMLvbY0=; b=RgNIOotaZY6IHBV6sa2Vmdi4sg 9dIBrBTeJ1pERKWP6muy7NLuTwNtQwbOQBeI0PYBdXPXl+6AZJA2iGTyYGJf0Ibhrv9SC3K4a6iiy spAnjoIEcCeGdhCW2oYqIncyRAKuEfeEVFxBUIWYccQS7EXT/xDPJ8CUesyL1fPcmugY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.19] CHANGELOG.md: Finalize changes in 4.19 release cycle Message-Id: Date: Mon, 29 Jul 2024 15:44:23 +0000 commit fe84f5392d8c96d7d73c0cf02413eeff0ef2a40e Author: Oleksii Kurochko AuthorDate: Mon Jul 29 13:52:36 2024 +0200 Commit: Julien Grall CommitDate: Mon Jul 29 16:36:41 2024 +0100 CHANGELOG.md: Finalize changes in 4.19 release cycle Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich (cherry picked from commit 8b5016e28737f140926619b14b8ca291dc4c5e62) --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8fbe82df6..f143a924ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,11 +23,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) using a standalone library implementation. - xenalyze no longer requires `--svm-mode` when analyzing traces generated on AMD CPUs + - Code symbol annotations and MISRA compliance improvements. + - CI updates: + - Minimum fixes to rebuild the containers, following the HEREDOC problems. + - Rebuild containers to have testing with up-to-date LTS distros. + - Few build system checks, and strip the obsolete contents of + the build containers. ### Added - On x86: - Introduce a new x2APIC driver that uses Cluster Logical addressing mode for IPIs and Physical addressing mode for external interrupts. + - On Arm: + - FF-A notification support. + - Introduction of dynamic node programming using overlay dtbo. - Add a new 9pfs backend running as a daemon in dom0. First user is Xenstore-stubdom now being able to support full Xenstore trace capability. - libxl support for backendtype=tap with tapback. -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.19 From xen-changelog-bounces@lists.xenproject.org Mon Jul 29 17:33:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 29 Jul 2024 17:33:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767053.1177612 (Exim 4.92) (envelope-from ) id 1sYUF7-0000fY-DI; Mon, 29 Jul 2024 17:33:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767053.1177612; Mon, 29 Jul 2024 17:33:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYUF7-0000fQ-Ac; Mon, 29 Jul 2024 17:33:05 +0000 Received: by outflank-mailman (input) for mailman id 767053; Mon, 29 Jul 2024 17:33:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYUF6-0000fK-91 for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 17:33:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYUF6-0003G2-3j for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 17:33:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYUF6-0004Z8-2S for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 17:33:04 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=pXpCCNpV2ElFI504Ja2vdZj7BMsf1JTR5o6roz3LB0Y=; b=tCslxaQhJy9npspRgxWCoiNlAR 711NFwpdTq9m1Vbexkvu5wL6g+VeaY7yuHX4FzmD35JdIVDOh++IFnyLtZOtHNXOZTycWyOw3oIoC snsSqVTqsHAObhg/MbRKvyRgaZFUcJK1ss31kFzR+lrzCACQehmrzDkHIGhBH+YVaOKE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.19] Config.mk: Bump tags to 4.19.0 final Message-Id: Date: Mon, 29 Jul 2024 17:33:04 +0000 commit b2d2878ab2686b92fcdd7bbca4ff4c312a42bc11 Author: Julien Grall AuthorDate: Mon Jul 29 18:18:01 2024 +0100 Commit: Julien Grall CommitDate: Mon Jul 29 18:18:01 2024 +0100 Config.mk: Bump tags to 4.19.0 final Signed-off-by: Julien Grall --- Config.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Config.mk b/Config.mk index 8f759e95b3..ac8fb847ce 100644 --- a/Config.mk +++ b/Config.mk @@ -221,10 +221,10 @@ OVMF_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/ovmf.git OVMF_UPSTREAM_REVISION ?= ba91d0292e593df8528b66f99c1b0b14fadc8e16 QEMU_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/qemu-xen.git -QEMU_UPSTREAM_REVISION ?= qemu-xen-4.19.0-rc4 +QEMU_UPSTREAM_REVISION ?= qemu-xen-4.19.0 MINIOS_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/mini-os.git -MINIOS_UPSTREAM_REVISION ?= xen-4.19.0-rc4 +MINIOS_UPSTREAM_REVISION ?= xen-RELEASE-4.19.0 SEABIOS_UPSTREAM_URL ?= https://xenbits.xen.org/git-http/seabios.git SEABIOS_UPSTREAM_REVISION ?= rel-1.16.3 @@ -233,7 +233,7 @@ ETHERBOOT_NICS ?= rtl8139 8086100e QEMU_TRADITIONAL_URL ?= https://xenbits.xen.org/git-http/qemu-xen-traditional.git -QEMU_TRADITIONAL_REVISION ?= xen-4.19.0-rc4 +QEMU_TRADITIONAL_REVISION ?= xen-4.19.0 # Wed Jul 15 10:01:40 2020 +0100 # qemu-trad: remove Xen path dependencies -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.19 From xen-changelog-bounces@lists.xenproject.org Mon Jul 29 17:33:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 29 Jul 2024 17:33:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767054.1177615 (Exim 4.92) (envelope-from ) id 1sYUFH-0000hL-EX; Mon, 29 Jul 2024 17:33:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767054.1177615; Mon, 29 Jul 2024 17:33:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYUFH-0000hE-C8; Mon, 29 Jul 2024 17:33:15 +0000 Received: by outflank-mailman (input) for mailman id 767054; Mon, 29 Jul 2024 17:33:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYUFG-0000h4-98 for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 17:33:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYUFG-0003GC-7E for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 17:33:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYUFG-0004b2-5q for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 17:33:14 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=nrXLpXoCHayP2e8i64Y/+KmbD2pzpjQnKpohTZ/AaEc=; b=SWK9hiz17n1amjZvtr3wMOB7ML tPNkwh8kTZhaQzuYoGG9A9wx/rT6AY2KI4C6+Ljv0lqfx6DHWUe4WeazGXjXMWs+w/2Fer61Mypjx fu56/lU3mtBu9TOV1cT40kSqMvB7phnsw0H7GQByPS38xPDmi62Xmd98bdkfoI344HHA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.19] README: make heading say 4.19 Message-Id: Date: Mon, 29 Jul 2024 17:33:14 +0000 commit df9b8a649f0424e0a949c0f9a7961724bbe8ea70 Author: Julien Grall AuthorDate: Mon Jul 29 18:20:08 2024 +0100 Commit: Julien Grall CommitDate: Mon Jul 29 18:20:08 2024 +0100 README: make heading say 4.19 Signed-off-by: Julien Grall --- README | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README b/README index 560247e710..5cacce282e 100644 --- a/README +++ b/README @@ -1,11 +1,11 @@ -################################################# +################################## __ __ _ _ _ ___ -\ \/ /___ _ __ | || | / |/ _ \ _ __ ___ - \ // _ \ '_ \ | || |_ | | (_) |_____| '__/ __| - / \ __/ | | | |__ _|| |\__, |_____| | | (__ -/_/\_\___|_| |_| |_|(_)_| /_/ |_| \___| +\ \/ /___ _ __ | || | / |/ _ \ + \ // _ \ '_ \ | || |_ | | (_) | + / \ __/ | | | |__ _|| |\__, | +/_/\_\___|_| |_| |_|(_)_| /_/ -################################################# +################################## https://www.xen.org/ -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.19 From xen-changelog-bounces@lists.xenproject.org Mon Jul 29 17:33:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Mon, 29 Jul 2024 17:33:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767055.1177620 (Exim 4.92) (envelope-from ) id 1sYUFR-0000k4-GQ; Mon, 29 Jul 2024 17:33:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767055.1177620; Mon, 29 Jul 2024 17:33:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYUFR-0000ju-DX; Mon, 29 Jul 2024 17:33:25 +0000 Received: by outflank-mailman (input) for mailman id 767055; Mon, 29 Jul 2024 17:33:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYUFQ-0000jd-Ay for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 17:33:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYUFQ-0003GJ-A2 for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 17:33:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYUFQ-0004dT-9M for xen-changelog@lists.xenproject.org; Mon, 29 Jul 2024 17:33:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=8fBQEVEkNXcM2aIARLUXnJww6HOYWS5FRIP4mNLtGDI=; b=HvqsrelUbCDEutHAX88VmwqfAW h8/Xir2op00foVJ1C0FL1CIWtQAzRKJ7nlfieCaPLLCK78kw9bAVY3UBPNkdY7/2ZPbAix+7Ehnck G2vgTFgMwMxv5YWH5BxvMZZlqKmxwpljbD6FTV9hTzwy0EL2wfsiTxSl3xK6ng4KCx7I=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging-4.19] Set 4.19 version Message-Id: Date: Mon, 29 Jul 2024 17:33:24 +0000 commit 026c9fa29716b0ff0f8b7c687908e71ba29cf239 Author: Julien Grall AuthorDate: Mon Jul 29 18:20:45 2024 +0100 Commit: Julien Grall CommitDate: Mon Jul 29 18:20:45 2024 +0100 Set 4.19 version Signed-off-by: Julien Grall --- xen/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/Makefile b/xen/Makefile index e9fd19536f..16055101fb 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -6,7 +6,7 @@ this-makefile := $(call lastword,$(MAKEFILE_LIST)) # All other places this is stored (eg. compile.h) should be autogenerated. export XEN_VERSION = 4 export XEN_SUBVERSION = 19 -export XEN_EXTRAVERSION ?= -rc$(XEN_VENDORVERSION) +export XEN_EXTRAVERSION ?= .0$(XEN_VENDORVERSION) export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) -include xen-version -- generated by git-patchbot for /home/xen/git/xen.git#staging-4.19 From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 01:11:10 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 01:11:10 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767225.1177813 (Exim 4.92) (envelope-from ) id 1sYbOJ-0007Bx-Uz; Tue, 30 Jul 2024 01:11:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767225.1177813; Tue, 30 Jul 2024 01:11:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYbOJ-0007Bp-SK; Tue, 30 Jul 2024 01:11:03 +0000 Received: by outflank-mailman (input) for mailman id 767225; Tue, 30 Jul 2024 01:11:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYbOI-0007Bj-DU for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 01:11:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYbOI-0006TC-CI for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 01:11:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYbOI-0000rx-8B for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 01:11:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=w9w1rksMVnWNo61BHf46+wFENRpyv1GU0DmXNQMytsw=; b=ArW+RBC1u6sZ5FCxlz/cEwj4RL stvw7dZ0QDkMAGXxqeBU/CqnGJtAp1VIbiaqqRo+kalxaATF+dMKhRQMZksAvqOsZkRPxh5QKhazo wNYIWy8ix7JvBy3uNYk9gqgYDokCeviCY9hZ2CEcgxmrDrTc83ijPwRQ1VcPVCTOXVV8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.19] SUPPORT.md: Define support lifetime Message-Id: Date: Tue, 30 Jul 2024 01:11:02 +0000 commit 6ce22ee4ba70a2ce6b983925629fa5844340e98c Author: Julien Grall AuthorDate: Sat Jul 27 11:45:46 2024 +0100 Commit: Julien Grall CommitDate: Mon Jul 29 16:36:29 2024 +0100 SUPPORT.md: Define support lifetime Signed-off-by: Julien Grall Release-Acked-By: Oleksii Kurochko --- SUPPORT.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SUPPORT.md b/SUPPORT.md index 77d2a7a7db..8b998d9bc7 100644 --- a/SUPPORT.md +++ b/SUPPORT.md @@ -9,13 +9,13 @@ for the definitions of the support status levels etc. # Release Support - Xen-Version: 4.19-rc - Initial-Release: n/a - Supported-Until: TBD - Security-Support-Until: Unreleased - not yet security-supported + Xen-Version: 4.19 + Initial-Release: 2024-07-29 + Supported-Until: 2026-01-29 + Security-Support-Until: 2027-07-29 Release Notes -: RN +: RN # Feature Support -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.19 From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 01:11:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 01:11:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767226.1177818 (Exim 4.92) (envelope-from ) id 1sYbOU-0007Dn-0H; Tue, 30 Jul 2024 01:11:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767226.1177818; Tue, 30 Jul 2024 01:11:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYbOT-0007Df-Tp; Tue, 30 Jul 2024 01:11:13 +0000 Received: by outflank-mailman (input) for mailman id 767226; Tue, 30 Jul 2024 01:11:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYbOS-0007DV-Gd for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 01:11:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYbOS-0006Te-FY for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 01:11:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYbOS-0000sg-EY for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 01:11:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Xn3E7FvzpNS3PR/rwN60NGzc8mtT0Ts4vCs+44F2x5s=; b=Xl6TgJZDBJbGTcpUnHT2L4yxcM yCB9905H+z0RNHLPKyMtvL4h/on/i+8LDgDWQG+y67RQ95uJhOzxoY54v+xQUq/pizvYIIpprpDqK 71RQ4APDpasCTyaE+H4+Gc6ISu/PmL66mtqmW/avOKv5YLavCUE/Wn8nIWEYkFFHzVh8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen stable-4.19] CHANGELOG.md: Finalize changes in 4.19 release cycle Message-Id: Date: Tue, 30 Jul 2024 01:11:12 +0000 commit fe84f5392d8c96d7d73c0cf02413eeff0ef2a40e Author: Oleksii Kurochko AuthorDate: Mon Jul 29 13:52:36 2024 +0200 Commit: Julien Grall CommitDate: Mon Jul 29 16:36:41 2024 +0100 CHANGELOG.md: Finalize changes in 4.19 release cycle Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich (cherry picked from commit 8b5016e28737f140926619b14b8ca291dc4c5e62) --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8fbe82df6..f143a924ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,11 +23,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) using a standalone library implementation. - xenalyze no longer requires `--svm-mode` when analyzing traces generated on AMD CPUs + - Code symbol annotations and MISRA compliance improvements. + - CI updates: + - Minimum fixes to rebuild the containers, following the HEREDOC problems. + - Rebuild containers to have testing with up-to-date LTS distros. + - Few build system checks, and strip the obsolete contents of + the build containers. ### Added - On x86: - Introduce a new x2APIC driver that uses Cluster Logical addressing mode for IPIs and Physical addressing mode for external interrupts. + - On Arm: + - FF-A notification support. + - Introduction of dynamic node programming using overlay dtbo. - Add a new 9pfs backend running as a daemon in dom0. First user is Xenstore-stubdom now being able to support full Xenstore trace capability. - libxl support for backendtype=tap with tapback. -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.19 From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 04:44:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 04:44:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767235.1177832 (Exim 4.92) (envelope-from ) id 1sYeiQ-0000v0-L8; Tue, 30 Jul 2024 04:44:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767235.1177832; Tue, 30 Jul 2024 04:44:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYeiQ-0000ur-IU; Tue, 30 Jul 2024 04:44:02 +0000 Received: by outflank-mailman (input) for mailman id 767235; Tue, 30 Jul 2024 04:44:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYeiQ-0000uj-48 for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 04:44:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYeiQ-0002o6-28 for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 04:44:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYeiP-0006kC-Ve for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 04:44:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=PKFMSp31hVegrw/gRdxO1DmGuNCl5CbbPnYZLQaiTfM=; b=MndLLyGCSNtUbkgJVMTvqTxNqv ae++c5TzC0qkZTJDenCNEf1YgdGoJqmNu2zI99QiPznCHhmYGNE8buzIW47wdEvfoP1hf9lsF/mWF YhaxFVtTWfaJHmUxe4k2BW/pGqmpUM6snT0uzv/hA1CqQcReaH8DXpVRw1n6JKmlpfTA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] CHANGELOG.md: Finalize changes in 4.19 release cycle Message-Id: Date: Tue, 30 Jul 2024 04:44:01 +0000 commit 8b5016e28737f140926619b14b8ca291dc4c5e62 Author: Oleksii Kurochko AuthorDate: Mon Jul 29 13:52:36 2024 +0200 Commit: Julien Grall CommitDate: Mon Jul 29 16:34:57 2024 +0100 CHANGELOG.md: Finalize changes in 4.19 release cycle Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3b788df61..92f5825bff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,11 +31,20 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) using a standalone library implementation. - xenalyze no longer requires `--svm-mode` when analyzing traces generated on AMD CPUs + - Code symbol annotations and MISRA compliance improvements. + - CI updates: + - Minimum fixes to rebuild the containers, following the HEREDOC problems. + - Rebuild containers to have testing with up-to-date LTS distros. + - Few build system checks, and strip the obsolete contents of + the build containers. ### Added - On x86: - Introduce a new x2APIC driver that uses Cluster Logical addressing mode for IPIs and Physical addressing mode for external interrupts. + - On Arm: + - FF-A notification support. + - Introduction of dynamic node programming using overlay dtbo. - Add a new 9pfs backend running as a daemon in dom0. First user is Xenstore-stubdom now being able to support full Xenstore trace capability. - libxl support for backendtype=tap with tapback. -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 09:55:09 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 09:55:09 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767426.1178040 (Exim 4.92) (envelope-from ) id 1sYjZO-0004ss-RX; Tue, 30 Jul 2024 09:55:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767426.1178040; Tue, 30 Jul 2024 09:55:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjZO-0004sl-OZ; Tue, 30 Jul 2024 09:55:02 +0000 Received: by outflank-mailman (input) for mailman id 767426; Tue, 30 Jul 2024 09:55:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjZO-0004sR-6n for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 09:55:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjZN-0001SM-SB for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 09:55:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYjZN-0005D5-Qm for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 09:55:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=b8Y4GMbHMOd4XwlQQRH/+iIl9tfC4HjdoppiYDAFOSY=; b=j9kUS7aE5v2hCQZGJUTAugC50G +C3UaSQ0HlIL/GW0DVQ69KH7XJB96YXFM18WzEWvklTeVqy1MyyS+U/RbSFENiGiJRKG0VTblLvni sWt85iDF8VeD46XwP2pPmuSTHF6lfKVkBVduQcYmPqKbJRRsWFeItAMGEdawzyaR/PiE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [mini-os master] mini-os: put sanity_check() under CONFIG_TEST Message-Id: Date: Tue, 30 Jul 2024 09:55:01 +0000 commit dc3b68bf37f401c98d598e37344a73a60a4a67e9 Author: Juergen Gross AuthorDate: Tue Jul 30 11:50:02 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:50:02 2024 +0200 mini-os: put sanity_check() under CONFIG_TEST Hide the sanity_check() function, as it is used nowhere. By putting it under #ifdef CONFIG_TEST it will stay around, but it won't be included in normal production builds. Call sanity_check() from the periodic thread of the test app, causing a sanity check every second. Since any application linked with Mini-OS can't call sanity_check() (there is no EXPORT_SYMBOL for it), there is zero chance of breaking any use case. Signed-off-by: Juergen Gross Reviewed-by: Samuel Thibault --- include/lib.h | 2 ++ mm.c | 2 ++ test.c | 1 + 3 files changed, 5 insertions(+) diff --git a/include/lib.h b/include/lib.h index abd4e9a..de67bab 100644 --- a/include/lib.h +++ b/include/lib.h @@ -152,8 +152,10 @@ do { \ #define BUG_ON(x) ASSERT(!(x)) +#ifdef CONFIG_TEST /* Consistency check as much as possible. */ void sanity_check(void); +#endif /* Get own domid. */ domid_t get_domid(void); diff --git a/mm.c b/mm.c index 4aa0c6c..a5d3f5e 100644 --- a/mm.c +++ b/mm.c @@ -395,6 +395,7 @@ void fini_mm(void) { } +#ifdef CONFIG_TEST void sanity_check(void) { int x; @@ -410,3 +411,4 @@ void sanity_check(void) } } } +#endif diff --git a/test.c b/test.c index 465c54e..4dd6e26 100644 --- a/test.c +++ b/test.c @@ -185,6 +185,7 @@ static void periodic_thread(void *p) { gettimeofday(&tv, NULL); printk("T(s=%ld us=%ld)\n", tv.tv_sec, tv.tv_usec); + sanity_check(); msleep(1000); } } -- generated by git-patchbot for /home/xen/git/mini-os.git#master From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 10:00:05 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 10:00:05 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767434.1178045 (Exim 4.92) (envelope-from ) id 1sYjeG-00064L-6C; Tue, 30 Jul 2024 10:00:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767434.1178045; Tue, 30 Jul 2024 10:00:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjeG-00063r-2n; Tue, 30 Jul 2024 10:00:04 +0000 Received: by outflank-mailman (input) for mailman id 767434; Tue, 30 Jul 2024 10:00:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjeF-0005xN-IS for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjeF-0001dc-DM for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYjeF-0005hJ-CE for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=wGmPuklcqpSBuXgjnOQqW+Z/Gfee3Q7xOAIyOBTOH40=; b=2XQeq6KdaE7Xnh9TUaPB9QPkIK cBHcYslMKPL4f1ykXnnL7BTxojYIbHQP1y4R/04vVTMoHh0nnocHX93DnqORdSoaWzX/cAeGjFeL+ g0idtJJQydLE5ANP65QMXuMjuQSsnbDyx4VjLiYl52NrdKY2WfpXUHWbsa+1olxlc3w0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/viridian: Clarify some viridian logging strings Message-Id: Date: Tue, 30 Jul 2024 10:00:03 +0000 commit ba709d514aac1484f8a0825d3907dda11cf569bd Author: Alejandro Vallejo AuthorDate: Tue Jul 30 11:51:23 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:51:23 2024 +0200 x86/viridian: Clarify some viridian logging strings It's sadically misleading to show an error without letters and expect the dmesg reader to understand it's in hex. The patch adds a 0x prefix to all hex numbers that don't already have it. On the one instance in which a boolean is printed as an integer, print it as a decimal integer instead so it's 0/1 in the common case and not misleading if it's ever not just that due to a bug. While at it, rename VIRIDIAN CRASH to VIRIDIAN GUEST_CRASH. Every member of a support team that looks at the message systematically believes "viridian" crashed, which is absolutely not what goes on. It's the guest asking the hypervisor for a sudden shutdown because it crashed, and stating why. Signed-off-by: Alejandro Vallejo Reviewed-by: Paul Durrant --- xen/arch/x86/hvm/viridian/synic.c | 2 +- xen/arch/x86/hvm/viridian/viridian.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/hvm/viridian/synic.c b/xen/arch/x86/hvm/viridian/synic.c index 3375e55e95..c3dc573b00 100644 --- a/xen/arch/x86/hvm/viridian/synic.c +++ b/xen/arch/x86/hvm/viridian/synic.c @@ -172,7 +172,7 @@ int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val) vector = new.vector; vv->vector_to_sintx[vector] = sintx; - printk(XENLOG_G_INFO "%pv: VIRIDIAN SINT%u: vector: %x\n", v, sintx, + printk(XENLOG_G_INFO "%pv: VIRIDIAN SINT%u: vector: %#x\n", v, sintx, vector); *vs = new; diff --git a/xen/arch/x86/hvm/viridian/viridian.c b/xen/arch/x86/hvm/viridian/viridian.c index 0496c52ed5..21480d9ee7 100644 --- a/xen/arch/x86/hvm/viridian/viridian.c +++ b/xen/arch/x86/hvm/viridian/viridian.c @@ -253,7 +253,7 @@ static void dump_guest_os_id(const struct domain *d) goi = &d->arch.hvm.viridian->guest_os_id; printk(XENLOG_G_INFO - "d%d: VIRIDIAN GUEST_OS_ID: vendor: %x os: %x major: %x minor: %x sp: %x build: %x\n", + "d%d: VIRIDIAN GUEST_OS_ID: vendor: %#x os: %#x major: %#x minor: %#x sp: %#x build: %#x\n", d->domain_id, goi->vendor, goi->os, goi->major, goi->minor, goi->service_pack, goi->build_number); } @@ -264,7 +264,7 @@ static void dump_hypercall(const struct domain *d) hg = &d->arch.hvm.viridian->hypercall_gpa; - printk(XENLOG_G_INFO "d%d: VIRIDIAN HYPERCALL: enabled: %x pfn: %lx\n", + printk(XENLOG_G_INFO "d%d: VIRIDIAN HYPERCALL: enabled: %u pfn: %#lx\n", d->domain_id, hg->enabled, (unsigned long)hg->pfn); } @@ -372,7 +372,8 @@ int guest_wrmsr_viridian(struct vcpu *v, uint32_t idx, uint64_t val) d->shutdown_code = SHUTDOWN_crash; spin_unlock(&d->shutdown_lock); - gprintk(XENLOG_WARNING, "VIRIDIAN CRASH: %lx %lx %lx %lx %lx\n", + gprintk(XENLOG_WARNING, + "VIRIDIAN GUEST_CRASH: %#lx %#lx %#lx %#lx %#lx\n", vv->crash_param[0], vv->crash_param[1], vv->crash_param[2], vv->crash_param[3], vv->crash_param[4]); break; @@ -1056,7 +1057,7 @@ void viridian_dump_guest_page(const struct vcpu *v, const char *name, if ( !vp->msr.enabled ) return; - printk(XENLOG_G_INFO "%pv: VIRIDIAN %s: pfn: %lx\n", + printk(XENLOG_G_INFO "%pv: VIRIDIAN %s: pfn: %#lx\n", v, name, (unsigned long)vp->msr.pfn); } -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 10:00:16 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 10:00:16 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767435.1178048 (Exim 4.92) (envelope-from ) id 1sYjeQ-0006bG-76; Tue, 30 Jul 2024 10:00:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767435.1178048; Tue, 30 Jul 2024 10:00:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjeQ-0006b8-4P; Tue, 30 Jul 2024 10:00:14 +0000 Received: by outflank-mailman (input) for mailman id 767435; Tue, 30 Jul 2024 10:00:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjeP-0006b0-HL for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjeP-0001e0-GQ for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYjeP-0005id-FR for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=AlYsvGtRmJ1XjGvE28eIPtzGAVFYIz/bnoBSs+Fu1Q8=; b=omp65qeeHZJ5Jmm9admCqvvPrw O6fCjQFa2nJtx5M38M7yPw3JdbUlfFerkhyaSv9mLH33wz0Itr9HnOpQ8Owtgo6sCU6i5kbN2Jj5D JeWXXnUaQqCnnr+SV7xZlod7ER6+0XlqKvwyoFeCwb9Ofdz6YWPobeVEk8k2knnkI7r8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/cpupools: silence maybe-unitialized warning Message-Id: Date: Tue, 30 Jul 2024 10:00:13 +0000 commit 1adc5fbfa6627da352f97d84a8a752084da4419f Author: Stewart Hildebrand AuthorDate: Tue Jul 30 11:52:03 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:52:03 2024 +0200 xen/cpupools: silence maybe-unitialized warning When building with gcc with -finstrument-functions, optimization level -O1, CONFIG_HYPFS=y and # CONFIG_HAS_SCHED_GRANULARITY is not set, the the following build warning (error) is encountered: common/sched/cpupool.c: In function ‘cpupool_gran_write’: common/sched/cpupool.c:1220:26: error: ‘gran’ may be used uninitialized [-Werror=maybe-uninitialized] 1220 | 0 : cpupool_check_granularity(gran); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ common/sched/cpupool.c:1207:21: note: ‘gran’ declared here 1207 | enum sched_gran gran; | ^~~~ This is a false positive. Silence the warning (error) by initializing the variable. Signed-off-by: Stewart Hildebrand Reviewed-by: Juergen Gross --- xen/common/sched/cpupool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/common/sched/cpupool.c b/xen/common/sched/cpupool.c index 57dfee26f2..3d02c7b706 100644 --- a/xen/common/sched/cpupool.c +++ b/xen/common/sched/cpupool.c @@ -103,6 +103,7 @@ custom_param("sched-gran", sched_select_granularity); #elif defined(CONFIG_HYPFS) static int sched_gran_get(const char *str, enum sched_gran *mode) { + *mode = SCHED_GRAN_cpu; return -EINVAL; } #endif -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 10:00:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 10:00:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767436.1178052 (Exim 4.92) (envelope-from ) id 1sYjea-0006db-8h; Tue, 30 Jul 2024 10:00:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767436.1178052; Tue, 30 Jul 2024 10:00: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 1sYjea-0006dS-5y; Tue, 30 Jul 2024 10:00:24 +0000 Received: by outflank-mailman (input) for mailman id 767436; Tue, 30 Jul 2024 10:00:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjeZ-0006dM-KN for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjeZ-0001e9-Jc for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYjeZ-0005ji-Ic for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=CYQerCnfB1TMSK+5Mejx4Ui7Ug/VurINzJXqJkKPIdE=; b=iyj+nMFHW9WSahtXx7uOTCFUTo 5xWm3i5ftBGenYwRI4iqcgzt1TF3tPODNieMhdH9A41hybWK39fK/l4h0AwthaBIyTauJKVQHoNrU nVrZ2D5UsKr/mHPi+WlUl/dUNuKCrXzbZpJILhLSz2zMWxCyHko7bAy8WDs4lyqOoGUM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] automation/eclair: fix deviation of MISRA C Rule 16.3 Message-Id: Date: Tue, 30 Jul 2024 10:00:23 +0000 commit 5f6548ea1fe2b2b8dc72a0362c72442e62955213 Author: Federico Serafini AuthorDate: Tue Jul 30 11:52:31 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:52:31 2024 +0200 automation/eclair: fix deviation of MISRA C Rule 16.3 Add missing escape for the final dot of the fallthrough comment, extend the search of a fallthrough comment up to 2 lines after the last statement and improve the text of the justification. Fixes: a128d8da91 ("automation/eclair: add deviations for MISRA C:2012 Rule 16.3") Reported-by: Jan Beulich Signed-off-by: Federico Serafini Acked-by: Stefano Stabellini --- automation/eclair_analysis/ECLAIR/deviations.ecl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl index 0af1cb93d1..603480161e 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -482,9 +482,8 @@ safe." -config=MC3R1.R16.3,reports+={safe, "any_area(end_loc(any_exp(text(/BUG\\(\\);/))))"} -doc_end --doc_begin="Switch clauses not ending with the break statement are safe if an -explicit comment indicating the fallthrough intention is present." --config=MC3R1.R16.3,reports+={safe, "any_area(end_loc(any_exp(text(^(?s).*/\\* [fF]all ?through.? \\*/.*$,0..1))))"} +-doc_begin="Switch clauses ending with an explicit comment indicating the fallthrough intention are safe." +-config=MC3R1.R16.3,reports+={safe, "any_area(end_loc(any_exp(text(^(?s).*/\\* [fF]all ?through\\.? \\*/.*$,0..2))))"} -doc_end -doc_begin="Switch statements having a controlling expression of enum type deliberately do not have a default case: gcc -Wall enables -Wswitch which warns (and breaks the build as we use -Werror) if one of the enum labels is missing from the switch." -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 10:00:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 10:00:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767437.1178057 (Exim 4.92) (envelope-from ) id 1sYjek-0006gB-A7; Tue, 30 Jul 2024 10:00:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767437.1178057; Tue, 30 Jul 2024 10:00:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjek-0006g3-7O; Tue, 30 Jul 2024 10:00:34 +0000 Received: by outflank-mailman (input) for mailman id 767437; Tue, 30 Jul 2024 10:00:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjej-0006fv-Nl for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjej-0001eG-MW for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYjej-0005ko-Lk for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=U+q3YqEqXuDOvEvBNT67qIP1jQteU1XHeGYUNq82gyI=; b=U//tcSe6euLqObA17QgRTBA+hO /4FofPrEe6jkWskP7lTWQXWftPU2Vn93S/H4M+oxvPauexn3ywKI2EPG3fJPYLTxKkt4k5utztQfR t/EPXmX9mC1eb9xASDwkPmv23fhcItyTlGue7GMPqTpYWJBG9LoJD42cEVtPIcEGYZ/k=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/vpmu: address violations of MISRA C Rule 16.3 Message-Id: Date: Tue, 30 Jul 2024 10:00:33 +0000 commit cd94e7cff8be9f6d742bb947451685408da6781d Author: Federico Serafini AuthorDate: Tue Jul 30 11:52:47 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:52:47 2024 +0200 x86/vpmu: address violations of MISRA C Rule 16.3 Add missing break statements to address violations of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Reviewed-by: Jan Beulich --- xen/arch/x86/cpu/vpmu.c | 3 +++ xen/arch/x86/cpu/vpmu_intel.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c index a7bc0cd1fc..b2ba999412 100644 --- a/xen/arch/x86/cpu/vpmu.c +++ b/xen/arch/x86/cpu/vpmu.c @@ -663,6 +663,8 @@ long do_xenpmu_op( if ( pmu_params.version.maj != XENPMU_VER_MAJ ) return -EINVAL; + + break; } switch ( op ) @@ -776,6 +778,7 @@ long do_xenpmu_op( default: ret = -EINVAL; + break; } return ret; diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen/arch/x86/cpu/vpmu_intel.c index cd414165df..26dd3a9358 100644 --- a/xen/arch/x86/cpu/vpmu_intel.c +++ b/xen/arch/x86/cpu/vpmu_intel.c @@ -666,6 +666,7 @@ static int cf_check core2_vpmu_do_wrmsr(unsigned int msr, uint64_t msr_content) xen_pmu_cntr_pair[tmp].control = msr_content; } + break; } if ( type != MSR_TYPE_GLOBAL ) @@ -713,6 +714,7 @@ static int cf_check core2_vpmu_do_rdmsr(unsigned int msr, uint64_t *msr_content) break; default: rdmsrl(msr, *msr_content); + break; } } else if ( msr == MSR_IA32_MISC_ENABLE ) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 10:00:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 10:00:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767438.1178059 (Exim 4.92) (envelope-from ) id 1sYjev-0006iw-Bg; Tue, 30 Jul 2024 10:00:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767438.1178059; Tue, 30 Jul 2024 10:00:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjev-0006io-8p; Tue, 30 Jul 2024 10:00:45 +0000 Received: by outflank-mailman (input) for mailman id 767438; Tue, 30 Jul 2024 10:00:43 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjet-0006ie-QX for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:43 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjet-0001eQ-Pi for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:43 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYjet-0005m4-On for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:43 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=EQGcUP3qIIq4zDA4ckRntkvacO4cMXSsvujN5aBdHRs=; b=J6ZFk//1g7OYauPUyvgaveUXph nMm49gJ0nnRrANo+YTr+2UM4jHfJ7ON6vTUPSusE2B8A60TZb7SLaOZ7cU5mJzLNZVKH2DbiN1sNs C6jZde9EXM4rpEekO8vWL18zDuODbTh6jV9NSrjKyglMQKckkhr66hkYzjVt6ABYod5Q=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/traps: address violations of MISRA C Rule 16.3 Message-Id: Date: Tue, 30 Jul 2024 10:00:43 +0000 commit 2c9044adf815f92db4e9cfe7c25e60265b7d45a0 Author: Federico Serafini AuthorDate: Tue Jul 30 11:53:06 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:53:06 2024 +0200 x86/traps: address violations of MISRA C Rule 16.3 Add break or pseudo keyword fallthrough to address violations of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/traps.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index ee91fc56b1..7a9299ae6c 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1186,6 +1186,7 @@ void cpuid_hypervisor_leaves(const struct vcpu *v, uint32_t leaf, default: ASSERT_UNREACHABLE(); + break; } } @@ -1748,6 +1749,7 @@ static void io_check_error(const struct cpu_user_regs *regs) { case 'd': /* 'dom0' */ nmi_hwdom_report(_XEN_NMIREASON_io_error); + break; case 'i': /* 'ignore' */ break; default: /* 'fatal' */ @@ -1768,6 +1770,7 @@ static void unknown_nmi_error(const struct cpu_user_regs *regs, { case 'd': /* 'dom0' */ nmi_hwdom_report(_XEN_NMIREASON_unknown); + break; case 'i': /* 'ignore' */ break; default: /* 'fatal' */ -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 10:00:55 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 10:00:55 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767439.1178063 (Exim 4.92) (envelope-from ) id 1sYjf5-0006m4-Cq; Tue, 30 Jul 2024 10:00:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767439.1178063; Tue, 30 Jul 2024 10:00:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjf5-0006lx-AN; Tue, 30 Jul 2024 10:00:55 +0000 Received: by outflank-mailman (input) for mailman id 767439; Tue, 30 Jul 2024 10:00:53 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjf3-0006lk-Td for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:53 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjf3-0001eZ-So for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:53 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYjf3-0005n0-Ru for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:00:53 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Mxr61Z5Oaf9AcwmMgAp7gkalfMCUHi+w1CNSlw1VtlM=; b=oggfi9aRedmd50/Bamxq4ZYR3e mfRtrX154VqaJ8W7qvpzADJEd+kzySDjW7TjnP46xMlFK2unP7D3hnBVaktdy/gGpzo+0SIYNXOJ9 QiP/nROhJop6JcKicOG04gYu7ShKdMU8h0Yc1USzO5K+xTN/FV8IzcRstnq0YMSsyiX4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/mce: address violations of MISRA C Rule 16.3 Message-Id: Date: Tue, 30 Jul 2024 10:00:53 +0000 commit 20716a4b1ceea298e4b31d6596403cbc7548ef9f Author: Federico Serafini AuthorDate: Tue Jul 30 11:53:26 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:53:26 2024 +0200 x86/mce: address violations of MISRA C Rule 16.3 Add missing break statements to address violations of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/cpu/mcheck/mce_amd.c | 1 + xen/arch/x86/cpu/mcheck/mce_intel.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/xen/arch/x86/cpu/mcheck/mce_amd.c b/xen/arch/x86/cpu/mcheck/mce_amd.c index 3318b8204f..4f06a3153b 100644 --- a/xen/arch/x86/cpu/mcheck/mce_amd.c +++ b/xen/arch/x86/cpu/mcheck/mce_amd.c @@ -201,6 +201,7 @@ static void mcequirk_amd_apply(enum mcequirk_amd_flags flags) default: ASSERT(flags == MCEQUIRK_NONE); + break; } } diff --git a/xen/arch/x86/cpu/mcheck/mce_intel.c b/xen/arch/x86/cpu/mcheck/mce_intel.c index dd812f4b8a..9574dedbfd 100644 --- a/xen/arch/x86/cpu/mcheck/mce_intel.c +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c @@ -896,6 +896,8 @@ static void intel_init_ppin(const struct cpuinfo_x86 *c) ppin_msr = 0; else if ( c == &boot_cpu_data ) ppin_msr = MSR_PPIN; + + break; } } -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 10:01:05 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 10:01:05 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767440.1178070 (Exim 4.92) (envelope-from ) id 1sYjfF-0006of-GF; Tue, 30 Jul 2024 10:01:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767440.1178070; Tue, 30 Jul 2024 10:01:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfF-0006oX-C5; Tue, 30 Jul 2024 10:01:05 +0000 Received: by outflank-mailman (input) for mailman id 767440; Tue, 30 Jul 2024 10:01:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfE-0006oN-0e for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfD-0001eu-W7 for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYjfD-0005oS-V3 for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=rLK2v1xqgjgmt2X0VuKfv8l7lxbNGQpCoOwyLnCPsqY=; b=NA6xdVulMnMbXC28BgGwuU1qJB F8PnMrkXObUmwF/gwkdyuJ6CQCIBMxziClxexTY5azU+eE42RkSWhmXXzLJazNDVofZ0NjU/QjB3e N0NG0SiKk/0UpuDAs2oiTFWInbJZl0Jg8SaH1wM/k70JCJjUYsoh+EJiZ12LX40BLHUc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/mpparse: address a violation of MISRA C Rule 16.3 Message-Id: Date: Tue, 30 Jul 2024 10:01:03 +0000 commit c8a92406c2f69b273a3b984a754fb437a6df8ddd Author: Federico Serafini AuthorDate: Tue Jul 30 11:53:46 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:53:46 2024 +0200 x86/mpparse: address a violation of MISRA C Rule 16.3 Add a missing break statement to address a violation of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/mpparse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c index d8ccab2449..306d8ed97a 100644 --- a/xen/arch/x86/mpparse.c +++ b/xen/arch/x86/mpparse.c @@ -544,6 +544,7 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) case 4: case 7: memcpy(bus.mpc_bustype, "MCA ", 6); + break; } MP_bus_info(&bus); if (mpc_default_type > 4) { -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 10:01:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 10:01:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767441.1178072 (Exim 4.92) (envelope-from ) id 1sYjfP-0006rp-I9; Tue, 30 Jul 2024 10:01:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767441.1178072; Tue, 30 Jul 2024 10:01:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfP-0006rh-FE; Tue, 30 Jul 2024 10:01:15 +0000 Received: by outflank-mailman (input) for mailman id 767441; Tue, 30 Jul 2024 10:01:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfO-0006rQ-4k for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfO-0001fK-3v for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYjfO-0005pV-23 for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:14 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=5HklTd/0V3zvXEF7+kykip+P3IKSTFys3LUBaGqavSM=; b=yVDNjKkmJwc3CMANXE6UizHtuM tRmZVIfgM2naE7ufMCTQYTCmpr4I9yUBXS9aQSdD5tSmKvRf6DUsZ0GvwitlniWjCWwTeBpKcWnzt WM5w5FLWD0VjcBO+wZOEHV2GLCwFlHmgPhQ55OW+sPBsd2Hl5/oondyDbnnM3XzWRou8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] misra: add deviation for headers that explicitly avoid guards Message-Id: Date: Tue, 30 Jul 2024 10:01:14 +0000 commit d2ff674a9c6664db666a92a45dd5f36344501f00 Author: Simone Ballarin AuthorDate: Tue Jul 30 11:54:11 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:54:11 2024 +0200 misra: add deviation for headers that explicitly avoid guards Some headers, under specific circumstances (documented in a comment at the beginning of the file), explicitly do not have strict inclusion guards: the caller is responsible for including them correctly. These files are not supposed to comply with Directive 4.10: "Precautions shall be taken in order to prevent the contents of a header file being included more than once" This patch adds deviation cooments for headers that avoid guards. Signed-off-by: Simone Ballarin Signed-off-by: Nicola Vetrini Signed-off-by: Alessandro Zucchelli Reviewed-by: Stefano Stabellini --- docs/misra/safe.json | 8 ++++++++ xen/include/public/arch-x86/cpufeatureset.h | 1 + xen/include/public/errno.h | 1 + 3 files changed, 10 insertions(+) diff --git a/docs/misra/safe.json b/docs/misra/safe.json index 3f18ef401c..44d1c4890e 100644 --- a/docs/misra/safe.json +++ b/docs/misra/safe.json @@ -68,6 +68,14 @@ }, { "id": "SAF-8-safe", + "analyser": { + "eclair": "MC3R1.D4.10" + }, + "name": "Dir 4.10: headers that leave it up to the caller to include them correctly", + "text": "Headers that deliberatively leave the responsability of their correct inclusion to the caller are allowed." + }, + { + "id": "SAF-9-safe", "analyser": {}, "name": "Sentinel", "text": "Next ID to be used" diff --git a/xen/include/public/arch-x86/cpufeatureset.h b/xen/include/public/arch-x86/cpufeatureset.h index d9eba5e9a7..3962ba9342 100644 --- a/xen/include/public/arch-x86/cpufeatureset.h +++ b/xen/include/public/arch-x86/cpufeatureset.h @@ -23,6 +23,7 @@ * their XEN_CPUFEATURE() being appropriate in the included context. */ +/* SAF-8-safe inclusion procedure left to caller */ #ifndef XEN_CPUFEATURE /* diff --git a/xen/include/public/errno.h b/xen/include/public/errno.h index 5a78a7607c..b9fc6762fb 100644 --- a/xen/include/public/errno.h +++ b/xen/include/public/errno.h @@ -17,6 +17,7 @@ * will unilaterally #undef XEN_ERRNO(). */ +/* SAF-8-safe inclusion procedure left to caller */ #ifndef XEN_ERRNO /* -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 10:01:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 10:01:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767442.1178075 (Exim 4.92) (envelope-from ) id 1sYjfZ-0006uR-JH; Tue, 30 Jul 2024 10:01:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767442.1178075; Tue, 30 Jul 2024 10:01:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfZ-0006uJ-Gh; Tue, 30 Jul 2024 10:01:25 +0000 Received: by outflank-mailman (input) for mailman id 767442; Tue, 30 Jul 2024 10:01:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfY-0006uA-7e for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfY-0001h3-6v for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYjfY-0005rF-66 for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=YckQnqTI4gB6BzX4rG31tv2sWhzzxaYJ9JmVIjV+cDw=; b=zW0i+sM3PP5QOwoNB6x2niLP57 4/6RT5yFK5+MdJYc08bt5CsiBy6eFVkMDwW1rXPjhiY9lZ6sovEAhdiE5vLqEsCxwlR/sn5Y0JGnR aQ63HNt2pM69EZvTv4iM4HrhmiL6vUWVjOcPe3lcm6yWCIatcHAN07NJwqzph2oSRKW8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] misra: modify deviations for empty and generated headers Message-Id: Date: Tue, 30 Jul 2024 10:01:24 +0000 commit 79b9c0cdd84fd5c4656b0e55cbb45e5199fa75fb Author: Simone Ballarin AuthorDate: Tue Jul 30 11:54:42 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:54:42 2024 +0200 misra: modify deviations for empty and generated headers This patch modifies deviations for Directive 4.10: "Precautions shall be taken in order to prevent the contents of a header file being included more than once" This patch avoids the file-based deviation for empty headers, and replaces it with a comment-based one using the format specified in docs/misra/safe.json. Generated headers are not generally safe against multi-inclusions, whether a header is safe depends on the nature of the generated code in the header. For that reason, this patch drops the deviation for generated headers. Signed-off-by: Simone Ballarin Reviewed-by: Stefano Stabellini Signed-off-by: Alessandro Zucchelli Signed-off-by: Nicola Vetrini --- automation/eclair_analysis/ECLAIR/deviations.ecl | 7 ------- docs/misra/safe.json | 8 ++++++++ xen/arch/arm/efi/runtime.h | 1 + xen/include/Makefile | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl index 603480161e..31b2ec669a 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -72,13 +72,6 @@ they are not instances of commented-out code." -config=MC3R1.D4.3,reports+={deliberate, "any_area(any_loc(file(arm64_bitops))&&context(name(int_clear_mask16)))"} -doc_end --doc_begin="This header file is autogenerated or empty, therefore it poses no -risk if included more than once." --file_tag+={empty_header, "^xen/arch/arm/efi/runtime\\.h$"} --file_tag+={autogen_headers, "^xen/include/xen/compile\\.h$||^xen/include/generated/autoconf.h$||^xen/include/xen/hypercall-defs.h$"} --config=MC3R1.D4.10,reports+={safe, "all_area(all_loc(file(empty_header||autogen_headers)))"} --doc_end - -doc_begin="Files that are intended to be included more than once do not need to conform to the directive." -config=MC3R1.D4.10,reports+={safe, "first_area(text(^/\\* This file is legitimately included multiple times\\. \\*/$, begin-4))"} diff --git a/docs/misra/safe.json b/docs/misra/safe.json index 44d1c4890e..ffa8bfdc4a 100644 --- a/docs/misra/safe.json +++ b/docs/misra/safe.json @@ -76,6 +76,14 @@ }, { "id": "SAF-9-safe", + "analyser": { + "eclair": "MC3R1.D4.10" + }, + "name": "Dir 4.10: empty headers", + "text": "Empty headers pose no risk if included more than once." + }, + { + "id": "SAF-10-safe", "analyser": {}, "name": "Sentinel", "text": "Next ID to be used" diff --git a/xen/arch/arm/efi/runtime.h b/xen/arch/arm/efi/runtime.h index 25afcebed1..4d2d40bf3c 100644 --- a/xen/arch/arm/efi/runtime.h +++ b/xen/arch/arm/efi/runtime.h @@ -1 +1,2 @@ /* Placeholder for ARM-specific runtime include/declarations */ +/* SAF-9-safe empty header */ diff --git a/xen/include/Makefile b/xen/include/Makefile index 2e61b50139..058b0a566b 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -53,7 +53,7 @@ cmd_compat_h = \ mv -f $@.new $@ quiet_cmd_stub_h = GEN $@ -cmd_stub_h = echo '/* empty */' >$@ +cmd_stub_h = echo '/* SAF-9-safe empty header */' >$@ quiet_cmd_compat_i = CPP $@ cmd_compat_i = $(CPP) $(filter-out -Wa$(comma)% -include %/include/xen/config.h,$(XEN_CFLAGS)) $(cppflags-y) -o $@ $< -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 10:01:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 10:01:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767443.1178081 (Exim 4.92) (envelope-from ) id 1sYjfj-0006x5-Ld; Tue, 30 Jul 2024 10:01:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767443.1178081; Tue, 30 Jul 2024 10:01:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfj-0006wy-IB; Tue, 30 Jul 2024 10:01:35 +0000 Received: by outflank-mailman (input) for mailman id 767443; Tue, 30 Jul 2024 10:01:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfi-0006wg-Bm for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfi-0001hA-9m for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYjfi-0005s5-96 for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=tSxCb785aINn5pPVj4ilbjUyaYDNtG7BYSnLdqNBAEU=; b=NJTOWOlEDgETfKQOhV9pZA0Yf/ /oHmvfn4/95AthcyVXa/TU7AazG0/+B49NcBS53jS7t3QTDy22dPvX4NHHD+UHetVxyr8xYA5kvNY Cy5bp4NkQSybnrjVHKcQia8dRkgKdw64elt2uMpjOfWu7ErLxE+wRofeJ819fxFmMNug=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] misra: add deviations for direct inclusion guards Message-Id: Date: Tue, 30 Jul 2024 10:01:34 +0000 commit 89719f57cca51f5e4b2c8acddce957ba8248b246 Author: Simone Ballarin AuthorDate: Tue Jul 30 11:55:09 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:55:09 2024 +0200 misra: add deviations for direct inclusion guards Add deviation comments to address violations of MISRA C:2012 Directive 4.10 ("Precautions shall be taken in order to prevent the contents of a header file being included more than once"). Inclusion guards must appear at the beginning of the headers (comments are permitted anywhere). This patch adds deviation comments using the format specified in docs/misra/safe.json for headers with just the direct inclusion guard before the inclusion guard since they are safe and not supposed to comply with the directive. Note that with SAF-10-safe in place, failures to have proper guards later in the header files will not be reported Signed-off-by: Simone Ballarin Signed-off-by: Alessandro Zucchelli Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- docs/misra/safe.json | 8 ++++++++ xen/arch/arm/include/asm/hypercall.h | 1 + xen/arch/x86/include/asm/hypercall.h | 1 + 3 files changed, 10 insertions(+) diff --git a/docs/misra/safe.json b/docs/misra/safe.json index ffa8bfdc4a..684346386e 100644 --- a/docs/misra/safe.json +++ b/docs/misra/safe.json @@ -84,6 +84,14 @@ }, { "id": "SAF-10-safe", + "analyser": { + "eclair": "MC3R1.D4.10" + }, + "name": "Dir 4.10: direct inclusion guard before", + "text": "Headers with just the direct inclusion guard before the inclusion guard are safe." + }, + { + "id": "SAF-11-safe", "analyser": {}, "name": "Sentinel", "text": "Next ID to be used" diff --git a/xen/arch/arm/include/asm/hypercall.h b/xen/arch/arm/include/asm/hypercall.h index ccd26c5184..07e231f8b5 100644 --- a/xen/arch/arm/include/asm/hypercall.h +++ b/xen/arch/arm/include/asm/hypercall.h @@ -1,3 +1,4 @@ +/* SAF-10-safe direct inclusion guard before */ #ifndef __XEN_HYPERCALL_H__ #error "asm/hypercall.h should not be included directly - include xen/hypercall.h instead" #endif diff --git a/xen/arch/x86/include/asm/hypercall.h b/xen/arch/x86/include/asm/hypercall.h index ec2edc771e..389fa62af2 100644 --- a/xen/arch/x86/include/asm/hypercall.h +++ b/xen/arch/x86/include/asm/hypercall.h @@ -2,6 +2,7 @@ * asm-x86/hypercall.h */ +/* SAF-10-safe direct inclusion guard before */ #ifndef __XEN_HYPERCALL_H__ #error "asm/hypercall.h should not be included directly - include xen/hypercall.h instead" #endif -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 10:01:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 10:01:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767444.1178084 (Exim 4.92) (envelope-from ) id 1sYjft-0006zs-MQ; Tue, 30 Jul 2024 10:01:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767444.1178084; Tue, 30 Jul 2024 10:01:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjft-0006zk-Jn; Tue, 30 Jul 2024 10:01:45 +0000 Received: by outflank-mailman (input) for mailman id 767444; Tue, 30 Jul 2024 10:01:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfs-0006zP-Eh for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjfs-0001hK-Ch for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:44 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYjfs-0005su-Bs for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:44 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=aw5xjMxVX2EQdTvuwJNZKwIaHV8shsCJz1jlGzVa3Dc=; b=PNviZnv8s1JM7s6Fi65vCTSt4U x9AlUS/2PXcy+6IkQeo4nW4eZWkCM93yxoLH2YJTi0kmZe/fmLko/rVuvRJfi/iarD6wl/TN9U9BY jBSkhZQQFdtyjMn2dlXDiZeSiwEldlfkWV3kEejH6DYiPbXw+gcxy1gFB0kldnbiQqi4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/pvh: Allow (un)map_pirq when dom0 is PVH Message-Id: Date: Tue, 30 Jul 2024 10:01:44 +0000 commit e42d107d0d8bfa82c92ec7ed69bac259effc97ad Author: Jiqian Chen AuthorDate: Tue Jul 30 11:55:36 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:55:36 2024 +0200 x86/pvh: Allow (un)map_pirq when dom0 is PVH If run Xen with PVH dom0 and hvm domU, hvm will map a pirq for a passthrough device by using gsi, see qemu code xen_pt_realize->xc_physdev_map_pirq and libxl code pci_add_dm_done->xc_physdev_map_pirq. Then xc_physdev_map_pirq will call into Xen, but in hvm_physdev_op, PHYSDEVOP_map_pirq is not allowed because currd is PVH dom0 and PVH has no X86_EMU_USE_PIRQ flag, it will fail at has_pirq check. So, allow PHYSDEVOP_map_pirq when dom0 is PVH and also allow PHYSDEVOP_unmap_pirq for the removal device path to unmap pirq. And add a new check to prevent (un)map when the subject domain doesn't have a notion of PIRQ. So that the interrupt of a passthrough device can be successfully mapped to pirq for domU with a notion of PIRQ when dom0 is PVH Signed-off-by: Jiqian Chen Signed-off-by: Huang Rui Signed-off-by: Jiqian Chen Reviewed-by: Jan Beulich Reviewed-by: Stefano Stabellini --- xen/arch/x86/hvm/hypercall.c | 6 ++++++ xen/arch/x86/physdev.c | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c index 7fb3136f0c..83a9b4fb1e 100644 --- a/xen/arch/x86/hvm/hypercall.c +++ b/xen/arch/x86/hvm/hypercall.c @@ -71,8 +71,14 @@ long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) switch ( cmd ) { + /* + * Only being permitted for management of other domains. + * Further restrictions are enforced in do_physdev_op. + */ case PHYSDEVOP_map_pirq: case PHYSDEVOP_unmap_pirq: + break; + case PHYSDEVOP_eoi: case PHYSDEVOP_irq_status_query: case PHYSDEVOP_get_free_pirq: diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c index d6dd622952..9f30a8c63a 100644 --- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -323,7 +323,11 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) if ( !d ) break; - ret = physdev_map_pirq(d, map.type, &map.index, &map.pirq, &msi); + /* Only mapping when the subject domain has a notion of PIRQ */ + if ( !is_hvm_domain(d) || has_pirq(d) ) + ret = physdev_map_pirq(d, map.type, &map.index, &map.pirq, &msi); + else + ret = -EOPNOTSUPP; rcu_unlock_domain(d); @@ -346,7 +350,11 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) if ( !d ) break; - ret = physdev_unmap_pirq(d, unmap.pirq); + /* Only unmapping when the subject domain has a notion of PIRQ */ + if ( !is_hvm_domain(d) || has_pirq(d) ) + ret = physdev_unmap_pirq(d, unmap.pirq); + else + ret = -EOPNOTSUPP; rcu_unlock_domain(d); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 10:01:55 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 10:01:55 +0000 Received: from list by lists.xenproject.org with outflank-mailman.767445.1178088 (Exim 4.92) (envelope-from ) id 1sYjg3-00072s-Nt; Tue, 30 Jul 2024 10:01:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 767445.1178088; Tue, 30 Jul 2024 10:01:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjg3-00072k-LE; Tue, 30 Jul 2024 10:01:55 +0000 Received: by outflank-mailman (input) for mailman id 767445; Tue, 30 Jul 2024 10:01:54 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjg2-00072a-Gs for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:54 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYjg2-0001hW-G4 for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:54 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYjg2-0005u3-F4 for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 10:01:54 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=adbtR3+vZ5hC8zBLbpfMqdFgPOQisgKC6q/2MOhTUYk=; b=ect7ig4Db7beOTaHqNzRzmvJ+8 EgMtpMHXG/9iMm51yDcW7QHTfOkji1BKaVgX+6Eymp3OZaqLqkuDjjwOOZf1P3+VO4hL9VxjHmoiZ +Y5FtY5fpzldl/VrwMy/lNJtj+VEO598WVBhLL8BX2JrauEXJBhHmLz6MAaiUPAfb9kA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] bunzip2: fix rare decompression failure Message-Id: Date: Tue, 30 Jul 2024 10:01:54 +0000 commit 303d3ff85c90ee4af4bad4e3b1d4932fa2634d64 Author: Ross Lagerwall AuthorDate: Tue Jul 30 11:55:56 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:55:56 2024 +0200 bunzip2: fix rare decompression failure The decompression code parses a huffman tree and counts the number of symbols for a given bit length. In rare cases, there may be >= 256 symbols with a given bit length, causing the unsigned char to overflow. This causes a decompression failure later when the code tries and fails to find the bit length for a given symbol. Since the maximum number of symbols is 258, use unsigned short instead. Fixes: ab77e81f6521 ("x86/dom0: support bzip2 and lzma compressed bzImage payloads") Signed-off-by: Ross Lagerwall Acked-by: Jan Beulich --- xen/common/bunzip2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/common/bunzip2.c b/xen/common/bunzip2.c index 4466426941..79f17162b1 100644 --- a/xen/common/bunzip2.c +++ b/xen/common/bunzip2.c @@ -221,7 +221,8 @@ static int __init get_next_block(struct bunzip_data *bd) RUNB) */ symCount = symTotal+2; for (j = 0; j < groupCount; j++) { - unsigned char length[MAX_SYMBOLS], temp[MAX_HUFCODE_BITS+1]; + unsigned char length[MAX_SYMBOLS]; + unsigned short temp[MAX_HUFCODE_BITS+1]; int minLen, maxLen, pp; /* Read Huffman code lengths for each symbol. They're stored in a way similar to mtf; record a starting -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 17:55:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 17:55:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768028.1178738 (Exim 4.92) (envelope-from ) id 1sYr3x-0004UX-5M; Tue, 30 Jul 2024 17:55:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768028.1178738; Tue, 30 Jul 2024 17:55:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr3x-0004UP-2q; Tue, 30 Jul 2024 17:55:05 +0000 Received: by outflank-mailman (input) for mailman id 768028; Tue, 30 Jul 2024 17:55:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr3v-0004UH-RS for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr3v-0002XF-IE for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYr3v-0001Mm-FQ for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=DEJk6QbylS6BAcTkxl9Axqjq7wFzvPx/izFI6UaJumg=; b=1PUKsbW+IMVmgr9evlBW/rZCTE tw/l1ViEB3RUOzIGKctdbR/haYBXp/9eY3THC50JdC7HxTMF55r+hIHnjydz5O0kur7NLX3gYs7oC ZbMWo3ApB67dgKQ4nCWRXqyx7tRobst945wCeqamcw9pg6hUcEg2DSyrZdIbaqdZpGaY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] Revert "x86/pvh: Allow (un)map_pirq when dom0 is PVH" Message-Id: Date: Tue, 30 Jul 2024 17:55:03 +0000 commit 90a8f4c7eab05c2323082a367b936d8de1a33071 Author: Andrew Cooper AuthorDate: Tue Jul 30 14:12:53 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 Revert "x86/pvh: Allow (un)map_pirq when dom0 is PVH" This reverts commit e42d107d0d8bfa82c92ec7ed69bac259effc97ad. The Gitlab CI {adl,zen3p}-pci-hvm-x86-64-gcc-debug tests says this breaks PCI Passthrough to HVM guests, with -EOPNOTSUPP. Signed-off-by: Andrew Cooper --- xen/arch/x86/hvm/hypercall.c | 6 ------ xen/arch/x86/physdev.c | 12 ++---------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c index 83a9b4fb1e..7fb3136f0c 100644 --- a/xen/arch/x86/hvm/hypercall.c +++ b/xen/arch/x86/hvm/hypercall.c @@ -71,14 +71,8 @@ long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) switch ( cmd ) { - /* - * Only being permitted for management of other domains. - * Further restrictions are enforced in do_physdev_op. - */ case PHYSDEVOP_map_pirq: case PHYSDEVOP_unmap_pirq: - break; - case PHYSDEVOP_eoi: case PHYSDEVOP_irq_status_query: case PHYSDEVOP_get_free_pirq: diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c index 9f30a8c63a..d6dd622952 100644 --- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -323,11 +323,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) if ( !d ) break; - /* Only mapping when the subject domain has a notion of PIRQ */ - if ( !is_hvm_domain(d) || has_pirq(d) ) - ret = physdev_map_pirq(d, map.type, &map.index, &map.pirq, &msi); - else - ret = -EOPNOTSUPP; + ret = physdev_map_pirq(d, map.type, &map.index, &map.pirq, &msi); rcu_unlock_domain(d); @@ -350,11 +346,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) if ( !d ) break; - /* Only unmapping when the subject domain has a notion of PIRQ */ - if ( !is_hvm_domain(d) || has_pirq(d) ) - ret = physdev_unmap_pirq(d, unmap.pirq); - else - ret = -EOPNOTSUPP; + ret = physdev_unmap_pirq(d, unmap.pirq); rcu_unlock_domain(d); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 17:55:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 17:55:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768029.1178743 (Exim 4.92) (envelope-from ) id 1sYr47-0004WU-78; Tue, 30 Jul 2024 17:55:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768029.1178743; Tue, 30 Jul 2024 17:55:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr47-0004WN-4H; Tue, 30 Jul 2024 17:55:15 +0000 Received: by outflank-mailman (input) for mailman id 768029; Tue, 30 Jul 2024 17:55:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr45-0004W7-Mi for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr45-0002XK-Ls for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYr45-0001Nh-Ks for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=SPOWYNGonnGpbrcpFNfqbuE+jToIcQfvJZdKlyRL9uE=; b=t/HTXpdTHqRrdOex5dWjx3gq3X J+RmlMqRburSCFD+nwzFxuAsZlidK4D1QFgcBPxITFj0KiGPa7Rwoql+gl3J6/8ozarLlxujB3dob WwsRV6u/kais+RhKiW0pXtCyy8mxmOULi6mk+Eyotg3kgVXsi6XT4TG2AMldqYYuPlUw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/mm: Drop l{1,2,3,4}e_write_atomic() Message-Id: Date: Tue, 30 Jul 2024 17:55:13 +0000 commit f51571fe7945f8e0d0a8ff8a438e8feb17d96aca Author: Roger Pau Monne AuthorDate: Fri Jul 26 17:21:45 2024 +0200 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 x86/mm: Drop l{1,2,3,4}e_write_atomic() The l{1,2,3,4}e_write_atomic() and non _atomic suffixed helpers share the same implementation, so it seems pointless and possibly confusing to have both. x86 32bit mode used to have a non-atomic PTE write that would split the write in two halves, but with Xen only supporting x86 64bit that's no longer present. Remove the l{1,2,3,4}e_write_atomic() helpers and switch it's user to l{1,2,3,4}e_write(), as that's also atomic. While there also remove pte_write{,_atomic}() and just use write_atomic() in the wrappers. No functional change intended. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/include/asm/page.h | 21 ++++-------------- xen/arch/x86/include/asm/x86_64/page.h | 2 -- xen/arch/x86/mm.c | 39 ++++++++++++++-------------------- 3 files changed, 20 insertions(+), 42 deletions(-) diff --git a/xen/arch/x86/include/asm/page.h b/xen/arch/x86/include/asm/page.h index 350d1fb110..3d20ee507a 100644 --- a/xen/arch/x86/include/asm/page.h +++ b/xen/arch/x86/include/asm/page.h @@ -26,27 +26,14 @@ l4e_from_intpte(pte_read_atomic(&l4e_get_intpte(*(l4ep)))) /* Write a pte atomically to memory. */ -#define l1e_write_atomic(l1ep, l1e) \ - pte_write_atomic(&l1e_get_intpte(*(l1ep)), l1e_get_intpte(l1e)) -#define l2e_write_atomic(l2ep, l2e) \ - pte_write_atomic(&l2e_get_intpte(*(l2ep)), l2e_get_intpte(l2e)) -#define l3e_write_atomic(l3ep, l3e) \ - pte_write_atomic(&l3e_get_intpte(*(l3ep)), l3e_get_intpte(l3e)) -#define l4e_write_atomic(l4ep, l4e) \ - pte_write_atomic(&l4e_get_intpte(*(l4ep)), l4e_get_intpte(l4e)) - -/* - * Write a pte safely but non-atomically to memory. - * The PTE may become temporarily not-present during the update. - */ #define l1e_write(l1ep, l1e) \ - pte_write(&l1e_get_intpte(*(l1ep)), l1e_get_intpte(l1e)) + write_atomic(&l1e_get_intpte(*(l1ep)), l1e_get_intpte(l1e)) #define l2e_write(l2ep, l2e) \ - pte_write(&l2e_get_intpte(*(l2ep)), l2e_get_intpte(l2e)) + write_atomic(&l2e_get_intpte(*(l2ep)), l2e_get_intpte(l2e)) #define l3e_write(l3ep, l3e) \ - pte_write(&l3e_get_intpte(*(l3ep)), l3e_get_intpte(l3e)) + write_atomic(&l3e_get_intpte(*(l3ep)), l3e_get_intpte(l3e)) #define l4e_write(l4ep, l4e) \ - pte_write(&l4e_get_intpte(*(l4ep)), l4e_get_intpte(l4e)) + write_atomic(&l4e_get_intpte(*(l4ep)), l4e_get_intpte(l4e)) /* Get direct integer representation of a pte's contents (intpte_t). */ #define l1e_get_intpte(x) ((x).l1) diff --git a/xen/arch/x86/include/asm/x86_64/page.h b/xen/arch/x86/include/asm/x86_64/page.h index 19ca64d792..03fcce61c0 100644 --- a/xen/arch/x86/include/asm/x86_64/page.h +++ b/xen/arch/x86/include/asm/x86_64/page.h @@ -70,8 +70,6 @@ typedef l4_pgentry_t root_pgentry_t; #endif /* !__ASSEMBLY__ */ #define pte_read_atomic(ptep) read_atomic(ptep) -#define pte_write_atomic(ptep, pte) write_atomic(ptep, pte) -#define pte_write(ptep, pte) write_atomic(ptep, pte) /* Given a virtual address, get an entry offset into a linear page table. */ #define l1_linear_offset(_a) (((_a) & VADDR_MASK) >> L1_PAGETABLE_SHIFT) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 95795567f2..fab2de5fae 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -5253,7 +5253,7 @@ int map_pages_to_xen( !(flags & (_PAGE_PAT | MAP_SMALL_PAGES)) ) { /* 1GB-page mapping. */ - l3e_write_atomic(pl3e, l3e_from_mfn(mfn, l1f_to_lNf(flags))); + l3e_write(pl3e, l3e_from_mfn(mfn, l1f_to_lNf(flags))); if ( (l3e_get_flags(ol3e) & _PAGE_PRESENT) ) { @@ -5353,8 +5353,7 @@ int map_pages_to_xen( if ( (l3e_get_flags(*pl3e) & _PAGE_PRESENT) && (l3e_get_flags(*pl3e) & _PAGE_PSE) ) { - l3e_write_atomic(pl3e, - l3e_from_mfn(l2mfn, __PAGE_HYPERVISOR)); + l3e_write(pl3e, l3e_from_mfn(l2mfn, __PAGE_HYPERVISOR)); l2mfn = INVALID_MFN; } if ( locking ) @@ -5375,7 +5374,7 @@ int map_pages_to_xen( { /* Super-page mapping. */ ol2e = *pl2e; - l2e_write_atomic(pl2e, l2e_from_mfn(mfn, l1f_to_lNf(flags))); + l2e_write(pl2e, l2e_from_mfn(mfn, l1f_to_lNf(flags))); if ( (l2e_get_flags(ol2e) & _PAGE_PRESENT) ) { @@ -5457,8 +5456,7 @@ int map_pages_to_xen( if ( (l2e_get_flags(*pl2e) & _PAGE_PRESENT) && (l2e_get_flags(*pl2e) & _PAGE_PSE) ) { - l2e_write_atomic(pl2e, l2e_from_mfn(l1mfn, - __PAGE_HYPERVISOR)); + l2e_write(pl2e, l2e_from_mfn(l1mfn, __PAGE_HYPERVISOR)); l1mfn = INVALID_MFN; } if ( locking ) @@ -5471,7 +5469,7 @@ int map_pages_to_xen( if ( !pl1e ) pl1e = map_l1t_from_l2e(*pl2e) + l1_table_offset(virt); ol1e = *pl1e; - l1e_write_atomic(pl1e, l1e_from_mfn(mfn, flags)); + l1e_write(pl1e, l1e_from_mfn(mfn, flags)); UNMAP_DOMAIN_PAGE(pl1e); if ( (l1e_get_flags(ol1e) & _PAGE_PRESENT) ) { @@ -5524,8 +5522,7 @@ int map_pages_to_xen( UNMAP_DOMAIN_PAGE(l1t); if ( i == L1_PAGETABLE_ENTRIES ) { - l2e_write_atomic(pl2e, l2e_from_pfn(base_mfn, - l1f_to_lNf(flags))); + l2e_write(pl2e, l2e_from_pfn(base_mfn, l1f_to_lNf(flags))); if ( locking ) spin_unlock(&map_pgdir_lock); flush_area(virt - PAGE_SIZE, @@ -5574,8 +5571,7 @@ int map_pages_to_xen( UNMAP_DOMAIN_PAGE(l2t); if ( i == L2_PAGETABLE_ENTRIES ) { - l3e_write_atomic(pl3e, l3e_from_pfn(base_mfn, - l1f_to_lNf(flags))); + l3e_write(pl3e, l3e_from_pfn(base_mfn, l1f_to_lNf(flags))); if ( locking ) spin_unlock(&map_pgdir_lock); flush_area(virt - PAGE_SIZE, @@ -5674,7 +5670,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) : l3e_from_pfn(l3e_get_pfn(*pl3e), (l3e_get_flags(*pl3e) & ~FLAGS_MASK) | nf); - l3e_write_atomic(pl3e, nl3e); + l3e_write(pl3e, nl3e); v += 1UL << L3_PAGETABLE_SHIFT; continue; } @@ -5696,8 +5692,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) if ( (l3e_get_flags(*pl3e) & _PAGE_PRESENT) && (l3e_get_flags(*pl3e) & _PAGE_PSE) ) { - l3e_write_atomic(pl3e, - l3e_from_mfn(l2mfn, __PAGE_HYPERVISOR)); + l3e_write(pl3e, l3e_from_mfn(l2mfn, __PAGE_HYPERVISOR)); l2mfn = INVALID_MFN; } if ( locking ) @@ -5732,7 +5727,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) : l2e_from_pfn(l2e_get_pfn(*pl2e), (l2e_get_flags(*pl2e) & ~FLAGS_MASK) | nf); - l2e_write_atomic(pl2e, nl2e); + l2e_write(pl2e, nl2e); v += 1UL << L2_PAGETABLE_SHIFT; } else @@ -5755,8 +5750,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) if ( (l2e_get_flags(*pl2e) & _PAGE_PRESENT) && (l2e_get_flags(*pl2e) & _PAGE_PSE) ) { - l2e_write_atomic(pl2e, l2e_from_mfn(l1mfn, - __PAGE_HYPERVISOR)); + l2e_write(pl2e, l2e_from_mfn(l1mfn, __PAGE_HYPERVISOR)); l1mfn = INVALID_MFN; } if ( locking ) @@ -5785,7 +5779,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) : l1e_from_pfn(l1e_get_pfn(*pl1e), (l1e_get_flags(*pl1e) & ~FLAGS_MASK) | nf); - l1e_write_atomic(pl1e, nl1e); + l1e_write(pl1e, nl1e); UNMAP_DOMAIN_PAGE(pl1e); v += PAGE_SIZE; @@ -5824,7 +5818,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) if ( i == L1_PAGETABLE_ENTRIES ) { /* Empty: zap the L2E and free the L1 page. */ - l2e_write_atomic(pl2e, l2e_empty()); + l2e_write(pl2e, l2e_empty()); if ( locking ) spin_unlock(&map_pgdir_lock); flush_area(NULL, FLUSH_TLB_GLOBAL); /* flush before free */ @@ -5868,7 +5862,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) if ( i == L2_PAGETABLE_ENTRIES ) { /* Empty: zap the L3E and free the L2 page. */ - l3e_write_atomic(pl3e, l3e_empty()); + l3e_write(pl3e, l3e_empty()); if ( locking ) spin_unlock(&map_pgdir_lock); flush_area(NULL, FLUSH_TLB_GLOBAL); /* flush before free */ @@ -5940,7 +5934,7 @@ void init_or_livepatch modify_xen_mappings_lite( { ASSERT(IS_ALIGNED(v, 1UL << L2_PAGETABLE_SHIFT)); - l2e_write_atomic(pl2e, l2e_from_intpte((l2e.l2 & ~fm) | flags)); + l2e_write(pl2e, l2e_from_intpte((l2e.l2 & ~fm) | flags)); v += 1UL << L2_PAGETABLE_SHIFT; continue; @@ -5958,8 +5952,7 @@ void init_or_livepatch modify_xen_mappings_lite( ASSERT(l1f & _PAGE_PRESENT); - l1e_write_atomic(pl1e, - l1e_from_intpte((l1e.l1 & ~fm) | flags)); + l1e_write(pl1e, l1e_from_intpte((l1e.l1 & ~fm) | flags)); v += 1UL << L1_PAGETABLE_SHIFT; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 17:55:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 17:55:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768030.1178747 (Exim 4.92) (envelope-from ) id 1sYr4H-0004ZD-8w; Tue, 30 Jul 2024 17:55:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768030.1178747; Tue, 30 Jul 2024 17:55:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4H-0004Z5-6B; Tue, 30 Jul 2024 17:55:25 +0000 Received: by outflank-mailman (input) for mailman id 768030; Tue, 30 Jul 2024 17:55:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4F-0004Yr-Qi for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4F-0002Xp-PR for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYr4F-0001OL-ON for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=bT6qxPYqTgDpfUlc19uNxLYZyb5CzIbNgnntQKFsbJQ=; b=FlJ/Q/Luiv2amhXnvSQM8QTIr8 kiGaM+okN8/zKLCAJAgkaN6JnUZUOVTzt06XuPD8d0COW/ljM0lATii3CDqIDiTLnapGj7YpDeWbr BS+9fWbexFpStko4MbxZk4tLtaBJszbf3BMMQ3wTzC00Oug+Sb2YaHhv65gJxDYZ0w60=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/mm: Rename l{1,2,3,4}e_read_atomic() Message-Id: Date: Tue, 30 Jul 2024 17:55:23 +0000 commit 2ba11c33b51d18a480e509876a815b59342ad487 Author: Roger Pau Monne AuthorDate: Fri Jul 26 17:21:46 2024 +0200 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 x86/mm: Rename l{1,2,3,4}e_read_atomic() There's no l{1,2,3,4}e_read() implementation, so drop the _atomic suffix from the read helpers. This allows unifying the naming with the write helpers, which are also atomic but don't have the suffix already: l{1,2,3,4}e_write(). No functional change intended. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/include/asm/page.h | 16 ++++++++-------- xen/arch/x86/include/asm/x86_64/page.h | 2 -- xen/arch/x86/mm.c | 12 ++++++------ xen/arch/x86/traps.c | 8 ++++---- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/xen/arch/x86/include/asm/page.h b/xen/arch/x86/include/asm/page.h index 3d20ee507a..e48571de93 100644 --- a/xen/arch/x86/include/asm/page.h +++ b/xen/arch/x86/include/asm/page.h @@ -16,14 +16,14 @@ #include /* Read a pte atomically from memory. */ -#define l1e_read_atomic(l1ep) \ - l1e_from_intpte(pte_read_atomic(&l1e_get_intpte(*(l1ep)))) -#define l2e_read_atomic(l2ep) \ - l2e_from_intpte(pte_read_atomic(&l2e_get_intpte(*(l2ep)))) -#define l3e_read_atomic(l3ep) \ - l3e_from_intpte(pte_read_atomic(&l3e_get_intpte(*(l3ep)))) -#define l4e_read_atomic(l4ep) \ - l4e_from_intpte(pte_read_atomic(&l4e_get_intpte(*(l4ep)))) +#define l1e_read(l1ep) \ + l1e_from_intpte(read_atomic(&l1e_get_intpte(*(l1ep)))) +#define l2e_read(l2ep) \ + l2e_from_intpte(read_atomic(&l2e_get_intpte(*(l2ep)))) +#define l3e_read(l3ep) \ + l3e_from_intpte(read_atomic(&l3e_get_intpte(*(l3ep)))) +#define l4e_read(l4ep) \ + l4e_from_intpte(read_atomic(&l4e_get_intpte(*(l4ep)))) /* Write a pte atomically to memory. */ #define l1e_write(l1ep, l1e) \ diff --git a/xen/arch/x86/include/asm/x86_64/page.h b/xen/arch/x86/include/asm/x86_64/page.h index 03fcce61c0..465a707312 100644 --- a/xen/arch/x86/include/asm/x86_64/page.h +++ b/xen/arch/x86/include/asm/x86_64/page.h @@ -69,8 +69,6 @@ typedef l4_pgentry_t root_pgentry_t; #endif /* !__ASSEMBLY__ */ -#define pte_read_atomic(ptep) read_atomic(ptep) - /* Given a virtual address, get an entry offset into a linear page table. */ #define l1_linear_offset(_a) (((_a) & VADDR_MASK) >> L1_PAGETABLE_SHIFT) #define l2_linear_offset(_a) (((_a) & VADDR_MASK) >> L2_PAGETABLE_SHIFT) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index fab2de5fae..6ffacab341 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -2147,7 +2147,7 @@ static int mod_l1_entry(l1_pgentry_t *pl1e, l1_pgentry_t nl1e, struct vcpu *pt_vcpu, struct domain *pg_dom) { bool preserve_ad = (cmd == MMU_PT_UPDATE_PRESERVE_AD); - l1_pgentry_t ol1e = l1e_read_atomic(pl1e); + l1_pgentry_t ol1e = l1e_read(pl1e); struct domain *pt_dom = pt_vcpu->domain; int rc = 0; @@ -2270,7 +2270,7 @@ static int mod_l2_entry(l2_pgentry_t *pl2e, return -EPERM; } - ol2e = l2e_read_atomic(pl2e); + ol2e = l2e_read(pl2e); if ( l2e_get_flags(nl2e) & _PAGE_PRESENT ) { @@ -2332,7 +2332,7 @@ static int mod_l3_entry(l3_pgentry_t *pl3e, if ( pgentry_ptr_to_slot(pl3e) >= 3 && is_pv_32bit_domain(d) ) return -EINVAL; - ol3e = l3e_read_atomic(pl3e); + ol3e = l3e_read(pl3e); if ( l3e_get_flags(nl3e) & _PAGE_PRESENT ) { @@ -2394,7 +2394,7 @@ static int mod_l4_entry(l4_pgentry_t *pl4e, return -EINVAL; } - ol4e = l4e_read_atomic(pl4e); + ol4e = l4e_read(pl4e); if ( l4e_get_flags(nl4e) & _PAGE_PRESENT ) { @@ -5925,7 +5925,7 @@ void init_or_livepatch modify_xen_mappings_lite( while ( v < e ) { l2_pgentry_t *pl2e = &l2_xenmap[l2_table_offset(v)]; - l2_pgentry_t l2e = l2e_read_atomic(pl2e); + l2_pgentry_t l2e = l2e_read(pl2e); unsigned int l2f = l2e_get_flags(l2e); ASSERT(l2f & _PAGE_PRESENT); @@ -5947,7 +5947,7 @@ void init_or_livepatch modify_xen_mappings_lite( while ( v < e ) { l1_pgentry_t *pl1e = &pl1t[l1_table_offset(v)]; - l1_pgentry_t l1e = l1e_read_atomic(pl1e); + l1_pgentry_t l1e = l1e_read(pl1e); unsigned int l1f = l1e_get_flags(l1e); ASSERT(l1f & _PAGE_PRESENT); diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 7a9299ae6c..a981b6c2e8 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1451,7 +1451,7 @@ static enum pf_type __page_fault_type(unsigned long addr, mfn = cr3 >> PAGE_SHIFT; l4t = map_domain_page(_mfn(mfn)); - l4e = l4e_read_atomic(&l4t[l4_table_offset(addr)]); + l4e = l4e_read(&l4t[l4_table_offset(addr)]); mfn = l4e_get_pfn(l4e); unmap_domain_page(l4t); if ( ((l4e_get_flags(l4e) & required_flags) != required_flags) || @@ -1460,7 +1460,7 @@ static enum pf_type __page_fault_type(unsigned long addr, page_user &= l4e_get_flags(l4e); l3t = map_domain_page(_mfn(mfn)); - l3e = l3e_read_atomic(&l3t[l3_table_offset(addr)]); + l3e = l3e_read(&l3t[l3_table_offset(addr)]); mfn = l3e_get_pfn(l3e); unmap_domain_page(l3t); if ( ((l3e_get_flags(l3e) & required_flags) != required_flags) || @@ -1471,7 +1471,7 @@ static enum pf_type __page_fault_type(unsigned long addr, goto leaf; l2t = map_domain_page(_mfn(mfn)); - l2e = l2e_read_atomic(&l2t[l2_table_offset(addr)]); + l2e = l2e_read(&l2t[l2_table_offset(addr)]); mfn = l2e_get_pfn(l2e); unmap_domain_page(l2t); if ( ((l2e_get_flags(l2e) & required_flags) != required_flags) || @@ -1482,7 +1482,7 @@ static enum pf_type __page_fault_type(unsigned long addr, goto leaf; l1t = map_domain_page(_mfn(mfn)); - l1e = l1e_read_atomic(&l1t[l1_table_offset(addr)]); + l1e = l1e_read(&l1t[l1_table_offset(addr)]); mfn = l1e_get_pfn(l1e); unmap_domain_page(l1t); if ( ((l1e_get_flags(l1e) & required_flags) != required_flags) || -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 17:55:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 17:55:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768031.1178752 (Exim 4.92) (envelope-from ) id 1sYr4R-0004c9-Bi; Tue, 30 Jul 2024 17:55:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768031.1178752; Tue, 30 Jul 2024 17:55:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4R-0004c1-7a; Tue, 30 Jul 2024 17:55:35 +0000 Received: by outflank-mailman (input) for mailman id 768031; Tue, 30 Jul 2024 17:55:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4P-0004bp-TQ for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4P-0002Xy-Sc for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYr4P-0001Ox-Rp for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=VtvnIHmWWyswf8WeqS2e2NajK2znf5j9Elxtnn7/1Pk=; b=nKHj+8hwbXfEoi+rZKgTguVPA+ 0QXf9ZJSofMKa5xqv4VK2/Eq6X0skON84IncNCDW0VpNryWCHMK+RUSec4VqyYrCaFZ8uoqSBZshJ 4zOwmnhQSwZFv6J8OFpHPeRrcqLTFclveCf/Hujh/tuBVGvOZnkgDhrCfwFJrVfAO0H4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/mm: Make virt_to_xen_l1e() static Message-Id: Date: Tue, 30 Jul 2024 17:55:33 +0000 commit 11506df83ae11369ef2299fc7805e18cb71e25c8 Author: Roger Pau Monne AuthorDate: Fri Jul 26 17:21:49 2024 +0200 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 x86/mm: Make virt_to_xen_l1e() static There are no callers outside the translation unit where it's defined, so make the function static. No functional change intended. Signed-off-by: Roger Pau Monné Acked-by: Andrew Cooper --- xen/arch/x86/include/asm/mm.h | 2 -- xen/arch/x86/mm.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/mm.h b/xen/arch/x86/include/asm/mm.h index 98b66edaca..b3853ae734 100644 --- a/xen/arch/x86/include/asm/mm.h +++ b/xen/arch/x86/include/asm/mm.h @@ -567,8 +567,6 @@ mfn_t alloc_xen_pagetable(void); void free_xen_pagetable(mfn_t mfn); void *alloc_mapped_pagetable(mfn_t *pmfn); -l1_pgentry_t *virt_to_xen_l1e(unsigned long v); - int __sync_local_execstate(void); /* Arch-specific portion of memory_op hypercall. */ diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 6ffacab341..38e0bfec43 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -5081,7 +5081,7 @@ static l2_pgentry_t *virt_to_xen_l2e(unsigned long v) return map_l2t_from_l3e(l3e) + l2_table_offset(v); } -l1_pgentry_t *virt_to_xen_l1e(unsigned long v) +static l1_pgentry_t *virt_to_xen_l1e(unsigned long v) { l2_pgentry_t *pl2e, l2e; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 17:55:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 17:55:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768032.1178755 (Exim 4.92) (envelope-from ) id 1sYr4b-0004f6-C1; Tue, 30 Jul 2024 17:55:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768032.1178755; Tue, 30 Jul 2024 17:55:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4b-0004ey-94; Tue, 30 Jul 2024 17:55:45 +0000 Received: by outflank-mailman (input) for mailman id 768032; Tue, 30 Jul 2024 17:55:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4a-0004em-0X for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4Z-0002YA-W3 for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:43 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYr4Z-0001Pd-Uz for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:43 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=XFBuL8hBu5jUu9Zk2tWByy7mico9aUhOyALBMGe+bBk=; b=D8xNmcJH9iD+iwa7GagV4tNj9g TUYUqet/GE/0FTVeyZCArnEGVP6dX1bCGN1kPReaCt+li6qGgxF16VmQ/yoSH6Ztpjbp+PQksaZn/ 88qzWmv/TTJVlP8PWj/4lzRH45V67EfF734az+PdzU/B3n7U7fzMlh3ugQ82mAvupBi0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/mm: Introduce a local domain variable to write_ptbase() Message-Id: Date: Tue, 30 Jul 2024 17:55:43 +0000 commit 1f2153fc5846683e6142c4405c8817d387ff3eb9 Author: Roger Pau Monne AuthorDate: Fri Jul 26 17:21:50 2024 +0200 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 x86/mm: Introduce a local domain variable to write_ptbase() This reduces the repeated accessing of v->domain. No functional change intended. Signed-off-by: Roger Pau Monné Acked-by: Andrew Cooper --- xen/arch/x86/mm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 38e0bfec43..e9c86208b0 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -517,13 +517,14 @@ void make_cr3(struct vcpu *v, mfn_t mfn) void write_ptbase(struct vcpu *v) { + const struct domain *d = v->domain; struct cpu_info *cpu_info = get_cpu_info(); unsigned long new_cr4; - new_cr4 = (is_pv_vcpu(v) && !is_idle_vcpu(v)) + new_cr4 = (is_pv_domain(d) && !is_idle_domain(d)) ? pv_make_cr4(v) : mmu_cr4_features; - if ( is_pv_vcpu(v) && v->domain->arch.pv.xpti ) + if ( is_pv_domain(d) && d->arch.pv.xpti ) { cpu_info->root_pgt_changed = true; cpu_info->pv_cr3 = __pa(this_cpu(root_pgt)); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 17:55:55 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 17:55:55 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768033.1178759 (Exim 4.92) (envelope-from ) id 1sYr4l-0004j1-Eo; Tue, 30 Jul 2024 17:55:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768033.1178759; Tue, 30 Jul 2024 17:55:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4l-0004iu-Bz; Tue, 30 Jul 2024 17:55:55 +0000 Received: by outflank-mailman (input) for mailman id 768033; Tue, 30 Jul 2024 17:55:54 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4k-0004ij-63 for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:54 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4k-0002YI-5B for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:54 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYr4k-0001Qh-2f for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:55:54 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=m/YJXYmlu4WrRWmI1j7jUwwrXToKG6IdokF4y51Sb7g=; b=EXJ4ZmRuWXfSjp43XXT2bQ5pQ0 /fixC+aUyKl/nVHOzU1YOUi4RhBakChy+tm1/KAZgpD7UIAhfXhkkTMsywR/HF0XocEutauv+I9KD ZZa/etvN3nNKQm6uDok/5c4fkyNAN1PdVSEjNa1ZoNR7DTp2Xhyd2mBfX7+w7gkZBfEI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] tools/examples: Remove more obsolete content Message-Id: Date: Tue, 30 Jul 2024 17:55:54 +0000 commit ef0c3e7483569c06c395e044373c9a6a4d2574bb Author: Andrew Cooper AuthorDate: Mon Jul 15 14:17:43 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 tools/examples: Remove more obsolete content xeninfo.pl was introduced in commit 1b0a8bb57e3e ("Added xeninfo.pl, a script for collecting statistics from Xen hosts using the Xen-API") and has been touched exactly twice since to remove hardcoded IP addresses and paths. The configuration files in vnc/* date from when we had a vendered version of Qemu living in the tree. These have never (AFAICT) been wired into the `make install` rule. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD --- tools/examples/vnc/Xservers | 5 - tools/examples/vnc/Xvnc-xen | 53 --------- tools/examples/xeninfo.pl | 284 -------------------------------------------- 3 files changed, 342 deletions(-) diff --git a/tools/examples/vnc/Xservers b/tools/examples/vnc/Xservers deleted file mode 100644 index adc5748be6..0000000000 --- a/tools/examples/vnc/Xservers +++ /dev/null @@ -1,5 +0,0 @@ -# Configuration lines to go in /etc/X11/xdm/Xservers to -# start Xvnc and connect back to a vncviewer in domain-0. -# See 'man xdm' under 'LOCAL SERVER SPECIFICATION' for format details. - -:1 Xvnc local /usr/X11R6/bin/Xvnc-xen :1 \ No newline at end of file diff --git a/tools/examples/vnc/Xvnc-xen b/tools/examples/vnc/Xvnc-xen deleted file mode 100755 index 15058e622d..0000000000 --- a/tools/examples/vnc/Xvnc-xen +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -#============================================================================ -# This script should be installed in /usr/X11R6/bin/Xvnc-xen. -#============================================================================ -# -# Start Xvnc and use vncconnect to connect back to a vncviewer listening in -# domain 0. The host and port to connect to are given by -# -# VNC_VIEWER=: -# -# in the kernel command line (/proc/cmdline). -# -# The '--vnc' option to 'xm create' will start a vncviewer and -# pass its address in VNC_VIEWER for this script to find. -# -# Usage: -# Xvnc-xen [args] -# -# Any arguments are passed to Xvnc. -# -#============================================================================ - -# Prefix for messages. -M="[$(basename $0)]" - -# Usage: vnc_addr -# Print : for the vncviewer given in -# the kernel command line. -vnc_addr () { - sed -n -e "s/.*VNC_VIEWER=\([^ ]*\).*/\1/p" /proc/cmdline -} - -# Usage: vnc_connect -# If a vncviewer address was given on the kernel command line, -# run vncconnect for it. -vnc_connect () { - local addr=$(vnc_addr) - - if [ -n "${addr}" ] ; then - echo "$M Connecting to ${addr}." - vncconnect ${addr} - else - echo "$M No VNC_VIEWER in kernel command line." - echo "$M Create the domain with 'xm create --vnc '." - return 1 - fi -} - -# Start the vnc server. -Xvnc "$@" >/dev/null 2>&1 & - -# Connect back to the viewer in domain-0. -vnc_connect diff --git a/tools/examples/xeninfo.pl b/tools/examples/xeninfo.pl deleted file mode 100644 index 95a15d9595..0000000000 --- a/tools/examples/xeninfo.pl +++ /dev/null @@ -1,284 +0,0 @@ -#!/usr/bin/perl -w - -############################################################################################################# -# # -# Developed by Ingard Mevåg @ Oslo University College, spring 2007 # -# ingard [at] mevaag [dot] no # -# # -# This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License. # -# To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter # -# to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. # -# # -############################################################################################################# - -use strict; -# http://search.cpan.org/~rjray/RPC-XML-0.59/lib/RPC/XML/Client.pm -require RPC::XML; -require RPC::XML::Client; - -# for debug purposes -#use Data::Dumper; - -##### CONFIG ###### - -my %xenhosts = ("192.0.2.10" => {"port" => "9363"}, - "192.0.2.11" => {"port" => "9363"}, - "192.0.2.12" => {"port" => "9363"}, - "192.0.2.13" => {"port" => "9363"}); - -##### CONFIG END ### - -##### STATIC VARS ##### -my %host_info; - -####################### -sub apiconnect -{ - foreach my $xenhost (keys %xenhosts) - { - my $xen = RPC::XML::Client->new("http://$xenhost:$xenhosts{$xenhost}{'port'}"); - my $session = $xen->simple_request("session.login_with_password", "user",""); - if (! $session) - { - print "Can't connect to $xenhost :(\n"; - $xenhosts{$xenhost} = {'xen' => $xen, 'session' => ""}; - } - else - { - $xenhosts{$xenhost} = {'xen' => $xen, 'session' => $session->{'Value'}}; - print "Connected successfully to $xenhost..\n"; - } - } -} - -sub validate_response -{ - my ($result_ref) = @_; - if ($result_ref->{'Status'} eq "Success") - { - return $result_ref->{'Value'}; - } - else - { - # status = Failure ! -# die ("xmlrpc failed! ErrorDescription: $result_ref->{'ErrorDescription'}[1] -> $result_ref->{'ErrorDescription'}[0]"); - print "xmlrpc failed! ErrorDescription: $result_ref->{'ErrorDescription'}[1] -> $result_ref->{'ErrorDescription'}[0]\n"; - } -} - -sub get_host_cpu_utilisation -{ - my ($xen, $session, $host_name, $host_ref) = @_; - my $host_cpu_ref = validate_response($xen->simple_request("host.get_host_CPUs", $session, $host_ref)); - foreach (@$host_cpu_ref) - { - my $host_cpu_utilisation = validate_response($xen->simple_request("host_cpu.get_utilisation", $session, $_)); - $host_info{$host_name}{'cpus'}{$_} = $host_cpu_utilisation; - print " CPUiNFO: $host_cpu_utilisation\n"; - } -} - -sub get_host_pif_utilisation -{ - my ($xen, $session, $host_name, $host_ref) = @_; - -# This method isnt implemented yet it seems so using PIF.get_all for now.. -# This will break when xen is made cluster aware.. -# my $host_pif_ref = validate_response($xen->simple_request("host.get_PIFs", $session, $host_ref)); - my $host_pif_ref = validate_response($xen->simple_request("PIF.get_all", $session)); - foreach (@$host_pif_ref) - { - my $host_pif_device = validate_response($xen->simple_request("PIF.get_device", $session, $_)); - my $host_pif_metrics_ref = validate_response($xen->simple_request("PIF.get_metrics", $session, $_)); - -# Whats the best solution performancewise? -# Collecting stats from get_records, or pulling individually? - -# my $host_pif_record = validate_response($xen->simple_request("PIF_metrics.get_record", $session, $host_pif_metrics_ref)); -# my $host_pif_io_read = $host_pif_record->{'io_read_kbs'}; -# my $host_pif_io_write = $host_pif_record->{'io_write_kbs'}; - my $host_pif_io_read = validate_response($xen->simple_request("PIF_metrics.get_io_read_kbs", $session, $host_pif_metrics_ref)); - my $host_pif_io_write = validate_response($xen->simple_request("PIF_metrics.get_io_write_kbs", $session, $host_pif_metrics_ref)); - - $host_info{$host_name}{'pifs'}{$host_pif_device} = {'read' => $host_pif_io_read, 'write' => $host_pif_io_write}; - print " PiFiNFO: $host_pif_device READ: $host_pif_io_read - WRITE: $host_pif_io_write\n"; -# $host_info{$host_name}{'pifs'}{$host_pif_device}{'read'} = $host_pif_io_read; -# $host_info{$host_name}{'pifs'}{$host_pif_device}{'write'} = $host_pif_io_write; - } -} - -sub get_host_mem_utilisation -{ - my ($xen, $session, $host_name, $host_ref) = @_; - my $host_metrics_ref = validate_response($xen->simple_request("host.get_metrics", $session, $host_ref)); - my $host_mem_total = validate_response($xen->simple_request("host_metrics.get_memory_total", $session, $host_metrics_ref)) / 1024 / 1024; - my $host_mem_free = validate_response($xen->simple_request("host_metrics.get_memory_free", $session, $host_metrics_ref)) / 1024 / 1024; - $host_info{$host_name}{'memory'} = {'total' => $host_mem_total, 'free' => $host_mem_free}; - print " MEMiNFO: Total: $host_mem_total MB - Free: $host_mem_free MB\n"; -} - -sub get_vm_mem_info -{ - my ($xen, $session, $host_name, $vm_ref, $vm_name_label) = @_; - my $vm_mem_stat_max = validate_response($xen->simple_request("VM.get_memory_static_max",$session,$vm_ref)); - my $vm_mem_stat_min = validate_response($xen->simple_request("VM.get_memory_static_min",$session,$vm_ref)); - my $vm_mem_dyn_max = validate_response($xen->simple_request("VM.get_memory_dynamic_max",$session,$vm_ref)); - my $vm_mem_dyn_min = validate_response($xen->simple_request("VM.get_memory_dynamic_min",$session,$vm_ref)); - - # not implemented yet.. We'll do this at the same time as getting cpu utilisation - # in the get_vm_metrics sub instead.. - #my $vm_metrics_ref = validate_response($xen->simple_request("VM.get_metrics",$session,$vm_ref)); - #my $vm_mem_actual = validate_response($xen->simple_request("VM_metrics.get_memory_actual",$session,$vm_metrics_ref)); - - $host_info{$host_name}{'vms'}{$vm_name_label}{'memory'} = {'static_max' => $vm_mem_stat_max, - 'static_min' => $vm_mem_stat_min, - 'dynamic_max' => $vm_mem_dyn_max, - 'dynamic_min' => $vm_mem_dyn_min}; - - # xm list uses the dynamic min var as far as i can tell.. or? - # Lets print the memactual info instead of this... I'll do that in the get_vm_metrics sub instead.. - # print " |- MEMiNFO: Dynamic Min: $vm_mem_dyn_min - Actually in use: $vm_mem_actual\n"; -} - -sub get_vm_metrics -{ - my ($xen, $session, $host_name, $vm_ref, $vm_name_label) = @_; - my $vm_metrics_ref = validate_response($xen->simple_request("VM.get_metrics",$session,$vm_ref)); - - my %vm_vcpu_utilisation = %{validate_response($xen->simple_request("VM_metrics.get_vcpus_utilisation",$session,$vm_metrics_ref))}; - for my $tempcpu (keys %vm_vcpu_utilisation) - { - print " |- CPUiNFO: $tempcpu - $vm_vcpu_utilisation{$tempcpu}\n"; - $host_info{$host_name}{'vms'}{$vm_name_label}{'vcpus'} = {$tempcpu => $vm_vcpu_utilisation{$tempcpu}}; - } - my $vm_mem_actual = validate_response($xen->simple_request("VM_metrics.get_memory_actual",$session,$vm_metrics_ref)) / 1024 / 1024; - $host_info{$host_name}{'vms'}{$vm_name_label}{'memory'}{'actual'} = "$vm_mem_actual"; - print " |- MEMiNFO: Actually in use: $vm_mem_actual MB\n"; -} - -sub get_vm_vif_utilisation -{ - my ($xen, $session, $host_name, $vm_ref, $vm_name_label) = @_; - my $vm_vifs = validate_response($xen->simple_request("VM.get_VIFs",$session,$vm_ref)); - foreach (@$vm_vifs) - { - my $vif_device = validate_response($xen->simple_request("VIF.get_device",$session,$_)); - my $vif_io_read = validate_response($xen->simple_request("VIF_metrics.get_io_read_kbs", $session, $_)); - my $vif_io_write = validate_response($xen->simple_request("VIF_metrics.get_io_write_kbs", $session, $_)); - $host_info{$host_name}{'vms'}{$vm_name_label}{'vifs'}{$vif_device} = {'read' => $vif_io_read, 'write' => $vif_io_write}; - print " |- ViFiNFO: $vif_device READ: $vif_io_read - WRITE: $vif_io_write\n"; - } -} - -sub get_vm_vbd_utilisation -{ - my ($xen, $session, $host_name, $vm_ref, $vm_name_label) = @_; - my $vm_vbds = validate_response($xen->simple_request("VM.get_VBDs",$session,$vm_ref)); - foreach (@$vm_vbds) - { - my $vbd_device = validate_response($xen->simple_request("VBD.get_device",$session,$_)); - my $vbd_io_read = validate_response($xen->simple_request("VBD_metrics.get_io_read_kbs", $session, $_)); - my $vbd_io_write = validate_response($xen->simple_request("VBD_metrics.get_io_write_kbs", $session, $_)); - $host_info{$host_name}{'vms'}{$vm_name_label}{'vbds'}{$vbd_device} = {'read' => $vbd_io_read, 'write' => $vbd_io_write}; - print " |- VBDiNFO: $vbd_device READ: $vbd_io_read - WRITE: $vbd_io_write\n"; - } -} - - -sub get_vm_type -{ - my ($xen, $session, $host_name, $vm_ref, $vm_name_label) = @_; - # not running response through validate_response() here to stop it from crashing.. - # - # api docs says if this (following) field is set, its a HVM domain. - my $vm_bootloader_results = $xen->simple_request("VM.get_HVM_boot_policy",$session,$vm_ref); - if ("$vm_bootloader_results->{'Status'}" eq "Success") - { - if ("$vm_bootloader_results->{'Value'}" ne "") - { - $host_info{$host_name}{'vms'}{$vm_name_label}{'type'} = "HVM"; - } - else - { - $host_info{$host_name}{'vms'}{$vm_name_label}{'type'} = "PV"; - } - } - else - { - # However, xen 3.0.4 doest support this part of the api, so afaik I can get the difference with: - my $vm_pv_kernel_results = $xen->simple_request("VM.get_PV_kernel",$session,$vm_ref); - # which is something like: - # 'PV_kernel': '/boot/vmlinuz-2.6.18-xen', - # or - # 'PV_kernel': 'hvmloader', - if ("$vm_pv_kernel_results->{'Value'}" =~ m/hvm/i) - { - $host_info{$host_name}{'vms'}{$vm_name_label}{'type'} = "HVM"; - } - else - { - $host_info{$host_name}{'vms'}{$vm_name_label}{'type'} = "PV"; - } - } -} - -sub get_complete_info -{ - my %all_vms; - foreach my $xenhost (sort keys %xenhosts) - { - next unless $xenhosts{$xenhost}{'session'}; - my $xen = $xenhosts{$xenhost}{'xen'}; - my $session = $xenhosts{$xenhost}{'session'}; - print "_______________________\n## $xenhost ##\n-----------------------\n"; - - my $host_ref = validate_response($xen->simple_request("session.get_this_host", $session)); - - my $host_name = validate_response($xen->simple_request("host.get_name_label", $session, $host_ref)); - $xenhosts{$xenhost}{'hostname'} = $host_name; - $host_info{$host_name}{'ip'} = $xenhost; - - get_host_cpu_utilisation($xen, $session, $host_name, $host_ref); - - get_host_mem_utilisation($xen, $session, $host_name, $host_ref); - - get_host_pif_utilisation($xen, $session, $host_name, $host_ref); - - - my $all_vm_refs = validate_response($xen->simple_request("host.get_resident_VMs",$session, $host_ref)); - - foreach my $vm_ref (@$all_vm_refs) - { - my $vm_name_label = validate_response($xen->simple_request("VM.get_name_label",$session,$vm_ref)); - get_vm_type($xen,$session,$host_name,$vm_ref,$vm_name_label); - - my $vm_id = validate_response($xen->simple_request("VM.get_domid",$session,$vm_ref)); - - print "vm: $vm_id\t$vm_name_label\ttype: $host_info{$host_name}{'vms'}->{$vm_name_label}{'type'}\n"; - - # vm_metrics includes both mem_actual & cpu utilisation - # So we'll add all stats found in that class in one go.. - get_vm_metrics($xen,$session,$host_name,$vm_ref,$vm_name_label); -# get_vm_cpu_utilisation($xen,$session,$host_name,$vm_ref,$vm_name_label); - - # all other mem stats are added seperately.. - # This might not be needed at all as xen doesnt have functionality to - # resize mem for a VM atm (afaik) - get_vm_mem_info($xen,$session,$host_name,$vm_ref,$vm_name_label); - - get_vm_vif_utilisation($xen,$session,$host_name,$vm_ref,$vm_name_label); - - get_vm_vbd_utilisation($xen,$session,$host_name,$vm_ref,$vm_name_label); - - $all_vms{$vm_name_label} = "" unless ("$vm_name_label" eq "Domain-0"); - } - print "\n"; - } - # Debug: Uncomment to see the nested datastructure.. - #print Dumper(%host_info); -} - - - -apiconnect(); -get_complete_info(); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 17:56:05 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 17:56:05 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768034.1178763 (Exim 4.92) (envelope-from ) id 1sYr4v-0004lV-GQ; Tue, 30 Jul 2024 17:56:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768034.1178763; Tue, 30 Jul 2024 17:56:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4v-0004lN-Dh; Tue, 30 Jul 2024 17:56:05 +0000 Received: by outflank-mailman (input) for mailman id 768034; Tue, 30 Jul 2024 17:56:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4u-0004lB-9Q for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:56:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr4u-0002Ye-8a for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:56:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYr4u-0001Rv-7g for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:56:04 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=yWuDfXnmvEiQIK5TZha2u2yeJ9y3AsVbYyWjDThspbI=; b=zqka8EdOB1Jm0SDa0MyPBIuKW3 VpEYx7kcM/OodqNuP65bjXXvuK5OkrDo092xPrtJCn+06f912mJQk72f2zXo/vWahYdXN0jw/9JH9 yhqLOxb3WOXovlm6dW8Y8wM6HsowN4t4yigm26Ol9aO6GhGezFGyArSABqJQT0UwqAWs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/APIC: Drop APIC_BASE and use fix_to_virt() Message-Id: Date: Tue, 30 Jul 2024 17:56:04 +0000 commit cb2cd59d45ef85a08f9bd030501b79c17f6bd5d3 Author: Andrew Cooper AuthorDate: Tue Jul 30 11:54:43 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 x86/APIC: Drop APIC_BASE and use fix_to_virt() Right now the apic_mem_*() helpers only compile because sizeof(void *) == sizeof(long long). Switch to using fix_to_virt() which is a void *type. Also adjust the two places where the APIC/IO-APIC virtual address is rendered in a printk(). No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/apic.c | 4 ++-- xen/arch/x86/include/asm/apic.h | 10 +++++++--- xen/arch/x86/include/asm/apicdef.h | 2 -- xen/arch/x86/io_apic.c | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 6567af685a..7869c30e83 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -938,8 +938,8 @@ void __init init_apic_mappings(void) apic_phys = mp_lapic_addr; set_fixmap_nocache(FIX_APIC_BASE, apic_phys); - apic_printk(APIC_VERBOSE, "mapped APIC to %08Lx (%08lx)\n", APIC_BASE, - apic_phys); + apic_printk(APIC_VERBOSE, "mapped APIC to %p (%08lx)\n", + fix_to_virt(FIX_APIC_BASE), apic_phys); __next: /* diff --git a/xen/arch/x86/include/asm/apic.h b/xen/arch/x86/include/asm/apic.h index a7798de029..d8eda6df6d 100644 --- a/xen/arch/x86/include/asm/apic.h +++ b/xen/arch/x86/include/asm/apic.h @@ -51,12 +51,16 @@ const struct genapic *apic_x2apic_probe(void); static inline void apic_mem_write(unsigned int reg, uint32_t v) { - *((volatile u32 *)(APIC_BASE+reg)) = v; + volatile uint32_t *addr = fix_to_virt(FIX_APIC_BASE) + reg; + + *addr = v; } -static inline u32 apic_mem_read(unsigned int reg) +static inline uint32_t apic_mem_read(unsigned int reg) { - return *((volatile u32 *)(APIC_BASE+reg)); + const volatile uint32_t *addr = fix_to_virt(FIX_APIC_BASE) + reg; + + return *addr; } /* NOTE: in x2APIC mode, we should use apic_icr_write()/apic_icr_read() to diff --git a/xen/arch/x86/include/asm/apicdef.h b/xen/arch/x86/include/asm/apicdef.h index b0790fad1c..49e29ec801 100644 --- a/xen/arch/x86/include/asm/apicdef.h +++ b/xen/arch/x86/include/asm/apicdef.h @@ -117,8 +117,6 @@ /* Applicable to vectors, TPR, and PPR. */ #define APIC_PRIO_CLASS(v) ((v) & 0xF0) -#define APIC_BASE __fix_to_virt(FIX_APIC_BASE) - #define MAX_IO_APICS 128 extern bool x2apic_enabled; diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 7744b43f24..7727005846 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2596,8 +2596,8 @@ static void __init ioapic_init_mappings(void) } set_fixmap_nocache(idx, ioapic_phys); - apic_printk(APIC_VERBOSE, "mapped IOAPIC to %08Lx (%08lx)\n", - __fix_to_virt(idx), ioapic_phys); + apic_printk(APIC_VERBOSE, "mapped IOAPIC to %p (%08lx)\n", + fix_to_virt(idx), ioapic_phys); if ( bad_ioapic_register(i) ) { -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 17:56:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 17:56:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768035.1178767 (Exim 4.92) (envelope-from ) id 1sYr55-0004oi-IE; Tue, 30 Jul 2024 17:56:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768035.1178767; Tue, 30 Jul 2024 17:56:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr55-0004oa-FF; Tue, 30 Jul 2024 17:56:15 +0000 Received: by outflank-mailman (input) for mailman id 768035; Tue, 30 Jul 2024 17:56:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr54-0004oO-Ds for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:56:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr54-0002Yl-C1 for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:56:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYr54-0001Sd-As for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:56:14 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=5yBeqhgK+iRrGpjWHbI8oiOvwXXR+Rwq/NbUavTehbM=; b=0r4fjEJfcY10vZyBqaFn85u3nb saDZXfkG9QMAXi+9sV8//Mml76IslZJJG/sp1LQDohn66VRWl9cg5sK9wFjPE+kQBybLLn9gZwG4o d7jZUauu1GvNd+ngQxXnS1AgR7gzDCjToZmk89A3Oetce2DTQ6nFbsS2UhEPDjjspMDs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] XSM/domctl: Fix permission checks on XEN_DOMCTL_createdomain Message-Id: Date: Tue, 30 Jul 2024 17:56:14 +0000 commit ee32b9b29af449d38aad0a1b3a81aaae586f5ea7 Author: Andrew Cooper AuthorDate: Fri Jul 5 12:52:05 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:42:17 2024 +0100 XSM/domctl: Fix permission checks on XEN_DOMCTL_createdomain The XSM checks for XEN_DOMCTL_createdomain are problematic. There's a split between xsm_domctl() called early, and flask_domain_create() called quite late during domain construction. All XSM implementations except Flask have a simple IS_PRIV check in xsm_domctl(), and operate as expected when an unprivileged domain tries to make a hypercall. Flask however foregoes any action in xsm_domctl() and defers everything, including the simple "is the caller permitted to create a domain" check, to flask_domain_create(). As a consequence, when XSM Flask is active, and irrespective of the policy loaded, all domains irrespective of privilege can: * Mutate the global 'rover' variable, used to track the next free domid. Therefore, all domains can cause a domid wraparound, and combined with a voluntary reboot, choose their own domid. * Cause a reasonable amount of a domain to be constructed before ultimately failing for permission reasons, including the use of settings outside of supported limits. In order to remediate this, pass the ssidref into xsm_domctl() and at least check that the calling domain privileged enough to create domains. Take the opportunity to also fix the sign of the cmd parameter to be unsigned. This issue has not been assigned an XSA, because Flask is experimental and not security supported. Reported-by: Ross Lagerwall Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Acked-by: Daniel P. Smith --- xen/arch/x86/mm/paging.c | 2 +- xen/common/domctl.c | 4 +++- xen/include/xsm/dummy.h | 2 +- xen/include/xsm/xsm.h | 7 ++++--- xen/xsm/flask/hooks.c | 14 ++++++++++++-- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c index bca320fffa..dd47bde5ce 100644 --- a/xen/arch/x86/mm/paging.c +++ b/xen/arch/x86/mm/paging.c @@ -767,7 +767,7 @@ long do_paging_domctl_cont( if ( d == NULL ) return -ESRCH; - ret = xsm_domctl(XSM_OTHER, d, op.cmd); + ret = xsm_domctl(XSM_OTHER, d, op.cmd, 0 /* SSIDref not applicable */); if ( !ret ) { if ( domctl_lock_acquire() ) diff --git a/xen/common/domctl.c b/xen/common/domctl.c index 2c0331bb05..ea16b75910 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -322,7 +322,9 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) break; } - ret = xsm_domctl(XSM_OTHER, d, op->cmd); + ret = xsm_domctl(XSM_OTHER, d, op->cmd, + /* SSIDRef only applicable for cmd == createdomain */ + op->u.createdomain.ssidref); if ( ret ) goto domctl_out_unlock_domonly; diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h index 00d2cbebf2..7956f27a29 100644 --- a/xen/include/xsm/dummy.h +++ b/xen/include/xsm/dummy.h @@ -162,7 +162,7 @@ static XSM_INLINE int cf_check xsm_set_target( } static XSM_INLINE int cf_check xsm_domctl( - XSM_DEFAULT_ARG struct domain *d, int cmd) + XSM_DEFAULT_ARG struct domain *d, unsigned int cmd, uint32_t ssidref) { XSM_ASSERT_ACTION(XSM_OTHER); switch ( cmd ) diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h index 8dad03fd3d..627c0d2731 100644 --- a/xen/include/xsm/xsm.h +++ b/xen/include/xsm/xsm.h @@ -60,7 +60,7 @@ struct xsm_ops { int (*domctl_scheduler_op)(struct domain *d, int op); int (*sysctl_scheduler_op)(int op); int (*set_target)(struct domain *d, struct domain *e); - int (*domctl)(struct domain *d, int cmd); + int (*domctl)(struct domain *d, unsigned int cmd, uint32_t ssidref); int (*sysctl)(int cmd); int (*readconsole)(uint32_t clear); @@ -248,9 +248,10 @@ static inline int xsm_set_target( return alternative_call(xsm_ops.set_target, d, e); } -static inline int xsm_domctl(xsm_default_t def, struct domain *d, int cmd) +static inline int xsm_domctl(xsm_default_t def, struct domain *d, + unsigned int cmd, uint32_t ssidref) { - return alternative_call(xsm_ops.domctl, d, cmd); + return alternative_call(xsm_ops.domctl, d, cmd, ssidref); } static inline int xsm_sysctl(xsm_default_t def, int cmd) diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c index 5e88c71b8e..278ad38c2a 100644 --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -663,12 +663,22 @@ static int cf_check flask_set_target(struct domain *d, struct domain *t) return rc; } -static int cf_check flask_domctl(struct domain *d, int cmd) +static int cf_check flask_domctl(struct domain *d, unsigned int cmd, + uint32_t ssidref) { switch ( cmd ) { - /* These have individual XSM hooks (common/domctl.c) */ case XEN_DOMCTL_createdomain: + /* + * There is a later hook too, but at this early point simply check + * that the calling domain is privileged enough to create a domain. + * + * Note that d is NULL because we haven't even allocated memory for it + * this early in XEN_DOMCTL_createdomain. + */ + return avc_current_has_perm(ssidref, SECCLASS_DOMAIN, DOMAIN__CREATE, NULL); + + /* These have individual XSM hooks (common/domctl.c) */ case XEN_DOMCTL_getdomaininfo: case XEN_DOMCTL_scheduler_op: case XEN_DOMCTL_irq_permission: -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Tue Jul 30 17:56:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 17:56:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768036.1178771 (Exim 4.92) (envelope-from ) id 1sYr5F-0004s5-Ke; Tue, 30 Jul 2024 17:56:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768036.1178771; Tue, 30 Jul 2024 17:56:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr5F-0004rx-Hv; Tue, 30 Jul 2024 17:56:25 +0000 Received: by outflank-mailman (input) for mailman id 768036; Tue, 30 Jul 2024 17:56:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr5E-0004rp-Fb for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:56:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr5E-0002aj-Eu for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:56:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYr5E-0001T9-E7 for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:56:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=K4tHfLtJN76n/lehfz7eLgJ1NL8ZSw6MSUWMSFEZF48=; b=LWDbN0TWcS7uQJNdX/gmdBWwnZ a8uzqA6fUtbBcs6/oNKeMt8LHe2zZaCtortCd0tJvqNI+zjmWecHA5W0GuRCdzd5Qvz6MWaqvBgXe HPhS3U11e8Um+wfpG4HWwRD+3X4x2tCcvt5Ff3GguEM5eFdUaoNdk2FHhqIlQjQbra84=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] automation: upgrade Yocto to scarthgap Message-Id: Date: Tue, 30 Jul 2024 17:56:24 +0000 commit 7234e598185f0fccb89178300354d65e342cc36b Author: Stefano Stabellini AuthorDate: Fri Jul 26 17:19:42 2024 -0700 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:44:41 2024 +0100 automation: upgrade Yocto to scarthgap Upgrade Yocto to a newer version. Use ext4 as image format for testing with QEMU on ARM and ARM64 as the default is WIC and it is not available for our xen-image-minimal target. Also update the tar.bz2 filename for the rootfs. Signed-off-by: Stefano Stabellini Reviewed-by: Marek Marczykowski-Górecki --- automation/build/yocto/build-yocto.sh | 15 ++++++++++++--- automation/build/yocto/yocto.inc | 4 ++-- automation/gitlab-ci/build.yaml | 2 +- automation/scripts/qemu-smoke-dom0-arm32.sh | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/automation/build/yocto/build-yocto.sh b/automation/build/yocto/build-yocto.sh index 93ce81ce82..e1e69f2bb5 100755 --- a/automation/build/yocto/build-yocto.sh +++ b/automation/build/yocto/build-yocto.sh @@ -25,6 +25,7 @@ TARGET_SUPPORTED="qemuarm qemuarm64 qemux86-64" VERBOSE="n" TARGETLIST="" BUILDJOBS="8" +IMAGE_FMT="" # actions to do do_clean="n" @@ -38,8 +39,9 @@ build_result=0 # layers to include in the project build_layerlist="poky/meta poky/meta-poky poky/meta-yocto-bsp \ meta-openembedded/meta-oe meta-openembedded/meta-python \ + meta-openembedded/meta-networking \ meta-openembedded/meta-filesystems \ - meta-openembedded/meta-networking meta-virtualization" + meta-virtualization" # yocto image to build build_image="xen-image-minimal" @@ -175,7 +177,7 @@ function project_build() { mkdir -p $OUTPUTDIR cp $BUILDDIR/tmp/deploy/images/qemuarm/zImage $OUTPUTDIR cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-qemuarm $OUTPUTDIR - cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-image-minimal-qemuarm.tar.bz2 $OUTPUTDIR + cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-image-minimal-qemuarm.rootfs.tar.bz2 $OUTPUTDIR fi fi ) || return 1 @@ -196,7 +198,7 @@ function project_run() { /usr/bin/expect < Envelope-to: archives@lists.xen.org Delivery-date: Tue, 30 Jul 2024 17:56:36 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768037.1178775 (Exim 4.92) (envelope-from ) id 1sYr5Q-0004wN-MN; Tue, 30 Jul 2024 17:56:36 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768037.1178775; Tue, 30 Jul 2024 17:56:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr5Q-0004wD-JR; Tue, 30 Jul 2024 17:56:36 +0000 Received: by outflank-mailman (input) for mailman id 768037; Tue, 30 Jul 2024 17:56:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr5O-0004w0-KI for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:56:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYr5O-0002ar-JR for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:56:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYr5O-0001Tp-Hm for xen-changelog@lists.xenproject.org; Tue, 30 Jul 2024 17:56:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=7CBpReLrJQuUHi28N6tn8TKvBjGBsDD4+BUcCXl3bQo=; b=kcsS5hA6sMXUfyGdsBKY7jorfT Qpo6TCBZ2KldJxwhbh356GBWD/OjWf/2oiYSTG5/Qx8V1Tmm2fqOWr8COaw0r7M/NMhdl54yA7cvA Uel4dbv7Bv4RbouEGNTWNmK3Xkgp8+xUfzRS7g1oOWcRLwBzF3P6hk9gxioGUfY565Bo=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] libxl: Enable stubdom cdrom changing Message-Id: Date: Tue, 30 Jul 2024 17:56:34 +0000 commit a18b50614d97ecb488479829dcd5ad963bf691e3 Author: Jason Andryuk AuthorDate: Mon Jul 29 11:04:12 2024 -0400 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:51:06 2024 +0100 libxl: Enable stubdom cdrom changing To change the cd-rom medium, libxl will: - QMP eject the medium from QEMU - block-detach the old PV disk - block-attach the new PV disk - QMP change the medium to the new PV disk by fdset-id The QMP code is reused, and remove and attach are implemented here. The stubdom must internally handle adding /dev/xvdc to the appropriate fdset. libxl in dom0 doesn't see the result of adding to the fdset as that is internal to the stubdom, but the fdset's opaque fields will be set to stub-devid:$devid, so libxl can identify it. $devid is common between the stubdom and libxl, so it can be identified on both side. The stubdom will name the device xvdY regardless of the guest name hdY, sdY, or xvdY, but the stubdom will be assigned the same devid facilitating lookup. Because the stubdom add-fd call is asynchronous, libxl needs to poll query-fdsets to identify when add-fd has completed. For cd-eject, we still need to attach the empty vbd. This is necessary since xenstore is used to determine that hdc exists. Otherwise after eject, hdc would be gone and the cd-insert would fail to find the drive to insert new media. Signed-off-by: Jason Andryuk Signed-off-by: Jason Andryuk Reviewed-by: Anthony PERARD --- docs/misc/stubdom.txt | 10 ++ tools/libs/light/libxl_disk.c | 383 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 372 insertions(+), 21 deletions(-) diff --git a/docs/misc/stubdom.txt b/docs/misc/stubdom.txt index c717a95d17..64c220db20 100644 --- a/docs/misc/stubdom.txt +++ b/docs/misc/stubdom.txt @@ -127,6 +127,16 @@ Limitations: - at most 26 emulated disks are supported (more are still available as PV disks) - graphics output (VNC/SDL/Spice) not supported +CD-ROM changing: + +To change the CD-ROM medium, libxl will: + - QMP eject the medium from QEMU + - block-detach the old PV disk + - block-attach the new PV disk + - QMP change the medium to the new PV disk by fdset-id + +The stubdom must internally add /dev/xvdc to an fdset in QEMU with opaque set +to "stub-devid:$devid". libxl will lookup the fdset with that string. PV-GRUB ======= diff --git a/tools/libs/light/libxl_disk.c b/tools/libs/light/libxl_disk.c index 1f1e5c6567..da1d973bf5 100644 --- a/tools/libs/light/libxl_disk.c +++ b/tools/libs/light/libxl_disk.c @@ -829,21 +829,118 @@ int libxl_device_disk_getinfo(libxl_ctx *ctx, uint32_t domid, return rc; } +/* + * Search through the query-fdsets JSON looking for a matching devid. + * + * If found, return the fdset-id integer (>=0). + * + * If not found, return ERROR_NOTFOUND. + * + * On error, return libxl ERROR_*. + */ +static int query_fdsets_find_fdset(libxl__gc *gc, + const libxl__json_object *response, + int devid) +{ + const libxl__json_object *fdset; + const char *needle = GCSPRINTF("stub-devid:%d", devid); + int i, j, rc; + + /* query-fdsets returns: + * [ + * { "fds": [ + * { "fd": 30, + * "opaque": "stub-devid:2080" + * } + * ], + * "fdset-id": 1 + * } + * ] + */ + for (i = 0; (fdset = libxl__json_array_get(response, i)); i++) { + const libxl__json_object *fdset_id; + const libxl__json_object *fds; + const libxl__json_object *fd; + + fdset_id = libxl__json_map_get("fdset-id", fdset, JSON_INTEGER); + if (!fdset_id) { + rc = ERROR_QEMU_API; + goto out; + } + + fds = libxl__json_map_get("fds", fdset, JSON_ARRAY); + if (!fds) { + rc = ERROR_QEMU_API; + goto out; + } + for (j = 0; (fd = libxl__json_array_get(fds, j)); j++) { + const libxl__json_object *fd_num; + const libxl__json_object *opaque; + const char *opaque_str; + + fd_num = libxl__json_map_get("fd", fd, JSON_INTEGER); + if (!fd_num) { + rc = ERROR_QEMU_API; + goto out; + } + opaque = libxl__json_map_get("opaque", fd, JSON_STRING); + if (!opaque) { + continue; + } + + opaque_str = libxl__json_object_get_string(opaque); + if (strcmp(opaque_str, needle) == 0) { + return libxl__json_object_get_integer(fdset_id); + } + } + } + rc = ERROR_NOTFOUND; + + out: + return rc; +} + typedef struct { libxl__ao *ao; + libxl__ao_device aodev; libxl_domid domid; + libxl_domid disk_domid; libxl_device_disk *disk; libxl_device_disk disk_saved; libxl__ev_slowlock qmp_lock; int dm_ver; libxl__ev_time time; + libxl__ev_time retry_timer; libxl__ev_qmp qmp; + int stubdom_fdset; } libxl__cdrom_insert_state; static void cdrom_insert_lock_acquired(libxl__egc *, libxl__ev_slowlock *, int rc); static void cdrom_insert_qmp_connected(libxl__egc *, libxl__ev_qmp *, const libxl__json_object *, int rc); +static void cdrom_insert_stubdom_query_fdset_rm(libxl__egc *egc, + libxl__ev_qmp *qmp, + const libxl__json_object *resp, + int rc); +static void cdrom_insert_stubdom_parse_fdset_rm(libxl__egc *egc, + libxl__ev_qmp *qmp, + const libxl__json_object *resp, + int rc); +static void cdrom_insert_stubdom_ejected(libxl__egc *egc, libxl__ev_qmp *, + const libxl__json_object *, int rc); +static void cdrom_insert_stubdom_disk_remove_cb(libxl__egc *egc, + libxl__ao_device *aodev); +static void cdrom_insert_stubdom_disk_add_cb(libxl__egc *egc, + libxl__ao_device *aodev); +static void cdrom_insert_stubdom_query_fdset(libxl__egc *egc, + libxl__ev_time *ev, + const struct timeval *abs, + int rc); +static void cdrom_insert_stubdom_parse_fdset(libxl__egc *egc, + libxl__ev_qmp *qmp, + const libxl__json_object *response, + int rc); static void cdrom_insert_ejected(libxl__egc *egc, libxl__ev_qmp *, const libxl__json_object *, int rc); static void cdrom_insert_addfd_cb(libxl__egc *egc, libxl__ev_qmp *, @@ -865,6 +962,7 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, libxl_device_disk *disks = NULL; int rc; libxl__cdrom_insert_state *cis; + libxl_domid stubdomid; GCNEW(cis); cis->ao = ao; @@ -876,6 +974,8 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, cis->qmp_lock.ao = ao; cis->qmp_lock.domid = domid; libxl__ev_time_init(&cis->time); + libxl__ev_time_init(&cis->retry_timer); + cis->stubdom_fdset = -1; libxl__ev_qmp_init(&cis->qmp); cis->qmp.ao = ao; cis->qmp.domid = domid; @@ -892,12 +992,6 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, goto out; } - if (libxl_get_stubdom_id(ctx, domid) != 0) { - LOGD(ERROR, domid, "cdrom-insert doesn't work for stub domains"); - rc = ERROR_INVAL; - goto out; - } - cis->dm_ver = libxl__device_model_version_running(gc, domid); if (cis->dm_ver == -1) { LOGD(ERROR, domid, "Cannot determine device model version"); @@ -905,7 +999,22 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, goto out; } - disks = libxl__device_list(gc, &libxl__disk_devtype, domid, &num); + stubdomid = libxl_get_stubdom_id(CTX, cis->domid); + if (stubdomid == 0) { + cis->disk_domid = domid; + } else { + cis->disk_domid = stubdomid; + disk->backend = LIBXL_DISK_BACKEND_PHY; + } + + if (cis->dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL && + stubdomid) { + LOGD(ERROR, domid, "cdrom-insert doesn't work for Mini-OS stubdoms"); + rc = ERROR_INVAL; + goto out; + } + + disks = libxl__device_list(gc, &libxl__disk_devtype, cis->disk_domid, &num); for (i = 0; i < num; i++) { if (disks[i].is_cdrom && !strcmp(disk->vdev, disks[i].vdev)) { @@ -920,7 +1029,7 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, goto out; } - rc = libxl__device_disk_setdefault(gc, domid, disk, false); + rc = libxl__device_disk_setdefault(gc, cis->disk_domid, disk, false); if (rc) goto out; if (!disk->pdev_path) { @@ -994,7 +1103,12 @@ static void cdrom_insert_qmp_connected(libxl__egc *egc, libxl__ev_qmp *qmp, QMP_PARAMETERS_SPRINTF(&args, "id", "ide-%i", devid); else QMP_PARAMETERS_SPRINTF(&args, "device", "ide-%i", devid); - qmp->callback = cdrom_insert_ejected; + + if (libxl_get_stubdom_id(CTX, cis->domid)) + qmp->callback = cdrom_insert_stubdom_query_fdset_rm; + else + qmp->callback = cdrom_insert_ejected; + rc = libxl__ev_qmp_send(egc, qmp, "eject", args); if (rc) goto out; return; @@ -1002,6 +1116,210 @@ out: cdrom_insert_done(egc, cis, rc); /* must be last */ } +static void cdrom_insert_stubdom_query_fdset_rm(libxl__egc *egc, + libxl__ev_qmp *qmp, + const libxl__json_object *resp, + int rc) +{ + libxl__cdrom_insert_state *cis = CONTAINER_OF(qmp, *cis, qmp); + + if (rc) goto out; + + /* Only called for qemu-xen/linux stubdom. */ + assert(cis->dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN); + + cis->qmp.callback = cdrom_insert_stubdom_parse_fdset_rm; + + rc = libxl__ev_qmp_send(egc, &cis->qmp, "query-fdsets", NULL); + if (rc) goto out; + + return; + + out: + cdrom_insert_done(egc, cis, rc); /* must be last */ +} + +static void cdrom_insert_stubdom_parse_fdset_rm(libxl__egc *egc, + libxl__ev_qmp *qmp, + const libxl__json_object *resp, + int rc) +{ + EGC_GC; + libxl__cdrom_insert_state *cis = CONTAINER_OF(qmp, *cis, qmp); + int devid; + int fdset; + + if (rc) goto out; + + /* Only called for qemu-xen/linux stubdom. */ + assert(cis->dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN); + + devid = libxl__device_disk_dev_number(cis->disk->vdev, NULL, NULL); + fdset = query_fdsets_find_fdset(gc, resp, devid); + if (fdset < 0) { + rc = fdset; + goto out; + } + + LOGD(DEBUG, cis->domid, "Found fdset %d", fdset); + + libxl__json_object *args = NULL; + + libxl__qmp_param_add_integer(gc, &args, "fdset-id", fdset); + + cis->qmp.callback = cdrom_insert_stubdom_ejected; + + rc = libxl__ev_qmp_send(egc, &cis->qmp, "remove-fd", args); + if (rc) goto out; + + return; + + out: + if (rc == ERROR_NOTFOUND) { + LOGD(DEBUG, cis->domid, "No fdset found - skipping remove-fd"); + cdrom_insert_stubdom_ejected(egc, qmp, resp, 0); /* must be last */ + } else { + cdrom_insert_done(egc, cis, rc); /* must be last */ + } +} + + +static void cdrom_insert_stubdom_ejected(libxl__egc *egc, libxl__ev_qmp *qmp, + const libxl__json_object *response, + int rc) +{ + libxl__cdrom_insert_state *cis = CONTAINER_OF(qmp, *cis, qmp); + libxl__device *device; + STATE_AO_GC(cis->ao); + domid_t stubdomid = cis->disk_domid; + + if (rc) goto out; + + GCNEW(device); + rc = libxl__device_from_disk(gc, stubdomid, cis->disk, device); + if (rc) goto out; + + /* stubdom PV block dev eject */ + libxl__prepare_ao_device(ao, &cis->aodev); + cis->aodev.action = LIBXL__DEVICE_ACTION_REMOVE; + cis->aodev.dev = device; + cis->aodev.callback = cdrom_insert_stubdom_disk_remove_cb; + cis->aodev.force.flag = LIBXL__FORCE_OFF; + libxl__initiate_device_generic_remove(egc, &cis->aodev); + return; + + out: + cdrom_insert_done(egc, cis, rc); /* must be last */ +} + +static void cdrom_insert_stubdom_disk_remove_cb(libxl__egc *egc, + libxl__ao_device *aodev) +{ + STATE_AO_GC(aodev->ao); + libxl__cdrom_insert_state *cis = CONTAINER_OF(aodev, *cis, aodev); + domid_t stubdomid = cis->disk_domid; + + if (aodev->rc) { + LOGD(ERROR, aodev->dev->domid, "Unable to remove stubdom PV disk id %u", + aodev->dev->devid); + goto out; + } + + /* block dev insert - this may be inserting an empty disk for eject. */ + libxl__prepare_ao_device(ao, &cis->aodev); + /* set an ao callback to end up in cdrom_insert_ejected */ + cis->aodev.callback = cdrom_insert_stubdom_disk_add_cb; + libxl__device_disk_add(egc, stubdomid, cis->disk, &cis->aodev); + + return; + + out: + cdrom_insert_done(egc, cis, aodev->rc); /* must be last */ +} + +static void cdrom_insert_stubdom_disk_add_cb(libxl__egc *egc, + libxl__ao_device *aodev) +{ + EGC_GC; + libxl__cdrom_insert_state *cis = CONTAINER_OF(aodev, *cis, aodev); + + if (aodev->rc) { + LOGD(ERROR, aodev->dev->domid, "Unable to insert stubdom PV disk id %u", + aodev->dev->devid); + goto out; + } + + cdrom_insert_stubdom_query_fdset(egc, &cis->retry_timer, NULL, + ERROR_TIMEDOUT); + return; + + out: + cdrom_insert_done(egc, cis, aodev->rc); /* must be last */ +} + +static void cdrom_insert_stubdom_query_fdset(libxl__egc *egc, + libxl__ev_time *ev, + const struct timeval *abs, + int rc) +{ + EGC_GC; + libxl__cdrom_insert_state *cis = CONTAINER_OF(ev, *cis, retry_timer); + + if (rc != ERROR_TIMEDOUT) goto out; + + /* Only called for qemu-xen/linux stubdom. */ + assert(cis->dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN); + + cis->qmp.callback = cdrom_insert_stubdom_parse_fdset; + + rc = libxl__ev_qmp_send(egc, &cis->qmp, "query-fdsets", NULL); + if (rc) goto out; + + return; + + out: + cdrom_insert_done(egc, cis, rc); /* must be last */ +} + +static void cdrom_insert_stubdom_parse_fdset(libxl__egc *egc, + libxl__ev_qmp *qmp, + const libxl__json_object *response, + int rc) +{ + EGC_GC; + libxl__cdrom_insert_state *cis = CONTAINER_OF(qmp, *cis, qmp); + int devid; + int fdset; + + if (rc) goto out; + + /* Only called for qemu-xen/linux stubdom. */ + assert(cis->dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN); + + devid = libxl__device_disk_dev_number(cis->disk->vdev, NULL, NULL); + fdset = query_fdsets_find_fdset(gc, response, devid); + if (fdset == ERROR_NOTFOUND) { + /* Give the stubdom a little time before trying again. */ + rc = libxl__ev_time_register_rel(cis->ao, &cis->retry_timer, + cdrom_insert_stubdom_query_fdset, + 200); + if (rc) goto out; + return; + } else if (fdset < 0) { + rc = fdset; + goto out; + } + + cis->stubdom_fdset = fdset; + + LOGD(DEBUG, cis->domid, "Found fdset %d", cis->stubdom_fdset); + cdrom_insert_ejected(egc, &cis->qmp, NULL, rc); + return; + + out: + cdrom_insert_done(egc, cis, rc); /* must be last */ +} + static void cdrom_insert_ejected(libxl__egc *egc, libxl__ev_qmp *qmp, const libxl__json_object *response, @@ -1026,7 +1344,7 @@ static void cdrom_insert_ejected(libxl__egc *egc, if (rc) goto out; - rc = libxl__device_from_disk(gc, domid, disk, &device); + rc = libxl__device_from_disk(gc, cis->disk_domid, disk, &device); if (rc) goto out; be_path = libxl__device_backend_path(gc, &device); libxl_path = libxl__device_libxl_path(gc, &device); @@ -1082,6 +1400,7 @@ static void cdrom_insert_ejected(libxl__egc *egc, if (rc) goto out; if (cis->dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN && + libxl_get_stubdom_id(CTX, cis->domid) == 0 && disk->format != LIBXL_DISK_FORMAT_EMPTY) { libxl__json_object *args = NULL; @@ -1094,7 +1413,7 @@ static void cdrom_insert_ejected(libxl__egc *egc, goto out; } - /* This free form parameter is not use by QEMU or libxl. */ + /* This free form parameter is not used by QEMU or non-stubdom libxl. */ QMP_PARAMETERS_SPRINTF(&args, "opaque", "%s:%s", libxl_disk_format_to_string(disk->format), disk->pdev_path); @@ -1116,7 +1435,15 @@ out: cdrom_insert_done(egc, cis, rc); /* must be last */ } else if (!has_callback) { /* Only called if no asynchronous callback are set. */ - cdrom_insert_inserted(egc, qmp, NULL, 0); /* must be last */ + if (libxl_get_stubdom_id(CTX, cis->domid) && + disk->format != LIBXL_DISK_FORMAT_EMPTY) { + LOGD(DEBUG, cis->domid, + "stubdom %d needs to perform add-fd internally", + libxl_get_stubdom_id(CTX, cis->domid)); + cdrom_insert_addfd_cb(egc, qmp, NULL, 0); /* must be last */ + } else { + cdrom_insert_inserted(egc, qmp, NULL, 0); /* must be last */ + } } } @@ -1135,17 +1462,25 @@ static void cdrom_insert_addfd_cb(libxl__egc *egc, /* convenience aliases */ libxl_device_disk *disk = cis->disk; - close(qmp->payload_fd); + if (qmp->payload_fd >= 0) + { + close(qmp->payload_fd); + } qmp->payload_fd = -1; if (rc) goto out; - o = libxl__json_map_get("fdset-id", response, JSON_INTEGER); - if (!o) { - rc = ERROR_FAIL; - goto out; + /* response non-NULL only for non-stubdom */ + if (cis->stubdom_fdset == -1) { + o = libxl__json_map_get("fdset-id", response, JSON_INTEGER); + if (!o) { + rc = ERROR_FAIL; + goto out; + } + fdset = libxl__json_object_get_integer(o); + } else { + fdset = cis->stubdom_fdset; } - fdset = libxl__json_object_get_integer(o); devid = libxl__device_disk_dev_number(disk->vdev, NULL, NULL); qmp->callback = cdrom_insert_inserted; @@ -1158,8 +1493,13 @@ static void cdrom_insert_addfd_cb(libxl__egc *egc, if (libxl__qmp_ev_qemu_compare_version(qmp, 2, 8, 0) >= 0) { QMP_PARAMETERS_SPRINTF(&args, "id", "ide-%i", devid); QMP_PARAMETERS_SPRINTF(&args, "filename", "/dev/fdset/%d", fdset); - libxl__qmp_param_add_string(gc, &args, "format", - libxl__qemu_disk_format_string(disk->format)); + if (response) { + libxl__qmp_param_add_string(gc, &args, "format", + libxl__qemu_disk_format_string(disk->format)); + } else { + /* Stubdom is using blockdev /dev/xvd* */ + libxl__qmp_param_add_string(gc, &args, "format", "host_device"); + } rc = libxl__ev_qmp_send(egc, qmp, "blockdev-change-medium", args); } else { QMP_PARAMETERS_SPRINTF(&args, "device", "ide-%i", devid); @@ -1196,7 +1536,7 @@ static void cdrom_insert_inserted(libxl__egc *egc, if (rc) goto out; - rc = libxl__device_from_disk(gc, domid, disk, &device); + rc = libxl__device_from_disk(gc, cis->disk_domid, disk, &device); if (rc) goto out; be_path = libxl__device_backend_path(gc, &device); libxl_path = libxl__device_libxl_path(gc, &device); @@ -1281,6 +1621,7 @@ static void cdrom_insert_done(libxl__egc *egc, EGC_GC; libxl__ev_time_deregister(gc, &cis->time); + libxl__ev_time_deregister(gc, &cis->retry_timer); libxl__ev_qmp_dispose(gc, &cis->qmp); if (cis->qmp.payload_fd >= 0) close(cis->qmp.payload_fd); libxl__ev_slowlock_unlock(gc, &cis->qmp_lock); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 01:22:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 01:22:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768167.1178914 (Exim 4.92) (envelope-from ) id 1sYy2W-0008Ks-JH; Wed, 31 Jul 2024 01:22:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768167.1178914; Wed, 31 Jul 2024 01:22:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy2W-0008Kk-GZ; Wed, 31 Jul 2024 01:22:04 +0000 Received: by outflank-mailman (input) for mailman id 768167; Wed, 31 Jul 2024 01:22:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy2W-0008Ke-6D for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy2W-0006Xa-0r for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYy2V-00077B-Vk for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=QZs2jK9V5zUREzRjO2OQCeAjOYjqvCr+Khs/vg0HKjs=; b=YoaXqjd2wMO6DEdqrFu8VL3tzw DSSkSc1zXSaG+e54jLAw9fO7vhaSmfBl2HgWcYrrS6JXC2uEYBNcSXjcXe/xM7nWjNUZwonKzQvVv Yl3l/TJUWA1b4LsAOjGWOHkFFozSGae8Oy6t6VflkIQYEqIXFj6joFv5deRXckD8J8RE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/event: address violation of MISRA C Rule 13.6 Message-Id: Date: Wed, 31 Jul 2024 01:22:03 +0000 commit 04c031d9a10e99bdcdb736d4c84454b9c79d1144 Author: Alessandro Zucchelli AuthorDate: Tue Jun 25 12:14:20 2024 +0200 Commit: Stefano Stabellini CommitDate: Tue Jul 30 15:14:31 2024 -0700 xen/event: address violation of MISRA C Rule 13.6 In the file include/xen/event.h macro set_bit is called with argument current->pause_flags. Once expanded this set_bit's argument is used in sizeof operations and thus 'current', being a macro that expands to a function call with potential side effects, generates a violation. To address this violation the value of current is therefore stored in a variable called 'v' before passing it to macro set_bit. No functional change. Signed-off-by: Alessandro Zucchelli Reviewed-by: Stefano Stabellini --- xen/include/xen/event.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h index f1472ea1eb..48b79f3d62 100644 --- a/xen/include/xen/event.h +++ b/xen/include/xen/event.h @@ -183,13 +183,14 @@ static bool evtchn_usable(const struct evtchn *evtchn) /* Wait on a Xen-attached event channel. */ #define wait_on_xen_event_channel(port, condition) \ do { \ + struct vcpu *v = current; \ if ( condition ) \ break; \ - set_bit(_VPF_blocked_in_xen, ¤t->pause_flags); \ + set_bit(_VPF_blocked_in_xen, &v->pause_flags); \ smp_mb(); /* set blocked status /then/ re-evaluate condition */ \ if ( condition ) \ { \ - clear_bit(_VPF_blocked_in_xen, ¤t->pause_flags); \ + clear_bit(_VPF_blocked_in_xen, &v->pause_flags); \ break; \ } \ raise_softirq(SCHEDULE_SOFTIRQ); \ @@ -198,7 +199,8 @@ static bool evtchn_usable(const struct evtchn *evtchn) #define prepare_wait_on_xen_event_channel(port) \ do { \ - set_bit(_VPF_blocked_in_xen, ¤t->pause_flags); \ + struct vcpu *v = current; \ + set_bit(_VPF_blocked_in_xen, &v->pause_flags); \ raise_softirq(SCHEDULE_SOFTIRQ); \ smp_mb(); /* set blocked status /then/ caller does his work */ \ } while ( 0 ) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 01:22:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 01:22:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768168.1178919 (Exim 4.92) (envelope-from ) id 1sYy2g-0008Ms-Lq; Wed, 31 Jul 2024 01:22:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768168.1178919; Wed, 31 Jul 2024 01:22:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy2g-0008Mk-JJ; Wed, 31 Jul 2024 01:22:14 +0000 Received: by outflank-mailman (input) for mailman id 768168; Wed, 31 Jul 2024 01:22:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy2g-0008Me-5G for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy2g-0006Xo-4J for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYy2g-00077o-2y for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:14 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=FJMMiTZcb8h6MAOTD5DOJhNCUkhfMIwjGGPQktQ43ug=; b=UsDrPSuq+2xlWh6msczxYKaA6T UGUwnoOVhQGP8Vzry8zf8p2K1EUdxgFa4nnVGgSf6qNrKfKV/o5etTSJRxMv9ONrSCsyJZwt48Jw4 MXzLaXkjVyeMSzcgb+hLjDEBNR+gPy2v1yimzjTqBIZc2+QUqLz/jKwjkpAx/KkV4bxI=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] docs/misra: rules for mass adoption Message-Id: Date: Wed, 31 Jul 2024 01:22:14 +0000 commit 7d60eaf28d86a09bf7c41dee06cb3bc5e7aae89f Author: Stefano Stabellini AuthorDate: Tue Jun 25 18:39:22 2024 -0700 Commit: Stefano Stabellini CommitDate: Tue Jul 30 15:14:31 2024 -0700 docs/misra: rules for mass adoption This patch adds a bunch of rules to rules.rst that are uncontroversial and have zero violations in Xen. As such, they have been approved for adoption. All the ones that regard the standard library have the link to the existing footnote in the notes. Signed-off-by: Stefano Stabellini Acked-by: Andrew Cooper --- docs/misra/rules.rst | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 80e5e972ad..2e11566e20 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -580,6 +580,11 @@ maintainers if you want to suggest a change. - The relational operators > >= < and <= shall not be applied to objects of pointer type except where they point into the same object - + * - `Rule 18.8 `_ + - Required + - Variable-length array types shall not be used + - + * - `Rule 19.1 `_ - Mandatory - An object shall not be assigned or copied to an overlapping @@ -589,11 +594,29 @@ maintainers if you want to suggest a change. instances where Eclair is unable to verify that the code is valid in regard to Rule 19.1. Caution reports are not violations. + * - `Rule 20.2 `_ + - Required + - The ', " or \ characters and the /* or // character sequences + shall not occur in a header file name + - + + * - `Rule 20.3 `_ + - Required + - The #include directive shall be followed by either a + or "filename" sequence + - + * - `Rule 20.4 `_ - Required - A macro shall not be defined with the same name as a keyword - + * - `Rule 20.6 `_ + - Required + - Tokens that look like a preprocessing directive shall not occur + within a macro argument + - + * - `Rule 20.7 `_ - Required - Expressions resulting from the expansion of macro parameters @@ -609,6 +632,12 @@ maintainers if you want to suggest a change. evaluation - + * - `Rule 20.11 `_ + - Required + - A macro parameter immediately following a # operator shall not + immediately be followed by a ## operator + - + * - `Rule 20.12 `_ - Required - A macro parameter used as an operand to the # or ## operators, @@ -651,11 +680,39 @@ maintainers if you want to suggest a change. declared - See comment for Rule 21.1 + * - `Rule 21.3 `_ + - Required + - The memory allocation and deallocation functions of + shall not be used + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + + * - `Rule 21.4 `_ + - Required + - The standard header file shall not be used + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + + * - `Rule 21.5 `_ + - Required + - The standard header file shall not be used + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + * - `Rule 21.6 `_ - Required - The Standard Library input/output routines shall not be used - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + * - `Rule 21.7 `_ + - Required + - The Standard Library functions atof, atoi, atol and atoll of + shall not be used + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + + * - `Rule 21.8 `_ + - Required + - The Standard Library functions abort, exit and system of + shall not be used + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + * - `Rule 21.9 `_ - Required - The library functions bsearch and qsort of shall not be used @@ -666,6 +723,16 @@ maintainers if you want to suggest a change. - The Standard Library time and date routines shall not be used - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + * - `Rule 21.11 `_ + - Required + - The standard header file shall not be used + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + + * - `Rule 21.12 `_ + - Advisory + - The exception handling features of should not be used + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + * - `Rule 21.13 `_ - Mandatory - Any value passed to a function in shall be representable as an @@ -725,12 +792,24 @@ maintainers if you want to suggest a change. - The Standard Library function system of shall not be used - + * - `Rule 22.1 `_ + - Required + - All resources obtained dynamically by means of Standard Library + functions shall be explicitly released + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + * - `Rule 22.2 `_ - Mandatory - A block of memory shall only be freed if it was allocated by means of a Standard Library function - + * - `Rule 22.3 `_ + - Required + - The same file shall not be open for read and write access at the + same time on different streams + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + * - `Rule 22.4 `_ - Mandatory - There shall be no attempt to write to a stream which has been opened as @@ -748,6 +827,31 @@ maintainers if you want to suggest a change. stream has been closed - + * - `Rule 22.7 `_ + - Required + - The macro EOF shall only be compared with the unmodified return + value from any Standard Library function capable of returning EOF + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + + * - `Rule 22.8 `_ + - Required + - The value of errno shall be set to zero prior to a call to an + errno-setting-function + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + + * - `Rule 22.9 `_ + - Required + - The value of errno shall be tested against zero after calling an + errno-setting-function + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + + * - `Rule 22.10 `_ + - Required + - The value of errno shall only be tested when the last function to + be called was an errno-setting-function + - Xen doesn't provide, use, or link against a Standard Library [#xen-stdlib]_ + + Terms & Definitions ------------------- -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 01:22:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 01:22:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768169.1178922 (Exim 4.92) (envelope-from ) id 1sYy2r-0008R3-NF; Wed, 31 Jul 2024 01:22:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768169.1178922; Wed, 31 Jul 2024 01:22:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy2r-0008Qw-Kn; Wed, 31 Jul 2024 01:22:25 +0000 Received: by outflank-mailman (input) for mailman id 768169; Wed, 31 Jul 2024 01:22:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy2q-0008Qe-AG for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy2q-0006YH-8I for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYy2q-00078O-6O for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=tddMwtGYkd27EV6MwyJuki7XQ78FhD7c2fMdVHc29Zc=; b=EATB/nEuoYaBfWm8jr46Ln0mFE VC7a/C89oS5jOPVUwCETyMW/CeFIyeoTIFd8ve5/VpP9/M7i5VwADvOBA0hxCrd4DFXhlf+S5SnK+ l/NsieBPRdPBsFu51JI5SV3AZZn/lAPUUYoN6xIW1RlvhZiOBdzoYb2hI8zWEElyp8YA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] docs/misra: add rule 12.2 Message-Id: Date: Wed, 31 Jul 2024 01:22:24 +0000 commit 404135d408b562dd73a57ff7d070a407651bfa66 Author: Stefano Stabellini AuthorDate: Fri Jul 12 15:45:54 2024 -0700 Commit: Stefano Stabellini CommitDate: Tue Jul 30 15:14:31 2024 -0700 docs/misra: add rule 12.2 As discussed during the last MISRA C meeting, add Rule 12.2 to the list of MISRA C rules we accept, together with an explanation that we use gcc -fsanitize=undefined to check for violations. Signed-off-by: Stefano Stabellini Acked-by: Jan Beulich --- docs/misra/rules.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index 2e11566e20..bb7e1ea396 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -443,6 +443,14 @@ maintainers if you want to suggest a change. - The macro NULL shall be the only permitted form of null pointer constant - + * - `Rule 12.2 `_ + - Required + - The right hand operand of a shift operator shall lie in the range + zero to one less than the width in bits of the essential type of + the left hand operand + - We rely on gcc -fsanitize=undefined to check for dangerious + violations to this rule and to ensure compliance + * - `Rule 12.5 `_ - Mandatory - The sizeof operator shall not have an operand which is a function -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 01:22:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 01:22:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768170.1178927 (Exim 4.92) (envelope-from ) id 1sYy31-0008U5-P5; Wed, 31 Jul 2024 01:22:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768170.1178927; Wed, 31 Jul 2024 01:22:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy31-0008Tx-ML; Wed, 31 Jul 2024 01:22:35 +0000 Received: by outflank-mailman (input) for mailman id 768170; Wed, 31 Jul 2024 01:22:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy30-0008Te-C3 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy30-0006YQ-BG for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYy30-00078y-AP for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=LfMefwAC01iwNgL2NNUGhF9dYSxl9oTWcfVmRWW2Glw=; b=nKhsFak8l9oDeE9/e96g2ATijv aGxp/bHB/vbrX5ABhMNSzofx7xrpeBihSoWz/36H6ovSUQoz+oiitlN/9JLheiiABb3UeoMXfHLEi r5NJ5q9rUNVP1jMRdbpHoz45pQTbs0r5P4G8NYDavJfeqe29VLLG6oNMd+AbGYJRpFEE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] docs/misra: add R18.6 to rules.rst Message-Id: Date: Wed, 31 Jul 2024 01:22:34 +0000 commit 682ffdbda496c9565ecec7074835153e0bf66d6d Author: Stefano Stabellini AuthorDate: Wed Jul 24 15:44:14 2024 -0700 Commit: Stefano Stabellini CommitDate: Tue Jul 30 15:14:31 2024 -0700 docs/misra: add R18.6 to rules.rst In practice, we are already following R18.6 and we have zero violations reported by ECLAIR (there are some cautions being reported.) Signed-off-by: Stefano Stabellini Acked-by: Bertrand Marquis --- docs/misra/rules.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/misra/rules.rst b/docs/misra/rules.rst index bb7e1ea396..7b366edb07 100644 --- a/docs/misra/rules.rst +++ b/docs/misra/rules.rst @@ -593,6 +593,13 @@ maintainers if you want to suggest a change. - Variable-length array types shall not be used - + * - `Rule 18.6 `_ + - Required + - The address of an object with automatic storage shall not be + copied to another object that persists after the first object has + ceased to exist + - + * - `Rule 19.1 `_ - Mandatory - An object shall not be assigned or copied to an overlapping -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 01:22:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 01:22:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768171.1178931 (Exim 4.92) (envelope-from ) id 1sYy3B-00005W-Qf; Wed, 31 Jul 2024 01:22:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768171.1178931; Wed, 31 Jul 2024 01:22:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy3B-00005O-Nn; Wed, 31 Jul 2024 01:22:45 +0000 Received: by outflank-mailman (input) for mailman id 768171; Wed, 31 Jul 2024 01:22:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy3A-000055-FP for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sYy3A-0006Yc-EV for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:44 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sYy3A-00079W-DM for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 01:22:44 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=FMcw66sXaTMCX/9rd+RWJKAJu5qyZAUPZEhpRF1frl0=; b=5ZD0+42vRfYBCvbi4N8CezGYhD vhYiD64PBbETu5iYtxfR66XY6/Bs7oupbq+wRGaqeYrlbAjaWLU7sXQPxRrlyaXxdBrUSPcH5s/rS aneqVpBah2JV0d3ExwkNo/7kHiBsD0I59RYwk7JhFS65bwl2a8FAni/vrNjs87wxV7Co=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] automation: add x86_64 xilinx smoke test Message-Id: Date: Wed, 31 Jul 2024 01:22:44 +0000 commit 6979e17b3f8a18d2ba5dbd4f0623c4061dae0dfc Author: Victor Lira AuthorDate: Fri Jul 26 18:56:39 2024 -0700 Commit: Stefano Stabellini CommitDate: Tue Jul 30 15:14:31 2024 -0700 automation: add x86_64 xilinx smoke test Add a test script and related job for running x86_64 dom0 tests. Signed-off-by: Victor Lira Reviewed-by: Stefano Stabellini --- automation/gitlab-ci/test.yaml | 24 +++++ automation/scripts/xilinx-smoke-dom0-x86_64.sh | 144 +++++++++++++++++++++++++ 2 files changed, 168 insertions(+) diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index d89e41f244..4e74946419 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -96,6 +96,22 @@ tags: - xilinx +.xilinx-x86_64: + extends: .test-jobs-common + variables: + CONTAINER: ubuntu:xenial-xilinx + LOGFILE: xilinx-smoke-x86_64.log + artifacts: + paths: + - smoke.serial + - '*.log' + when: always + only: + variables: + - $XILINX_JOBS == "true" && $CI_COMMIT_REF_PROTECTED == "true" + tags: + - xilinx + .adl-x86-64: extends: .test-jobs-common variables: @@ -159,6 +175,14 @@ xilinx-smoke-dom0less-arm64-gcc-debug-gem-passthrough: - *arm64-test-needs - alpine-3.18-gcc-debug-arm64 +xilinx-smoke-dom0-x86_64-gcc-debug: + extends: .xilinx-x86_64 + script: + - ./automation/scripts/xilinx-smoke-dom0-x86_64.sh ping 2>&1 | tee ${LOGFILE} + needs: + - *x86-64-test-needs + - alpine-3.18-gcc-debug + adl-smoke-x86-64-gcc-debug: extends: .adl-x86-64 script: diff --git a/automation/scripts/xilinx-smoke-dom0-x86_64.sh b/automation/scripts/xilinx-smoke-dom0-x86_64.sh new file mode 100755 index 0000000000..e6e6fac6a5 --- /dev/null +++ b/automation/scripts/xilinx-smoke-dom0-x86_64.sh @@ -0,0 +1,144 @@ +#!/bin/sh + +# Run x86_64 dom0 tests on hardware. + +set -ex + +fatal() { + echo "$(basename "$0") $*" >&2 + exit 1 +} + +# Test parameter defaults. +TEST="$1" +PASS_MSG="Test passed: ${TEST}" +XEN_CMD_CONSOLE="console=com1 com1=115200,8n1,0x3F8,4" +XEN_CMD_DOM0="dom0=pvh dom0_max_vcpus=4 dom0_mem=4G" +XEN_CMD_XEN="sched=null loglvl=all guest_loglvl=all console_timestamps=boot" +XEN_CMD_EXTRA="" +DOM0_CMD="" +DOMU_CMD="" +DOMU_CFG=' +type = "pvh" +name = "domU" +kernel = "/boot/vmlinuz" +ramdisk = "/boot/initrd-domU" +extra = "root=/dev/ram0 console=hvc0" +memory = 512 +vif = [ "bridge=xenbr0", ] +disk = [ ] +' +TIMEOUT_SECONDS=120 + +# Select test variant. +if [ "${TEST}" = "ping" ]; then + DOMU_MSG="domU online" + DOMU_CMD=" +ifconfig eth0 192.168.0.2 +until ping -c 10 192.168.0.1; do + sleep 1 +done +echo \"${DOMU_MSG}\" +" + DOM0_CMD=" +set +x +until grep -q \"${DOMU_MSG}\" /var/log/xen/console/guest-domU.log; do + sleep 1 +done +set -x +echo \"${PASS_MSG}\" +" +else + fatal "Unknown test: ${TEST}" +fi + +# Set up domU rootfs. +mkdir -p rootfs +cd rootfs +tar xzf ../binaries/initrd.tar.gz +mkdir proc +mkdir run +mkdir srv +mkdir sys +rm var/run +echo "#!/bin/sh + +${DOMU_CMD} +" > etc/local.d/xen.start +chmod +x etc/local.d/xen.start +echo "rc_verbose=yes" >> etc/rc.conf +sed -i -e 's/^Welcome/domU \0/' etc/issue +find . | cpio -H newc -o | gzip > ../binaries/domU-rootfs.cpio.gz +cd .. +rm -rf rootfs + +# Set up dom0 rootfs. +mkdir -p rootfs +cd rootfs +tar xzf ../binaries/initrd.tar.gz +mkdir boot +mkdir proc +mkdir run +mkdir srv +mkdir sys +rm var/run +cp -ar ../binaries/dist/install/* . +echo "#!/bin/bash + +export LD_LIBRARY_PATH=/usr/local/lib +bash /etc/init.d/xencommons start + +brctl addbr xenbr0 +brctl addif xenbr0 eth0 +ifconfig eth0 up +ifconfig xenbr0 up +ifconfig xenbr0 192.168.0.1 + +# get domU console content into test log +tail -F /var/log/xen/console/guest-domU.log 2>/dev/null | sed -e \"s/^/(domU) /\" & +xl create /etc/xen/domU.cfg +${DOM0_CMD} +" > etc/local.d/xen.start +chmod +x etc/local.d/xen.start +echo "${DOMU_CFG}" > etc/xen/domU.cfg +echo "rc_verbose=yes" >> etc/rc.conf +echo "XENCONSOLED_TRACE=all" >> etc/default/xencommons +echo "QEMU_XEN=/bin/false" >> etc/default/xencommons +mkdir -p var/log/xen/console +cp ../binaries/bzImage boot/vmlinuz +cp ../binaries/domU-rootfs.cpio.gz boot/initrd-domU +find . | cpio -H newc -o | gzip > ../binaries/dom0-rootfs.cpio.gz +cd .. + +# Load software into TFTP server directory. +TFTP="/scratch/gitlab-runner/tftp" +XEN_CMDLINE="${XEN_CMD_CONSOLE} ${XEN_CMD_XEN} ${XEN_CMD_DOM0} ${XEN_CMD_EXTRA}" +cp -f binaries/xen ${TFTP}/pxelinux.cfg/xen +cp -f binaries/bzImage ${TFTP}/pxelinux.cfg/vmlinuz +cp -f binaries/dom0-rootfs.cpio.gz ${TFTP}/pxelinux.cfg/initrd-dom0 +echo " +net_default_server=10.0.6.1 +multiboot2 (tftp)/pxelinux.cfg/xen ${XEN_CMDLINE} +module2 (tftp)/pxelinux.cfg/vmlinuz console=hvc0 root=/dev/ram0 earlyprintk=xen +module2 (tftp)/pxelinux.cfg/initrd-dom0 +boot +" > ${TFTP}/pxelinux.cfg/grub.cfg + +# Power cycle board and collect serial port output. +SERIAL_CMD="cat /dev/ttyUSB9 | tee smoke.serial | sed 's/\r//'" +sh /scratch/gitlab-runner/v2000a.sh 2 +sleep 5 +sh /scratch/gitlab-runner/v2000a.sh 1 +sleep 5 +set +e +stty -F /dev/ttyUSB9 115200 +timeout -k 1 ${TIMEOUT_SECONDS} nohup sh -c "${SERIAL_CMD}" +sh /scratch/gitlab-runner/v2000a.sh 2 + +set -e + +if grep -q "${PASS_MSG}" smoke.serial; then + exit 0 +fi + +fatal "Test failed" -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 10:22:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 10:22:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768451.1179234 (Exim 4.92) (envelope-from ) id 1sZ6T7-00083N-Hx; Wed, 31 Jul 2024 10:22:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768451.1179234; Wed, 31 Jul 2024 10:22:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6T7-00083G-FV; Wed, 31 Jul 2024 10:22:05 +0000 Received: by outflank-mailman (input) for mailman id 768451; Wed, 31 Jul 2024 10:22:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6T6-00082r-9p for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:22:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6T5-0000mk-V5 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:22:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ6T5-0004Ph-Sc for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:22:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=hSCgWRMuVvbF3M+1VQoGS7vrBKt3DXi+LYCNBOnUzys=; b=WoRJZrGP+BHZ78vhB5lfSKZcrj jMpW8K8dECcBX5R0xVhgY7uqE11ToQAXni4wmBooh7qJoxhev1TomdccteMmQ1eHDuxdHLTpVe4CY jJw/RoyVHekeICH/TICpUlwFFgI4YrEVlQsUBKXnQld1YidsrnjYmkHHbQdv0lhVuSvM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/domain: Introduce arch_init_idle_domain() Message-Id: Date: Wed, 31 Jul 2024 10:22:03 +0000 commit 694ce812e7cb643236e8e677aca763c5f2aa4f4b Author: Andrew Cooper AuthorDate: Thu Jul 18 20:54:05 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 31 11:14:50 2024 +0100 xen/domain: Introduce arch_init_idle_domain() The idle domain causes a large amount of complexity in domain_create() because of x86's need to initialise d->arch.ctxt_switch in arch_domain_create(). In order to address this, introduce an optional hook to perform extra initialisation of the idle domain. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Reviewed-by: Stefano Stabellini --- xen/common/domain.c | 3 +++ xen/include/xen/sched.h | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c index 7b47696dd3..f1d54845ec 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -686,6 +686,9 @@ struct domain *domain_create(domid_t domid, rangeset_domain_initialise(d); + if ( is_idle_domain(d) ) + arch_init_idle_domain(d); + /* DOMID_{XEN,IO,etc} (other than IDLE) are sufficiently constructed. */ if ( is_system_domain(d) && !is_idle_domain(d) ) return d; diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 2dcd1d1a4f..90666576c2 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -728,6 +728,11 @@ struct domain *domain_create(domid_t domid, struct xen_domctl_createdomain *config, unsigned int flags); +#ifndef arch_init_idle_domain +/* Optional, if there's any construction necessary for DOMID_IDLE */ +static inline void arch_init_idle_domain(struct domain *d) {} +#endif + /* * rcu_lock_domain_by_id() is more efficient than get_domain_by_id(). * This is the preferred function if the returned domain reference -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 10:22:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 10:22:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768452.1179240 (Exim 4.92) (envelope-from ) id 1sZ6TH-000856-KT; Wed, 31 Jul 2024 10:22:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768452.1179240; Wed, 31 Jul 2024 10:22:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6TH-00084y-HA; Wed, 31 Jul 2024 10:22:15 +0000 Received: by outflank-mailman (input) for mailman id 768452; Wed, 31 Jul 2024 10:22:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6TG-00084s-3j for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:22:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6TG-0000n1-2y for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:22:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ6TG-0004QN-11 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:22:14 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=aFtOgP7xphgwhD50BG/xu+QTfT3lFkGKgFSUgFGlB9Y=; b=YtTe7c1HwU7oVT3qNG8cAPdw6e n/dQirnBGwF1cs0EuaTm1fTxYNVeZd4DvoAAYLSqEyNO/ucqqnf2r2woEfICFmiyR10DERqejb2G3 v0GqcoDllagAXCBGOfd7OcfZFy7Vgi1XAQn2jvzPAqtdAM008TC6T90Hf2HIHHCv4Iek=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/domain: Implement arch_init_idle_domain() Message-Id: Date: Wed, 31 Jul 2024 10:22:14 +0000 commit fdb4d76ff3c44752d067fe598c0c021389030c63 Author: Andrew Cooper AuthorDate: Thu Jul 18 21:12:31 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 31 11:14:50 2024 +0100 x86/domain: Implement arch_init_idle_domain() The idle domain needs d->arch.ctxt_switch initialised on x86. Implement the new arch_init_idle_domain() in order to do this. Intentionally remove cpu_policy's initialisation to ZERO_BLOCK_PTR. It has never tripped since it's introduction, and is weird to have in isolation without a similar approach on other pointers. No practical change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/domain.c | 21 +++++++++++---------- xen/arch/x86/include/asm/domain.h | 3 +++ 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index ccadfe0c9e..a6cb7a98ed 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -768,6 +768,17 @@ static bool emulation_flags_ok(const struct domain *d, uint32_t emflags) return true; } +void __init arch_init_idle_domain(struct domain *d) +{ + static const struct arch_csw idle_csw = { + .from = paravirt_ctxt_switch_from, + .to = paravirt_ctxt_switch_to, + .tail = idle_loop, + }; + + d->arch.ctxt_switch = &idle_csw; +} + int arch_domain_create(struct domain *d, struct xen_domctl_createdomain *config, unsigned int flags) @@ -783,16 +794,6 @@ int arch_domain_create(struct domain *d, /* Minimal initialisation for the idle domain. */ if ( unlikely(is_idle_domain(d)) ) { - static const struct arch_csw idle_csw = { - .from = paravirt_ctxt_switch_from, - .to = paravirt_ctxt_switch_to, - .tail = idle_loop, - }; - - d->arch.ctxt_switch = &idle_csw; - - d->arch.cpu_policy = ZERO_BLOCK_PTR; /* Catch stray misuses. */ - return 0; } diff --git a/xen/arch/x86/include/asm/domain.h b/xen/arch/x86/include/asm/domain.h index f5daeb182b..bca3258d69 100644 --- a/xen/arch/x86/include/asm/domain.h +++ b/xen/arch/x86/include/asm/domain.h @@ -779,6 +779,9 @@ struct arch_vcpu_io { /* Maxphysaddr supportable by the paging infrastructure. */ unsigned int domain_max_paddr_bits(const struct domain *d); +#define arch_init_idle_domain arch_init_idle_domain +void arch_init_idle_domain(struct domain *d); + #endif /* __ASM_DOMAIN_H__ */ /* -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 10:22:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 10:22:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768453.1179243 (Exim 4.92) (envelope-from ) id 1sZ6TR-00089c-NW; Wed, 31 Jul 2024 10:22:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768453.1179243; Wed, 31 Jul 2024 10:22:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6TR-00089U-Kq; Wed, 31 Jul 2024 10:22:25 +0000 Received: by outflank-mailman (input) for mailman id 768453; Wed, 31 Jul 2024 10:22:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6TQ-00089I-70 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:22:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6TQ-0000n9-6B for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:22:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ6TQ-0004Qq-57 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:22:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=tOYcUMlMJJh+o1wt0rYLM/XKVnWoOaByem4bzVqaQW4=; b=pvB8q4k9TXGJS76bCdFW1/pSZ7 bw56H2evRJj/aZ6kp+VZVV+s5vVqzNHprSrK6vjsrNDYy2kcIrWN2p7zuJLRZu6lUn10FDzYsTPVw h1yd6cUgsoP83ew7k9E8cK60EItWGFH89l9FwOtFrn/NLhTdRBSla8Y9mEO6G/yPDlI0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/domain: Simpliy domain_create() now the idle domain is complete earlier Message-Id: Date: Wed, 31 Jul 2024 10:22:24 +0000 commit a259a658f203e3b17734c42f2ca6e75344e2de22 Author: Andrew Cooper AuthorDate: Thu Jul 18 21:20:52 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 31 11:14:50 2024 +0100 xen/domain: Simpliy domain_create() now the idle domain is complete earlier With x86 implementing arch_init_idle_domain(), there is no longer any need to call arch_domain_create() with the idle domain. Have the idle domain exit early with all other system domains. Move the static-analysis ASSERT() earlier. Then, remove the !is_idle_domain() protections around the majority of domain_create() and remove one level of indentation. No practical change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Reviewed-by: Stefano Stabellini --- xen/common/domain.c | 127 +++++++++++++++++++++++++--------------------------- 1 file changed, 60 insertions(+), 67 deletions(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index f1d54845ec..2566604738 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -689,95 +689,88 @@ struct domain *domain_create(domid_t domid, if ( is_idle_domain(d) ) arch_init_idle_domain(d); - /* DOMID_{XEN,IO,etc} (other than IDLE) are sufficiently constructed. */ - if ( is_system_domain(d) && !is_idle_domain(d) ) + /* DOMID_{XEN,IO,IDLE,etc} are sufficiently constructed. */ + if ( is_system_domain(d) ) return d; + /* + * This assertion helps static analysis tools infer that config cannot be + * NULL in this branch, which in turn means that it can be safely + * dereferenced. Therefore, this assertion is not redundant. + */ + ASSERT(config); + #ifdef CONFIG_HAS_PIRQ - if ( !is_idle_domain(d) ) - { - if ( !is_hardware_domain(d) ) - d->nr_pirqs = nr_static_irqs + extra_domU_irqs; - else - d->nr_pirqs = extra_hwdom_irqs ? nr_static_irqs + extra_hwdom_irqs - : arch_hwdom_irqs(d); - d->nr_pirqs = min(d->nr_pirqs, nr_irqs); + if ( !is_hardware_domain(d) ) + d->nr_pirqs = nr_static_irqs + extra_domU_irqs; + else + d->nr_pirqs = extra_hwdom_irqs ? nr_static_irqs + extra_hwdom_irqs + : arch_hwdom_irqs(d); + d->nr_pirqs = min(d->nr_pirqs, nr_irqs); - radix_tree_init(&d->pirq_tree); - } + radix_tree_init(&d->pirq_tree); #endif if ( (err = arch_domain_create(d, config, flags)) != 0 ) goto fail; init_status |= INIT_arch; - if ( !is_idle_domain(d) ) - { - /* - * The assertion helps static analysis tools infer that config cannot - * be NULL in this branch, which in turn means that it can be safely - * dereferenced. Therefore, this assertion is not redundant. - */ - ASSERT(config); - - watchdog_domain_init(d); - init_status |= INIT_watchdog; + watchdog_domain_init(d); + init_status |= INIT_watchdog; - err = -ENOMEM; - d->iomem_caps = rangeset_new(d, "I/O Memory", RANGESETF_prettyprint_hex); - d->irq_caps = rangeset_new(d, "Interrupts", 0); - if ( !d->iomem_caps || !d->irq_caps ) - goto fail; + err = -ENOMEM; + d->iomem_caps = rangeset_new(d, "I/O Memory", RANGESETF_prettyprint_hex); + d->irq_caps = rangeset_new(d, "Interrupts", 0); + if ( !d->iomem_caps || !d->irq_caps ) + goto fail; - if ( (err = xsm_domain_create(XSM_HOOK, d, config->ssidref)) != 0 ) - goto fail; + if ( (err = xsm_domain_create(XSM_HOOK, d, config->ssidref)) != 0 ) + goto fail; - d->controller_pause_count = 1; - atomic_inc(&d->pause_count); + d->controller_pause_count = 1; + atomic_inc(&d->pause_count); - if ( (err = evtchn_init(d, config->max_evtchn_port)) != 0 ) - goto fail; - init_status |= INIT_evtchn; + if ( (err = evtchn_init(d, config->max_evtchn_port)) != 0 ) + goto fail; + init_status |= INIT_evtchn; - if ( (err = grant_table_init(d, config->max_grant_frames, - config->max_maptrack_frames, - config->grant_opts)) != 0 ) - goto fail; - init_status |= INIT_gnttab; + if ( (err = grant_table_init(d, config->max_grant_frames, + config->max_maptrack_frames, + config->grant_opts)) != 0 ) + goto fail; + init_status |= INIT_gnttab; - if ( (err = argo_init(d)) != 0 ) - goto fail; + if ( (err = argo_init(d)) != 0 ) + goto fail; - err = -ENOMEM; + err = -ENOMEM; + d->pbuf = xzalloc_array(char, DOMAIN_PBUF_SIZE); + if ( !d->pbuf ) + goto fail; - d->pbuf = xzalloc_array(char, DOMAIN_PBUF_SIZE); - if ( !d->pbuf ) - goto fail; + if ( (err = sched_init_domain(d, config->cpupool_id)) != 0 ) + goto fail; - if ( (err = sched_init_domain(d, config->cpupool_id)) != 0 ) - goto fail; + if ( (err = late_hwdom_init(d)) != 0 ) + goto fail; - if ( (err = late_hwdom_init(d)) != 0 ) - goto fail; + /* + * Must not fail beyond this point, as our caller doesn't know whether + * the domain has been entered into domain_list or not. + */ - /* - * Must not fail beyond this point, as our caller doesn't know whether - * the domain has been entered into domain_list or not. - */ + spin_lock(&domlist_update_lock); + pd = &domain_list; /* NB. domain_list maintained in order of domid. */ + for ( pd = &domain_list; *pd != NULL; pd = &(*pd)->next_in_list ) + if ( (*pd)->domain_id > d->domain_id ) + break; + d->next_in_list = *pd; + d->next_in_hashbucket = domain_hash[DOMAIN_HASH(domid)]; + rcu_assign_pointer(*pd, d); + rcu_assign_pointer(domain_hash[DOMAIN_HASH(domid)], d); + spin_unlock(&domlist_update_lock); - spin_lock(&domlist_update_lock); - pd = &domain_list; /* NB. domain_list maintained in order of domid. */ - for ( pd = &domain_list; *pd != NULL; pd = &(*pd)->next_in_list ) - if ( (*pd)->domain_id > d->domain_id ) - break; - d->next_in_list = *pd; - d->next_in_hashbucket = domain_hash[DOMAIN_HASH(domid)]; - rcu_assign_pointer(*pd, d); - rcu_assign_pointer(domain_hash[DOMAIN_HASH(domid)], d); - spin_unlock(&domlist_update_lock); - - memcpy(d->handle, config->handle, sizeof(d->handle)); - } + memcpy(d->handle, config->handle, sizeof(d->handle)); return d; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 10:22:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 10:22:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768454.1179248 (Exim 4.92) (envelope-from ) id 1sZ6Ta-0008CG-P7; Wed, 31 Jul 2024 10:22:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768454.1179248; Wed, 31 Jul 2024 10:22:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6Ta-0008CA-MD; Wed, 31 Jul 2024 10:22:34 +0000 Received: by outflank-mailman (input) for mailman id 768454; Wed, 31 Jul 2024 10:22:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6Ta-0008C4-Bj for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:22:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6Ta-0000nW-Av for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:22:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ6Ta-0004RL-8L for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:22:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=sgUvFNDv9MjXHK8a9UVmxax11Xa6/KqsTSO7oexvym4=; b=PwYNXQ/J/osJ1fUz+3pr3edeHW aP7Nfmk1FbIwHsppLnUA9RgwhMez/e7JHLp8zmrcxMTaX4uwwsqZh9Mei1ohz9sLaA7cxom2h87ud 6IqXxm2DOPXMEMzjLlshoy2UcKtV4c43gG1kyGP2NNUM90T5vwcbUb1mZIPdMxQczzv0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] arch/domain: Clean up the idle domain remnants in arch_domain_create() Message-Id: Date: Wed, 31 Jul 2024 10:22:34 +0000 commit a5b8e72e9e2e59941cc76978725bb9ee04eba722 Author: Andrew Cooper AuthorDate: Thu Jul 18 21:22:41 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 31 11:14:50 2024 +0100 arch/domain: Clean up the idle domain remnants in arch_domain_create() With arch_domain_create() no longer being called with the idle domain, drop the last remaining logic. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Reviewed-by: Stefano Stabellini --- xen/arch/arm/domain.c | 6 ------ xen/arch/x86/domain.c | 13 ------------- 2 files changed, 19 deletions(-) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 7cfcefd279..3ba959f866 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -706,12 +706,6 @@ int arch_domain_create(struct domain *d, BUILD_BUG_ON(GUEST_MAX_VCPUS < MAX_VIRT_CPUS); - /* Idle domains do not need this setup */ - if ( is_idle_domain(d) ) - return 0; - - ASSERT(config != NULL); - #ifdef CONFIG_IOREQ_SERVER ioreq_domain_init(d); #endif diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index a6cb7a98ed..c71b9023cb 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -791,19 +791,6 @@ int arch_domain_create(struct domain *d, spin_lock_init(&d->arch.e820_lock); - /* Minimal initialisation for the idle domain. */ - if ( unlikely(is_idle_domain(d)) ) - { - return 0; - } - - if ( !config ) - { - /* Only IDLE is allowed with no config. */ - ASSERT_UNREACHABLE(); - return -EINVAL; - } - if ( d->domain_id && cpu_has_amd_erratum(&boot_cpu_data, AMD_ERRATUM_121) ) { if ( !opt_allow_unsafe ) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 10:44:08 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 10:44:08 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768463.1179251 (Exim 4.92) (envelope-from ) id 1sZ6oO-0002lW-7D; Wed, 31 Jul 2024 10:44:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768463.1179251; Wed, 31 Jul 2024 10:44:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6oO-0002lO-4c; Wed, 31 Jul 2024 10:44:04 +0000 Received: by outflank-mailman (input) for mailman id 768463; Wed, 31 Jul 2024 10:44:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6oN-0002lI-MO for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6oN-000183-Gp for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ6oN-0005uR-Ej for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=9eNfpecXhnByHRDEfW24I9QAF0egrdyDqPqMFEzhLVI=; b=sca+wOPiY1M2cms70c6rE2fpbK Fq6rfFHv2FOeRqPPbXxE4paCbP6OObKGKANSjdGAKQoJUMVfvlb7b0Dn13Mikeh3MEiFtoy4KLZug aZgw6P+lQhEo0OhIuSLqysjiPapViCt+8HHjJ/TmBYMh3D3AgwvIx/ipFssuPLOpAEaw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86+Arm: drop (rename) __virt_to_maddr() / __maddr_to_virt() Message-Id: Date: Wed, 31 Jul 2024 10:44:03 +0000 commit 96f35de69e593a9d9c348ae33ba17cf3cc5a9a79 Author: Jan Beulich AuthorDate: Wed Jul 31 12:36:14 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 12:36:14 2024 +0200 x86+Arm: drop (rename) __virt_to_maddr() / __maddr_to_virt() There's no use of them anymore except in the definitions of the non- underscore-prefixed aliases. On Arm convert the (renamed) inline function to a macro. On x86 rename the inline functions, adjust the virt_to_maddr() #define, and purge the maddr_to_virt() one, thus eliminating a bogus cast which would have allowed the passing of a pointer type variable into maddr_to_virt() to go silently. No functional change intended. Signed-off-by: Jan Beulich Reviewed-by: Oleksii Kurochko Acked-by: Julien Grall --- xen/arch/arm/include/asm/mm.h | 10 ++++------ xen/arch/x86/hvm/nestedhvm.c | 2 +- xen/arch/x86/include/asm/page.h | 2 -- xen/arch/x86/include/asm/x86_64/page.h | 5 +++-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/xen/arch/arm/include/asm/mm.h b/xen/arch/arm/include/asm/mm.h index 48538b5337..f6ba611f01 100644 --- a/xen/arch/arm/include/asm/mm.h +++ b/xen/arch/arm/include/asm/mm.h @@ -256,12 +256,10 @@ static inline void __iomem *ioremap_wc(paddr_t start, size_t len) /* Page-align address and convert to frame number format */ #define paddr_to_pfn_aligned(paddr) paddr_to_pfn(PAGE_ALIGN(paddr)) -static inline paddr_t __virt_to_maddr(vaddr_t va) -{ - uint64_t par = va_to_par(va); - return (par & PADDR_MASK & PAGE_MASK) | (va & ~PAGE_MASK); -} -#define virt_to_maddr(va) __virt_to_maddr((vaddr_t)(va)) +#define virt_to_maddr(va) ({ \ + vaddr_t va_ = (vaddr_t)(va); \ + (va_to_par(va_) & PADDR_MASK & PAGE_MASK) | (va_ & ~PAGE_MASK); \ +}) #ifdef CONFIG_ARM_32 /** diff --git a/xen/arch/x86/hvm/nestedhvm.c b/xen/arch/x86/hvm/nestedhvm.c index 451c4da6d4..d895a73844 100644 --- a/xen/arch/x86/hvm/nestedhvm.c +++ b/xen/arch/x86/hvm/nestedhvm.c @@ -125,7 +125,7 @@ static int __init cf_check nestedhvm_setup(void) /* shadow_io_bitmaps can't be declared static because * they must fulfill hw requirements (page aligned section) * and doing so triggers the ASSERT(va >= XEN_VIRT_START) - * in __virt_to_maddr() + * in virt_to_maddr() * * So as a compromise pre-allocate them when xen boots. * This function must be called from within start_xen() when diff --git a/xen/arch/x86/include/asm/page.h b/xen/arch/x86/include/asm/page.h index e48571de93..e01af28916 100644 --- a/xen/arch/x86/include/asm/page.h +++ b/xen/arch/x86/include/asm/page.h @@ -256,8 +256,6 @@ void copy_page_sse2(void *to, const void *from); #define mfn_valid(mfn) __mfn_valid(mfn_x(mfn)) #define virt_to_mfn(va) __virt_to_mfn(va) #define mfn_to_virt(mfn) __mfn_to_virt(mfn) -#define virt_to_maddr(va) __virt_to_maddr((unsigned long)(va)) -#define maddr_to_virt(ma) __maddr_to_virt((unsigned long)(ma)) #define maddr_to_page(ma) __maddr_to_page(ma) #define page_to_maddr(pg) __page_to_maddr(pg) #define virt_to_page(va) __virt_to_page(va) diff --git a/xen/arch/x86/include/asm/x86_64/page.h b/xen/arch/x86/include/asm/x86_64/page.h index 465a707312..201b79f99e 100644 --- a/xen/arch/x86/include/asm/x86_64/page.h +++ b/xen/arch/x86/include/asm/x86_64/page.h @@ -34,7 +34,7 @@ static inline unsigned long canonicalise_addr(unsigned long addr) #define pdx_to_virt(pdx) ((void *)(DIRECTMAP_VIRT_START + \ ((unsigned long)(pdx) << PAGE_SHIFT))) -static inline unsigned long __virt_to_maddr(unsigned long va) +static inline unsigned long virt_to_maddr(unsigned long va) { ASSERT(va < DIRECTMAP_VIRT_END); if ( va >= DIRECTMAP_VIRT_START ) @@ -47,8 +47,9 @@ static inline unsigned long __virt_to_maddr(unsigned long va) return xen_phys_start + va - XEN_VIRT_START; } +#define virt_to_maddr(va) virt_to_maddr((unsigned long)(va)) -static inline void *__maddr_to_virt(unsigned long ma) +static inline void *maddr_to_virt(unsigned long ma) { /* Offset in the direct map, accounting for pdx compression */ unsigned long va_offset = maddr_to_directmapoff(ma); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 10:44:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 10:44:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768464.1179255 (Exim 4.92) (envelope-from ) id 1sZ6oY-0002nl-92; Wed, 31 Jul 2024 10:44:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768464.1179255; Wed, 31 Jul 2024 10:44:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6oY-0002nb-6E; Wed, 31 Jul 2024 10:44:14 +0000 Received: by outflank-mailman (input) for mailman id 768464; Wed, 31 Jul 2024 10:44:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6oX-0002nR-Mo for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6oX-00018B-M0 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ6oX-0005uz-Iv for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=NTN3i4UTbi+sxU6P4iw2vyvGkxEvChaoizxrrYcy5fU=; b=Prq9kUCgLHbsh8afQb5vphaici gVw/8OQUfOO/uGsYGP46z0MlZqx5hiswoJUP/bfpEcZwCNzPlgZzMT3nRM5ythaG+k+OiFwvdMST6 1bgIsKKeT29VGfxU3yQhpAMqXJIU9ApAFyYRyL6k3/bG42qwwqiI5/xefA9LR5jLoAJk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] public/x86: don't include common xen.h from arch-specific one Message-Id: Date: Wed, 31 Jul 2024 10:44:13 +0000 commit ce6c6a697edf40763a8512369672a399821b17bf Author: Jan Beulich AuthorDate: Wed Jul 31 12:39:35 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 12:39:35 2024 +0200 public/x86: don't include common xen.h from arch-specific one No other arch-*.h does so, and arch-x86/xen.h really just takes the role of arch-x86_32.h and arch-x86_64.h (by those two forwarding there). With xen.h itself including the per-arch headers, doing so is also kind of backwards anyway, and just calling for problems. There's exactly one place where arch-x86/xen.h is included when really xen.h is meant (for wanting XEN_GUEST_HANDLE_64() to be made available, the default definition of which lives in the common xen.h). This then addresses a violation of Misra C:2012 Directive 4.10 ("Precautions shall be taken in order to prevent the contents of a header file being included more than once"). Reported-by: Nicola Vetrini Signed-off-by: Jan Beulich Reviewed-by: Stefano Stabellini --- xen/include/public/arch-x86/xen.h | 2 -- xen/include/xen/lib/x86/cpu-policy.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/include/public/arch-x86/xen.h b/xen/include/public/arch-x86/xen.h index a9a87d9b50..fc24879866 100644 --- a/xen/include/public/arch-x86/xen.h +++ b/xen/include/public/arch-x86/xen.h @@ -7,8 +7,6 @@ * Copyright (c) 2004-2006, K A Fraser */ -#include "../xen.h" - #ifndef __XEN_PUBLIC_ARCH_X86_XEN_H__ #define __XEN_PUBLIC_ARCH_X86_XEN_H__ diff --git a/xen/include/xen/lib/x86/cpu-policy.h b/xen/include/xen/lib/x86/cpu-policy.h index d26012c6da..f43e1a3b21 100644 --- a/xen/include/xen/lib/x86/cpu-policy.h +++ b/xen/include/xen/lib/x86/cpu-policy.h @@ -439,7 +439,7 @@ void x86_cpu_policy_fill_native(struct cpu_policy *p); void x86_cpu_policy_clear_out_of_range_leaves(struct cpu_policy *p); #ifdef __XEN__ -#include +#include typedef XEN_GUEST_HANDLE_64(xen_cpuid_leaf_t) cpuid_leaf_buffer_t; typedef XEN_GUEST_HANDLE_64(xen_msr_entry_t) msr_entry_buffer_t; #else -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 10:44:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 10:44:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768465.1179259 (Exim 4.92) (envelope-from ) id 1sZ6oi-0002q9-A8; Wed, 31 Jul 2024 10:44:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768465.1179259; Wed, 31 Jul 2024 10:44: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 1sZ6oi-0002q2-7f; Wed, 31 Jul 2024 10:44:24 +0000 Received: by outflank-mailman (input) for mailman id 768465; Wed, 31 Jul 2024 10:44:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6oh-0002pw-Rx for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6oh-00018I-R6 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ6oh-0005vv-O1 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Kvyjfx1fsM/+Lo+fGbg9dV9Fr8rnPRowtWNN6xPEA8M=; b=Cc3cRie2if3FxUqw/kGqnuwG34 VSZ/L4TqCCpLdJYS1SpYc4ldgFr8CM8M1hXZWq8/TnrW9GvFU5TOUMnJb3LKyu5VxpzOUf62SqLD8 bQBmfXiSiMe471HIYbFSJ27GOGlCUaVV+S3A/RDeqDTbdCWmbsklURFBLSON7iRX28Z4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/HVM: get_pat_flags() is needed only by shadow code Message-Id: Date: Wed, 31 Jul 2024 10:44:23 +0000 commit 157c693e9a488fe125ffe7adfb807b783a7d1757 Author: Jan Beulich AuthorDate: Wed Jul 31 12:40:19 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 12:40:19 2024 +0200 x86/HVM: get_pat_flags() is needed only by shadow code Therefore with SHADOW_PAGING=n this is better compiled out, to avoid leaving around unreachable/dead code. Signed-off-by: Jan Beulich Reviewed-by: Jason Andryuk Reviewed-by: Roger Pau Monné --- xen/arch/x86/hvm/mtrr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c index 4620ed427c..797f2ae7fd 100644 --- a/xen/arch/x86/hvm/mtrr.c +++ b/xen/arch/x86/hvm/mtrr.c @@ -271,6 +271,8 @@ int mtrr_get_type(const struct mtrr_state *m, paddr_t pa, unsigned int order) return overlap_mtrr_pos; } +#ifdef CONFIG_SHADOW_PAGING + /* * return the memory type from PAT. * NOTE: valid only when paging is enabled. @@ -359,6 +361,8 @@ uint32_t get_pat_flags(struct vcpu *v, return pat_type_2_pte_flags(pat_entry_value); } +#endif /* CONFIG_SHADOW_PAGING */ + static inline bool valid_mtrr_type(uint8_t type) { switch ( type ) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 10:44:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 10:44:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768466.1179262 (Exim 4.92) (envelope-from ) id 1sZ6os-0002t4-Bm; Wed, 31 Jul 2024 10:44:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768466.1179262; Wed, 31 Jul 2024 10:44:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6os-0002sw-9E; Wed, 31 Jul 2024 10:44:34 +0000 Received: by outflank-mailman (input) for mailman id 768466; Wed, 31 Jul 2024 10:44:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6or-0002sm-Uk for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6or-00018m-U3 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ6or-0005wq-T9 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=yLXKf/s5GLkKjz5+jmZ6zFOSR0uAywHwAD4lbS0di7I=; b=V+M5APHb1BwrTFLdBfg5sgcvT6 tEfnbU0x4kqI15LKE7e8TtN4US0Ga6RqdHPYDKXTDCLLIbdEZFzQsMiV4oei4mwDZlgPMBeo5jDh+ 3Yoxdh5lnB+B9A4KfMz9lc4AYLOVfJGrFZJU213I1pb4lnpg9Fxj6rltLXHhP1fLvpaY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/dom0: fix restoring %cr3 and the mapcache override on PV build error Message-Id: Date: Wed, 31 Jul 2024 10:44:33 +0000 commit 1fc3f77113dd43b14fa7ef5936dcdba120c0b63f Author: Roger Pau Monné AuthorDate: Wed Jul 31 12:41:02 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 12:41:02 2024 +0200 x86/dom0: fix restoring %cr3 and the mapcache override on PV build error One of the error paths in the PV dom0 builder section that runs on the guest page-tables wasn't restoring the Xen value of %cr3, neither removing the mapcache override. Fixes: 079ff2d32c3d ('libelf-loader: introduce elf_load_image') Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- xen/arch/x86/pv/dom0_build.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c index d8043fa58a..57e58a02e7 100644 --- a/xen/arch/x86/pv/dom0_build.c +++ b/xen/arch/x86/pv/dom0_build.c @@ -825,6 +825,8 @@ int __init dom0_construct_pv(struct domain *d, rc = elf_load_binary(&elf); if ( rc < 0 ) { + mapcache_override_current(NULL); + switch_cr3_cr4(current->arch.cr3, read_cr4()); printk("Failed to load the kernel binary\n"); goto out; } -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 10:44:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 10:44:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768467.1179267 (Exim 4.92) (envelope-from ) id 1sZ6p3-0002xc-Eu; Wed, 31 Jul 2024 10:44:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768467.1179267; Wed, 31 Jul 2024 10:44:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6p3-0002xU-CE; Wed, 31 Jul 2024 10:44:45 +0000 Received: by outflank-mailman (input) for mailman id 768467; Wed, 31 Jul 2024 10:44:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6p2-0002wl-1N for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ6p2-00018t-0j for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:44 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ6p1-0005xa-WA for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 10:44:43 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=A3oVnAAug2O0dqESFB5F5FMqORfzDYSerMVegKlhX/Q=; b=mzIy/ZnXueftq71LkhP4IB9JdX pkR3Rzo31OkKk2BuSTWpNPNj24mw28h8Nz9HM4bt/59XerPoiRgymTqaC4gH7Ed85Ni+n1NuOgcQh I+AsBurEpdetH2+aClDIfB0lG31Y2NFbVsPegs8t/HvHNLH8UCipGIYpKYe8yD3hCQpE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/altcall: further refine clang workaround Message-Id: Date: Wed, 31 Jul 2024 10:44:43 +0000 commit 561cba38ff551383a628dc93e64ab0691cfc92bf Author: Roger Pau Monné AuthorDate: Wed Jul 31 12:41:22 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 12:41:22 2024 +0200 x86/altcall: further refine clang workaround The current code in ALT_CALL_ARG() won't successfully workaround the clang code-generation issue if the arg parameter has a size that's not a power of 2. While there are no such sized parameters at the moment, improve the workaround to also be effective when such sizes are used. Instead of using a union with a long use an unsigned long that's first initialized to 0 and afterwards set to the argument value. Reported-by: Alejandro Vallejo Suggested-by: Alejandro Vallejo Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- xen/arch/x86/include/asm/alternative.h | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/xen/arch/x86/include/asm/alternative.h b/xen/arch/x86/include/asm/alternative.h index e63b459276..a86eadfaec 100644 --- a/xen/arch/x86/include/asm/alternative.h +++ b/xen/arch/x86/include/asm/alternative.h @@ -169,27 +169,25 @@ extern void alternative_branches(void); #ifdef CONFIG_CC_IS_CLANG /* - * Use a union with an unsigned long in order to prevent clang from - * skipping a possible truncation of the value. By using the union any - * truncation is carried before the call instruction, in turn covering - * for ABI-non-compliance in that the necessary clipping / extension of - * the value is supposed to be carried out in the callee. + * Clang doesn't follow the psABI and doesn't truncate parameter values at the + * callee. This can lead to bad code being generated when using alternative + * calls. * - * Note this behavior is not mandated by the standard, and hence could - * stop being a viable workaround, or worse, could cause a different set - * of code-generation issues in future clang versions. + * Workaround it by using a temporary intermediate variable that's zeroed + * before being assigned the parameter value, as that forces clang to zero the + * register at the caller. * * This has been reported upstream: * https://github.com/llvm/llvm-project/issues/12579 * https://github.com/llvm/llvm-project/issues/82598 */ #define ALT_CALL_ARG(arg, n) \ - register union { \ - typeof(arg) e[sizeof(long) / sizeof(arg)]; \ - unsigned long r; \ - } a ## n ## _ asm ( ALT_CALL_arg ## n ) = { \ - .e[0] = ({ BUILD_BUG_ON(sizeof(arg) > sizeof(void *)); (arg); })\ - } + register unsigned long a ## n ## _ asm ( ALT_CALL_arg ## n ) = ({ \ + unsigned long tmp = 0; \ + BUILD_BUG_ON(sizeof(arg) > sizeof(unsigned long)); \ + *(typeof(arg) *)&tmp = (arg); \ + tmp; \ + }) #else #define ALT_CALL_ARG(arg, n) \ register typeof(arg) a ## n ## _ asm ( ALT_CALL_arg ## n ) = \ -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 11:22:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 11:22:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768474.1179270 (Exim 4.92) (envelope-from ) id 1sZ7PA-0008JW-S9; Wed, 31 Jul 2024 11:22:04 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768474.1179270; Wed, 31 Jul 2024 11:22:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7PA-0008JP-Pe; Wed, 31 Jul 2024 11:22:04 +0000 Received: by outflank-mailman (input) for mailman id 768474; Wed, 31 Jul 2024 11:22:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7PA-0008JJ-Go for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7PA-0001mg-2N for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ7PA-0000D4-12 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:04 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=fCSGUj0KajSoboFJ8by2eKnXdw60CM2YVXeEXPj2hG4=; b=Hb7P1QAYZhmgc2e9kDy9+x5jqF Fc2YGc368S7IUf2FHhLkn9nm1+GjFvsEXbsPRO9a1lxescVcIuLdBqI3gR0JoP6A+XrNk36Z2buJq KPuT1+/QKNXa/K7jsKd+8yVQCL0PLgfnYNwM6nBZZ2y5FKNOJdiT5dq7HStMP5aDq9DU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen: introduce generic non-atomic test_*bit() Message-Id: Date: Wed, 31 Jul 2024 11:22:04 +0000 commit f1879b2c2584194fd54085033548911a840c9597 Author: Oleksii Kurochko AuthorDate: Wed Jul 31 13:04:20 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 13:04:20 2024 +0200 xen: introduce generic non-atomic test_*bit() The following generic functions were introduced: * test_bit * generic__test_and_set_bit * generic__test_and_clear_bit * generic__test_and_change_bit These functions and macros can be useful for architectures that don't have corresponding arch-specific instructions. Also, the patch introduces the following generics which are used by the functions mentioned above: * BITOP_BITS_PER_WORD * BITOP_MASK * BITOP_WORD * BITOP_TYPE The following approach was chosen for generic*() and arch*() bit operation functions: If the bit operation function that is going to be generic starts with the prefix "__", then the corresponding generic/arch function will also contain the "__" prefix. For example: * test_bit() will be defined using arch_test_bit() and generic_test_bit(). * __test_and_set_bit() will be defined using arch__test_and_set_bit() and generic__test_and_set_bit(). Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich Reviewed-by: Michal Orzel --- xen/arch/arm/include/asm/bitops.h | 67 -------------- xen/arch/ppc/include/asm/bitops.h | 52 ----------- xen/arch/ppc/include/asm/page.h | 2 +- xen/arch/ppc/mm-radix.c | 2 +- xen/arch/x86/include/asm/bitops.h | 31 ++----- xen/include/xen/bitops.h | 180 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 191 insertions(+), 143 deletions(-) diff --git a/xen/arch/arm/include/asm/bitops.h b/xen/arch/arm/include/asm/bitops.h index 8f4bdc09d1..3c023103f7 100644 --- a/xen/arch/arm/include/asm/bitops.h +++ b/xen/arch/arm/include/asm/bitops.h @@ -22,9 +22,6 @@ #define __set_bit(n,p) set_bit(n,p) #define __clear_bit(n,p) clear_bit(n,p) -#define BITOP_BITS_PER_WORD 32 -#define BITOP_MASK(nr) (1UL << ((nr) % BITOP_BITS_PER_WORD)) -#define BITOP_WORD(nr) ((nr) / BITOP_BITS_PER_WORD) #define BITS_PER_BYTE 8 #define ADDR (*(volatile int *) addr) @@ -76,70 +73,6 @@ bool test_and_change_bit_timeout(int nr, volatile void *p, bool clear_mask16_timeout(uint16_t mask, volatile void *p, unsigned int max_try); -/** - * __test_and_set_bit - Set a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is non-atomic and can be reordered. - * If two examples of this operation race, one can appear to succeed - * but actually fail. You must protect multiple accesses with a lock. - */ -static inline int __test_and_set_bit(int nr, volatile void *addr) -{ - unsigned int mask = BITOP_MASK(nr); - volatile unsigned int *p = - ((volatile unsigned int *)addr) + BITOP_WORD(nr); - unsigned int old = *p; - - *p = old | mask; - return (old & mask) != 0; -} - -/** - * __test_and_clear_bit - Clear a bit and return its old value - * @nr: Bit to clear - * @addr: Address to count from - * - * This operation is non-atomic and can be reordered. - * If two examples of this operation race, one can appear to succeed - * but actually fail. You must protect multiple accesses with a lock. - */ -static inline int __test_and_clear_bit(int nr, volatile void *addr) -{ - unsigned int mask = BITOP_MASK(nr); - volatile unsigned int *p = - ((volatile unsigned int *)addr) + BITOP_WORD(nr); - unsigned int old = *p; - - *p = old & ~mask; - return (old & mask) != 0; -} - -/* WARNING: non atomic and it can be reordered! */ -static inline int __test_and_change_bit(int nr, - volatile void *addr) -{ - unsigned int mask = BITOP_MASK(nr); - volatile unsigned int *p = - ((volatile unsigned int *)addr) + BITOP_WORD(nr); - unsigned int old = *p; - - *p = old ^ mask; - return (old & mask) != 0; -} - -/** - * test_bit - Determine whether a bit is set - * @nr: bit number to test - * @addr: Address to start counting from - */ -static inline int test_bit(int nr, const volatile void *addr) -{ - const volatile unsigned int *p = (const volatile unsigned int *)addr; - return 1UL & (p[BITOP_WORD(nr)] >> (nr & (BITOP_BITS_PER_WORD-1))); -} - #define arch_ffs(x) ((x) ? 1 + __builtin_ctz(x) : 0) #define arch_ffsl(x) ((x) ? 1 + __builtin_ctzl(x) : 0) #define arch_fls(x) ((x) ? 32 - __builtin_clz(x) : 0) diff --git a/xen/arch/ppc/include/asm/bitops.h b/xen/arch/ppc/include/asm/bitops.h index 8119b5ace8..eb3355812e 100644 --- a/xen/arch/ppc/include/asm/bitops.h +++ b/xen/arch/ppc/include/asm/bitops.h @@ -15,9 +15,6 @@ #define __set_bit(n, p) set_bit(n, p) #define __clear_bit(n, p) clear_bit(n, p) -#define BITOP_BITS_PER_WORD 32 -#define BITOP_MASK(nr) (1U << ((nr) % BITOP_BITS_PER_WORD)) -#define BITOP_WORD(nr) ((nr) / BITOP_BITS_PER_WORD) #define BITS_PER_BYTE 8 /* PPC bit number conversion */ @@ -69,17 +66,6 @@ static inline void clear_bit(int nr, volatile void *addr) clear_bits(BITOP_MASK(nr), (volatile unsigned int *)addr + BITOP_WORD(nr)); } -/** - * test_bit - Determine whether a bit is set - * @nr: bit number to test - * @addr: Address to start counting from - */ -static inline int test_bit(int nr, const volatile void *addr) -{ - const volatile unsigned int *p = addr; - return 1 & (p[BITOP_WORD(nr)] >> (nr & (BITOP_BITS_PER_WORD - 1))); -} - static inline unsigned int test_and_clear_bits( unsigned int mask, volatile unsigned int *p) @@ -133,44 +119,6 @@ static inline int test_and_set_bit(unsigned int nr, volatile void *addr) (volatile unsigned int *)addr + BITOP_WORD(nr)) != 0; } -/** - * __test_and_set_bit - Set a bit and return its old value - * @nr: Bit to set - * @addr: Address to count from - * - * This operation is non-atomic and can be reordered. - * If two examples of this operation race, one can appear to succeed - * but actually fail. You must protect multiple accesses with a lock. - */ -static inline int __test_and_set_bit(int nr, volatile void *addr) -{ - unsigned int mask = BITOP_MASK(nr); - volatile unsigned int *p = (volatile unsigned int *)addr + BITOP_WORD(nr); - unsigned int old = *p; - - *p = old | mask; - return (old & mask) != 0; -} - -/** - * __test_and_clear_bit - Clear a bit and return its old value - * @nr: Bit to clear - * @addr: Address to count from - * - * This operation is non-atomic and can be reordered. - * If two examples of this operation race, one can appear to succeed - * but actually fail. You must protect multiple accesses with a lock. - */ -static inline int __test_and_clear_bit(int nr, volatile void *addr) -{ - unsigned int mask = BITOP_MASK(nr); - volatile unsigned int *p = (volatile unsigned int *)addr + BITOP_WORD(nr); - unsigned int old = *p; - - *p = old & ~mask; - return (old & mask) != 0; -} - #define arch_ffs(x) ((x) ? 1 + __builtin_ctz(x) : 0) #define arch_ffsl(x) ((x) ? 1 + __builtin_ctzl(x) : 0) #define arch_fls(x) ((x) ? 32 - __builtin_clz(x) : 0) diff --git a/xen/arch/ppc/include/asm/page.h b/xen/arch/ppc/include/asm/page.h index 890e285051..6d4cd2611c 100644 --- a/xen/arch/ppc/include/asm/page.h +++ b/xen/arch/ppc/include/asm/page.h @@ -2,9 +2,9 @@ #ifndef _ASM_PPC_PAGE_H #define _ASM_PPC_PAGE_H +#include #include -#include #include #define PDE_VALID PPC_BIT(0) diff --git a/xen/arch/ppc/mm-radix.c b/xen/arch/ppc/mm-radix.c index 0a47959e64..24232f3907 100644 --- a/xen/arch/ppc/mm-radix.c +++ b/xen/arch/ppc/mm-radix.c @@ -1,4 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */ +#include #include #include #include @@ -6,7 +7,6 @@ #include #include -#include #include #include #include diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/bitops.h index aa71542e7b..f9aa60111f 100644 --- a/xen/arch/x86/include/asm/bitops.h +++ b/xen/arch/x86/include/asm/bitops.h @@ -19,9 +19,6 @@ #define ADDR (*(volatile int *) addr) #define CONST_ADDR (*(const volatile int *) addr) -extern void __bitop_bad_size(void); -#define bitop_bad_size(addr) (sizeof(*(addr)) < 4) - /** * set_bit - Atomically set a bit in memory * @nr: the bit to set @@ -175,7 +172,7 @@ static inline int test_and_set_bit(int nr, volatile void *addr) }) /** - * __test_and_set_bit - Set a bit and return its old value + * arch__test_and_set_bit - Set a bit and return its old value * @nr: Bit to set * @addr: Address to count from * @@ -183,7 +180,7 @@ static inline int test_and_set_bit(int nr, volatile void *addr) * If two examples of this operation race, one can appear to succeed * but actually fail. You must protect multiple accesses with a lock. */ -static inline int __test_and_set_bit(int nr, void *addr) +static inline int arch__test_and_set_bit(int nr, volatile void *addr) { int oldbit; @@ -194,10 +191,7 @@ static inline int __test_and_set_bit(int nr, void *addr) return oldbit; } -#define __test_and_set_bit(nr, addr) ({ \ - if ( bitop_bad_size(addr) ) __bitop_bad_size(); \ - __test_and_set_bit(nr, addr); \ -}) +#define arch__test_and_set_bit arch__test_and_set_bit /** * test_and_clear_bit - Clear a bit and return its old value @@ -224,7 +218,7 @@ static inline int test_and_clear_bit(int nr, volatile void *addr) }) /** - * __test_and_clear_bit - Clear a bit and return its old value + * arch__test_and_clear_bit - Clear a bit and return its old value * @nr: Bit to set * @addr: Address to count from * @@ -232,7 +226,7 @@ static inline int test_and_clear_bit(int nr, volatile void *addr) * If two examples of this operation race, one can appear to succeed * but actually fail. You must protect multiple accesses with a lock. */ -static inline int __test_and_clear_bit(int nr, void *addr) +static inline int arch__test_and_clear_bit(int nr, volatile void *addr) { int oldbit; @@ -243,13 +237,10 @@ static inline int __test_and_clear_bit(int nr, void *addr) return oldbit; } -#define __test_and_clear_bit(nr, addr) ({ \ - if ( bitop_bad_size(addr) ) __bitop_bad_size(); \ - __test_and_clear_bit(nr, addr); \ -}) +#define arch__test_and_clear_bit arch__test_and_clear_bit /* WARNING: non atomic and it can be reordered! */ -static inline int __test_and_change_bit(int nr, void *addr) +static inline int arch__test_and_change_bit(int nr, volatile void *addr) { int oldbit; @@ -260,10 +251,7 @@ static inline int __test_and_change_bit(int nr, void *addr) return oldbit; } -#define __test_and_change_bit(nr, addr) ({ \ - if ( bitop_bad_size(addr) ) __bitop_bad_size(); \ - __test_and_change_bit(nr, addr); \ -}) +#define arch__test_and_change_bit arch__test_and_change_bit /** * test_and_change_bit - Change a bit and return its new value @@ -307,8 +295,7 @@ static inline int variable_test_bit(int nr, const volatile void *addr) return oldbit; } -#define test_bit(nr, addr) ({ \ - if ( bitop_bad_size(addr) ) __bitop_bad_size(); \ +#define arch_test_bit(nr, addr) ({ \ __builtin_constant_p(nr) ? \ constant_test_bit(nr, addr) : \ variable_test_bit(nr, addr); \ diff --git a/xen/include/xen/bitops.h b/xen/include/xen/bitops.h index 6a5e28730a..3d88d2f3f1 100644 --- a/xen/include/xen/bitops.h +++ b/xen/include/xen/bitops.h @@ -4,6 +4,17 @@ #include #include +#define BITOP_BITS_PER_WORD 32 +typedef uint32_t bitop_uint_t; + +#define BITOP_MASK(nr) ((bitop_uint_t)1 << ((nr) % BITOP_BITS_PER_WORD)) + +#define BITOP_WORD(nr) ((nr) / BITOP_BITS_PER_WORD) + +extern void __bitop_bad_size(void); + +#define bitop_bad_size(addr) (sizeof(*(addr)) < sizeof(bitop_uint_t)) + #include /* @@ -24,6 +35,175 @@ unsigned int __pure generic_ffsl(unsigned long x); unsigned int __pure generic_flsl(unsigned long x); +/** + * generic__test_and_set_bit - Set a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static always_inline bool +generic__test_and_set_bit(int nr, volatile void *addr) +{ + bitop_uint_t mask = BITOP_MASK(nr); + volatile bitop_uint_t *p = (volatile bitop_uint_t *)addr + BITOP_WORD(nr); + bitop_uint_t old = *p; + + *p = old | mask; + return (old & mask); +} + +/** + * generic__test_and_clear_bit - Clear a bit and return its old value + * @nr: Bit to clear + * @addr: Address to count from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static always_inline bool +generic__test_and_clear_bit(int nr, volatile void *addr) +{ + bitop_uint_t mask = BITOP_MASK(nr); + volatile bitop_uint_t *p = (volatile bitop_uint_t *)addr + BITOP_WORD(nr); + bitop_uint_t old = *p; + + *p = old & ~mask; + return (old & mask); +} + +/** + * generic__test_and_change_bit - Change a bit and return its old value + * @nr: Bit to change + * @addr: Address to count from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static always_inline bool +generic__test_and_change_bit(int nr, volatile void *addr) +{ + bitop_uint_t mask = BITOP_MASK(nr); + volatile bitop_uint_t *p = (volatile bitop_uint_t *)addr + BITOP_WORD(nr); + bitop_uint_t old = *p; + + *p = old ^ mask; + return (old & mask); +} + +/** + * generic_test_bit - Determine whether a bit is set + * @nr: bit number to test + * @addr: Address to start counting from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static always_inline bool generic_test_bit(int nr, const volatile void *addr) +{ + bitop_uint_t mask = BITOP_MASK(nr); + const volatile bitop_uint_t *p = + (const volatile bitop_uint_t *)addr + BITOP_WORD(nr); + + return (*p & mask); +} + +/** + * __test_and_set_bit - Set a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static always_inline bool +__test_and_set_bit(int nr, volatile void *addr) +{ +#ifndef arch__test_and_set_bit +#define arch__test_and_set_bit generic__test_and_set_bit +#endif + + return arch__test_and_set_bit(nr, addr); +} +#define __test_and_set_bit(nr, addr) ({ \ + if ( bitop_bad_size(addr) ) __bitop_bad_size(); \ + __test_and_set_bit(nr, addr); \ +}) + +/** + * __test_and_clear_bit - Clear a bit and return its old value + * @nr: Bit to clear + * @addr: Address to count from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static always_inline bool +__test_and_clear_bit(int nr, volatile void *addr) +{ +#ifndef arch__test_and_clear_bit +#define arch__test_and_clear_bit generic__test_and_clear_bit +#endif + + return arch__test_and_clear_bit(nr, addr); +} +#define __test_and_clear_bit(nr, addr) ({ \ + if ( bitop_bad_size(addr) ) __bitop_bad_size(); \ + __test_and_clear_bit(nr, addr); \ +}) + +/** + * __test_and_change_bit - Change a bit and return its old value + * @nr: Bit to change + * @addr: Address to count from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static always_inline bool +__test_and_change_bit(int nr, volatile void *addr) +{ +#ifndef arch__test_and_change_bit +#define arch__test_and_change_bit generic__test_and_change_bit +#endif + + return arch__test_and_change_bit(nr, addr); +} +#define __test_and_change_bit(nr, addr) ({ \ + if ( bitop_bad_size(addr) ) __bitop_bad_size(); \ + __test_and_change_bit(nr, addr); \ +}) + +/** + * test_bit - Determine whether a bit is set + * @nr: bit number to test + * @addr: Address to start counting from + * + * This operation is non-atomic and can be reordered. + * If two examples of this operation race, one can appear to succeed + * but actually fail. You must protect multiple accesses with a lock. + */ +static always_inline bool test_bit(int nr, const volatile void *addr) +{ +#ifndef arch_test_bit +#define arch_test_bit generic_test_bit +#endif + + return arch_test_bit(nr, addr); +} +#define test_bit(nr, addr) ({ \ + if ( bitop_bad_size(addr) ) __bitop_bad_size(); \ + test_bit(nr, addr); \ +}) + static always_inline __pure unsigned int ffs(unsigned int x) { if ( __builtin_constant_p(x) ) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 11:22:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 11:22:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768475.1179275 (Exim 4.92) (envelope-from ) id 1sZ7PK-0008LP-Te; Wed, 31 Jul 2024 11:22:14 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768475.1179275; Wed, 31 Jul 2024 11:22:14 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7PK-0008LI-RA; Wed, 31 Jul 2024 11:22:14 +0000 Received: by outflank-mailman (input) for mailman id 768475; Wed, 31 Jul 2024 11:22:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7PK-0008LC-8U for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7PK-0001mt-6Z for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ7PK-0000E3-4Q for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:14 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=9TvhV9Od2oWB6aWC/891M2ElG9/GZAKz62hEwAcjAMI=; b=JvcEkuykDu1+63Dxg5WIOKrPiG 5F9ql0Dl74Cey5tXsJ4BcB4EFb0o5EwwfPRvjFHCaHvmek7/EBsfBiqfeePCbNwv85vPxtc7cI+DT RwnVmbP5rBucw7PLLOpLUbdbIupKSGbcxiAPm74SncLgbLMJBlNSqNs3XxjSLT3ykZ9o=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/riscv: introduce bitops.h Message-Id: Date: Wed, 31 Jul 2024 11:22:14 +0000 commit bf34f99c3351b21f8b66227b31502726bc59c7cd Author: Oleksii Kurochko AuthorDate: Wed Jul 31 13:05:49 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 13:05:49 2024 +0200 xen/riscv: introduce bitops.h Taken from Linux-6.4.0-rc1 Xen's bitops.h consists of several Linux's headers: * linux/arch/include/asm/bitops.h: * The following function were removed as they aren't used in Xen: * test_and_set_bit_lock * clear_bit_unlock * __clear_bit_unlock * The following functions were renamed in the way how they are used by common code: * __test_and_set_bit * __test_and_clear_bit * The declaration and implementation of the following functios were updated to make Xen build happy: * clear_bit * set_bit * __test_and_clear_bit * __test_and_set_bit Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- xen/arch/riscv/include/asm/bitops.h | 137 ++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) diff --git a/xen/arch/riscv/include/asm/bitops.h b/xen/arch/riscv/include/asm/bitops.h new file mode 100644 index 0000000000..7f7af3fda1 --- /dev/null +++ b/xen/arch/riscv/include/asm/bitops.h @@ -0,0 +1,137 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (C) 2012 Regents of the University of California */ + +#ifndef _ASM_RISCV_BITOPS_H +#define _ASM_RISCV_BITOPS_H + +#include + +#if BITOP_BITS_PER_WORD == 64 +#define __AMO(op) "amo" #op ".d" +#elif BITOP_BITS_PER_WORD == 32 +#define __AMO(op) "amo" #op ".w" +#else +#error "Unexpected BITOP_BITS_PER_WORD" +#endif + +/* Based on linux/arch/include/asm/bitops.h */ + +/* + * Non-atomic bit manipulation. + * + * Implemented using atomics to be interrupt safe. Could alternatively + * implement with local interrupt masking. + */ +#define __set_bit(n, p) set_bit(n, p) +#define __clear_bit(n, p) clear_bit(n, p) + +#define test_and_op_bit_ord(op, mod, nr, addr, ord) \ +({ \ + bitop_uint_t res, mask; \ + mask = BITOP_MASK(nr); \ + asm volatile ( \ + __AMO(op) #ord " %0, %2, %1" \ + : "=r" (res), "+A" (addr[BITOP_WORD(nr)]) \ + : "r" (mod(mask)) \ + : "memory"); \ + ((res & mask) != 0); \ +}) + +#define op_bit_ord(op, mod, nr, addr, ord) \ + asm volatile ( \ + __AMO(op) #ord " zero, %1, %0" \ + : "+A" (addr[BITOP_WORD(nr)]) \ + : "r" (mod(BITOP_MASK(nr))) \ + : "memory"); + +#define test_and_op_bit(op, mod, nr, addr) \ + test_and_op_bit_ord(op, mod, nr, addr, .aqrl) +#define op_bit(op, mod, nr, addr) \ + op_bit_ord(op, mod, nr, addr, ) + +/* Bitmask modifiers */ +#define NOP(x) (x) +#define NOT(x) (~(x)) + +/** + * test_and_set_bit - Set a bit and return its old value + * @nr: Bit to set + * @addr: Address to count from + */ +static inline bool test_and_set_bit(int nr, volatile void *p) +{ + volatile bitop_uint_t *addr = p; + + return test_and_op_bit(or, NOP, nr, addr); +} + +/** + * test_and_clear_bit - Clear a bit and return its old value + * @nr: Bit to clear + * @addr: Address to count from + */ +static inline bool test_and_clear_bit(int nr, volatile void *p) +{ + volatile bitop_uint_t *addr = p; + + return test_and_op_bit(and, NOT, nr, addr); +} + +/** + * test_and_change_bit - Toggle (change) a bit and return its old value + * @nr: Bit to change + * @addr: Address to count from + * + * This operation is atomic and cannot be reordered. + * It also implies a memory barrier. + */ +static inline bool test_and_change_bit(int nr, volatile void *p) +{ + volatile bitop_uint_t *addr = p; + + return test_and_op_bit(xor, NOP, nr, addr); +} + +/** + * set_bit - Atomically set a bit in memory + * @nr: the bit to set + * @addr: the address to start counting from + * + * Note that @nr may be almost arbitrarily large; this function is not + * restricted to acting on a single-word quantity. + */ +static inline void set_bit(int nr, volatile void *p) +{ + volatile bitop_uint_t *addr = p; + + op_bit(or, NOP, nr, addr); +} + +/** + * clear_bit - Clears a bit in memory + * @nr: Bit to clear + * @addr: Address to start counting from + */ +static inline void clear_bit(int nr, volatile void *p) +{ + volatile bitop_uint_t *addr = p; + + op_bit(and, NOT, nr, addr); +} + +#undef test_and_op_bit +#undef op_bit +#undef NOP +#undef NOT +#undef __AMO + +#endif /* _ASM_RISCV_BITOPS_H */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 11:22:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 11:22:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768476.1179279 (Exim 4.92) (envelope-from ) id 1sZ7PV-0008Q5-0e; Wed, 31 Jul 2024 11:22:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768476.1179279; Wed, 31 Jul 2024 11:22: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 1sZ7PU-0008Py-UG; Wed, 31 Jul 2024 11:22:24 +0000 Received: by outflank-mailman (input) for mailman id 768476; Wed, 31 Jul 2024 11:22:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7PU-0008Po-AA for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7PU-0001n4-9M for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ7PU-0000EW-8d for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=gtL4UCbVgwQg3s/sVKS1ANbpE7wTlyKDK6yeThW8fCk=; b=ck7ccLpODj68Bbq2l2lpWoTSiG gNG+rJP4hcZQoudeXBpMk7siJhMmgWjjMNySJDVKfCsMEBdeVtxhSGa0CzKwu9kVvMqIKSdYxJXH9 DHFw2ymrKe2shyLfSbpgp2eZBj2pI84ZIB6B8btpGbhRJGUWpAH4crnccst37FufdeqU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/riscv: add minimal stuff to mm.h to build full Xen Message-Id: Date: Wed, 31 Jul 2024 11:22:24 +0000 commit 7db8d2bd9b9b087d9e51dcdef9bee3ce5220b9a2 Author: Oleksii Kurochko AuthorDate: Wed Jul 31 13:06:18 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 13:06:18 2024 +0200 xen/riscv: add minimal stuff to mm.h to build full Xen Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- xen/arch/riscv/include/asm/mm.h | 235 ++++++++++++++++++++++++++++++++++++++++ xen/arch/riscv/mm.c | 2 +- xen/arch/riscv/setup.c | 2 +- 3 files changed, 237 insertions(+), 2 deletions(-) diff --git a/xen/arch/riscv/include/asm/mm.h b/xen/arch/riscv/include/asm/mm.h index 07c7a0abba..25af9e1aaa 100644 --- a/xen/arch/riscv/include/asm/mm.h +++ b/xen/arch/riscv/include/asm/mm.h @@ -3,11 +3,241 @@ #ifndef _ASM_RISCV_MM_H #define _ASM_RISCV_MM_H +#include +#include +#include +#include +#include + #include #define pfn_to_paddr(pfn) ((paddr_t)(pfn) << PAGE_SHIFT) #define paddr_to_pfn(pa) ((unsigned long)((pa) >> PAGE_SHIFT)) +#define paddr_to_pdx(pa) mfn_to_pdx(maddr_to_mfn(pa)) +#define gfn_to_gaddr(gfn) pfn_to_paddr(gfn_x(gfn)) +#define gaddr_to_gfn(ga) _gfn(paddr_to_pfn(ga)) +#define mfn_to_maddr(mfn) pfn_to_paddr(mfn_x(mfn)) +#define maddr_to_mfn(ma) _mfn(paddr_to_pfn(ma)) +#define vmap_to_mfn(va) maddr_to_mfn(virt_to_maddr((vaddr_t)(va))) +#define vmap_to_page(va) mfn_to_page(vmap_to_mfn(va)) + +static inline void *maddr_to_virt(paddr_t ma) +{ + BUG_ON("unimplemented"); + return NULL; +} + +#define virt_to_maddr(va) ({ BUG_ON("unimplemented"); 0; }) + +/* Convert between Xen-heap virtual addresses and machine frame numbers. */ +#define __virt_to_mfn(va) mfn_x(maddr_to_mfn(virt_to_maddr(va))) +#define __mfn_to_virt(mfn) maddr_to_virt(mfn_to_maddr(_mfn(mfn))) + +/* + * We define non-underscored wrappers for above conversion functions. + * These are overriden in various source files while underscored version + * remain intact. + */ +#define virt_to_mfn(va) __virt_to_mfn(va) +#define mfn_to_virt(mfn) __mfn_to_virt(mfn) + +struct page_info +{ + /* Each frame can be threaded onto a doubly-linked list. */ + struct page_list_entry list; + + /* Reference count and various PGC_xxx flags and fields. */ + unsigned long count_info; + + /* Context-dependent fields follow... */ + union { + /* Page is in use: ((count_info & PGC_count_mask) != 0). */ + struct { + /* Type reference count and various PGT_xxx flags and fields. */ + unsigned long type_info; + } inuse; + + /* Page is on a free list: ((count_info & PGC_count_mask) == 0). */ + union { + struct { + /* + * Index of the first *possibly* unscrubbed page in the buddy. + * One more bit than maximum possible order to accommodate + * INVALID_DIRTY_IDX. + */ +#define INVALID_DIRTY_IDX ((1UL << (MAX_ORDER + 1)) - 1) + unsigned long first_dirty:MAX_ORDER + 1; + + /* Do TLBs need flushing for safety before next page use? */ + bool need_tlbflush:1; + +#define BUDDY_NOT_SCRUBBING 0 +#define BUDDY_SCRUBBING 1 +#define BUDDY_SCRUB_ABORT 2 + unsigned long scrub_state:2; + }; + + unsigned long val; + } free; + } u; + + union { + /* Page is in use */ + struct { + /* Owner of this page (NULL if page is anonymous). */ + struct domain *domain; + } inuse; + + /* Page is on a free list. */ + struct { + /* Order-size of the free chunk this page is the head of. */ + unsigned int order; + } free; + } v; + + union { + /* + * Timestamp from 'TLB clock', used to avoid extra safety flushes. + * Only valid for: a) free pages, and b) pages with zero type count + */ + uint32_t tlbflush_timestamp; + }; +}; + +#define frame_table ((struct page_info *)FRAMETABLE_VIRT_START) + +/* Convert between machine frame numbers and page-info structures. */ +#define mfn_to_page(mfn) (frame_table + mfn_x(mfn)) +#define page_to_mfn(pg) _mfn((pg) - frame_table) + +static inline void *page_to_virt(const struct page_info *pg) +{ + return mfn_to_virt(mfn_x(page_to_mfn(pg))); +} + +/* Convert between Xen-heap virtual addresses and page-info structures. */ +static inline struct page_info *virt_to_page(const void *v) +{ + BUG_ON("unimplemented"); + return NULL; +} + +/* + * Common code requires get_page_type and put_page_type. + * We don't care about typecounts so we just do the minimum to make it + * happy. + */ +static inline int get_page_type(struct page_info *page, unsigned long type) +{ + return 1; +} + +static inline void put_page_type(struct page_info *page) +{ +} + +static inline void put_page_and_type(struct page_info *page) +{ + put_page_type(page); + put_page(page); +} + +/* + * RISC-V does not have an M2P, but common code expects a handful of + * M2P-related defines and functions. Provide dummy versions of these. + */ +#define INVALID_M2P_ENTRY (~0UL) +#define SHARED_M2P_ENTRY (~0UL - 1UL) +#define SHARED_M2P(_e) ((_e) == SHARED_M2P_ENTRY) + +#define set_gpfn_from_mfn(mfn, pfn) do { (void)(mfn), (void)(pfn); } while (0) +#define mfn_to_gfn(d, mfn) ((void)(d), _gfn(mfn_x(mfn))) + +#define PDX_GROUP_SHIFT (PAGE_SHIFT + VPN_BITS) + +static inline unsigned long domain_get_maximum_gpfn(struct domain *d) +{ + BUG_ON("unimplemented"); + return 0; +} + +static inline long arch_memory_op(int op, XEN_GUEST_HANDLE_PARAM(void) arg) +{ + BUG_ON("unimplemented"); + return 0; +} + +/* + * On RISCV, all the RAM is currently direct mapped in Xen. + * Hence return always true. + */ +static inline bool arch_mfns_in_directmap(unsigned long mfn, unsigned long nr) +{ + return true; +} + +#define PG_shift(idx) (BITS_PER_LONG - (idx)) +#define PG_mask(x, idx) (x ## UL << PG_shift(idx)) + +#define PGT_none PG_mask(0, 1) /* no special uses of this page */ +#define PGT_writable_page PG_mask(1, 1) /* has writable mappings? */ +#define PGT_type_mask PG_mask(1, 1) /* Bits 31 or 63. */ + +/* Count of uses of this frame as its current type. */ +#define PGT_count_width PG_shift(2) +#define PGT_count_mask ((1UL << PGT_count_width) - 1) + +/* + * Page needs to be scrubbed. Since this bit can only be set on a page that is + * free (i.e. in PGC_state_free) we can reuse PGC_allocated bit. + */ +#define _PGC_need_scrub _PGC_allocated +#define PGC_need_scrub PGC_allocated + +/* Cleared when the owning guest 'frees' this page. */ +#define _PGC_allocated PG_shift(1) +#define PGC_allocated PG_mask(1, 1) +/* Page is Xen heap? */ +#define _PGC_xen_heap PG_shift(2) +#define PGC_xen_heap PG_mask(1, 2) +/* Page is broken? */ +#define _PGC_broken PG_shift(7) +#define PGC_broken PG_mask(1, 7) +/* Mutually-exclusive page states: { inuse, offlining, offlined, free }. */ +#define PGC_state PG_mask(3, 9) +#define PGC_state_inuse PG_mask(0, 9) +#define PGC_state_offlining PG_mask(1, 9) +#define PGC_state_offlined PG_mask(2, 9) +#define PGC_state_free PG_mask(3, 9) +#define page_state_is(pg, st) (((pg)->count_info&PGC_state) == PGC_state_##st) + +/* Count of references to this frame. */ +#define PGC_count_width PG_shift(9) +#define PGC_count_mask ((1UL << PGC_count_width) - 1) + +#define _PGC_extra PG_shift(10) +#define PGC_extra PG_mask(1, 10) + +#define is_xen_heap_page(page) ((page)->count_info & PGC_xen_heap) +#define is_xen_heap_mfn(mfn) \ + (mfn_valid(mfn) && is_xen_heap_page(mfn_to_page(mfn))) + +#define is_xen_fixed_mfn(mfn) \ + ((mfn_to_maddr(mfn) >= virt_to_maddr((vaddr_t)_start)) && \ + (mfn_to_maddr(mfn) <= virt_to_maddr((vaddr_t)_end - 1))) + +#define page_get_owner(p) (p)->v.inuse.domain +#define page_set_owner(p, d) ((p)->v.inuse.domain = (d)) + +/* TODO: implement */ +#define mfn_valid(mfn) ({ (void)(mfn); 0; }) + +#define domain_set_alloc_bitsize(d) ((void)(d)) +#define domain_clamp_alloc_bitsize(d, b) ((void)(d), (b)) + +#define PFN_ORDER(pg) ((pg)->v.free.order) + extern unsigned char cpu0_boot_stack[]; void setup_initial_pagetables(void); @@ -20,4 +250,9 @@ unsigned long calc_phys_offset(void); void turn_on_mmu(unsigned long ra); +static inline unsigned int arch_get_dma_bitsize(void) +{ + return 32; /* TODO */ +} + #endif /* _ASM_RISCV_MM_H */ diff --git a/xen/arch/riscv/mm.c b/xen/arch/riscv/mm.c index 3ebaf6da01..ae381e9581 100644 --- a/xen/arch/riscv/mm.c +++ b/xen/arch/riscv/mm.c @@ -4,13 +4,13 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 6593f601c1..98a94c4c48 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -2,9 +2,9 @@ #include #include +#include #include -#include /* Xen stack for bringing up the first CPU. */ unsigned char __initdata cpu0_boot_stack[STACK_SIZE] -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 11:22:35 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 11:22:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768477.1179283 (Exim 4.92) (envelope-from ) id 1sZ7Pf-0008SC-2e; Wed, 31 Jul 2024 11:22:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768477.1179283; Wed, 31 Jul 2024 11:22:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7Pe-0008S4-Vw; Wed, 31 Jul 2024 11:22:34 +0000 Received: by outflank-mailman (input) for mailman id 768477; Wed, 31 Jul 2024 11:22:34 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7Pe-0008Rw-Di for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:34 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7Pe-0001nS-Cw for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:34 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ7Pe-0000FO-BT for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:34 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=y2KQhDoPUSqDl9zwh7okHhfoGjXiZlrBBYOXLQLGoPI=; b=qpOsn2Zqh1racPUzZkKKzDPzEE C0eC64SHWdEeQ6epCYFOAOspAitd9dnAkHnmvRUmluQpyJiwT5Ie/7vHZiF7FAntqANsPXcvzlZi2 dooRwzZkBLVbO7PhrklLsINH9f5tWZ3SfcXac+V7pGT6LiLsVpW5c3VxOc3p3Z8T/75Y=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/riscv: add minimal amount of stubs to build full Xen Message-Id: Date: Wed, 31 Jul 2024 11:22:34 +0000 commit 2fc390242d3e64e01a2e60bbd4977190ee8827f8 Author: Oleksii Kurochko AuthorDate: Wed Jul 31 13:06:35 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 13:07:02 2024 +0200 xen/riscv: add minimal amount of stubs to build full Xen Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- xen/arch/riscv/Makefile | 1 + xen/arch/riscv/mm.c | 41 +++++ xen/arch/riscv/setup.c | 8 + xen/arch/riscv/stubs.c | 418 ++++++++++++++++++++++++++++++++++++++++++++++++ xen/arch/riscv/traps.c | 25 +++ 5 files changed, 493 insertions(+) diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile index 1ed1a8369b..60afbc0ad9 100644 --- a/xen/arch/riscv/Makefile +++ b/xen/arch/riscv/Makefile @@ -4,6 +4,7 @@ obj-y += mm.o obj-$(CONFIG_RISCV_64) += riscv64/ obj-y += sbi.o obj-y += setup.o +obj-y += stubs.o obj-y += traps.o obj-y += vm_event.o diff --git a/xen/arch/riscv/mm.c b/xen/arch/riscv/mm.c index ae381e9581..7d09e781bf 100644 --- a/xen/arch/riscv/mm.c +++ b/xen/arch/riscv/mm.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include #include #include #include @@ -294,3 +295,43 @@ unsigned long __init calc_phys_offset(void) phys_offset = load_start - XEN_VIRT_START; return phys_offset; } + +void put_page(struct page_info *page) +{ + BUG_ON("unimplemented"); +} + +void arch_dump_shared_mem_info(void) +{ + BUG_ON("unimplemented"); +} + +int populate_pt_range(unsigned long virt, unsigned long nr_mfns) +{ + BUG_ON("unimplemented"); + return -1; +} + +int xenmem_add_to_physmap_one(struct domain *d, unsigned int space, + union add_to_physmap_extra extra, + unsigned long idx, gfn_t gfn) +{ + BUG_ON("unimplemented"); + + return 0; +} + +int destroy_xen_mappings(unsigned long s, unsigned long e) +{ + BUG_ON("unimplemented"); + return -1; +} + +int map_pages_to_xen(unsigned long virt, + mfn_t mfn, + unsigned long nr_mfns, + unsigned int flags) +{ + BUG_ON("unimplemented"); + return -1; +} diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c index 98a94c4c48..8bb5bdb2ae 100644 --- a/xen/arch/riscv/setup.c +++ b/xen/arch/riscv/setup.c @@ -1,11 +1,19 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#include #include #include #include +#include + #include +void arch_get_xen_caps(xen_capabilities_info_t *info) +{ + BUG_ON("unimplemented"); +} + /* Xen stack for bringing up the first CPU. */ unsigned char __initdata cpu0_boot_stack[STACK_SIZE] __aligned(STACK_SIZE); diff --git a/xen/arch/riscv/stubs.c b/xen/arch/riscv/stubs.c new file mode 100644 index 0000000000..b67d99729f --- /dev/null +++ b/xen/arch/riscv/stubs.c @@ -0,0 +1,418 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#include +#include +#include +#include +#include +#include +#include + +#include + +/* smpboot.c */ + +cpumask_t cpu_online_map; +cpumask_t cpu_present_map; +cpumask_t cpu_possible_map; + +/* ID of the PCPU we're running on */ +DEFINE_PER_CPU(unsigned int, cpu_id); +/* XXX these seem awfully x86ish... */ +/* representing HT siblings of each logical CPU */ +DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_sibling_mask); +/* representing HT and core siblings of each logical CPU */ +DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_mask); + +nodemask_t __read_mostly node_online_map = { { [0] = 1UL } }; + +/* time.c */ + +unsigned long __ro_after_init cpu_khz; /* CPU clock frequency in kHz. */ + +s_time_t get_s_time(void) +{ + BUG_ON("unimplemented"); +} + +int reprogram_timer(s_time_t timeout) +{ + BUG_ON("unimplemented"); +} + +void send_timer_event(struct vcpu *v) +{ + BUG_ON("unimplemented"); +} + +void domain_set_time_offset(struct domain *d, int64_t time_offset_seconds) +{ + BUG_ON("unimplemented"); +} + +/* shutdown.c */ + +void machine_restart(unsigned int delay_millisecs) +{ + BUG_ON("unimplemented"); +} + +void machine_halt(void) +{ + BUG_ON("unimplemented"); +} + +/* domctl.c */ + +long arch_do_domctl(struct xen_domctl *domctl, struct domain *d, + XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) +{ + BUG_ON("unimplemented"); +} + +void arch_get_domain_info(const struct domain *d, + struct xen_domctl_getdomaininfo *info) +{ + BUG_ON("unimplemented"); +} + +void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c) +{ + BUG_ON("unimplemented"); +} + +/* monitor.c */ + +int arch_monitor_domctl_event(struct domain *d, + struct xen_domctl_monitor_op *mop) +{ + BUG_ON("unimplemented"); +} + +/* smp.c */ + +void arch_flush_tlb_mask(const cpumask_t *mask) +{ + BUG_ON("unimplemented"); +} + +void smp_send_event_check_mask(const cpumask_t *mask) +{ + BUG_ON("unimplemented"); +} + +void smp_send_call_function_mask(const cpumask_t *mask) +{ + BUG_ON("unimplemented"); +} + +/* irq.c */ + +struct pirq *alloc_pirq_struct(struct domain *d) +{ + BUG_ON("unimplemented"); +} + +int pirq_guest_bind(struct vcpu *v, struct pirq *pirq, int will_share) +{ + BUG_ON("unimplemented"); +} + +void pirq_guest_unbind(struct domain *d, struct pirq *pirq) +{ + BUG_ON("unimplemented"); +} + +void pirq_set_affinity(struct domain *d, int pirq, const cpumask_t *mask) +{ + BUG_ON("unimplemented"); +} + +void irq_ack_none(struct irq_desc *desc) +{ + BUG_ON("unimplemented"); +} + +int arch_init_one_irq_desc(struct irq_desc *desc) +{ + BUG_ON("unimplemented"); +} + +void smp_send_state_dump(unsigned int cpu) +{ + BUG_ON("unimplemented"); +} + +/* domain.c */ + +DEFINE_PER_CPU(struct vcpu *, curr_vcpu); +unsigned long __per_cpu_offset[NR_CPUS]; + +void context_switch(struct vcpu *prev, struct vcpu *next) +{ + BUG_ON("unimplemented"); +} + +void continue_running(struct vcpu *same) +{ + BUG_ON("unimplemented"); +} + +void sync_local_execstate(void) +{ + BUG_ON("unimplemented"); +} + +void sync_vcpu_execstate(struct vcpu *v) +{ + BUG_ON("unimplemented"); +} + +void startup_cpu_idle_loop(void) +{ + BUG_ON("unimplemented"); +} + +void free_domain_struct(struct domain *d) +{ + BUG_ON("unimplemented"); +} + +void dump_pageframe_info(struct domain *d) +{ + BUG_ON("unimplemented"); +} + +void free_vcpu_struct(struct vcpu *v) +{ + BUG_ON("unimplemented"); +} + +int arch_vcpu_create(struct vcpu *v) +{ + BUG_ON("unimplemented"); +} + +void arch_vcpu_destroy(struct vcpu *v) +{ + BUG_ON("unimplemented"); +} + +void vcpu_switch_to_aarch64_mode(struct vcpu *v) +{ + BUG_ON("unimplemented"); +} + +int arch_sanitise_domain_config(struct xen_domctl_createdomain *config) +{ + BUG_ON("unimplemented"); +} + +int arch_domain_create(struct domain *d, + struct xen_domctl_createdomain *config, + unsigned int flags) +{ + BUG_ON("unimplemented"); +} + +int arch_domain_teardown(struct domain *d) +{ + BUG_ON("unimplemented"); +} + +void arch_domain_destroy(struct domain *d) +{ + BUG_ON("unimplemented"); +} + +void arch_domain_shutdown(struct domain *d) +{ + BUG_ON("unimplemented"); +} + +void arch_domain_pause(struct domain *d) +{ + BUG_ON("unimplemented"); +} + +void arch_domain_unpause(struct domain *d) +{ + BUG_ON("unimplemented"); +} + +int arch_domain_soft_reset(struct domain *d) +{ + BUG_ON("unimplemented"); +} + +void arch_domain_creation_finished(struct domain *d) +{ + BUG_ON("unimplemented"); +} + +int arch_set_info_guest(struct vcpu *v, vcpu_guest_context_u c) +{ + BUG_ON("unimplemented"); +} + +int arch_initialise_vcpu(struct vcpu *v, XEN_GUEST_HANDLE_PARAM(void) arg) +{ + BUG_ON("unimplemented"); +} + +int arch_vcpu_reset(struct vcpu *v) +{ + BUG_ON("unimplemented"); +} + +int domain_relinquish_resources(struct domain *d) +{ + BUG_ON("unimplemented"); +} + +void arch_dump_domain_info(struct domain *d) +{ + BUG_ON("unimplemented"); +} + +void arch_dump_vcpu_info(struct vcpu *v) +{ + BUG_ON("unimplemented"); +} + +void vcpu_mark_events_pending(struct vcpu *v) +{ + BUG_ON("unimplemented"); +} + +void vcpu_update_evtchn_irq(struct vcpu *v) +{ + BUG_ON("unimplemented"); +} + +void vcpu_block_unless_event_pending(struct vcpu *v) +{ + BUG_ON("unimplemented"); +} + +void vcpu_kick(struct vcpu *v) +{ + BUG_ON("unimplemented"); +} + +struct domain *alloc_domain_struct(void) +{ + BUG_ON("unimplemented"); +} + +struct vcpu *alloc_vcpu_struct(const struct domain *d) +{ + BUG_ON("unimplemented"); +} + +unsigned long +hypercall_create_continuation(unsigned int op, const char *format, ...) +{ + BUG_ON("unimplemented"); +} + +int __init parse_arch_dom0_param(const char *s, const char *e) +{ + BUG_ON("unimplemented"); +} + +/* guestcopy.c */ + +unsigned long raw_copy_to_guest(void *to, const void *from, unsigned int len) +{ + BUG_ON("unimplemented"); +} + +unsigned long raw_copy_from_guest(void *to, const void __user *from, + unsigned int len) +{ + BUG_ON("unimplemented"); +} + +/* sysctl.c */ + +long arch_do_sysctl(struct xen_sysctl *sysctl, + XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) +{ + BUG_ON("unimplemented"); +} + +void arch_do_physinfo(struct xen_sysctl_physinfo *pi) +{ + BUG_ON("unimplemented"); +} + +/* p2m.c */ + +int arch_set_paging_mempool_size(struct domain *d, uint64_t size) +{ + BUG_ON("unimplemented"); +} + +int unmap_mmio_regions(struct domain *d, + gfn_t start_gfn, + unsigned long nr, + mfn_t mfn) +{ + BUG_ON("unimplemented"); +} + +int map_mmio_regions(struct domain *d, + gfn_t start_gfn, + unsigned long nr, + mfn_t mfn) +{ + BUG_ON("unimplemented"); +} + +int set_foreign_p2m_entry(struct domain *d, const struct domain *fd, + unsigned long gfn, mfn_t mfn) +{ + BUG_ON("unimplemented"); +} + +/* Return the size of the pool, in bytes. */ +int arch_get_paging_mempool_size(struct domain *d, uint64_t *size) +{ + BUG_ON("unimplemented"); +} + +/* delay.c */ + +void udelay(unsigned long usecs) +{ + BUG_ON("unimplemented"); +} + +/* guest_access.h */ + +static inline unsigned long raw_clear_guest(void *to, unsigned int len) +{ + BUG_ON("unimplemented"); +} + +/* smpboot.c */ + +int __cpu_up(unsigned int cpu) +{ + BUG_ON("unimplemented"); +} + +void __cpu_disable(void) +{ + BUG_ON("unimplemented"); +} + +void __cpu_die(unsigned int cpu) +{ + BUG_ON("unimplemented"); +} + +unsigned long get_upper_mfn_bound(void) +{ + BUG_ON("unimplemented"); +} diff --git a/xen/arch/riscv/traps.c b/xen/arch/riscv/traps.c index ccd3593f5a..5415cf8d90 100644 --- a/xen/arch/riscv/traps.c +++ b/xen/arch/riscv/traps.c @@ -4,6 +4,10 @@ * * RISC-V Trap handlers */ + +#include +#include + #include #include @@ -11,3 +15,24 @@ void do_trap(struct cpu_user_regs *cpu_regs) { die(); } + +void vcpu_show_execution_state(struct vcpu *v) +{ + BUG_ON("unimplemented"); +} + +void show_execution_state(const struct cpu_user_regs *regs) +{ + printk("implement show_execution_state(regs)\n"); +} + +void arch_hypercall_tasklet_result(struct vcpu *v, long res) +{ + BUG_ON("unimplemented"); +} + +enum mc_disposition arch_do_multicall_call(struct mc_state *state) +{ + BUG_ON("unimplemented"); + return mc_continue; +} -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 11:22:45 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 11:22:45 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768478.1179287 (Exim 4.92) (envelope-from ) id 1sZ7Pp-0008V2-3h; Wed, 31 Jul 2024 11:22:45 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768478.1179287; Wed, 31 Jul 2024 11:22:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7Pp-0008Uu-16; Wed, 31 Jul 2024 11:22:45 +0000 Received: by outflank-mailman (input) for mailman id 768478; Wed, 31 Jul 2024 11:22:44 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7Po-0008Um-Gx for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:44 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7Po-0001nc-GC for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:44 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ7Po-0000GD-F0 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:44 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=uFq7xBRR+1HdJEfNf46M1qmDqnaBRGTc9kPgX6o82/4=; b=p6IjS6y7qdNYIGLne3tvZL4F7q UCJq4lk0LfqiXc66tpNnMyTO5asDSQ7ACXJehYlYtgLoF/d+RzwpJtCxYoaAHGg26ZZtdbi9WIJxU YiJ7cpN3NKhJGGrdz3IUBIZUdTQWltOMvFfvFaK4KHYAfWwypyRpONfBPLJRmwLJwalk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/riscv: enable full Xen build Message-Id: Date: Wed, 31 Jul 2024 11:22:44 +0000 commit ed31c78ce0de11558a205b0703b9507f5b79be2e Author: Oleksii Kurochko AuthorDate: Wed Jul 31 13:07:45 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 13:07:45 2024 +0200 xen/riscv: enable full Xen build Signed-off-by: Oleksii Kurochko Reviewed-by: Jan Beulich --- xen/arch/riscv/Makefile | 16 +++- xen/arch/riscv/arch.mk | 4 - xen/arch/riscv/early_printk.c | 168 ------------------------------------------ 3 files changed, 15 insertions(+), 173 deletions(-) diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile index 60afbc0ad9..81b77b13d6 100644 --- a/xen/arch/riscv/Makefile +++ b/xen/arch/riscv/Makefile @@ -12,10 +12,24 @@ $(TARGET): $(TARGET)-syms $(OBJCOPY) -O binary -S $< $@ $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds - $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) -o $@ + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ + $(objtree)/common/symbols-dummy.o -o $(dot-target).0 + $(NM) -pa --format=sysv $(dot-target).0 \ + | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \ + > $(dot-target).0.S + $(MAKE) $(build)=$(@D) $(dot-target).0.o + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< \ + $(dot-target).0.o -o $(dot-target).1 + $(NM) -pa --format=sysv $(dot-target).1 \ + | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \ + > $(dot-target).1.S + $(MAKE) $(build)=$(@D) $(dot-target).1.o + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \ + $(dot-target).1.o -o $@ $(NM) -pa --format=sysv $@ \ | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \ > $@.map + rm -f $(@D)/.$(@F).[0-9]* $(obj)/xen.lds: $(src)/xen.lds.S FORCE $(call if_changed_dep,cpp_lds_S) diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk index 8c071aff65..17827c302c 100644 --- a/xen/arch/riscv/arch.mk +++ b/xen/arch/riscv/arch.mk @@ -38,7 +38,3 @@ extensions := $(subst $(space),,$(extensions)) # -mcmodel=medlow would force Xen into the lower half. CFLAGS += $(riscv-generic-flags)$(extensions) -mstrict-align -mcmodel=medany - -# TODO: Drop override when more of the build is working -override ALL_OBJS-y = arch/$(SRCARCH)/built_in.o -override ALL_LIBS-y = diff --git a/xen/arch/riscv/early_printk.c b/xen/arch/riscv/early_printk.c index 60742a042d..610c814f54 100644 --- a/xen/arch/riscv/early_printk.c +++ b/xen/arch/riscv/early_printk.c @@ -40,171 +40,3 @@ void early_printk(const char *str) str++; } } - -/* - * The following #if 1 ... #endif should be removed after printk - * and related stuff are ready. - */ -#if 1 - -#include -#include - -/** - * strlen - Find the length of a string - * @s: The string to be sized - */ -size_t (strlen)(const char * s) -{ - const char *sc; - - for (sc = s; *sc != '\0'; ++sc) - /* nothing */; - return sc - s; -} - -/** - * memcpy - Copy one area of memory to another - * @dest: Where to copy to - * @src: Where to copy from - * @count: The size of the area. - * - * You should not use this function to access IO space, use memcpy_toio() - * or memcpy_fromio() instead. - */ -void *(memcpy)(void *dest, const void *src, size_t count) -{ - char *tmp = (char *) dest, *s = (char *) src; - - while (count--) - *tmp++ = *s++; - - return dest; -} - -int vsnprintf(char* str, size_t size, const char* format, va_list args) -{ - size_t i = 0; /* Current position in the output string */ - size_t written = 0; /* Total number of characters written */ - char* dest = str; - - while ( format[i] != '\0' && written < size - 1 ) - { - if ( format[i] == '%' ) - { - i++; - - if ( format[i] == '\0' ) - break; - - if ( format[i] == '%' ) - { - if ( written < size - 1 ) - { - dest[written] = '%'; - written++; - } - i++; - continue; - } - - /* - * Handle format specifiers. - * For simplicity, only %s and %d are implemented here. - */ - - if ( format[i] == 's' ) - { - char* arg = va_arg(args, char*); - size_t arglen = strlen(arg); - - size_t remaining = size - written - 1; - - if ( arglen > remaining ) - arglen = remaining; - - memcpy(dest + written, arg, arglen); - - written += arglen; - i++; - } - else if ( format[i] == 'd' ) - { - int arg = va_arg(args, int); - - /* Convert the integer to string representation */ - char numstr[32]; /* Assumes a maximum of 32 digits */ - int numlen = 0; - int num = arg; - size_t remaining; - - if ( arg < 0 ) - { - if ( written < size - 1 ) - { - dest[written] = '-'; - written++; - } - - num = -arg; - } - - do - { - numstr[numlen] = '0' + num % 10; - num = num / 10; - numlen++; - } while ( num > 0 ); - - /* Reverse the string */ - for (int j = 0; j < numlen / 2; j++) - { - char tmp = numstr[j]; - numstr[j] = numstr[numlen - 1 - j]; - numstr[numlen - 1 - j] = tmp; - } - - remaining = size - written - 1; - - if ( numlen > remaining ) - numlen = remaining; - - memcpy(dest + written, numstr, numlen); - - written += numlen; - i++; - } - } - else - { - if ( written < size - 1 ) - { - dest[written] = format[i]; - written++; - } - i++; - } - } - - if ( size > 0 ) - dest[written] = '\0'; - - return written; -} - -void printk(const char *format, ...) -{ - static char buf[1024]; - - va_list args; - va_start(args, format); - - (void)vsnprintf(buf, sizeof(buf), format, args); - - early_printk(buf); - - va_end(args); -} - -#endif - -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 11:22:55 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 11:22:55 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768479.1179290 (Exim 4.92) (envelope-from ) id 1sZ7Pz-00007R-6G; Wed, 31 Jul 2024 11:22:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768479.1179290; Wed, 31 Jul 2024 11:22:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7Pz-00007J-3i; Wed, 31 Jul 2024 11:22:55 +0000 Received: by outflank-mailman (input) for mailman id 768479; Wed, 31 Jul 2024 11:22:54 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7Py-000072-Jx for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:54 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7Py-0001nj-JD for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:54 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ7Py-0000Gi-IE for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:22:54 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=v4nWWMuSefYxd2g0UYmgFcc1PR7O1uZal42X1+TmtR8=; b=K9OWzoDv9ts63frlA/faJAos9/ H3ZLDOR12WGSv2/0EhCXYCnJP7TJ3J9lukIRY5JLCeFIM5FwjMsinMRw89koTKAhbOCX4juLJCaj5 CNBO5ejtDGQUgPGbLSay4Vt0+1F2pdXREcTczPMZgeFqK1yNdlmTYY/G4Kp9zHambVZc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/x86: drop constanst_test_bit() in asm/bitops.h Message-Id: Date: Wed, 31 Jul 2024 11:22:54 +0000 commit 846472780d825fd04fa5df5b65c669848b028e08 Author: Oleksii Kurochko AuthorDate: Wed Jul 31 13:08:16 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 13:08:16 2024 +0200 xen/x86: drop constanst_test_bit() in asm/bitops.h constant_test_bit() is functionally the same as generic_test_bit(), so constant_test_bit() can be dropped and replaced with generic_test_bit(). Requested-by: Jan Beulich Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- xen/arch/x86/include/asm/bitops.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/xen/arch/x86/include/asm/bitops.h b/xen/arch/x86/include/asm/bitops.h index f9aa60111f..8c0403405a 100644 --- a/xen/arch/x86/include/asm/bitops.h +++ b/xen/arch/x86/include/asm/bitops.h @@ -277,12 +277,6 @@ static inline int test_and_change_bit(int nr, volatile void *addr) test_and_change_bit(nr, addr); \ }) -static inline int constant_test_bit(int nr, const volatile void *addr) -{ - return ((1U << (nr & 31)) & - (((const volatile unsigned int *)addr)[nr >> 5])) != 0; -} - static inline int variable_test_bit(int nr, const volatile void *addr) { int oldbit; @@ -297,7 +291,7 @@ static inline int variable_test_bit(int nr, const volatile void *addr) #define arch_test_bit(nr, addr) ({ \ __builtin_constant_p(nr) ? \ - constant_test_bit(nr, addr) : \ + generic_test_bit(nr, addr) : \ variable_test_bit(nr, addr); \ }) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 11:23:06 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 11:23:06 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768480.1179295 (Exim 4.92) (envelope-from ) id 1sZ7QA-0000B8-7h; Wed, 31 Jul 2024 11:23:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768480.1179295; Wed, 31 Jul 2024 11:23:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7QA-0000Ay-5B; Wed, 31 Jul 2024 11:23:06 +0000 Received: by outflank-mailman (input) for mailman id 768480; Wed, 31 Jul 2024 11:23:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7Q8-0000AO-Mw for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:23:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7Q8-0001o6-MF for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:23:04 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ7Q8-0000HN-LM for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:23:04 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=vcjGTbMR2B0vrv/UjwvkfjnD3ST5LIkeRIXDUKV28Fw=; b=5CYre3cLUWuvXzX9PHPJs0JuuF 6y0+W78LODtZ36E6W48pZKn6Hdb/8Rharjb2P/hfoWTrSAw0z11AgqiVGFdkZ8rWW2F9mSZpKWZjH MMKOQJ7JZQ9hnyIhdas7HAI+U/M6bWwqd1ZMpYNyKaH4NyKtFDhxgRDr/F4PwwwmT0sg=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/ucode: Introduce XENPF_microcode_update2 with flags parameter Message-Id: Date: Wed, 31 Jul 2024 11:23:04 +0000 commit c0b379294217f7a288d7369df7568d221cb9b03c Author: Fouad Hilly AuthorDate: Wed Jul 31 13:09:02 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 13:09:02 2024 +0200 x86/ucode: Introduce XENPF_microcode_update2 with flags parameter Refactor microcode_update() by adding flags field. struct xenpf_microcode_update2 added with uint32_t flags field. Introduce XENPF_microcode_update2 hypercall with flags field. Signed-off-by: Fouad Hilly Reviewed-by: Andrew Cooper --- xen/arch/x86/cpu/microcode/core.c | 11 ++++++++--- xen/arch/x86/include/asm/microcode.h | 3 ++- xen/arch/x86/platform_hypercall.c | 13 ++++++++++++- xen/include/public/platform.h | 14 ++++++++++++++ 4 files changed, 36 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/cpu/microcode/core.c b/xen/arch/x86/cpu/microcode/core.c index e90055772a..8a9e744489 100644 --- a/xen/arch/x86/cpu/microcode/core.c +++ b/xen/arch/x86/cpu/microcode/core.c @@ -40,6 +40,8 @@ #include #include +#include + #include "private.h" /* @@ -570,6 +572,7 @@ static int cf_check do_microcode_update(void *patch) } struct ucode_buf { + unsigned int flags; unsigned int len; char buffer[]; }; @@ -708,13 +711,14 @@ static long cf_check microcode_update_helper(void *data) return ret; } -int microcode_update(XEN_GUEST_HANDLE(const_void) buf, unsigned long len) +int microcode_update(XEN_GUEST_HANDLE(const_void) buf, + unsigned long len, unsigned int flags) { int ret; struct ucode_buf *buffer; - if ( len != (uint32_t)len ) - return -E2BIG; + if ( flags & ~XENPF_UCODE_FORCE ) + return -EINVAL; if ( !ucode_ops.apply_microcode ) return -EINVAL; @@ -730,6 +734,7 @@ int microcode_update(XEN_GUEST_HANDLE(const_void) buf, unsigned long len) return -EFAULT; } buffer->len = len; + buffer->flags = flags; /* * Always queue microcode_update_helper() on CPU0. Most of the logic diff --git a/xen/arch/x86/include/asm/microcode.h b/xen/arch/x86/include/asm/microcode.h index 8f59b20b02..57c08205d4 100644 --- a/xen/arch/x86/include/asm/microcode.h +++ b/xen/arch/x86/include/asm/microcode.h @@ -22,7 +22,8 @@ struct cpu_signature { DECLARE_PER_CPU(struct cpu_signature, cpu_sig); void microcode_set_module(unsigned int idx); -int microcode_update(XEN_GUEST_HANDLE(const_void) buf, unsigned long len); +int microcode_update(XEN_GUEST_HANDLE(const_void) buf, + unsigned long len, unsigned int flags); int early_microcode_init(unsigned long *module_map, const struct multiboot_info *mbi); int microcode_init_cache(unsigned long *module_map, diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c index 95467b88ab..7e32781093 100644 --- a/xen/arch/x86/platform_hypercall.c +++ b/xen/arch/x86/platform_hypercall.c @@ -311,7 +311,18 @@ ret_t do_platform_op( guest_from_compat_handle(data, op->u.microcode.data); - ret = microcode_update(data, op->u.microcode.length); + ret = microcode_update(data, op->u.microcode.length, 0); + break; + } + + case XENPF_microcode_update2: + { + XEN_GUEST_HANDLE(const_void) data; + + guest_from_compat_handle(data, op->u.microcode2.data); + + ret = microcode_update(data, op->u.microcode2.length, + op->u.microcode2.flags); break; } diff --git a/xen/include/public/platform.h b/xen/include/public/platform.h index 15777b5416..2725b8d104 100644 --- a/xen/include/public/platform.h +++ b/xen/include/public/platform.h @@ -624,6 +624,19 @@ struct xenpf_ucode_revision { typedef struct xenpf_ucode_revision xenpf_ucode_revision_t; DEFINE_XEN_GUEST_HANDLE(xenpf_ucode_revision_t); +/* Hypercall to microcode_update with flags */ +#define XENPF_microcode_update2 66 +struct xenpf_microcode_update2 { + /* IN variables. */ + uint32_t flags; /* Flags to be passed with ucode. */ +/* Force to skip microcode version check */ +#define XENPF_UCODE_FORCE 1 + uint32_t length; /* Length of microcode data. */ + XEN_GUEST_HANDLE(const_void) data;/* Pointer to microcode data */ +}; +typedef struct xenpf_microcode_update2 xenpf_microcode_update2_t; +DEFINE_XEN_GUEST_HANDLE(xenpf_microcode_update2_t); + /* * ` enum neg_errnoval * ` HYPERVISOR_platform_op(const struct xen_platform_op*); @@ -656,6 +669,7 @@ struct xen_platform_op { xenpf_symdata_t symdata; xenpf_dom0_console_t dom0_console; xenpf_ucode_revision_t ucode_revision; + xenpf_microcode_update2_t microcode2; uint8_t pad[128]; } u; }; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 11:23:16 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 11:23:16 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768481.1179300 (Exim 4.92) (envelope-from ) id 1sZ7QK-0000Da-9e; Wed, 31 Jul 2024 11:23:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768481.1179300; Wed, 31 Jul 2024 11:23:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7QK-0000DS-6g; Wed, 31 Jul 2024 11:23:16 +0000 Received: by outflank-mailman (input) for mailman id 768481; Wed, 31 Jul 2024 11:23:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7QI-0000DG-RP for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:23:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7QI-0001oG-QX for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:23:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ7QI-0000JX-P9 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:23:14 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=jSnaRvt4crkzyQYpiF5a2ch/GgVR/FV6+IrVOPlfCgs=; b=GtvKUg/KBh1FiUt7W9a5fTMiSv ZEzpHkMlgH54Yo3qDnrMI0tmTs1JlcqPcVGBKvrp3z1pMwbxDnwC7RtBTgQ+UryhGW8pYhoHzE48L yWimN9G58fZIywf/riPx54v3f72jj9kcex/8UoV77/sDN4F94rjA2ZYv8+wYovMx7KT4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/hvm: address violations of MISRA C Rule 16.3 Message-Id: Date: Wed, 31 Jul 2024 11:23:14 +0000 commit 4cf7e1311613f8357d5f9c929ea379517927e241 Author: Federico Serafini AuthorDate: Wed Jul 31 13:09:33 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 13:09:33 2024 +0200 x86/hvm: address violations of MISRA C Rule 16.3 MISRA C Rule 16.3 states that "An unconditional `break' statement shall terminate every switch-clause". Add pseudo keyword fallthrough or missing break statement to address violations of the rule. Signed-off-by: Federico Serafini Acked-by: Jan Beulich --- xen/arch/x86/hvm/emulate.c | 11 ++++++----- xen/arch/x86/hvm/hvm.c | 1 + xen/arch/x86/hvm/hypercall.c | 2 +- xen/arch/x86/hvm/irq.c | 1 + xen/arch/x86/hvm/pmtimer.c | 1 + xen/arch/x86/hvm/svm/svm.c | 2 ++ xen/arch/x86/hvm/vlapic.c | 1 + xen/arch/x86/hvm/vmx/vmx.c | 3 ++- xen/arch/x86/hvm/vmx/vvmx.c | 1 + xen/arch/x86/hvm/vpic.c | 1 + xen/arch/x86/hvm/vpt.c | 3 +-- 11 files changed, 18 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c index 02e378365b..135aa6fc22 100644 --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -339,7 +339,7 @@ static int hvmemul_do_io( } case X86EMUL_UNIMPLEMENTED: ASSERT_UNREACHABLE(); - /* Fall-through */ + fallthrough; default: BUG(); } @@ -396,8 +396,7 @@ static int hvmemul_acquire_page(unsigned long gmfn, struct page_info **page) default: ASSERT_UNREACHABLE(); - /* Fallthrough */ - + fallthrough; case -EINVAL: return X86EMUL_UNHANDLEABLE; } @@ -2764,6 +2763,7 @@ int hvm_emulate_one_mmio(unsigned long mfn, unsigned long gla) /* fallthrough */ default: hvm_emulate_writeback(&ctxt); + break; } return rc; @@ -2799,10 +2799,11 @@ void hvm_emulate_one_vm_event(enum emul_kind kind, unsigned int trapnr, memcpy(hvio->mmio_insn, curr->arch.vm_event->emul.insn.data, hvio->mmio_insn_bytes); } - /* Fall-through */ + fallthrough; default: ctx.set_context = (kind == EMUL_KIND_SET_CONTEXT_DATA); rc = hvm_emulate_one(&ctx, VIO_no_completion); + break; } switch ( rc ) @@ -2818,7 +2819,7 @@ void hvm_emulate_one_vm_event(enum emul_kind kind, unsigned int trapnr, case X86EMUL_UNIMPLEMENTED: if ( hvm_monitor_emul_unimplemented() ) return; - /* fall-through */ + fallthrough; case X86EMUL_UNHANDLEABLE: hvm_dump_emulation_state(XENLOG_G_DEBUG, "Mem event", &ctx, rc); hvm_inject_hw_exception(trapnr, errcode); diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 7f4b627b1f..1d32f473a4 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -5283,6 +5283,7 @@ void hvm_get_segment_register(struct vcpu *v, enum x86_segment seg, * %cs and %tr are unconditionally present. SVM ignores these present * bits and will happily run without them set. */ + fallthrough; case x86_seg_cs: reg->p = 1; break; diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c index 7fb3136f0c..c1bd17571e 100644 --- a/xen/arch/x86/hvm/hypercall.c +++ b/xen/arch/x86/hvm/hypercall.c @@ -110,7 +110,7 @@ int hvm_hypercall(struct cpu_user_regs *regs) { case 8: eax = regs->rax; - /* Fallthrough to permission check. */ + fallthrough; case 4: case 2: if ( currd->arch.monitor.guest_request_userspace_enabled && diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c index 210cebb0e6..1eab44defc 100644 --- a/xen/arch/x86/hvm/irq.c +++ b/xen/arch/x86/hvm/irq.c @@ -282,6 +282,7 @@ static void hvm_set_callback_irq_level(struct vcpu *v) __hvm_pci_intx_assert(d, pdev, pintx); else __hvm_pci_intx_deassert(d, pdev, pintx); + break; default: break; } diff --git a/xen/arch/x86/hvm/pmtimer.c b/xen/arch/x86/hvm/pmtimer.c index 97099ac305..87a7a01c9f 100644 --- a/xen/arch/x86/hvm/pmtimer.c +++ b/xen/arch/x86/hvm/pmtimer.c @@ -185,6 +185,7 @@ static int cf_check handle_evt_io( gdprintk(XENLOG_WARNING, "Bad ACPI PM register write: %x bytes (%x) at %x\n", bytes, *val, port); + break; } } /* Fix up the SCI state to match the new register state */ diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 988250dbc1..92bb10c504 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -681,6 +681,7 @@ static void cf_check svm_get_segment_register( ASSERT_UNREACHABLE(); domain_crash(v->domain); *reg = (struct segment_register){}; + break; } } @@ -2416,6 +2417,7 @@ static void cf_check svm_set_reg(struct vcpu *v, unsigned int reg, uint64_t val) printk(XENLOG_G_ERR "%s(%pv, 0x%08x, 0x%016"PRIx64") Bad register\n", __func__, v, reg, val); domain_crash(d); + break; } } diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c index 9cfc82666a..2ec9594271 100644 --- a/xen/arch/x86/hvm/vlapic.c +++ b/xen/arch/x86/hvm/vlapic.c @@ -367,6 +367,7 @@ static void vlapic_accept_irq(struct vcpu *v, uint32_t icr_low) gdprintk(XENLOG_ERR, "TODO: unsupported delivery mode in ICR %x\n", icr_low); domain_crash(v->domain); + break; } } diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index f16faa6a61..46911c3e1c 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -2745,6 +2745,7 @@ static void cf_check vmx_set_reg(struct vcpu *v, unsigned int reg, uint64_t val) printk(XENLOG_G_ERR "%s(%pv, 0x%08x, 0x%016"PRIx64") Bad register\n", __func__, v, reg, val); domain_crash(d); + break; } vmx_vmcs_exit(v); } @@ -3393,7 +3394,7 @@ static int cf_check vmx_msr_read_intercept( *msr_content |= MSR_IA32_MISC_ENABLE_BTS_UNAVAIL | MSR_IA32_MISC_ENABLE_PEBS_UNAVAIL; /* Perhaps vpmu will change some bits. */ - /* FALLTHROUGH */ + fallthrough; case MSR_P6_PERFCTR(0)...MSR_P6_PERFCTR(7): case MSR_P6_EVNTSEL(0)...MSR_P6_EVNTSEL(3): case MSR_CORE_PERF_FIXED_CTR0...MSR_CORE_PERF_FIXED_CTR2: diff --git a/xen/arch/x86/hvm/vmx/vvmx.c b/xen/arch/x86/hvm/vmx/vvmx.c index 39290c9861..c05e0e9326 100644 --- a/xen/arch/x86/hvm/vmx/vvmx.c +++ b/xen/arch/x86/hvm/vmx/vvmx.c @@ -2768,6 +2768,7 @@ int nvmx_n2_vmexit_handler(struct cpu_user_regs *regs, gprintk(XENLOG_ERR, "Unhandled nested vmexit: reason %u\n", exit_reason); domain_crash(v->domain); + break; } return ( nvcpu->nv_vmexit_pending == 1 ); diff --git a/xen/arch/x86/hvm/vpic.c b/xen/arch/x86/hvm/vpic.c index 7c3b5c7254..6427b08086 100644 --- a/xen/arch/x86/hvm/vpic.c +++ b/xen/arch/x86/hvm/vpic.c @@ -309,6 +309,7 @@ static void vpic_ioport_write( if ( !(vpic->init_state & 8) ) break; /* CASCADE mode: wait for write to ICW3. */ /* SNGL mode: fall through (no ICW3). */ + fallthrough; case 2: /* ICW3 */ vpic->init_state++; diff --git a/xen/arch/x86/hvm/vpt.c b/xen/arch/x86/hvm/vpt.c index e1d6845a28..5e7b9a9f66 100644 --- a/xen/arch/x86/hvm/vpt.c +++ b/xen/arch/x86/hvm/vpt.c @@ -119,8 +119,7 @@ static int pt_irq_masked(struct periodic_time *pt) gsi = hvm_isa_irq_to_gsi(pt->irq); } - - /* Fallthrough to check if the interrupt is masked on the IO APIC. */ + fallthrough; case PTSRC_ioapic: { int mask = vioapic_get_mask(v->domain, gsi); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 11:23:26 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 11:23:26 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768482.1179304 (Exim 4.92) (envelope-from ) id 1sZ7QU-0000GA-Bj; Wed, 31 Jul 2024 11:23:26 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768482.1179304; Wed, 31 Jul 2024 11:23:26 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7QU-0000G3-8A; Wed, 31 Jul 2024 11:23:26 +0000 Received: by outflank-mailman (input) for mailman id 768482; Wed, 31 Jul 2024 11:23:25 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7QS-0000Fs-VX for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:23:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ7QS-0001oN-Th for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:23:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ7QS-0000Kb-Sy for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 11:23:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=+fszzgZeJ2z1eisMonEq/w9uILs61j0k12nFQ+/z2y0=; b=rt15QEF0mDAAYCLHmKMRoGwBZS 2k9hgKXo8WzdHAolgZo/dxbxRRQOqeqjOFAi/Uge4OCBKzd4f1Q94HkTyTPAanyrY8Sr98pwqaB3a ahDFedFdK71uHmPgL44tEfgRnq02cDM/VGYCfNtSdh7JUpLSFh2seGQvgMYsOfEDdAkU=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/hvm: add defensive statements in unreachable program points Message-Id: Date: Wed, 31 Jul 2024 11:23:24 +0000 commit 643c2b6bc7df1971559855de854a80aee3b878e6 Author: Federico Serafini AuthorDate: Wed Jul 31 13:09:58 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 13:09:58 2024 +0200 x86/hvm: add defensive statements in unreachable program points As a defensive measure, make sure to signal an error to the caller if an unreachable program point is reached. Signed-off-by: Federico Serafini Reviewed-by: Jan Beulich --- xen/arch/x86/hvm/emulate.c | 1 + xen/arch/x86/hvm/hvm.c | 4 ++++ xen/arch/x86/hvm/vmx/vmcs.c | 2 ++ 3 files changed, 7 insertions(+) diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c index 135aa6fc22..b6ca5cb9d1 100644 --- a/xen/arch/x86/hvm/emulate.c +++ b/xen/arch/x86/hvm/emulate.c @@ -2673,6 +2673,7 @@ static int _hvm_emulate_one(struct hvm_emulate_ctxt *hvmemul_ctxt, default: ASSERT_UNREACHABLE(); + return X86EMUL_UNHANDLEABLE; } if ( hvmemul_ctxt->ctxt.retire.singlestep ) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 1d32f473a4..d7f195ba9a 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -4919,6 +4919,8 @@ static int do_altp2m_op( default: ASSERT_UNREACHABLE(); + rc = -EOPNOTSUPP; + break; } out: @@ -5020,6 +5022,8 @@ static int compat_altp2m_op( default: ASSERT_UNREACHABLE(); + rc = -EOPNOTSUPP; + break; } return rc; diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c index 9b6dc51f36..5787110a56 100644 --- a/xen/arch/x86/hvm/vmx/vmcs.c +++ b/xen/arch/x86/hvm/vmx/vmcs.c @@ -1446,6 +1446,7 @@ struct vmx_msr_entry *vmx_find_msr(const struct vcpu *v, uint32_t msr, default: ASSERT_UNREACHABLE(); + break; } if ( !start ) @@ -1598,6 +1599,7 @@ int vmx_del_msr(struct vcpu *v, uint32_t msr, enum vmx_msr_list_type type) default: ASSERT_UNREACHABLE(); + return -EINVAL; } if ( !start ) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 12:55:10 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 12:55:10 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768578.1179407 (Exim 4.92) (envelope-from ) id 1sZ8rB-0001Kc-1R; Wed, 31 Jul 2024 12:55:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768578.1179407; Wed, 31 Jul 2024 12:55:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8rA-0001KU-V1; Wed, 31 Jul 2024 12:55:04 +0000 Received: by outflank-mailman (input) for mailman id 768578; Wed, 31 Jul 2024 12:55:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8rA-0001KO-4M for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 12:55:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8r9-0003TK-TJ for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 12:55:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8r9-0006vc-RA for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 12:55:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=66WWoyndlG+t9bX4PBRLGAC7vPXGIspYMUYYYpMyJSs=; b=i+Cwtw5F+cF/r702pTKm3yptFz 0lifRqDJq4S32ye4fjc66slo6LKQITWYsnEabVjoIyHqop4mI1WbmIwJDzujXctv9ImY4CDc8r4XA MP1hxcACN/nE2nkZrgKzz16jHIwrQjeQ2HByQkGsPnYhWt8SF2MT4C1HYP69qIhIdxIM=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/sched: fix error handling in cpu_schedule_up() Message-Id: Date: Wed, 31 Jul 2024 12:55:03 +0000 commit 44a7d4f0a5e9eae41a44a162e54ff6d2ebe5b7d6 Author: Juergen Gross AuthorDate: Wed Jul 31 14:50:18 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 14:50:18 2024 +0200 xen/sched: fix error handling in cpu_schedule_up() In case cpu_schedule_up() is failing, it needs to undo all externally visible changes it has done before. Reason is that cpu_schedule_callback() won't be called with the CPU_UP_CANCELED notifier in case cpu_schedule_up() did fail. Fixes: 207589dbacd4 ("xen/sched: move per cpu scheduler private data into struct sched_resource") Reported-by: Jan Beulich Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- xen/common/sched/core.c | 63 ++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 30 deletions(-) diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c index 1a3ff5ae4d..d6296d99fd 100644 --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -2756,6 +2756,36 @@ static struct sched_resource *sched_alloc_res(void) return sr; } +static void cf_check sched_res_free(struct rcu_head *head) +{ + struct sched_resource *sr = container_of(head, struct sched_resource, rcu); + + free_cpumask_var(sr->cpus); + if ( sr->sched_unit_idle ) + sched_free_unit_mem(sr->sched_unit_idle); + xfree(sr); +} + +static void cpu_schedule_down(unsigned int cpu) +{ + struct sched_resource *sr; + + rcu_read_lock(&sched_res_rculock); + + sr = get_sched_res(cpu); + + kill_timer(&sr->s_timer); + + cpumask_clear_cpu(cpu, &sched_res_mask); + set_sched_res(cpu, NULL); + + /* Keep idle unit. */ + sr->sched_unit_idle = NULL; + call_rcu(&sr->rcu, sched_res_free); + + rcu_read_unlock(&sched_res_rculock); +} + static int cpu_schedule_up(unsigned int cpu) { struct sched_resource *sr; @@ -2795,7 +2825,10 @@ static int cpu_schedule_up(unsigned int cpu) idle_vcpu[cpu]->sched_unit->res = sr; if ( idle_vcpu[cpu] == NULL ) + { + cpu_schedule_down(cpu); return -ENOMEM; + } idle_vcpu[cpu]->sched_unit->rendezvous_in_cnt = 0; @@ -2813,36 +2846,6 @@ static int cpu_schedule_up(unsigned int cpu) return 0; } -static void cf_check sched_res_free(struct rcu_head *head) -{ - struct sched_resource *sr = container_of(head, struct sched_resource, rcu); - - free_cpumask_var(sr->cpus); - if ( sr->sched_unit_idle ) - sched_free_unit_mem(sr->sched_unit_idle); - xfree(sr); -} - -static void cpu_schedule_down(unsigned int cpu) -{ - struct sched_resource *sr; - - rcu_read_lock(&sched_res_rculock); - - sr = get_sched_res(cpu); - - kill_timer(&sr->s_timer); - - cpumask_clear_cpu(cpu, &sched_res_mask); - set_sched_res(cpu, NULL); - - /* Keep idle unit. */ - sr->sched_unit_idle = NULL; - call_rcu(&sr->rcu, sched_res_free); - - rcu_read_unlock(&sched_res_rculock); -} - void sched_rm_cpu(unsigned int cpu) { int rc; -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 12:55:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 12:55:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768579.1179411 (Exim 4.92) (envelope-from ) id 1sZ8rL-0001Mh-2p; Wed, 31 Jul 2024 12:55:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768579.1179411; Wed, 31 Jul 2024 12:55:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8rL-0001Ma-0C; Wed, 31 Jul 2024 12:55:15 +0000 Received: by outflank-mailman (input) for mailman id 768579; Wed, 31 Jul 2024 12:55:14 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8rK-0001MQ-17 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 12:55:14 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8rK-0003TX-0J for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 12:55:14 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8rJ-0006wj-Va for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 12:55:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=TEYz+Q/ldowb6AW1jV10+6kS1IGLqDKx9xu3FkjnPNA=; b=anqjAlvit/2sN/hOGtAoD25DID LBaGzlQhgovAQ3shw33D1YonOqm8OboCFzeMlEVH1QBlZ84+S+okwzhd+mnkKuL5RGqXBViOf3Fvm EGgp1P3MqqJyteb7Lfs8LB8uLiTVMyGbhZ1ZXK1UgXevcwQMKJ5gzv0QbT/bY6Pydn+s=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/e820 address violations of MISRA C:2012 Rule 5.3 Message-Id: Date: Wed, 31 Jul 2024 12:55:13 +0000 commit b5fd405aa381e587d90465829b94023ef243a080 Author: Alessandro Zucchelli AuthorDate: Wed Jul 31 14:50:48 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 14:50:48 2024 +0200 x86/e820 address violations of MISRA C:2012 Rule 5.3 This addresses violations of MISRA C:2012 Rule 5.3 which states as following: An identifier declared in an inner scope shall not hide an identifier declared in an outer scope. Right here the conflict is with the global named "e820". No functional change. Signed-off-by: Alessandro Zucchelli Acked-by: Jan Beulich --- xen/arch/x86/e820.c | 74 ++++++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c index 6a3ce7e0a0..3726823e88 100644 --- a/xen/arch/x86/e820.c +++ b/xen/arch/x86/e820.c @@ -593,79 +593,79 @@ int __init e820_add_range(uint64_t s, uint64_t e, uint32_t type) } int __init e820_change_range_type( - struct e820map *e820, uint64_t s, uint64_t e, + struct e820map *map, uint64_t s, uint64_t e, uint32_t orig_type, uint32_t new_type) { uint64_t rs = 0, re = 0; unsigned int i; - for ( i = 0; i < e820->nr_map; i++ ) + for ( i = 0; i < map->nr_map; i++ ) { /* Have we found the e820 region that includes the specified range? */ - rs = e820->map[i].addr; - re = rs + e820->map[i].size; + rs = map->map[i].addr; + re = rs + map->map[i].size; if ( (s >= rs) && (e <= re) ) break; } - if ( (i == e820->nr_map) || (e820->map[i].type != orig_type) ) + if ( (i == map->nr_map) || (map->map[i].type != orig_type) ) return 0; if ( (s == rs) && (e == re) ) { - e820->map[i].type = new_type; + map->map[i].type = new_type; } else if ( (s == rs) || (e == re) ) { - if ( (e820->nr_map + 1) > ARRAY_SIZE(e820->map) ) + if ( (map->nr_map + 1) > ARRAY_SIZE(map->map) ) goto overflow; - memmove(&e820->map[i+1], &e820->map[i], - (e820->nr_map-i) * sizeof(e820->map[0])); - e820->nr_map++; + memmove(&map->map[i+1], &map->map[i], + (map->nr_map-i) * sizeof(map->map[0])); + map->nr_map++; if ( s == rs ) { - e820->map[i].size = e - s; - e820->map[i].type = new_type; - e820->map[i+1].addr = e; - e820->map[i+1].size = re - e; + map->map[i].size = e - s; + map->map[i].type = new_type; + map->map[i+1].addr = e; + map->map[i+1].size = re - e; } else { - e820->map[i].size = s - rs; - e820->map[i+1].addr = s; - e820->map[i+1].size = e - s; - e820->map[i+1].type = new_type; + map->map[i].size = s - rs; + map->map[i+1].addr = s; + map->map[i+1].size = e - s; + map->map[i+1].type = new_type; } } else { - if ( (e820->nr_map + 2) > ARRAY_SIZE(e820->map) ) + if ( (map->nr_map + 2) > ARRAY_SIZE(map->map) ) goto overflow; - memmove(&e820->map[i+2], &e820->map[i], - (e820->nr_map-i) * sizeof(e820->map[0])); - e820->nr_map += 2; + memmove(&map->map[i+2], &map->map[i], + (map->nr_map-i) * sizeof(map->map[0])); + map->nr_map += 2; - e820->map[i].size = s - rs; - e820->map[i+1].addr = s; - e820->map[i+1].size = e - s; - e820->map[i+1].type = new_type; - e820->map[i+2].addr = e; - e820->map[i+2].size = re - e; + map->map[i].size = s - rs; + map->map[i+1].addr = s; + map->map[i+1].size = e - s; + map->map[i+1].type = new_type; + map->map[i+2].addr = e; + map->map[i+2].size = re - e; } /* Finally, look for any opportunities to merge adjacent e820 entries. */ - for ( i = 0; i < (e820->nr_map - 1); i++ ) + for ( i = 0; i < (map->nr_map - 1); i++ ) { - if ( (e820->map[i].type != e820->map[i+1].type) || - ((e820->map[i].addr + e820->map[i].size) != e820->map[i+1].addr) ) + if ( (map->map[i].type != map->map[i+1].type) || + ((map->map[i].addr + map->map[i].size) != map->map[i+1].addr) ) continue; - e820->map[i].size += e820->map[i+1].size; - memmove(&e820->map[i+1], &e820->map[i+2], - (e820->nr_map-i-2) * sizeof(e820->map[0])); - e820->nr_map--; + map->map[i].size += map->map[i+1].size; + memmove(&map->map[i+1], &map->map[i+2], + (map->nr_map-i-2) * sizeof(map->map[0])); + map->nr_map--; i--; } @@ -678,9 +678,9 @@ int __init e820_change_range_type( } /* Set E820_RAM area (@s,@e) as RESERVED in specified e820 map. */ -int __init reserve_e820_ram(struct e820map *e820, uint64_t s, uint64_t e) +int __init reserve_e820_ram(struct e820map *map, uint64_t s, uint64_t e) { - return e820_change_range_type(e820, s, e, E820_RAM, E820_RESERVED); + return e820_change_range_type(map, s, e, E820_RAM, E820_RESERVED); } unsigned long __init init_e820(const char *str, struct e820map *raw) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 12:55:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 12:55:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768580.1179414 (Exim 4.92) (envelope-from ) id 1sZ8rV-0001PN-4j; Wed, 31 Jul 2024 12:55:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768580.1179414; Wed, 31 Jul 2024 12:55:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8rV-0001PE-1x; Wed, 31 Jul 2024 12:55:25 +0000 Received: by outflank-mailman (input) for mailman id 768580; Wed, 31 Jul 2024 12:55:24 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8rU-0001P8-4L for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 12:55:24 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8rU-0003Tk-3V for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 12:55:24 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8rU-0006xI-2a for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 12:55:24 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=+oc0I0B/qgcMVCDWA4peiM5S0w43WyKBfgtDxziTjXM=; b=ojdQETCP7ByYr6WnNE4LD1YCAX pkfuro4EsnMxNw5ZGMQS2ygoEpDQ9ASyOexRWwMTDDl61DIve+LV6KJyWUq7yjy0a+TzDx3AVw63A 8eGMT7VWwY7kRvetUCLKP8VMuw3C6cv8aqnsjV4r/IrbYhr9Fn41JHkNmPfal/ggTqaY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen: add deviations for MISRA C 2012 Dir D4.10 Message-Id: Date: Wed, 31 Jul 2024 12:55:24 +0000 commit d2b91faec4d905acebbc80aaec4def825e2f7280 Author: Maria Celeste Cesario AuthorDate: Wed Jul 31 14:51:13 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 14:51:13 2024 +0200 xen: add deviations for MISRA C 2012 Dir D4.10 Add safe deviation for *.c files, as estabilished in past discussion. Signed-off-by: Maria Celeste Cesario Signed-off-by: Simone Ballarin Signed-off-by: Nicola Vetrini Signed-off-by: Alessandro Zucchelli Reviewed-by: Stefano Stabellini --- automation/eclair_analysis/ECLAIR/deviations.ecl | 5 +++++ docs/misra/deviations.rst | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl index 31b2ec669a..1aa8277066 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -78,6 +78,11 @@ conform to the directive." -config=MC3R1.D4.10,reports+={safe, "first_area(text(^/\\* Generated file, do not edit! \\*/$, begin-3))"} -doc_end +-doc_begin="Including multiple times a .c file is safe because every function or data item +it defines would (in the common case) be already defined. Peer reviewed by the community." +-config=MC3R1.D4.10,reports+={safe, "all_area(all_loc(^.*\\.c$))"} +-doc_end + # # Series 5. # diff --git a/docs/misra/deviations.rst b/docs/misra/deviations.rst index 1ecce1469a..d51aa422b5 100644 --- a/docs/misra/deviations.rst +++ b/docs/misra/deviations.rst @@ -30,6 +30,12 @@ Deviations related to MISRA C:2012 Directives: not to add an additional encapsulation layer. - Tagged as `deliberate` for ECLAIR. + * - D4.10 + - Including multiple times a .c file is safe because every function or data item + it defines would in (the common case) be already defined. + Peer reviewed by the community. + - Tagged as `safe` for ECLAIR. + Deviations related to MISRA C:2012 Rules: ----------------------------------------- -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:00:03 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:00:03 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768582.1179419 (Exim 4.92) (envelope-from ) id 1sZ8vz-0002Lf-GH; Wed, 31 Jul 2024 13:00:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768582.1179419; Wed, 31 Jul 2024 13:00:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8vz-0002LK-DR; Wed, 31 Jul 2024 13:00:03 +0000 Received: by outflank-mailman (input) for mailman id 768582; Wed, 31 Jul 2024 13:00:01 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8vx-00025c-OR for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:01 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8vx-0003bM-Nh for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:01 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8vx-0007Gn-Le for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:01 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=qsOZXYbx4oGlTofnNGFWlPJ2azM5KXvANmzpTgFAlsk=; b=apvnt4279IW/Kue634j40lDEYm vIDqvvFrRoikhW4n6euRc16PZ9Xh+fLyF6FT5Z+dx0X4SghnNc7OpYWMKiyoZVA06ZE3UajjoTJgj lAm0FSWdUU9yWf04IHhvtYCKdu/IJoUTk51nNgSogIVQfeBVfWoV1SlZR+ckQ6VThBX4=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/viridian: Clarify some viridian logging strings Message-Id: Date: Wed, 31 Jul 2024 13:00:01 +0000 commit ba709d514aac1484f8a0825d3907dda11cf569bd Author: Alejandro Vallejo AuthorDate: Tue Jul 30 11:51:23 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:51:23 2024 +0200 x86/viridian: Clarify some viridian logging strings It's sadically misleading to show an error without letters and expect the dmesg reader to understand it's in hex. The patch adds a 0x prefix to all hex numbers that don't already have it. On the one instance in which a boolean is printed as an integer, print it as a decimal integer instead so it's 0/1 in the common case and not misleading if it's ever not just that due to a bug. While at it, rename VIRIDIAN CRASH to VIRIDIAN GUEST_CRASH. Every member of a support team that looks at the message systematically believes "viridian" crashed, which is absolutely not what goes on. It's the guest asking the hypervisor for a sudden shutdown because it crashed, and stating why. Signed-off-by: Alejandro Vallejo Reviewed-by: Paul Durrant --- xen/arch/x86/hvm/viridian/synic.c | 2 +- xen/arch/x86/hvm/viridian/viridian.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/hvm/viridian/synic.c b/xen/arch/x86/hvm/viridian/synic.c index 3375e55e95..c3dc573b00 100644 --- a/xen/arch/x86/hvm/viridian/synic.c +++ b/xen/arch/x86/hvm/viridian/synic.c @@ -172,7 +172,7 @@ int viridian_synic_wrmsr(struct vcpu *v, uint32_t idx, uint64_t val) vector = new.vector; vv->vector_to_sintx[vector] = sintx; - printk(XENLOG_G_INFO "%pv: VIRIDIAN SINT%u: vector: %x\n", v, sintx, + printk(XENLOG_G_INFO "%pv: VIRIDIAN SINT%u: vector: %#x\n", v, sintx, vector); *vs = new; diff --git a/xen/arch/x86/hvm/viridian/viridian.c b/xen/arch/x86/hvm/viridian/viridian.c index 0496c52ed5..21480d9ee7 100644 --- a/xen/arch/x86/hvm/viridian/viridian.c +++ b/xen/arch/x86/hvm/viridian/viridian.c @@ -253,7 +253,7 @@ static void dump_guest_os_id(const struct domain *d) goi = &d->arch.hvm.viridian->guest_os_id; printk(XENLOG_G_INFO - "d%d: VIRIDIAN GUEST_OS_ID: vendor: %x os: %x major: %x minor: %x sp: %x build: %x\n", + "d%d: VIRIDIAN GUEST_OS_ID: vendor: %#x os: %#x major: %#x minor: %#x sp: %#x build: %#x\n", d->domain_id, goi->vendor, goi->os, goi->major, goi->minor, goi->service_pack, goi->build_number); } @@ -264,7 +264,7 @@ static void dump_hypercall(const struct domain *d) hg = &d->arch.hvm.viridian->hypercall_gpa; - printk(XENLOG_G_INFO "d%d: VIRIDIAN HYPERCALL: enabled: %x pfn: %lx\n", + printk(XENLOG_G_INFO "d%d: VIRIDIAN HYPERCALL: enabled: %u pfn: %#lx\n", d->domain_id, hg->enabled, (unsigned long)hg->pfn); } @@ -372,7 +372,8 @@ int guest_wrmsr_viridian(struct vcpu *v, uint32_t idx, uint64_t val) d->shutdown_code = SHUTDOWN_crash; spin_unlock(&d->shutdown_lock); - gprintk(XENLOG_WARNING, "VIRIDIAN CRASH: %lx %lx %lx %lx %lx\n", + gprintk(XENLOG_WARNING, + "VIRIDIAN GUEST_CRASH: %#lx %#lx %#lx %#lx %#lx\n", vv->crash_param[0], vv->crash_param[1], vv->crash_param[2], vv->crash_param[3], vv->crash_param[4]); break; @@ -1056,7 +1057,7 @@ void viridian_dump_guest_page(const struct vcpu *v, const char *name, if ( !vp->msr.enabled ) return; - printk(XENLOG_G_INFO "%pv: VIRIDIAN %s: pfn: %lx\n", + printk(XENLOG_G_INFO "%pv: VIRIDIAN %s: pfn: %#lx\n", v, name, (unsigned long)vp->msr.pfn); } -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:00:16 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:00:16 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768583.1179423 (Exim 4.92) (envelope-from ) id 1sZ8w9-0002wz-HX; Wed, 31 Jul 2024 13:00:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768583.1179423; Wed, 31 Jul 2024 13:00:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8w9-0002wr-Et; Wed, 31 Jul 2024 13:00:13 +0000 Received: by outflank-mailman (input) for mailman id 768583; Wed, 31 Jul 2024 13:00:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8w8-0002wl-0C for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8w7-0003bW-Rw for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:11 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8w7-0007J0-Pu for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:11 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=xTfO+DT+Gdrf+AZ4GUPDtcK4UH3DaRJJ1T8EpreULFY=; b=pyrv/77fH5jgpXnuiGaCRSgcW0 H8ZZG4mwyOvYFwMWgXtggIwW1HrGqHk2pLOfYbZuLq/dbi+6tyyFgkdL+sqNMJUzS5RIYbx9f7jKo IhL98+C3Fzhcl4DJHWdlyGcSQIsUqZ6RRS8ZeIQAOXkQKejjk084QuJH0splzqV9eV/w=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] xen/cpupools: silence maybe-unitialized warning Message-Id: Date: Wed, 31 Jul 2024 13:00:11 +0000 commit 1adc5fbfa6627da352f97d84a8a752084da4419f Author: Stewart Hildebrand AuthorDate: Tue Jul 30 11:52:03 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:52:03 2024 +0200 xen/cpupools: silence maybe-unitialized warning When building with gcc with -finstrument-functions, optimization level -O1, CONFIG_HYPFS=y and # CONFIG_HAS_SCHED_GRANULARITY is not set, the the following build warning (error) is encountered: common/sched/cpupool.c: In function ‘cpupool_gran_write’: common/sched/cpupool.c:1220:26: error: ‘gran’ may be used uninitialized [-Werror=maybe-uninitialized] 1220 | 0 : cpupool_check_granularity(gran); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ common/sched/cpupool.c:1207:21: note: ‘gran’ declared here 1207 | enum sched_gran gran; | ^~~~ This is a false positive. Silence the warning (error) by initializing the variable. Signed-off-by: Stewart Hildebrand Reviewed-by: Juergen Gross --- xen/common/sched/cpupool.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/common/sched/cpupool.c b/xen/common/sched/cpupool.c index 57dfee26f2..3d02c7b706 100644 --- a/xen/common/sched/cpupool.c +++ b/xen/common/sched/cpupool.c @@ -103,6 +103,7 @@ custom_param("sched-gran", sched_select_granularity); #elif defined(CONFIG_HYPFS) static int sched_gran_get(const char *str, enum sched_gran *mode) { + *mode = SCHED_GRAN_cpu; return -EINVAL; } #endif -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:00:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:00:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768587.1179436 (Exim 4.92) (envelope-from ) id 1sZ8wK-0003G7-0T; Wed, 31 Jul 2024 13:00:24 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768587.1179436; Wed, 31 Jul 2024 13:00:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8wJ-0003G1-Td; Wed, 31 Jul 2024 13:00:23 +0000 Received: by outflank-mailman (input) for mailman id 768587; Wed, 31 Jul 2024 13:00:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8wH-0003F8-Vl for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:21 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8wH-0003bq-Uz for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:21 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8wH-0007Kq-U2 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:21 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=jZC7miLTE5Nh4yEfPOv8PWye0jYKmpTGozsrQ8hTUWk=; b=Z3EDM+mhdCwaQXp4AwJtDFpnip 1SjklxBwCwHmvQJyWLy1vPchjpbgXhZNOu+7KuzWiel1BHeBmXaKx13uN6rZVRyHn66Sv4sU5I+w3 CV56PcBWSCSpp5pLxlUJMzbaLbuHGiyl4rqhNL+5BQAbwExmwepgVkbJRhUhd8olIScE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] automation/eclair: fix deviation of MISRA C Rule 16.3 Message-Id: Date: Wed, 31 Jul 2024 13:00:21 +0000 commit 5f6548ea1fe2b2b8dc72a0362c72442e62955213 Author: Federico Serafini AuthorDate: Tue Jul 30 11:52:31 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:52:31 2024 +0200 automation/eclair: fix deviation of MISRA C Rule 16.3 Add missing escape for the final dot of the fallthrough comment, extend the search of a fallthrough comment up to 2 lines after the last statement and improve the text of the justification. Fixes: a128d8da91 ("automation/eclair: add deviations for MISRA C:2012 Rule 16.3") Reported-by: Jan Beulich Signed-off-by: Federico Serafini Acked-by: Stefano Stabellini --- automation/eclair_analysis/ECLAIR/deviations.ecl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl index 0af1cb93d1..603480161e 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -482,9 +482,8 @@ safe." -config=MC3R1.R16.3,reports+={safe, "any_area(end_loc(any_exp(text(/BUG\\(\\);/))))"} -doc_end --doc_begin="Switch clauses not ending with the break statement are safe if an -explicit comment indicating the fallthrough intention is present." --config=MC3R1.R16.3,reports+={safe, "any_area(end_loc(any_exp(text(^(?s).*/\\* [fF]all ?through.? \\*/.*$,0..1))))"} +-doc_begin="Switch clauses ending with an explicit comment indicating the fallthrough intention are safe." +-config=MC3R1.R16.3,reports+={safe, "any_area(end_loc(any_exp(text(^(?s).*/\\* [fF]all ?through\\.? \\*/.*$,0..2))))"} -doc_end -doc_begin="Switch statements having a controlling expression of enum type deliberately do not have a default case: gcc -Wall enables -Wswitch which warns (and breaks the build as we use -Werror) if one of the enum labels is missing from the switch." -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:00:33 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:00:33 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768590.1179455 (Exim 4.92) (envelope-from ) id 1sZ8wT-0003cR-Di; Wed, 31 Jul 2024 13:00:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768590.1179455; Wed, 31 Jul 2024 13:00:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8wT-0003cJ-Ab; Wed, 31 Jul 2024 13:00:33 +0000 Received: by outflank-mailman (input) for mailman id 768590; Wed, 31 Jul 2024 13:00:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8wS-0003LS-30 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8wS-0003cM-1k for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8wS-0007ML-0t for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=JKuYxH9bTkChlMzZKcR0G4nasRP8wQYMwmBiq6deieo=; b=4UuLbS2gIafaZuaijZk8RE3uCl MVLaLW7vdKuZNU8uA+zPX3fd2xsWL/zClA3KFIy8h3MR+4c8ImhTDbvKO+tNjjdZO1Y5x6epzYawq DRiMD+Lx4JLIUSsVb5y1KrKaeaH+bf+TNVvfyGojgPn3lpbPwo0UciZQBvQt1C0FtKyk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/vpmu: address violations of MISRA C Rule 16.3 Message-Id: Date: Wed, 31 Jul 2024 13:00:32 +0000 commit cd94e7cff8be9f6d742bb947451685408da6781d Author: Federico Serafini AuthorDate: Tue Jul 30 11:52:47 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:52:47 2024 +0200 x86/vpmu: address violations of MISRA C Rule 16.3 Add missing break statements to address violations of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Reviewed-by: Jan Beulich --- xen/arch/x86/cpu/vpmu.c | 3 +++ xen/arch/x86/cpu/vpmu_intel.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/xen/arch/x86/cpu/vpmu.c b/xen/arch/x86/cpu/vpmu.c index a7bc0cd1fc..b2ba999412 100644 --- a/xen/arch/x86/cpu/vpmu.c +++ b/xen/arch/x86/cpu/vpmu.c @@ -663,6 +663,8 @@ long do_xenpmu_op( if ( pmu_params.version.maj != XENPMU_VER_MAJ ) return -EINVAL; + + break; } switch ( op ) @@ -776,6 +778,7 @@ long do_xenpmu_op( default: ret = -EINVAL; + break; } return ret; diff --git a/xen/arch/x86/cpu/vpmu_intel.c b/xen/arch/x86/cpu/vpmu_intel.c index cd414165df..26dd3a9358 100644 --- a/xen/arch/x86/cpu/vpmu_intel.c +++ b/xen/arch/x86/cpu/vpmu_intel.c @@ -666,6 +666,7 @@ static int cf_check core2_vpmu_do_wrmsr(unsigned int msr, uint64_t msr_content) xen_pmu_cntr_pair[tmp].control = msr_content; } + break; } if ( type != MSR_TYPE_GLOBAL ) @@ -713,6 +714,7 @@ static int cf_check core2_vpmu_do_rdmsr(unsigned int msr, uint64_t *msr_content) break; default: rdmsrl(msr, *msr_content); + break; } } else if ( msr == MSR_IA32_MISC_ENABLE ) -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:00:44 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:00:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768597.1179487 (Exim 4.92) (envelope-from ) id 1sZ8we-0004Lx-3S; Wed, 31 Jul 2024 13:00:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768597.1179487; Wed, 31 Jul 2024 13:00:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8wd-0004Lc-U8; Wed, 31 Jul 2024 13:00:43 +0000 Received: by outflank-mailman (input) for mailman id 768597; Wed, 31 Jul 2024 13:00:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8wc-00043d-5V for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8wc-0003ci-4s for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8wc-0007Nk-3y for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=8Uk7I+71GPkv1SVCgO6YMmPvyZunxClPkWqTB79a60A=; b=Ey3cAxnOZ0+UkbpxACPJpVuJ5k oKtq7tUKu3HDVidtEDRCsnm8Lov35VzzUIZSKjSlgVUd0SIUSkbjlXdvkU7P5iA4JBbpVMFiuGTIp x1gAw1BH3xcRjKVkGrEfvM8H7ojSeRgwaOSwdOesYqC2BiebenU4tvInzmQKfmFDVJzk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/traps: address violations of MISRA C Rule 16.3 Message-Id: Date: Wed, 31 Jul 2024 13:00:42 +0000 commit 2c9044adf815f92db4e9cfe7c25e60265b7d45a0 Author: Federico Serafini AuthorDate: Tue Jul 30 11:53:06 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:53:06 2024 +0200 x86/traps: address violations of MISRA C Rule 16.3 Add break or pseudo keyword fallthrough to address violations of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/traps.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index ee91fc56b1..7a9299ae6c 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1186,6 +1186,7 @@ void cpuid_hypervisor_leaves(const struct vcpu *v, uint32_t leaf, default: ASSERT_UNREACHABLE(); + break; } } @@ -1748,6 +1749,7 @@ static void io_check_error(const struct cpu_user_regs *regs) { case 'd': /* 'dom0' */ nmi_hwdom_report(_XEN_NMIREASON_io_error); + break; case 'i': /* 'ignore' */ break; default: /* 'fatal' */ @@ -1768,6 +1770,7 @@ static void unknown_nmi_error(const struct cpu_user_regs *regs, { case 'd': /* 'dom0' */ nmi_hwdom_report(_XEN_NMIREASON_unknown); + break; case 'i': /* 'ignore' */ break; default: /* 'fatal' */ -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:00:53 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:00:53 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768603.1179506 (Exim 4.92) (envelope-from ) id 1sZ8wn-0004vp-Ij; Wed, 31 Jul 2024 13:00:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768603.1179506; Wed, 31 Jul 2024 13:00:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8wn-0004vD-Db; Wed, 31 Jul 2024 13:00:53 +0000 Received: by outflank-mailman (input) for mailman id 768603; Wed, 31 Jul 2024 13:00:52 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8wm-0004fz-8x for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:52 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8wm-0003dA-7p for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:52 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8wm-0007Ov-76 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:00:52 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=NeLvW5mW+d1CaO6MF/Zj6A844I2+B7/FIN+ut2HDUKA=; b=FKc/ClztsMVzuGIIK/Ifr6SfI3 fSXiPXYzO11XJBvVkGa/54C/DhriGYoC3XFs2Tk/s4P5cXVtFHafKzZnHKJw6A17pLKwXxpNVV0k6 vOyLcbLoYQzmUQZyb0eMhQWyAdA1cIOcOtNqhkjLQSTaFHzL/uwugWbOiJMEcR5jnZjw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/mce: address violations of MISRA C Rule 16.3 Message-Id: Date: Wed, 31 Jul 2024 13:00:52 +0000 commit 20716a4b1ceea298e4b31d6596403cbc7548ef9f Author: Federico Serafini AuthorDate: Tue Jul 30 11:53:26 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:53:26 2024 +0200 x86/mce: address violations of MISRA C Rule 16.3 Add missing break statements to address violations of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/cpu/mcheck/mce_amd.c | 1 + xen/arch/x86/cpu/mcheck/mce_intel.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/xen/arch/x86/cpu/mcheck/mce_amd.c b/xen/arch/x86/cpu/mcheck/mce_amd.c index 3318b8204f..4f06a3153b 100644 --- a/xen/arch/x86/cpu/mcheck/mce_amd.c +++ b/xen/arch/x86/cpu/mcheck/mce_amd.c @@ -201,6 +201,7 @@ static void mcequirk_amd_apply(enum mcequirk_amd_flags flags) default: ASSERT(flags == MCEQUIRK_NONE); + break; } } diff --git a/xen/arch/x86/cpu/mcheck/mce_intel.c b/xen/arch/x86/cpu/mcheck/mce_intel.c index dd812f4b8a..9574dedbfd 100644 --- a/xen/arch/x86/cpu/mcheck/mce_intel.c +++ b/xen/arch/x86/cpu/mcheck/mce_intel.c @@ -896,6 +896,8 @@ static void intel_init_ppin(const struct cpuinfo_x86 *c) ppin_msr = 0; else if ( c == &boot_cpu_data ) ppin_msr = MSR_PPIN; + + break; } } -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:01:03 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:01:03 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768617.1179510 (Exim 4.92) (envelope-from ) id 1sZ8wx-0005LM-Im; Wed, 31 Jul 2024 13:01:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768617.1179510; Wed, 31 Jul 2024 13:01:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8wx-0005LE-FD; Wed, 31 Jul 2024 13:01:03 +0000 Received: by outflank-mailman (input) for mailman id 768617; Wed, 31 Jul 2024 13:01:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8ww-0005Ir-Bk for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8ww-0003dc-Av for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8ww-0007QB-A2 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=xJDRWtgv3Oh6+SmrML2RYBD2nXQZx8w/7kUB2ipVRRw=; b=MUBLFvi2IW3vPhQl7Ns/BR95K5 2mhzrdqCZQNCLeJlAYDZ8FgR4sfmvwfHZckEw1vdrWn6vv4af4Ve83AiMknlgRS/P4z+zK/OrN7rI IbJ7EK8SB4VNKJk9oX73vvKUggWzriPQ5/5XHFHYrJDI5EYs1i8EmAzmqvoN7zTJvv4c=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/mpparse: address a violation of MISRA C Rule 16.3 Message-Id: Date: Wed, 31 Jul 2024 13:01:02 +0000 commit c8a92406c2f69b273a3b984a754fb437a6df8ddd Author: Federico Serafini AuthorDate: Tue Jul 30 11:53:46 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:53:46 2024 +0200 x86/mpparse: address a violation of MISRA C Rule 16.3 Add a missing break statement to address a violation of MISRA C Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Reviewed-by: Stefano Stabellini Acked-by: Jan Beulich --- xen/arch/x86/mpparse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c index d8ccab2449..306d8ed97a 100644 --- a/xen/arch/x86/mpparse.c +++ b/xen/arch/x86/mpparse.c @@ -544,6 +544,7 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) case 4: case 7: memcpy(bus.mpc_bustype, "MCA ", 6); + break; } MP_bus_info(&bus); if (mpc_default_type > 4) { -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:01:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:01:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768627.1179514 (Exim 4.92) (envelope-from ) id 1sZ8x7-0005h3-Jl; Wed, 31 Jul 2024 13:01:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768627.1179514; Wed, 31 Jul 2024 13:01:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8x7-0005gv-Gi; Wed, 31 Jul 2024 13:01:13 +0000 Received: by outflank-mailman (input) for mailman id 768627; Wed, 31 Jul 2024 13:01:12 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8x6-0005ez-Eu for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:12 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8x6-0003dq-E9 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8x6-0007RJ-DB for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=GworISd84eRzEWSErAuexOjw608IJG/maHaIq0ZCP9o=; b=veRuGKh/pB0xSvNCcemnpnlaWN ivhROsJvQP5dHMPeqeZFXOxFL4c2yyZ0PAj7b/qwNpRG45J5qCagDNPNQZc0Z0ELOUJ5VIMlpyU7P e6pSN1wKPDn/MbLRWWCCK9c5KfYYD1tSqVn8MwVQXMgvWouCjgGA5G2QB/SfODyYB7yc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] misra: add deviation for headers that explicitly avoid guards Message-Id: Date: Wed, 31 Jul 2024 13:01:12 +0000 commit d2ff674a9c6664db666a92a45dd5f36344501f00 Author: Simone Ballarin AuthorDate: Tue Jul 30 11:54:11 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:54:11 2024 +0200 misra: add deviation for headers that explicitly avoid guards Some headers, under specific circumstances (documented in a comment at the beginning of the file), explicitly do not have strict inclusion guards: the caller is responsible for including them correctly. These files are not supposed to comply with Directive 4.10: "Precautions shall be taken in order to prevent the contents of a header file being included more than once" This patch adds deviation cooments for headers that avoid guards. Signed-off-by: Simone Ballarin Signed-off-by: Nicola Vetrini Signed-off-by: Alessandro Zucchelli Reviewed-by: Stefano Stabellini --- docs/misra/safe.json | 8 ++++++++ xen/include/public/arch-x86/cpufeatureset.h | 1 + xen/include/public/errno.h | 1 + 3 files changed, 10 insertions(+) diff --git a/docs/misra/safe.json b/docs/misra/safe.json index 3f18ef401c..44d1c4890e 100644 --- a/docs/misra/safe.json +++ b/docs/misra/safe.json @@ -68,6 +68,14 @@ }, { "id": "SAF-8-safe", + "analyser": { + "eclair": "MC3R1.D4.10" + }, + "name": "Dir 4.10: headers that leave it up to the caller to include them correctly", + "text": "Headers that deliberatively leave the responsability of their correct inclusion to the caller are allowed." + }, + { + "id": "SAF-9-safe", "analyser": {}, "name": "Sentinel", "text": "Next ID to be used" diff --git a/xen/include/public/arch-x86/cpufeatureset.h b/xen/include/public/arch-x86/cpufeatureset.h index d9eba5e9a7..3962ba9342 100644 --- a/xen/include/public/arch-x86/cpufeatureset.h +++ b/xen/include/public/arch-x86/cpufeatureset.h @@ -23,6 +23,7 @@ * their XEN_CPUFEATURE() being appropriate in the included context. */ +/* SAF-8-safe inclusion procedure left to caller */ #ifndef XEN_CPUFEATURE /* diff --git a/xen/include/public/errno.h b/xen/include/public/errno.h index 5a78a7607c..b9fc6762fb 100644 --- a/xen/include/public/errno.h +++ b/xen/include/public/errno.h @@ -17,6 +17,7 @@ * will unilaterally #undef XEN_ERRNO(). */ +/* SAF-8-safe inclusion procedure left to caller */ #ifndef XEN_ERRNO /* -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:01:23 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:01:23 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768631.1179516 (Exim 4.92) (envelope-from ) id 1sZ8xH-0005vZ-L2; Wed, 31 Jul 2024 13:01:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768631.1179516; Wed, 31 Jul 2024 13:01:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xH-0005vS-II; Wed, 31 Jul 2024 13:01:23 +0000 Received: by outflank-mailman (input) for mailman id 768631; Wed, 31 Jul 2024 13:01:22 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xG-0005ta-Hp for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:22 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xG-0003fX-H6 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:22 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8xG-0007Sr-GO for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:22 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=8i6RToNPv0Ca6vRbpaxB9m9MioeyiwBJWZ6Zd8lnuWA=; b=3BY14JtEILp10sGH0WlUb+j4Ej wcB6Rh7hcTaTAlCG69LRmQKedaiozgYB0gwDeQxqlpW1jQkBaAQa6iZz5/3y8Pq7NWyZIZEITxag5 AJQDhQd7raSZrs2NBirKohqm8glgymoUtvPSzMcrm8pB17nAOnWu7yRkrZz6qdaLeNPY=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] misra: modify deviations for empty and generated headers Message-Id: Date: Wed, 31 Jul 2024 13:01:22 +0000 commit 79b9c0cdd84fd5c4656b0e55cbb45e5199fa75fb Author: Simone Ballarin AuthorDate: Tue Jul 30 11:54:42 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:54:42 2024 +0200 misra: modify deviations for empty and generated headers This patch modifies deviations for Directive 4.10: "Precautions shall be taken in order to prevent the contents of a header file being included more than once" This patch avoids the file-based deviation for empty headers, and replaces it with a comment-based one using the format specified in docs/misra/safe.json. Generated headers are not generally safe against multi-inclusions, whether a header is safe depends on the nature of the generated code in the header. For that reason, this patch drops the deviation for generated headers. Signed-off-by: Simone Ballarin Reviewed-by: Stefano Stabellini Signed-off-by: Alessandro Zucchelli Signed-off-by: Nicola Vetrini --- automation/eclair_analysis/ECLAIR/deviations.ecl | 7 ------- docs/misra/safe.json | 8 ++++++++ xen/arch/arm/efi/runtime.h | 1 + xen/include/Makefile | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/automation/eclair_analysis/ECLAIR/deviations.ecl b/automation/eclair_analysis/ECLAIR/deviations.ecl index 603480161e..31b2ec669a 100644 --- a/automation/eclair_analysis/ECLAIR/deviations.ecl +++ b/automation/eclair_analysis/ECLAIR/deviations.ecl @@ -72,13 +72,6 @@ they are not instances of commented-out code." -config=MC3R1.D4.3,reports+={deliberate, "any_area(any_loc(file(arm64_bitops))&&context(name(int_clear_mask16)))"} -doc_end --doc_begin="This header file is autogenerated or empty, therefore it poses no -risk if included more than once." --file_tag+={empty_header, "^xen/arch/arm/efi/runtime\\.h$"} --file_tag+={autogen_headers, "^xen/include/xen/compile\\.h$||^xen/include/generated/autoconf.h$||^xen/include/xen/hypercall-defs.h$"} --config=MC3R1.D4.10,reports+={safe, "all_area(all_loc(file(empty_header||autogen_headers)))"} --doc_end - -doc_begin="Files that are intended to be included more than once do not need to conform to the directive." -config=MC3R1.D4.10,reports+={safe, "first_area(text(^/\\* This file is legitimately included multiple times\\. \\*/$, begin-4))"} diff --git a/docs/misra/safe.json b/docs/misra/safe.json index 44d1c4890e..ffa8bfdc4a 100644 --- a/docs/misra/safe.json +++ b/docs/misra/safe.json @@ -76,6 +76,14 @@ }, { "id": "SAF-9-safe", + "analyser": { + "eclair": "MC3R1.D4.10" + }, + "name": "Dir 4.10: empty headers", + "text": "Empty headers pose no risk if included more than once." + }, + { + "id": "SAF-10-safe", "analyser": {}, "name": "Sentinel", "text": "Next ID to be used" diff --git a/xen/arch/arm/efi/runtime.h b/xen/arch/arm/efi/runtime.h index 25afcebed1..4d2d40bf3c 100644 --- a/xen/arch/arm/efi/runtime.h +++ b/xen/arch/arm/efi/runtime.h @@ -1 +1,2 @@ /* Placeholder for ARM-specific runtime include/declarations */ +/* SAF-9-safe empty header */ diff --git a/xen/include/Makefile b/xen/include/Makefile index 2e61b50139..058b0a566b 100644 --- a/xen/include/Makefile +++ b/xen/include/Makefile @@ -53,7 +53,7 @@ cmd_compat_h = \ mv -f $@.new $@ quiet_cmd_stub_h = GEN $@ -cmd_stub_h = echo '/* empty */' >$@ +cmd_stub_h = echo '/* SAF-9-safe empty header */' >$@ quiet_cmd_compat_i = CPP $@ cmd_compat_i = $(CPP) $(filter-out -Wa$(comma)% -include %/include/xen/config.h,$(XEN_CFLAGS)) $(cppflags-y) -o $@ $< -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:01:33 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:01:33 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768636.1179521 (Exim 4.92) (envelope-from ) id 1sZ8xR-00069C-Mq; Wed, 31 Jul 2024 13:01:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768636.1179521; Wed, 31 Jul 2024 13:01:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xR-00068b-Jz; Wed, 31 Jul 2024 13:01:33 +0000 Received: by outflank-mailman (input) for mailman id 768636; Wed, 31 Jul 2024 13:01:32 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xQ-00066g-Kg for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:32 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xQ-0003fx-K5 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:32 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8xQ-0007Tg-JH for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:32 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=9rQyFnEBiumlG5dXooeU5luWh4TdzMwqNgFIydXMjO4=; b=dOC4Q+TcIe4qeJJ/zTHHafbYZu c47bqcCMNlMG3bB53Kx7YhWhUpYIgSWND/2xGXUsJO8D91X5+y+XWB5pDi3Bl5kI9TdSidFpxPZSG ntM+cCdV1zLXMVz3eUwwGIVXKSeALnIlDDooP0VkP/cYcJqniWdE4TdZZsYqNhY6i7EA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] misra: add deviations for direct inclusion guards Message-Id: Date: Wed, 31 Jul 2024 13:01:32 +0000 commit 89719f57cca51f5e4b2c8acddce957ba8248b246 Author: Simone Ballarin AuthorDate: Tue Jul 30 11:55:09 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:55:09 2024 +0200 misra: add deviations for direct inclusion guards Add deviation comments to address violations of MISRA C:2012 Directive 4.10 ("Precautions shall be taken in order to prevent the contents of a header file being included more than once"). Inclusion guards must appear at the beginning of the headers (comments are permitted anywhere). This patch adds deviation comments using the format specified in docs/misra/safe.json for headers with just the direct inclusion guard before the inclusion guard since they are safe and not supposed to comply with the directive. Note that with SAF-10-safe in place, failures to have proper guards later in the header files will not be reported Signed-off-by: Simone Ballarin Signed-off-by: Alessandro Zucchelli Signed-off-by: Nicola Vetrini Reviewed-by: Stefano Stabellini --- docs/misra/safe.json | 8 ++++++++ xen/arch/arm/include/asm/hypercall.h | 1 + xen/arch/x86/include/asm/hypercall.h | 1 + 3 files changed, 10 insertions(+) diff --git a/docs/misra/safe.json b/docs/misra/safe.json index ffa8bfdc4a..684346386e 100644 --- a/docs/misra/safe.json +++ b/docs/misra/safe.json @@ -84,6 +84,14 @@ }, { "id": "SAF-10-safe", + "analyser": { + "eclair": "MC3R1.D4.10" + }, + "name": "Dir 4.10: direct inclusion guard before", + "text": "Headers with just the direct inclusion guard before the inclusion guard are safe." + }, + { + "id": "SAF-11-safe", "analyser": {}, "name": "Sentinel", "text": "Next ID to be used" diff --git a/xen/arch/arm/include/asm/hypercall.h b/xen/arch/arm/include/asm/hypercall.h index ccd26c5184..07e231f8b5 100644 --- a/xen/arch/arm/include/asm/hypercall.h +++ b/xen/arch/arm/include/asm/hypercall.h @@ -1,3 +1,4 @@ +/* SAF-10-safe direct inclusion guard before */ #ifndef __XEN_HYPERCALL_H__ #error "asm/hypercall.h should not be included directly - include xen/hypercall.h instead" #endif diff --git a/xen/arch/x86/include/asm/hypercall.h b/xen/arch/x86/include/asm/hypercall.h index ec2edc771e..389fa62af2 100644 --- a/xen/arch/x86/include/asm/hypercall.h +++ b/xen/arch/x86/include/asm/hypercall.h @@ -2,6 +2,7 @@ * asm-x86/hypercall.h */ +/* SAF-10-safe direct inclusion guard before */ #ifndef __XEN_HYPERCALL_H__ #error "asm/hypercall.h should not be included directly - include xen/hypercall.h instead" #endif -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:01:43 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:01:43 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768639.1179525 (Exim 4.92) (envelope-from ) id 1sZ8xb-0006FC-Pi; Wed, 31 Jul 2024 13:01:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768639.1179525; Wed, 31 Jul 2024 13:01:43 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xb-0006F4-N7; Wed, 31 Jul 2024 13:01:43 +0000 Received: by outflank-mailman (input) for mailman id 768639; Wed, 31 Jul 2024 13:01:42 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xa-0006El-Nd for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:42 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xa-0003g3-Mw for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:42 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8xa-0007UH-MH for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:42 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=jXns0SMYFH8UF8rCkUXVkVzG6q935R4vpWSkHVXJTWQ=; b=nHa2CBOhTLWDzPfmfTuBg95hnq ZI77fM/IPvDDWazdTlsc430rDotjnlTZkL4l9t/wmdLfEEdZJzoQ/Rx3tlrPujMfGIReTtVZ4L/Jc Vg54gJbO9khd8BbtJknsAHjN885FISlvwlY+YwE0Vj6o8jlPX5F9NB98ExGXgB6O2Roo=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/pvh: Allow (un)map_pirq when dom0 is PVH Message-Id: Date: Wed, 31 Jul 2024 13:01:42 +0000 commit e42d107d0d8bfa82c92ec7ed69bac259effc97ad Author: Jiqian Chen AuthorDate: Tue Jul 30 11:55:36 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:55:36 2024 +0200 x86/pvh: Allow (un)map_pirq when dom0 is PVH If run Xen with PVH dom0 and hvm domU, hvm will map a pirq for a passthrough device by using gsi, see qemu code xen_pt_realize->xc_physdev_map_pirq and libxl code pci_add_dm_done->xc_physdev_map_pirq. Then xc_physdev_map_pirq will call into Xen, but in hvm_physdev_op, PHYSDEVOP_map_pirq is not allowed because currd is PVH dom0 and PVH has no X86_EMU_USE_PIRQ flag, it will fail at has_pirq check. So, allow PHYSDEVOP_map_pirq when dom0 is PVH and also allow PHYSDEVOP_unmap_pirq for the removal device path to unmap pirq. And add a new check to prevent (un)map when the subject domain doesn't have a notion of PIRQ. So that the interrupt of a passthrough device can be successfully mapped to pirq for domU with a notion of PIRQ when dom0 is PVH Signed-off-by: Jiqian Chen Signed-off-by: Huang Rui Signed-off-by: Jiqian Chen Reviewed-by: Jan Beulich Reviewed-by: Stefano Stabellini --- xen/arch/x86/hvm/hypercall.c | 6 ++++++ xen/arch/x86/physdev.c | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c index 7fb3136f0c..83a9b4fb1e 100644 --- a/xen/arch/x86/hvm/hypercall.c +++ b/xen/arch/x86/hvm/hypercall.c @@ -71,8 +71,14 @@ long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) switch ( cmd ) { + /* + * Only being permitted for management of other domains. + * Further restrictions are enforced in do_physdev_op. + */ case PHYSDEVOP_map_pirq: case PHYSDEVOP_unmap_pirq: + break; + case PHYSDEVOP_eoi: case PHYSDEVOP_irq_status_query: case PHYSDEVOP_get_free_pirq: diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c index d6dd622952..9f30a8c63a 100644 --- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -323,7 +323,11 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) if ( !d ) break; - ret = physdev_map_pirq(d, map.type, &map.index, &map.pirq, &msi); + /* Only mapping when the subject domain has a notion of PIRQ */ + if ( !is_hvm_domain(d) || has_pirq(d) ) + ret = physdev_map_pirq(d, map.type, &map.index, &map.pirq, &msi); + else + ret = -EOPNOTSUPP; rcu_unlock_domain(d); @@ -346,7 +350,11 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) if ( !d ) break; - ret = physdev_unmap_pirq(d, unmap.pirq); + /* Only unmapping when the subject domain has a notion of PIRQ */ + if ( !is_hvm_domain(d) || has_pirq(d) ) + ret = physdev_unmap_pirq(d, unmap.pirq); + else + ret = -EOPNOTSUPP; rcu_unlock_domain(d); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:01:53 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:01:53 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768640.1179529 (Exim 4.92) (envelope-from ) id 1sZ8xl-0006L1-RG; Wed, 31 Jul 2024 13:01:53 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768640.1179529; Wed, 31 Jul 2024 13:01:53 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xl-0006Kt-OY; Wed, 31 Jul 2024 13:01:53 +0000 Received: by outflank-mailman (input) for mailman id 768640; Wed, 31 Jul 2024 13:01:52 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xk-0006Ki-QY for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:52 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xk-0003gC-Ps for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:52 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8xk-0007V3-P6 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:01:52 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=gq7nIgadj73Pf0UbYWQWB/VwFIqSDDM+cwoOaGWmvCI=; b=xhoVs+7pXpFNiPa6ViXGRJfvXg Mh9hpBhCQcF28H5tA3R5gDDEKjDtxehGl9zIglIYaLFi97XqySDVulE+LMx8ULaV2jZ1KgKoc8oZ5 wFELyoz/aMxnFaiuYPf6e0RJCBDAXNL9W9nx+Vn06ixCiTtOj+i+ELi60zhyaDMJIPQA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] bunzip2: fix rare decompression failure Message-Id: Date: Wed, 31 Jul 2024 13:01:52 +0000 commit 303d3ff85c90ee4af4bad4e3b1d4932fa2634d64 Author: Ross Lagerwall AuthorDate: Tue Jul 30 11:55:56 2024 +0200 Commit: Jan Beulich CommitDate: Tue Jul 30 11:55:56 2024 +0200 bunzip2: fix rare decompression failure The decompression code parses a huffman tree and counts the number of symbols for a given bit length. In rare cases, there may be >= 256 symbols with a given bit length, causing the unsigned char to overflow. This causes a decompression failure later when the code tries and fails to find the bit length for a given symbol. Since the maximum number of symbols is 258, use unsigned short instead. Fixes: ab77e81f6521 ("x86/dom0: support bzip2 and lzma compressed bzImage payloads") Signed-off-by: Ross Lagerwall Acked-by: Jan Beulich --- xen/common/bunzip2.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xen/common/bunzip2.c b/xen/common/bunzip2.c index 4466426941..79f17162b1 100644 --- a/xen/common/bunzip2.c +++ b/xen/common/bunzip2.c @@ -221,7 +221,8 @@ static int __init get_next_block(struct bunzip_data *bd) RUNB) */ symCount = symTotal+2; for (j = 0; j < groupCount; j++) { - unsigned char length[MAX_SYMBOLS], temp[MAX_HUFCODE_BITS+1]; + unsigned char length[MAX_SYMBOLS]; + unsigned short temp[MAX_HUFCODE_BITS+1]; int minLen, maxLen, pp; /* Read Huffman code lengths for each symbol. They're stored in a way similar to mtf; record a starting -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:02:03 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:02:03 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768642.1179533 (Exim 4.92) (envelope-from ) id 1sZ8xv-0006OT-ST; Wed, 31 Jul 2024 13:02:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768642.1179533; Wed, 31 Jul 2024 13:02:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xv-0006OM-Pw; Wed, 31 Jul 2024 13:02:03 +0000 Received: by outflank-mailman (input) for mailman id 768642; Wed, 31 Jul 2024 13:02:02 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xu-0006O6-Ta for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:02 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8xu-0003gX-Sn for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:02 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8xu-0007WV-S1 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:02 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=eHzxaYPM2CXNvXXsBqB87ZYa3sINNc+rqI+S+4u6Yqg=; b=3ilNlmHQV3MN4xqM6Lxaspfvj4 gWGGeBGj/Odex0Uy9jUaZWd3emnC/4YlmXyd+8qsOPEN/s2uufeuqUEok6YrezyKFOkANzpF3aEyl zC7rqeHvuf/hIZWMmq+O0xh/QZnDk56tR3r++fAtnunBAI1rSD7Sz+ue428GJDADN9rk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] Revert "x86/pvh: Allow (un)map_pirq when dom0 is PVH" Message-Id: Date: Wed, 31 Jul 2024 13:02:02 +0000 commit 90a8f4c7eab05c2323082a367b936d8de1a33071 Author: Andrew Cooper AuthorDate: Tue Jul 30 14:12:53 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 Revert "x86/pvh: Allow (un)map_pirq when dom0 is PVH" This reverts commit e42d107d0d8bfa82c92ec7ed69bac259effc97ad. The Gitlab CI {adl,zen3p}-pci-hvm-x86-64-gcc-debug tests says this breaks PCI Passthrough to HVM guests, with -EOPNOTSUPP. Signed-off-by: Andrew Cooper --- xen/arch/x86/hvm/hypercall.c | 6 ------ xen/arch/x86/physdev.c | 12 ++---------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/xen/arch/x86/hvm/hypercall.c b/xen/arch/x86/hvm/hypercall.c index 83a9b4fb1e..7fb3136f0c 100644 --- a/xen/arch/x86/hvm/hypercall.c +++ b/xen/arch/x86/hvm/hypercall.c @@ -71,14 +71,8 @@ long hvm_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) switch ( cmd ) { - /* - * Only being permitted for management of other domains. - * Further restrictions are enforced in do_physdev_op. - */ case PHYSDEVOP_map_pirq: case PHYSDEVOP_unmap_pirq: - break; - case PHYSDEVOP_eoi: case PHYSDEVOP_irq_status_query: case PHYSDEVOP_get_free_pirq: diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c index 9f30a8c63a..d6dd622952 100644 --- a/xen/arch/x86/physdev.c +++ b/xen/arch/x86/physdev.c @@ -323,11 +323,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) if ( !d ) break; - /* Only mapping when the subject domain has a notion of PIRQ */ - if ( !is_hvm_domain(d) || has_pirq(d) ) - ret = physdev_map_pirq(d, map.type, &map.index, &map.pirq, &msi); - else - ret = -EOPNOTSUPP; + ret = physdev_map_pirq(d, map.type, &map.index, &map.pirq, &msi); rcu_unlock_domain(d); @@ -350,11 +346,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) if ( !d ) break; - /* Only unmapping when the subject domain has a notion of PIRQ */ - if ( !is_hvm_domain(d) || has_pirq(d) ) - ret = physdev_unmap_pirq(d, unmap.pirq); - else - ret = -EOPNOTSUPP; + ret = physdev_unmap_pirq(d, unmap.pirq); rcu_unlock_domain(d); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:02:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:02:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768643.1179537 (Exim 4.92) (envelope-from ) id 1sZ8y5-0006Sg-U9; Wed, 31 Jul 2024 13:02:13 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768643.1179537; Wed, 31 Jul 2024 13:02:13 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8y5-0006SZ-RQ; Wed, 31 Jul 2024 13:02:13 +0000 Received: by outflank-mailman (input) for mailman id 768643; Wed, 31 Jul 2024 13:02:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8y5-0006SJ-09 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8y4-0003gi-Vn for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:12 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8y4-0007Wy-VD for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:12 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=gHCMEwhCNF9v+SziorCgQ4HGGelVC3dStKrMYUUF8BE=; b=0WsZV8gAw6rFtGmPSQUqMjS9Ji Ss0mhVtQ1ic69RHr/wvC+NTngtozCBWBEi/OIfGS/m4VqsoABORmnNZiSUPg/rSQvkc/OpOVq7Nr0 C0ZpnOSCcbdSgDVuzykOPr0N8FqlXHRAdIMd0cCbHu8G5drkHLAt2Wp6B6Vt0ZhRZxAA=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/mm: Drop l{1,2,3,4}e_write_atomic() Message-Id: Date: Wed, 31 Jul 2024 13:02:12 +0000 commit f51571fe7945f8e0d0a8ff8a438e8feb17d96aca Author: Roger Pau Monne AuthorDate: Fri Jul 26 17:21:45 2024 +0200 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 x86/mm: Drop l{1,2,3,4}e_write_atomic() The l{1,2,3,4}e_write_atomic() and non _atomic suffixed helpers share the same implementation, so it seems pointless and possibly confusing to have both. x86 32bit mode used to have a non-atomic PTE write that would split the write in two halves, but with Xen only supporting x86 64bit that's no longer present. Remove the l{1,2,3,4}e_write_atomic() helpers and switch it's user to l{1,2,3,4}e_write(), as that's also atomic. While there also remove pte_write{,_atomic}() and just use write_atomic() in the wrappers. No functional change intended. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/include/asm/page.h | 21 ++++-------------- xen/arch/x86/include/asm/x86_64/page.h | 2 -- xen/arch/x86/mm.c | 39 ++++++++++++++-------------------- 3 files changed, 20 insertions(+), 42 deletions(-) diff --git a/xen/arch/x86/include/asm/page.h b/xen/arch/x86/include/asm/page.h index 350d1fb110..3d20ee507a 100644 --- a/xen/arch/x86/include/asm/page.h +++ b/xen/arch/x86/include/asm/page.h @@ -26,27 +26,14 @@ l4e_from_intpte(pte_read_atomic(&l4e_get_intpte(*(l4ep)))) /* Write a pte atomically to memory. */ -#define l1e_write_atomic(l1ep, l1e) \ - pte_write_atomic(&l1e_get_intpte(*(l1ep)), l1e_get_intpte(l1e)) -#define l2e_write_atomic(l2ep, l2e) \ - pte_write_atomic(&l2e_get_intpte(*(l2ep)), l2e_get_intpte(l2e)) -#define l3e_write_atomic(l3ep, l3e) \ - pte_write_atomic(&l3e_get_intpte(*(l3ep)), l3e_get_intpte(l3e)) -#define l4e_write_atomic(l4ep, l4e) \ - pte_write_atomic(&l4e_get_intpte(*(l4ep)), l4e_get_intpte(l4e)) - -/* - * Write a pte safely but non-atomically to memory. - * The PTE may become temporarily not-present during the update. - */ #define l1e_write(l1ep, l1e) \ - pte_write(&l1e_get_intpte(*(l1ep)), l1e_get_intpte(l1e)) + write_atomic(&l1e_get_intpte(*(l1ep)), l1e_get_intpte(l1e)) #define l2e_write(l2ep, l2e) \ - pte_write(&l2e_get_intpte(*(l2ep)), l2e_get_intpte(l2e)) + write_atomic(&l2e_get_intpte(*(l2ep)), l2e_get_intpte(l2e)) #define l3e_write(l3ep, l3e) \ - pte_write(&l3e_get_intpte(*(l3ep)), l3e_get_intpte(l3e)) + write_atomic(&l3e_get_intpte(*(l3ep)), l3e_get_intpte(l3e)) #define l4e_write(l4ep, l4e) \ - pte_write(&l4e_get_intpte(*(l4ep)), l4e_get_intpte(l4e)) + write_atomic(&l4e_get_intpte(*(l4ep)), l4e_get_intpte(l4e)) /* Get direct integer representation of a pte's contents (intpte_t). */ #define l1e_get_intpte(x) ((x).l1) diff --git a/xen/arch/x86/include/asm/x86_64/page.h b/xen/arch/x86/include/asm/x86_64/page.h index 19ca64d792..03fcce61c0 100644 --- a/xen/arch/x86/include/asm/x86_64/page.h +++ b/xen/arch/x86/include/asm/x86_64/page.h @@ -70,8 +70,6 @@ typedef l4_pgentry_t root_pgentry_t; #endif /* !__ASSEMBLY__ */ #define pte_read_atomic(ptep) read_atomic(ptep) -#define pte_write_atomic(ptep, pte) write_atomic(ptep, pte) -#define pte_write(ptep, pte) write_atomic(ptep, pte) /* Given a virtual address, get an entry offset into a linear page table. */ #define l1_linear_offset(_a) (((_a) & VADDR_MASK) >> L1_PAGETABLE_SHIFT) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 95795567f2..fab2de5fae 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -5253,7 +5253,7 @@ int map_pages_to_xen( !(flags & (_PAGE_PAT | MAP_SMALL_PAGES)) ) { /* 1GB-page mapping. */ - l3e_write_atomic(pl3e, l3e_from_mfn(mfn, l1f_to_lNf(flags))); + l3e_write(pl3e, l3e_from_mfn(mfn, l1f_to_lNf(flags))); if ( (l3e_get_flags(ol3e) & _PAGE_PRESENT) ) { @@ -5353,8 +5353,7 @@ int map_pages_to_xen( if ( (l3e_get_flags(*pl3e) & _PAGE_PRESENT) && (l3e_get_flags(*pl3e) & _PAGE_PSE) ) { - l3e_write_atomic(pl3e, - l3e_from_mfn(l2mfn, __PAGE_HYPERVISOR)); + l3e_write(pl3e, l3e_from_mfn(l2mfn, __PAGE_HYPERVISOR)); l2mfn = INVALID_MFN; } if ( locking ) @@ -5375,7 +5374,7 @@ int map_pages_to_xen( { /* Super-page mapping. */ ol2e = *pl2e; - l2e_write_atomic(pl2e, l2e_from_mfn(mfn, l1f_to_lNf(flags))); + l2e_write(pl2e, l2e_from_mfn(mfn, l1f_to_lNf(flags))); if ( (l2e_get_flags(ol2e) & _PAGE_PRESENT) ) { @@ -5457,8 +5456,7 @@ int map_pages_to_xen( if ( (l2e_get_flags(*pl2e) & _PAGE_PRESENT) && (l2e_get_flags(*pl2e) & _PAGE_PSE) ) { - l2e_write_atomic(pl2e, l2e_from_mfn(l1mfn, - __PAGE_HYPERVISOR)); + l2e_write(pl2e, l2e_from_mfn(l1mfn, __PAGE_HYPERVISOR)); l1mfn = INVALID_MFN; } if ( locking ) @@ -5471,7 +5469,7 @@ int map_pages_to_xen( if ( !pl1e ) pl1e = map_l1t_from_l2e(*pl2e) + l1_table_offset(virt); ol1e = *pl1e; - l1e_write_atomic(pl1e, l1e_from_mfn(mfn, flags)); + l1e_write(pl1e, l1e_from_mfn(mfn, flags)); UNMAP_DOMAIN_PAGE(pl1e); if ( (l1e_get_flags(ol1e) & _PAGE_PRESENT) ) { @@ -5524,8 +5522,7 @@ int map_pages_to_xen( UNMAP_DOMAIN_PAGE(l1t); if ( i == L1_PAGETABLE_ENTRIES ) { - l2e_write_atomic(pl2e, l2e_from_pfn(base_mfn, - l1f_to_lNf(flags))); + l2e_write(pl2e, l2e_from_pfn(base_mfn, l1f_to_lNf(flags))); if ( locking ) spin_unlock(&map_pgdir_lock); flush_area(virt - PAGE_SIZE, @@ -5574,8 +5571,7 @@ int map_pages_to_xen( UNMAP_DOMAIN_PAGE(l2t); if ( i == L2_PAGETABLE_ENTRIES ) { - l3e_write_atomic(pl3e, l3e_from_pfn(base_mfn, - l1f_to_lNf(flags))); + l3e_write(pl3e, l3e_from_pfn(base_mfn, l1f_to_lNf(flags))); if ( locking ) spin_unlock(&map_pgdir_lock); flush_area(virt - PAGE_SIZE, @@ -5674,7 +5670,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) : l3e_from_pfn(l3e_get_pfn(*pl3e), (l3e_get_flags(*pl3e) & ~FLAGS_MASK) | nf); - l3e_write_atomic(pl3e, nl3e); + l3e_write(pl3e, nl3e); v += 1UL << L3_PAGETABLE_SHIFT; continue; } @@ -5696,8 +5692,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) if ( (l3e_get_flags(*pl3e) & _PAGE_PRESENT) && (l3e_get_flags(*pl3e) & _PAGE_PSE) ) { - l3e_write_atomic(pl3e, - l3e_from_mfn(l2mfn, __PAGE_HYPERVISOR)); + l3e_write(pl3e, l3e_from_mfn(l2mfn, __PAGE_HYPERVISOR)); l2mfn = INVALID_MFN; } if ( locking ) @@ -5732,7 +5727,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) : l2e_from_pfn(l2e_get_pfn(*pl2e), (l2e_get_flags(*pl2e) & ~FLAGS_MASK) | nf); - l2e_write_atomic(pl2e, nl2e); + l2e_write(pl2e, nl2e); v += 1UL << L2_PAGETABLE_SHIFT; } else @@ -5755,8 +5750,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) if ( (l2e_get_flags(*pl2e) & _PAGE_PRESENT) && (l2e_get_flags(*pl2e) & _PAGE_PSE) ) { - l2e_write_atomic(pl2e, l2e_from_mfn(l1mfn, - __PAGE_HYPERVISOR)); + l2e_write(pl2e, l2e_from_mfn(l1mfn, __PAGE_HYPERVISOR)); l1mfn = INVALID_MFN; } if ( locking ) @@ -5785,7 +5779,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) : l1e_from_pfn(l1e_get_pfn(*pl1e), (l1e_get_flags(*pl1e) & ~FLAGS_MASK) | nf); - l1e_write_atomic(pl1e, nl1e); + l1e_write(pl1e, nl1e); UNMAP_DOMAIN_PAGE(pl1e); v += PAGE_SIZE; @@ -5824,7 +5818,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) if ( i == L1_PAGETABLE_ENTRIES ) { /* Empty: zap the L2E and free the L1 page. */ - l2e_write_atomic(pl2e, l2e_empty()); + l2e_write(pl2e, l2e_empty()); if ( locking ) spin_unlock(&map_pgdir_lock); flush_area(NULL, FLUSH_TLB_GLOBAL); /* flush before free */ @@ -5868,7 +5862,7 @@ int modify_xen_mappings(unsigned long s, unsigned long e, unsigned int nf) if ( i == L2_PAGETABLE_ENTRIES ) { /* Empty: zap the L3E and free the L2 page. */ - l3e_write_atomic(pl3e, l3e_empty()); + l3e_write(pl3e, l3e_empty()); if ( locking ) spin_unlock(&map_pgdir_lock); flush_area(NULL, FLUSH_TLB_GLOBAL); /* flush before free */ @@ -5940,7 +5934,7 @@ void init_or_livepatch modify_xen_mappings_lite( { ASSERT(IS_ALIGNED(v, 1UL << L2_PAGETABLE_SHIFT)); - l2e_write_atomic(pl2e, l2e_from_intpte((l2e.l2 & ~fm) | flags)); + l2e_write(pl2e, l2e_from_intpte((l2e.l2 & ~fm) | flags)); v += 1UL << L2_PAGETABLE_SHIFT; continue; @@ -5958,8 +5952,7 @@ void init_or_livepatch modify_xen_mappings_lite( ASSERT(l1f & _PAGE_PRESENT); - l1e_write_atomic(pl1e, - l1e_from_intpte((l1e.l1 & ~fm) | flags)); + l1e_write(pl1e, l1e_from_intpte((l1e.l1 & ~fm) | flags)); v += 1UL << L1_PAGETABLE_SHIFT; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:02:24 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:02:24 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768644.1179541 (Exim 4.92) (envelope-from ) id 1sZ8yF-0006YI-Vm; Wed, 31 Jul 2024 13:02:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768644.1179541; Wed, 31 Jul 2024 13:02:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yF-0006YA-T3; Wed, 31 Jul 2024 13:02:23 +0000 Received: by outflank-mailman (input) for mailman id 768644; Wed, 31 Jul 2024 13:02:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yF-0006Xu-3b for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yF-0003h4-2h for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8yF-0007Xe-25 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=PQ284ginnJCyKB0SQUskY+Xweq3WV8oKC9TsTwb9PXk=; b=RSXd133FBBY3YHxU4yvNHU+Wwm J294y3eRABangCuq/jTzJ27TPq4vcg+91c661JUe/V9/dViDklbZsOHTWPdgjjvFwvYvC051YkxMt zUzcA/OjA9xfbQzQ69reEF9u6Qc3UKYxLbAKNAcTDByUMZYp1XKRwxp/vCY19lCNpI64=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/mm: Rename l{1,2,3,4}e_read_atomic() Message-Id: Date: Wed, 31 Jul 2024 13:02:23 +0000 commit 2ba11c33b51d18a480e509876a815b59342ad487 Author: Roger Pau Monne AuthorDate: Fri Jul 26 17:21:46 2024 +0200 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 x86/mm: Rename l{1,2,3,4}e_read_atomic() There's no l{1,2,3,4}e_read() implementation, so drop the _atomic suffix from the read helpers. This allows unifying the naming with the write helpers, which are also atomic but don't have the suffix already: l{1,2,3,4}e_write(). No functional change intended. Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/include/asm/page.h | 16 ++++++++-------- xen/arch/x86/include/asm/x86_64/page.h | 2 -- xen/arch/x86/mm.c | 12 ++++++------ xen/arch/x86/traps.c | 8 ++++---- 4 files changed, 18 insertions(+), 20 deletions(-) diff --git a/xen/arch/x86/include/asm/page.h b/xen/arch/x86/include/asm/page.h index 3d20ee507a..e48571de93 100644 --- a/xen/arch/x86/include/asm/page.h +++ b/xen/arch/x86/include/asm/page.h @@ -16,14 +16,14 @@ #include /* Read a pte atomically from memory. */ -#define l1e_read_atomic(l1ep) \ - l1e_from_intpte(pte_read_atomic(&l1e_get_intpte(*(l1ep)))) -#define l2e_read_atomic(l2ep) \ - l2e_from_intpte(pte_read_atomic(&l2e_get_intpte(*(l2ep)))) -#define l3e_read_atomic(l3ep) \ - l3e_from_intpte(pte_read_atomic(&l3e_get_intpte(*(l3ep)))) -#define l4e_read_atomic(l4ep) \ - l4e_from_intpte(pte_read_atomic(&l4e_get_intpte(*(l4ep)))) +#define l1e_read(l1ep) \ + l1e_from_intpte(read_atomic(&l1e_get_intpte(*(l1ep)))) +#define l2e_read(l2ep) \ + l2e_from_intpte(read_atomic(&l2e_get_intpte(*(l2ep)))) +#define l3e_read(l3ep) \ + l3e_from_intpte(read_atomic(&l3e_get_intpte(*(l3ep)))) +#define l4e_read(l4ep) \ + l4e_from_intpte(read_atomic(&l4e_get_intpte(*(l4ep)))) /* Write a pte atomically to memory. */ #define l1e_write(l1ep, l1e) \ diff --git a/xen/arch/x86/include/asm/x86_64/page.h b/xen/arch/x86/include/asm/x86_64/page.h index 03fcce61c0..465a707312 100644 --- a/xen/arch/x86/include/asm/x86_64/page.h +++ b/xen/arch/x86/include/asm/x86_64/page.h @@ -69,8 +69,6 @@ typedef l4_pgentry_t root_pgentry_t; #endif /* !__ASSEMBLY__ */ -#define pte_read_atomic(ptep) read_atomic(ptep) - /* Given a virtual address, get an entry offset into a linear page table. */ #define l1_linear_offset(_a) (((_a) & VADDR_MASK) >> L1_PAGETABLE_SHIFT) #define l2_linear_offset(_a) (((_a) & VADDR_MASK) >> L2_PAGETABLE_SHIFT) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index fab2de5fae..6ffacab341 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -2147,7 +2147,7 @@ static int mod_l1_entry(l1_pgentry_t *pl1e, l1_pgentry_t nl1e, struct vcpu *pt_vcpu, struct domain *pg_dom) { bool preserve_ad = (cmd == MMU_PT_UPDATE_PRESERVE_AD); - l1_pgentry_t ol1e = l1e_read_atomic(pl1e); + l1_pgentry_t ol1e = l1e_read(pl1e); struct domain *pt_dom = pt_vcpu->domain; int rc = 0; @@ -2270,7 +2270,7 @@ static int mod_l2_entry(l2_pgentry_t *pl2e, return -EPERM; } - ol2e = l2e_read_atomic(pl2e); + ol2e = l2e_read(pl2e); if ( l2e_get_flags(nl2e) & _PAGE_PRESENT ) { @@ -2332,7 +2332,7 @@ static int mod_l3_entry(l3_pgentry_t *pl3e, if ( pgentry_ptr_to_slot(pl3e) >= 3 && is_pv_32bit_domain(d) ) return -EINVAL; - ol3e = l3e_read_atomic(pl3e); + ol3e = l3e_read(pl3e); if ( l3e_get_flags(nl3e) & _PAGE_PRESENT ) { @@ -2394,7 +2394,7 @@ static int mod_l4_entry(l4_pgentry_t *pl4e, return -EINVAL; } - ol4e = l4e_read_atomic(pl4e); + ol4e = l4e_read(pl4e); if ( l4e_get_flags(nl4e) & _PAGE_PRESENT ) { @@ -5925,7 +5925,7 @@ void init_or_livepatch modify_xen_mappings_lite( while ( v < e ) { l2_pgentry_t *pl2e = &l2_xenmap[l2_table_offset(v)]; - l2_pgentry_t l2e = l2e_read_atomic(pl2e); + l2_pgentry_t l2e = l2e_read(pl2e); unsigned int l2f = l2e_get_flags(l2e); ASSERT(l2f & _PAGE_PRESENT); @@ -5947,7 +5947,7 @@ void init_or_livepatch modify_xen_mappings_lite( while ( v < e ) { l1_pgentry_t *pl1e = &pl1t[l1_table_offset(v)]; - l1_pgentry_t l1e = l1e_read_atomic(pl1e); + l1_pgentry_t l1e = l1e_read(pl1e); unsigned int l1f = l1e_get_flags(l1e); ASSERT(l1f & _PAGE_PRESENT); diff --git a/xen/arch/x86/traps.c b/xen/arch/x86/traps.c index 7a9299ae6c..a981b6c2e8 100644 --- a/xen/arch/x86/traps.c +++ b/xen/arch/x86/traps.c @@ -1451,7 +1451,7 @@ static enum pf_type __page_fault_type(unsigned long addr, mfn = cr3 >> PAGE_SHIFT; l4t = map_domain_page(_mfn(mfn)); - l4e = l4e_read_atomic(&l4t[l4_table_offset(addr)]); + l4e = l4e_read(&l4t[l4_table_offset(addr)]); mfn = l4e_get_pfn(l4e); unmap_domain_page(l4t); if ( ((l4e_get_flags(l4e) & required_flags) != required_flags) || @@ -1460,7 +1460,7 @@ static enum pf_type __page_fault_type(unsigned long addr, page_user &= l4e_get_flags(l4e); l3t = map_domain_page(_mfn(mfn)); - l3e = l3e_read_atomic(&l3t[l3_table_offset(addr)]); + l3e = l3e_read(&l3t[l3_table_offset(addr)]); mfn = l3e_get_pfn(l3e); unmap_domain_page(l3t); if ( ((l3e_get_flags(l3e) & required_flags) != required_flags) || @@ -1471,7 +1471,7 @@ static enum pf_type __page_fault_type(unsigned long addr, goto leaf; l2t = map_domain_page(_mfn(mfn)); - l2e = l2e_read_atomic(&l2t[l2_table_offset(addr)]); + l2e = l2e_read(&l2t[l2_table_offset(addr)]); mfn = l2e_get_pfn(l2e); unmap_domain_page(l2t); if ( ((l2e_get_flags(l2e) & required_flags) != required_flags) || @@ -1482,7 +1482,7 @@ static enum pf_type __page_fault_type(unsigned long addr, goto leaf; l1t = map_domain_page(_mfn(mfn)); - l1e = l1e_read_atomic(&l1t[l1_table_offset(addr)]); + l1e = l1e_read(&l1t[l1_table_offset(addr)]); mfn = l1e_get_pfn(l1e); unmap_domain_page(l1t); if ( ((l1e_get_flags(l1e) & required_flags) != required_flags) || -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:02:34 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:02:34 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768645.1179545 (Exim 4.92) (envelope-from ) id 1sZ8yQ-0006cY-2O; Wed, 31 Jul 2024 13:02:34 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768645.1179545; Wed, 31 Jul 2024 13:02:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yP-0006cR-Vs; Wed, 31 Jul 2024 13:02:33 +0000 Received: by outflank-mailman (input) for mailman id 768645; Wed, 31 Jul 2024 13:02:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yP-0006cE-6O for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yP-0003hS-5j for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8yP-0007YC-54 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=0n5Z1UKPe6AZ/T3XU8yFgu7dUYMrz9hgd6ZnX6BzPts=; b=FB7E/EOl8spSnZdpmwk6T/s9Uv VK1hLs/mV9JdifqigTSyOe+WR590PipKkR5Dm+seg6/p8+ONCJaQkXvk6iK+XRRSdX+iIwZgHSvQz 6Q/Fx41K8nUvHt5K8MiwiUy3B4SYcrReNis9yHevppCQpws0NeEvy4/fxoqLMtRBEqUk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/mm: Make virt_to_xen_l1e() static Message-Id: Date: Wed, 31 Jul 2024 13:02:33 +0000 commit 11506df83ae11369ef2299fc7805e18cb71e25c8 Author: Roger Pau Monne AuthorDate: Fri Jul 26 17:21:49 2024 +0200 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 x86/mm: Make virt_to_xen_l1e() static There are no callers outside the translation unit where it's defined, so make the function static. No functional change intended. Signed-off-by: Roger Pau Monné Acked-by: Andrew Cooper --- xen/arch/x86/include/asm/mm.h | 2 -- xen/arch/x86/mm.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/xen/arch/x86/include/asm/mm.h b/xen/arch/x86/include/asm/mm.h index 98b66edaca..b3853ae734 100644 --- a/xen/arch/x86/include/asm/mm.h +++ b/xen/arch/x86/include/asm/mm.h @@ -567,8 +567,6 @@ mfn_t alloc_xen_pagetable(void); void free_xen_pagetable(mfn_t mfn); void *alloc_mapped_pagetable(mfn_t *pmfn); -l1_pgentry_t *virt_to_xen_l1e(unsigned long v); - int __sync_local_execstate(void); /* Arch-specific portion of memory_op hypercall. */ diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 6ffacab341..38e0bfec43 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -5081,7 +5081,7 @@ static l2_pgentry_t *virt_to_xen_l2e(unsigned long v) return map_l2t_from_l3e(l3e) + l2_table_offset(v); } -l1_pgentry_t *virt_to_xen_l1e(unsigned long v) +static l1_pgentry_t *virt_to_xen_l1e(unsigned long v) { l2_pgentry_t *pl2e, l2e; -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:02:44 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:02:44 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768646.1179550 (Exim 4.92) (envelope-from ) id 1sZ8ya-0006fk-4k; Wed, 31 Jul 2024 13:02:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768646.1179550; Wed, 31 Jul 2024 13:02:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8ya-0006fc-1J; Wed, 31 Jul 2024 13:02:44 +0000 Received: by outflank-mailman (input) for mailman id 768646; Wed, 31 Jul 2024 13:02:43 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yZ-0006fT-9R for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:43 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yZ-0003hZ-8l for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:43 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8yZ-0007Yr-83 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:43 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=5boFYrr5MeL2ZKB+LOF8JDT46XW3cRLNcRy5AT6Krw0=; b=ggv5zS0t0Nl6507/hPg3qmpcpn PeMNDq9Oeju6OtxbWUtnQIcg3aXNyo3zA2CntdsfsMRfAxfD9moivJZ3A9meS8NB3SqOZnOWX4thU OrCNlviKO+eIWDADfWyfH2ERMBQrazVjipdY5qJM1GNHAOHXoS4Gu1khFQ7m+rKvLxRw=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/mm: Introduce a local domain variable to write_ptbase() Message-Id: Date: Wed, 31 Jul 2024 13:02:43 +0000 commit 1f2153fc5846683e6142c4405c8817d387ff3eb9 Author: Roger Pau Monne AuthorDate: Fri Jul 26 17:21:50 2024 +0200 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 x86/mm: Introduce a local domain variable to write_ptbase() This reduces the repeated accessing of v->domain. No functional change intended. Signed-off-by: Roger Pau Monné Acked-by: Andrew Cooper --- xen/arch/x86/mm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c index 38e0bfec43..e9c86208b0 100644 --- a/xen/arch/x86/mm.c +++ b/xen/arch/x86/mm.c @@ -517,13 +517,14 @@ void make_cr3(struct vcpu *v, mfn_t mfn) void write_ptbase(struct vcpu *v) { + const struct domain *d = v->domain; struct cpu_info *cpu_info = get_cpu_info(); unsigned long new_cr4; - new_cr4 = (is_pv_vcpu(v) && !is_idle_vcpu(v)) + new_cr4 = (is_pv_domain(d) && !is_idle_domain(d)) ? pv_make_cr4(v) : mmu_cr4_features; - if ( is_pv_vcpu(v) && v->domain->arch.pv.xpti ) + if ( is_pv_domain(d) && d->arch.pv.xpti ) { cpu_info->root_pgt_changed = true; cpu_info->pv_cr3 = __pa(this_cpu(root_pgt)); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:02:54 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:02:54 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768647.1179552 (Exim 4.92) (envelope-from ) id 1sZ8yk-0006iu-5T; Wed, 31 Jul 2024 13:02:54 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768647.1179552; Wed, 31 Jul 2024 13:02:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yk-0006im-2u; Wed, 31 Jul 2024 13:02:54 +0000 Received: by outflank-mailman (input) for mailman id 768647; Wed, 31 Jul 2024 13:02:53 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yj-0006iY-CN for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:53 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yj-0003hh-Ba for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:53 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8yj-0007ZV-Ar for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:02:53 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=LJXP8oBm2Qo5EsaCmTzNWu2siU8c63x5ofLBaPzDVY8=; b=3MS3b5gcJIwvaEoTtEaT5R9YHy n9ckesiX/woJ9a9E2ZrIfjxUpHcKwS30Z36ob7xDIIc2uuV/EnKmUP54EtqWQAcNWh3Au9JMorBh6 f+MMkYI/GZRq0n2boj8SYqzftfly7001nIN7E5dY1J6/fzE+us6cY7sxOqnDkWqQSFM8=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] tools/examples: Remove more obsolete content Message-Id: Date: Wed, 31 Jul 2024 13:02:53 +0000 commit ef0c3e7483569c06c395e044373c9a6a4d2574bb Author: Andrew Cooper AuthorDate: Mon Jul 15 14:17:43 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 tools/examples: Remove more obsolete content xeninfo.pl was introduced in commit 1b0a8bb57e3e ("Added xeninfo.pl, a script for collecting statistics from Xen hosts using the Xen-API") and has been touched exactly twice since to remove hardcoded IP addresses and paths. The configuration files in vnc/* date from when we had a vendered version of Qemu living in the tree. These have never (AFAICT) been wired into the `make install` rule. Signed-off-by: Andrew Cooper Reviewed-by: Anthony PERARD --- tools/examples/vnc/Xservers | 5 - tools/examples/vnc/Xvnc-xen | 53 --------- tools/examples/xeninfo.pl | 284 -------------------------------------------- 3 files changed, 342 deletions(-) diff --git a/tools/examples/vnc/Xservers b/tools/examples/vnc/Xservers deleted file mode 100644 index adc5748be6..0000000000 --- a/tools/examples/vnc/Xservers +++ /dev/null @@ -1,5 +0,0 @@ -# Configuration lines to go in /etc/X11/xdm/Xservers to -# start Xvnc and connect back to a vncviewer in domain-0. -# See 'man xdm' under 'LOCAL SERVER SPECIFICATION' for format details. - -:1 Xvnc local /usr/X11R6/bin/Xvnc-xen :1 \ No newline at end of file diff --git a/tools/examples/vnc/Xvnc-xen b/tools/examples/vnc/Xvnc-xen deleted file mode 100755 index 15058e622d..0000000000 --- a/tools/examples/vnc/Xvnc-xen +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -#============================================================================ -# This script should be installed in /usr/X11R6/bin/Xvnc-xen. -#============================================================================ -# -# Start Xvnc and use vncconnect to connect back to a vncviewer listening in -# domain 0. The host and port to connect to are given by -# -# VNC_VIEWER=: -# -# in the kernel command line (/proc/cmdline). -# -# The '--vnc' option to 'xm create' will start a vncviewer and -# pass its address in VNC_VIEWER for this script to find. -# -# Usage: -# Xvnc-xen [args] -# -# Any arguments are passed to Xvnc. -# -#============================================================================ - -# Prefix for messages. -M="[$(basename $0)]" - -# Usage: vnc_addr -# Print : for the vncviewer given in -# the kernel command line. -vnc_addr () { - sed -n -e "s/.*VNC_VIEWER=\([^ ]*\).*/\1/p" /proc/cmdline -} - -# Usage: vnc_connect -# If a vncviewer address was given on the kernel command line, -# run vncconnect for it. -vnc_connect () { - local addr=$(vnc_addr) - - if [ -n "${addr}" ] ; then - echo "$M Connecting to ${addr}." - vncconnect ${addr} - else - echo "$M No VNC_VIEWER in kernel command line." - echo "$M Create the domain with 'xm create --vnc '." - return 1 - fi -} - -# Start the vnc server. -Xvnc "$@" >/dev/null 2>&1 & - -# Connect back to the viewer in domain-0. -vnc_connect diff --git a/tools/examples/xeninfo.pl b/tools/examples/xeninfo.pl deleted file mode 100644 index 95a15d9595..0000000000 --- a/tools/examples/xeninfo.pl +++ /dev/null @@ -1,284 +0,0 @@ -#!/usr/bin/perl -w - -############################################################################################################# -# # -# Developed by Ingard Mevåg @ Oslo University College, spring 2007 # -# ingard [at] mevaag [dot] no # -# # -# This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 License. # -# To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter # -# to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. # -# # -############################################################################################################# - -use strict; -# http://search.cpan.org/~rjray/RPC-XML-0.59/lib/RPC/XML/Client.pm -require RPC::XML; -require RPC::XML::Client; - -# for debug purposes -#use Data::Dumper; - -##### CONFIG ###### - -my %xenhosts = ("192.0.2.10" => {"port" => "9363"}, - "192.0.2.11" => {"port" => "9363"}, - "192.0.2.12" => {"port" => "9363"}, - "192.0.2.13" => {"port" => "9363"}); - -##### CONFIG END ### - -##### STATIC VARS ##### -my %host_info; - -####################### -sub apiconnect -{ - foreach my $xenhost (keys %xenhosts) - { - my $xen = RPC::XML::Client->new("http://$xenhost:$xenhosts{$xenhost}{'port'}"); - my $session = $xen->simple_request("session.login_with_password", "user",""); - if (! $session) - { - print "Can't connect to $xenhost :(\n"; - $xenhosts{$xenhost} = {'xen' => $xen, 'session' => ""}; - } - else - { - $xenhosts{$xenhost} = {'xen' => $xen, 'session' => $session->{'Value'}}; - print "Connected successfully to $xenhost..\n"; - } - } -} - -sub validate_response -{ - my ($result_ref) = @_; - if ($result_ref->{'Status'} eq "Success") - { - return $result_ref->{'Value'}; - } - else - { - # status = Failure ! -# die ("xmlrpc failed! ErrorDescription: $result_ref->{'ErrorDescription'}[1] -> $result_ref->{'ErrorDescription'}[0]"); - print "xmlrpc failed! ErrorDescription: $result_ref->{'ErrorDescription'}[1] -> $result_ref->{'ErrorDescription'}[0]\n"; - } -} - -sub get_host_cpu_utilisation -{ - my ($xen, $session, $host_name, $host_ref) = @_; - my $host_cpu_ref = validate_response($xen->simple_request("host.get_host_CPUs", $session, $host_ref)); - foreach (@$host_cpu_ref) - { - my $host_cpu_utilisation = validate_response($xen->simple_request("host_cpu.get_utilisation", $session, $_)); - $host_info{$host_name}{'cpus'}{$_} = $host_cpu_utilisation; - print " CPUiNFO: $host_cpu_utilisation\n"; - } -} - -sub get_host_pif_utilisation -{ - my ($xen, $session, $host_name, $host_ref) = @_; - -# This method isnt implemented yet it seems so using PIF.get_all for now.. -# This will break when xen is made cluster aware.. -# my $host_pif_ref = validate_response($xen->simple_request("host.get_PIFs", $session, $host_ref)); - my $host_pif_ref = validate_response($xen->simple_request("PIF.get_all", $session)); - foreach (@$host_pif_ref) - { - my $host_pif_device = validate_response($xen->simple_request("PIF.get_device", $session, $_)); - my $host_pif_metrics_ref = validate_response($xen->simple_request("PIF.get_metrics", $session, $_)); - -# Whats the best solution performancewise? -# Collecting stats from get_records, or pulling individually? - -# my $host_pif_record = validate_response($xen->simple_request("PIF_metrics.get_record", $session, $host_pif_metrics_ref)); -# my $host_pif_io_read = $host_pif_record->{'io_read_kbs'}; -# my $host_pif_io_write = $host_pif_record->{'io_write_kbs'}; - my $host_pif_io_read = validate_response($xen->simple_request("PIF_metrics.get_io_read_kbs", $session, $host_pif_metrics_ref)); - my $host_pif_io_write = validate_response($xen->simple_request("PIF_metrics.get_io_write_kbs", $session, $host_pif_metrics_ref)); - - $host_info{$host_name}{'pifs'}{$host_pif_device} = {'read' => $host_pif_io_read, 'write' => $host_pif_io_write}; - print " PiFiNFO: $host_pif_device READ: $host_pif_io_read - WRITE: $host_pif_io_write\n"; -# $host_info{$host_name}{'pifs'}{$host_pif_device}{'read'} = $host_pif_io_read; -# $host_info{$host_name}{'pifs'}{$host_pif_device}{'write'} = $host_pif_io_write; - } -} - -sub get_host_mem_utilisation -{ - my ($xen, $session, $host_name, $host_ref) = @_; - my $host_metrics_ref = validate_response($xen->simple_request("host.get_metrics", $session, $host_ref)); - my $host_mem_total = validate_response($xen->simple_request("host_metrics.get_memory_total", $session, $host_metrics_ref)) / 1024 / 1024; - my $host_mem_free = validate_response($xen->simple_request("host_metrics.get_memory_free", $session, $host_metrics_ref)) / 1024 / 1024; - $host_info{$host_name}{'memory'} = {'total' => $host_mem_total, 'free' => $host_mem_free}; - print " MEMiNFO: Total: $host_mem_total MB - Free: $host_mem_free MB\n"; -} - -sub get_vm_mem_info -{ - my ($xen, $session, $host_name, $vm_ref, $vm_name_label) = @_; - my $vm_mem_stat_max = validate_response($xen->simple_request("VM.get_memory_static_max",$session,$vm_ref)); - my $vm_mem_stat_min = validate_response($xen->simple_request("VM.get_memory_static_min",$session,$vm_ref)); - my $vm_mem_dyn_max = validate_response($xen->simple_request("VM.get_memory_dynamic_max",$session,$vm_ref)); - my $vm_mem_dyn_min = validate_response($xen->simple_request("VM.get_memory_dynamic_min",$session,$vm_ref)); - - # not implemented yet.. We'll do this at the same time as getting cpu utilisation - # in the get_vm_metrics sub instead.. - #my $vm_metrics_ref = validate_response($xen->simple_request("VM.get_metrics",$session,$vm_ref)); - #my $vm_mem_actual = validate_response($xen->simple_request("VM_metrics.get_memory_actual",$session,$vm_metrics_ref)); - - $host_info{$host_name}{'vms'}{$vm_name_label}{'memory'} = {'static_max' => $vm_mem_stat_max, - 'static_min' => $vm_mem_stat_min, - 'dynamic_max' => $vm_mem_dyn_max, - 'dynamic_min' => $vm_mem_dyn_min}; - - # xm list uses the dynamic min var as far as i can tell.. or? - # Lets print the memactual info instead of this... I'll do that in the get_vm_metrics sub instead.. - # print " |- MEMiNFO: Dynamic Min: $vm_mem_dyn_min - Actually in use: $vm_mem_actual\n"; -} - -sub get_vm_metrics -{ - my ($xen, $session, $host_name, $vm_ref, $vm_name_label) = @_; - my $vm_metrics_ref = validate_response($xen->simple_request("VM.get_metrics",$session,$vm_ref)); - - my %vm_vcpu_utilisation = %{validate_response($xen->simple_request("VM_metrics.get_vcpus_utilisation",$session,$vm_metrics_ref))}; - for my $tempcpu (keys %vm_vcpu_utilisation) - { - print " |- CPUiNFO: $tempcpu - $vm_vcpu_utilisation{$tempcpu}\n"; - $host_info{$host_name}{'vms'}{$vm_name_label}{'vcpus'} = {$tempcpu => $vm_vcpu_utilisation{$tempcpu}}; - } - my $vm_mem_actual = validate_response($xen->simple_request("VM_metrics.get_memory_actual",$session,$vm_metrics_ref)) / 1024 / 1024; - $host_info{$host_name}{'vms'}{$vm_name_label}{'memory'}{'actual'} = "$vm_mem_actual"; - print " |- MEMiNFO: Actually in use: $vm_mem_actual MB\n"; -} - -sub get_vm_vif_utilisation -{ - my ($xen, $session, $host_name, $vm_ref, $vm_name_label) = @_; - my $vm_vifs = validate_response($xen->simple_request("VM.get_VIFs",$session,$vm_ref)); - foreach (@$vm_vifs) - { - my $vif_device = validate_response($xen->simple_request("VIF.get_device",$session,$_)); - my $vif_io_read = validate_response($xen->simple_request("VIF_metrics.get_io_read_kbs", $session, $_)); - my $vif_io_write = validate_response($xen->simple_request("VIF_metrics.get_io_write_kbs", $session, $_)); - $host_info{$host_name}{'vms'}{$vm_name_label}{'vifs'}{$vif_device} = {'read' => $vif_io_read, 'write' => $vif_io_write}; - print " |- ViFiNFO: $vif_device READ: $vif_io_read - WRITE: $vif_io_write\n"; - } -} - -sub get_vm_vbd_utilisation -{ - my ($xen, $session, $host_name, $vm_ref, $vm_name_label) = @_; - my $vm_vbds = validate_response($xen->simple_request("VM.get_VBDs",$session,$vm_ref)); - foreach (@$vm_vbds) - { - my $vbd_device = validate_response($xen->simple_request("VBD.get_device",$session,$_)); - my $vbd_io_read = validate_response($xen->simple_request("VBD_metrics.get_io_read_kbs", $session, $_)); - my $vbd_io_write = validate_response($xen->simple_request("VBD_metrics.get_io_write_kbs", $session, $_)); - $host_info{$host_name}{'vms'}{$vm_name_label}{'vbds'}{$vbd_device} = {'read' => $vbd_io_read, 'write' => $vbd_io_write}; - print " |- VBDiNFO: $vbd_device READ: $vbd_io_read - WRITE: $vbd_io_write\n"; - } -} - - -sub get_vm_type -{ - my ($xen, $session, $host_name, $vm_ref, $vm_name_label) = @_; - # not running response through validate_response() here to stop it from crashing.. - # - # api docs says if this (following) field is set, its a HVM domain. - my $vm_bootloader_results = $xen->simple_request("VM.get_HVM_boot_policy",$session,$vm_ref); - if ("$vm_bootloader_results->{'Status'}" eq "Success") - { - if ("$vm_bootloader_results->{'Value'}" ne "") - { - $host_info{$host_name}{'vms'}{$vm_name_label}{'type'} = "HVM"; - } - else - { - $host_info{$host_name}{'vms'}{$vm_name_label}{'type'} = "PV"; - } - } - else - { - # However, xen 3.0.4 doest support this part of the api, so afaik I can get the difference with: - my $vm_pv_kernel_results = $xen->simple_request("VM.get_PV_kernel",$session,$vm_ref); - # which is something like: - # 'PV_kernel': '/boot/vmlinuz-2.6.18-xen', - # or - # 'PV_kernel': 'hvmloader', - if ("$vm_pv_kernel_results->{'Value'}" =~ m/hvm/i) - { - $host_info{$host_name}{'vms'}{$vm_name_label}{'type'} = "HVM"; - } - else - { - $host_info{$host_name}{'vms'}{$vm_name_label}{'type'} = "PV"; - } - } -} - -sub get_complete_info -{ - my %all_vms; - foreach my $xenhost (sort keys %xenhosts) - { - next unless $xenhosts{$xenhost}{'session'}; - my $xen = $xenhosts{$xenhost}{'xen'}; - my $session = $xenhosts{$xenhost}{'session'}; - print "_______________________\n## $xenhost ##\n-----------------------\n"; - - my $host_ref = validate_response($xen->simple_request("session.get_this_host", $session)); - - my $host_name = validate_response($xen->simple_request("host.get_name_label", $session, $host_ref)); - $xenhosts{$xenhost}{'hostname'} = $host_name; - $host_info{$host_name}{'ip'} = $xenhost; - - get_host_cpu_utilisation($xen, $session, $host_name, $host_ref); - - get_host_mem_utilisation($xen, $session, $host_name, $host_ref); - - get_host_pif_utilisation($xen, $session, $host_name, $host_ref); - - - my $all_vm_refs = validate_response($xen->simple_request("host.get_resident_VMs",$session, $host_ref)); - - foreach my $vm_ref (@$all_vm_refs) - { - my $vm_name_label = validate_response($xen->simple_request("VM.get_name_label",$session,$vm_ref)); - get_vm_type($xen,$session,$host_name,$vm_ref,$vm_name_label); - - my $vm_id = validate_response($xen->simple_request("VM.get_domid",$session,$vm_ref)); - - print "vm: $vm_id\t$vm_name_label\ttype: $host_info{$host_name}{'vms'}->{$vm_name_label}{'type'}\n"; - - # vm_metrics includes both mem_actual & cpu utilisation - # So we'll add all stats found in that class in one go.. - get_vm_metrics($xen,$session,$host_name,$vm_ref,$vm_name_label); -# get_vm_cpu_utilisation($xen,$session,$host_name,$vm_ref,$vm_name_label); - - # all other mem stats are added seperately.. - # This might not be needed at all as xen doesnt have functionality to - # resize mem for a VM atm (afaik) - get_vm_mem_info($xen,$session,$host_name,$vm_ref,$vm_name_label); - - get_vm_vif_utilisation($xen,$session,$host_name,$vm_ref,$vm_name_label); - - get_vm_vbd_utilisation($xen,$session,$host_name,$vm_ref,$vm_name_label); - - $all_vms{$vm_name_label} = "" unless ("$vm_name_label" eq "Domain-0"); - } - print "\n"; - } - # Debug: Uncomment to see the nested datastructure.. - #print Dumper(%host_info); -} - - - -apiconnect(); -get_complete_info(); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:03:05 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:03:05 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768648.1179557 (Exim 4.92) (envelope-from ) id 1sZ8yv-0006ln-7P; Wed, 31 Jul 2024 13:03:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768648.1179557; Wed, 31 Jul 2024 13:03:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yv-0006lf-4c; Wed, 31 Jul 2024 13:03:05 +0000 Received: by outflank-mailman (input) for mailman id 768648; Wed, 31 Jul 2024 13:03:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yt-0006lO-FO for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:03:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8yt-0003i0-Ef for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:03:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8yt-0007aI-Du for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:03:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=BEg/WFH6Fnx3b33sSxFaY+1tauH1oEiVC7PdhP+4brk=; b=wlHDz9vMWFnxr0Pj9YX4Hr/bUK zDuhtyzoQ954nvYWrrFIvmtnGMqmhWqOwNejhl5j5Q5aTHs2Brmh0QI8rx+xSR9ELFa5IsnnP3fAc kZwh7h2iq5AlrwBsBbSRUlhNEiq9Emas/W+t8JpSdcJGwKwyh5SweetLOUmw8dMNqiNc=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] x86/APIC: Drop APIC_BASE and use fix_to_virt() Message-Id: Date: Wed, 31 Jul 2024 13:03:03 +0000 commit cb2cd59d45ef85a08f9bd030501b79c17f6bd5d3 Author: Andrew Cooper AuthorDate: Tue Jul 30 11:54:43 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:36:51 2024 +0100 x86/APIC: Drop APIC_BASE and use fix_to_virt() Right now the apic_mem_*() helpers only compile because sizeof(void *) == sizeof(long long). Switch to using fix_to_virt() which is a void *type. Also adjust the two places where the APIC/IO-APIC virtual address is rendered in a printk(). No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/x86/apic.c | 4 ++-- xen/arch/x86/include/asm/apic.h | 10 +++++++--- xen/arch/x86/include/asm/apicdef.h | 2 -- xen/arch/x86/io_apic.c | 4 ++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 6567af685a..7869c30e83 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -938,8 +938,8 @@ void __init init_apic_mappings(void) apic_phys = mp_lapic_addr; set_fixmap_nocache(FIX_APIC_BASE, apic_phys); - apic_printk(APIC_VERBOSE, "mapped APIC to %08Lx (%08lx)\n", APIC_BASE, - apic_phys); + apic_printk(APIC_VERBOSE, "mapped APIC to %p (%08lx)\n", + fix_to_virt(FIX_APIC_BASE), apic_phys); __next: /* diff --git a/xen/arch/x86/include/asm/apic.h b/xen/arch/x86/include/asm/apic.h index a7798de029..d8eda6df6d 100644 --- a/xen/arch/x86/include/asm/apic.h +++ b/xen/arch/x86/include/asm/apic.h @@ -51,12 +51,16 @@ const struct genapic *apic_x2apic_probe(void); static inline void apic_mem_write(unsigned int reg, uint32_t v) { - *((volatile u32 *)(APIC_BASE+reg)) = v; + volatile uint32_t *addr = fix_to_virt(FIX_APIC_BASE) + reg; + + *addr = v; } -static inline u32 apic_mem_read(unsigned int reg) +static inline uint32_t apic_mem_read(unsigned int reg) { - return *((volatile u32 *)(APIC_BASE+reg)); + const volatile uint32_t *addr = fix_to_virt(FIX_APIC_BASE) + reg; + + return *addr; } /* NOTE: in x2APIC mode, we should use apic_icr_write()/apic_icr_read() to diff --git a/xen/arch/x86/include/asm/apicdef.h b/xen/arch/x86/include/asm/apicdef.h index b0790fad1c..49e29ec801 100644 --- a/xen/arch/x86/include/asm/apicdef.h +++ b/xen/arch/x86/include/asm/apicdef.h @@ -117,8 +117,6 @@ /* Applicable to vectors, TPR, and PPR. */ #define APIC_PRIO_CLASS(v) ((v) & 0xF0) -#define APIC_BASE __fix_to_virt(FIX_APIC_BASE) - #define MAX_IO_APICS 128 extern bool x2apic_enabled; diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 7744b43f24..7727005846 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -2596,8 +2596,8 @@ static void __init ioapic_init_mappings(void) } set_fixmap_nocache(idx, ioapic_phys); - apic_printk(APIC_VERBOSE, "mapped IOAPIC to %08Lx (%08lx)\n", - __fix_to_virt(idx), ioapic_phys); + apic_printk(APIC_VERBOSE, "mapped IOAPIC to %p (%08lx)\n", + fix_to_virt(idx), ioapic_phys); if ( bad_ioapic_register(i) ) { -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:03:15 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:03:15 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768649.1179560 (Exim 4.92) (envelope-from ) id 1sZ8z5-0006os-8Y; Wed, 31 Jul 2024 13:03:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768649.1179560; Wed, 31 Jul 2024 13:03:15 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8z5-0006ok-63; Wed, 31 Jul 2024 13:03:15 +0000 Received: by outflank-mailman (input) for mailman id 768649; Wed, 31 Jul 2024 13:03:13 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8z3-0006oa-IL for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:03:13 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8z3-0003i8-Hi for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:03:13 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8z3-0007bj-H3 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:03:13 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=asvTG6xZodPG+IWQyVumgB9unheEbyLHQfz8+QgFa/A=; b=c/sIbhbtP8SMwBljELsCTbyHuu xEflbm8Y12/IS8niuN1CHBHdPoag+Qs9Qo3mK0dIRL7cknA+gauHRgolCgTUVUJRHWjG4odAU3TDF M5p4WPm9XiyKcdVeZG9yt68rtxK7Qw/PboA7tdFcV474/zqAJwjliVsK3MDdXnDH+jDs=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] XSM/domctl: Fix permission checks on XEN_DOMCTL_createdomain Message-Id: Date: Wed, 31 Jul 2024 13:03:13 +0000 commit ee32b9b29af449d38aad0a1b3a81aaae586f5ea7 Author: Andrew Cooper AuthorDate: Fri Jul 5 12:52:05 2024 +0100 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:42:17 2024 +0100 XSM/domctl: Fix permission checks on XEN_DOMCTL_createdomain The XSM checks for XEN_DOMCTL_createdomain are problematic. There's a split between xsm_domctl() called early, and flask_domain_create() called quite late during domain construction. All XSM implementations except Flask have a simple IS_PRIV check in xsm_domctl(), and operate as expected when an unprivileged domain tries to make a hypercall. Flask however foregoes any action in xsm_domctl() and defers everything, including the simple "is the caller permitted to create a domain" check, to flask_domain_create(). As a consequence, when XSM Flask is active, and irrespective of the policy loaded, all domains irrespective of privilege can: * Mutate the global 'rover' variable, used to track the next free domid. Therefore, all domains can cause a domid wraparound, and combined with a voluntary reboot, choose their own domid. * Cause a reasonable amount of a domain to be constructed before ultimately failing for permission reasons, including the use of settings outside of supported limits. In order to remediate this, pass the ssidref into xsm_domctl() and at least check that the calling domain privileged enough to create domains. Take the opportunity to also fix the sign of the cmd parameter to be unsigned. This issue has not been assigned an XSA, because Flask is experimental and not security supported. Reported-by: Ross Lagerwall Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich Acked-by: Daniel P. Smith --- xen/arch/x86/mm/paging.c | 2 +- xen/common/domctl.c | 4 +++- xen/include/xsm/dummy.h | 2 +- xen/include/xsm/xsm.h | 7 ++++--- xen/xsm/flask/hooks.c | 14 ++++++++++++-- 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/mm/paging.c b/xen/arch/x86/mm/paging.c index bca320fffa..dd47bde5ce 100644 --- a/xen/arch/x86/mm/paging.c +++ b/xen/arch/x86/mm/paging.c @@ -767,7 +767,7 @@ long do_paging_domctl_cont( if ( d == NULL ) return -ESRCH; - ret = xsm_domctl(XSM_OTHER, d, op.cmd); + ret = xsm_domctl(XSM_OTHER, d, op.cmd, 0 /* SSIDref not applicable */); if ( !ret ) { if ( domctl_lock_acquire() ) diff --git a/xen/common/domctl.c b/xen/common/domctl.c index 2c0331bb05..ea16b75910 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -322,7 +322,9 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) break; } - ret = xsm_domctl(XSM_OTHER, d, op->cmd); + ret = xsm_domctl(XSM_OTHER, d, op->cmd, + /* SSIDRef only applicable for cmd == createdomain */ + op->u.createdomain.ssidref); if ( ret ) goto domctl_out_unlock_domonly; diff --git a/xen/include/xsm/dummy.h b/xen/include/xsm/dummy.h index 00d2cbebf2..7956f27a29 100644 --- a/xen/include/xsm/dummy.h +++ b/xen/include/xsm/dummy.h @@ -162,7 +162,7 @@ static XSM_INLINE int cf_check xsm_set_target( } static XSM_INLINE int cf_check xsm_domctl( - XSM_DEFAULT_ARG struct domain *d, int cmd) + XSM_DEFAULT_ARG struct domain *d, unsigned int cmd, uint32_t ssidref) { XSM_ASSERT_ACTION(XSM_OTHER); switch ( cmd ) diff --git a/xen/include/xsm/xsm.h b/xen/include/xsm/xsm.h index 8dad03fd3d..627c0d2731 100644 --- a/xen/include/xsm/xsm.h +++ b/xen/include/xsm/xsm.h @@ -60,7 +60,7 @@ struct xsm_ops { int (*domctl_scheduler_op)(struct domain *d, int op); int (*sysctl_scheduler_op)(int op); int (*set_target)(struct domain *d, struct domain *e); - int (*domctl)(struct domain *d, int cmd); + int (*domctl)(struct domain *d, unsigned int cmd, uint32_t ssidref); int (*sysctl)(int cmd); int (*readconsole)(uint32_t clear); @@ -248,9 +248,10 @@ static inline int xsm_set_target( return alternative_call(xsm_ops.set_target, d, e); } -static inline int xsm_domctl(xsm_default_t def, struct domain *d, int cmd) +static inline int xsm_domctl(xsm_default_t def, struct domain *d, + unsigned int cmd, uint32_t ssidref) { - return alternative_call(xsm_ops.domctl, d, cmd); + return alternative_call(xsm_ops.domctl, d, cmd, ssidref); } static inline int xsm_sysctl(xsm_default_t def, int cmd) diff --git a/xen/xsm/flask/hooks.c b/xen/xsm/flask/hooks.c index 5e88c71b8e..278ad38c2a 100644 --- a/xen/xsm/flask/hooks.c +++ b/xen/xsm/flask/hooks.c @@ -663,12 +663,22 @@ static int cf_check flask_set_target(struct domain *d, struct domain *t) return rc; } -static int cf_check flask_domctl(struct domain *d, int cmd) +static int cf_check flask_domctl(struct domain *d, unsigned int cmd, + uint32_t ssidref) { switch ( cmd ) { - /* These have individual XSM hooks (common/domctl.c) */ case XEN_DOMCTL_createdomain: + /* + * There is a later hook too, but at this early point simply check + * that the calling domain is privileged enough to create a domain. + * + * Note that d is NULL because we haven't even allocated memory for it + * this early in XEN_DOMCTL_createdomain. + */ + return avc_current_has_perm(ssidref, SECCLASS_DOMAIN, DOMAIN__CREATE, NULL); + + /* These have individual XSM hooks (common/domctl.c) */ case XEN_DOMCTL_getdomaininfo: case XEN_DOMCTL_scheduler_op: case XEN_DOMCTL_irq_permission: -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 13:03:25 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:03:25 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768650.1179566 (Exim 4.92) (envelope-from ) id 1sZ8zF-0006rw-CX; Wed, 31 Jul 2024 13:03:25 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768650.1179566; Wed, 31 Jul 2024 13:03:25 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8zF-0006rl-99; Wed, 31 Jul 2024 13:03:25 +0000 Received: by outflank-mailman (input) for mailman id 768650; Wed, 31 Jul 2024 13:03:23 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8zD-0006rY-LB for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:03:23 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8zD-0003iE-KS for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:03:23 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8zD-0007cw-Jn for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:03:23 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=t4Z17Y4ZZyE439zqfIjqaw56SPuvzTcMU3Mk9h07swM=; b=STk6qDR8zo59pqVUqg9KBNexk+ e7xMfNmlloLwi2/D6avBnPrb6G1uNghARMZhAD4PimKujzRU9WozDO1shO0HeNTHgyxauU4HXUkvg W1wCRQ8YLKbnI5aNRf+3ymdziqRv6pFLSyqr49sGNdo+9K7raNVMSgCVlkCFOB0a2bzE=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] automation: upgrade Yocto to scarthgap Message-Id: Date: Wed, 31 Jul 2024 13:03:23 +0000 commit 7234e598185f0fccb89178300354d65e342cc36b Author: Stefano Stabellini AuthorDate: Fri Jul 26 17:19:42 2024 -0700 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:44:41 2024 +0100 automation: upgrade Yocto to scarthgap Upgrade Yocto to a newer version. Use ext4 as image format for testing with QEMU on ARM and ARM64 as the default is WIC and it is not available for our xen-image-minimal target. Also update the tar.bz2 filename for the rootfs. Signed-off-by: Stefano Stabellini Reviewed-by: Marek Marczykowski-Górecki --- automation/build/yocto/build-yocto.sh | 15 ++++++++++++--- automation/build/yocto/yocto.inc | 4 ++-- automation/gitlab-ci/build.yaml | 2 +- automation/scripts/qemu-smoke-dom0-arm32.sh | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/automation/build/yocto/build-yocto.sh b/automation/build/yocto/build-yocto.sh index 93ce81ce82..e1e69f2bb5 100755 --- a/automation/build/yocto/build-yocto.sh +++ b/automation/build/yocto/build-yocto.sh @@ -25,6 +25,7 @@ TARGET_SUPPORTED="qemuarm qemuarm64 qemux86-64" VERBOSE="n" TARGETLIST="" BUILDJOBS="8" +IMAGE_FMT="" # actions to do do_clean="n" @@ -38,8 +39,9 @@ build_result=0 # layers to include in the project build_layerlist="poky/meta poky/meta-poky poky/meta-yocto-bsp \ meta-openembedded/meta-oe meta-openembedded/meta-python \ + meta-openembedded/meta-networking \ meta-openembedded/meta-filesystems \ - meta-openembedded/meta-networking meta-virtualization" + meta-virtualization" # yocto image to build build_image="xen-image-minimal" @@ -175,7 +177,7 @@ function project_build() { mkdir -p $OUTPUTDIR cp $BUILDDIR/tmp/deploy/images/qemuarm/zImage $OUTPUTDIR cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-qemuarm $OUTPUTDIR - cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-image-minimal-qemuarm.tar.bz2 $OUTPUTDIR + cp $BUILDDIR/tmp/deploy/images/qemuarm/xen-image-minimal-qemuarm.rootfs.tar.bz2 $OUTPUTDIR fi fi ) || return 1 @@ -196,7 +198,7 @@ function project_run() { /usr/bin/expect < Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 13:03:35 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768651.1179569 (Exim 4.92) (envelope-from ) id 1sZ8zP-0006ur-DB; Wed, 31 Jul 2024 13:03:35 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768651.1179569; Wed, 31 Jul 2024 13:03:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8zP-0006uk-AZ; Wed, 31 Jul 2024 13:03:35 +0000 Received: by outflank-mailman (input) for mailman id 768651; Wed, 31 Jul 2024 13:03:33 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8zN-0006uY-O1 for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:03:33 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZ8zN-0003id-NM for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:03:33 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZ8zN-0007dd-Mb for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 13:03:33 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=uCrlCaYa2hgic0YMcTLL8mAiUNW/pEOM2PuQGVVac14=; b=axZmwpGpitgMPbDV6C56fWFTGd +Tc9OfqpEoUy15BlGs+MG6NW58xpH7LlfGrVnJkI+CR/wPG/F5hte+yTQfp2F3Rd09IRGLQCCLQKE GWijgnVi0PCYGN68yWJabkSaO14zwXfDPQTElKYQntX8P2Pfx8yW2oFjWXgkkRQDvWVk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen master] libxl: Enable stubdom cdrom changing Message-Id: Date: Wed, 31 Jul 2024 13:03:33 +0000 commit a18b50614d97ecb488479829dcd5ad963bf691e3 Author: Jason Andryuk AuthorDate: Mon Jul 29 11:04:12 2024 -0400 Commit: Andrew Cooper CommitDate: Tue Jul 30 17:51:06 2024 +0100 libxl: Enable stubdom cdrom changing To change the cd-rom medium, libxl will: - QMP eject the medium from QEMU - block-detach the old PV disk - block-attach the new PV disk - QMP change the medium to the new PV disk by fdset-id The QMP code is reused, and remove and attach are implemented here. The stubdom must internally handle adding /dev/xvdc to the appropriate fdset. libxl in dom0 doesn't see the result of adding to the fdset as that is internal to the stubdom, but the fdset's opaque fields will be set to stub-devid:$devid, so libxl can identify it. $devid is common between the stubdom and libxl, so it can be identified on both side. The stubdom will name the device xvdY regardless of the guest name hdY, sdY, or xvdY, but the stubdom will be assigned the same devid facilitating lookup. Because the stubdom add-fd call is asynchronous, libxl needs to poll query-fdsets to identify when add-fd has completed. For cd-eject, we still need to attach the empty vbd. This is necessary since xenstore is used to determine that hdc exists. Otherwise after eject, hdc would be gone and the cd-insert would fail to find the drive to insert new media. Signed-off-by: Jason Andryuk Signed-off-by: Jason Andryuk Reviewed-by: Anthony PERARD --- docs/misc/stubdom.txt | 10 ++ tools/libs/light/libxl_disk.c | 383 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 372 insertions(+), 21 deletions(-) diff --git a/docs/misc/stubdom.txt b/docs/misc/stubdom.txt index c717a95d17..64c220db20 100644 --- a/docs/misc/stubdom.txt +++ b/docs/misc/stubdom.txt @@ -127,6 +127,16 @@ Limitations: - at most 26 emulated disks are supported (more are still available as PV disks) - graphics output (VNC/SDL/Spice) not supported +CD-ROM changing: + +To change the CD-ROM medium, libxl will: + - QMP eject the medium from QEMU + - block-detach the old PV disk + - block-attach the new PV disk + - QMP change the medium to the new PV disk by fdset-id + +The stubdom must internally add /dev/xvdc to an fdset in QEMU with opaque set +to "stub-devid:$devid". libxl will lookup the fdset with that string. PV-GRUB ======= diff --git a/tools/libs/light/libxl_disk.c b/tools/libs/light/libxl_disk.c index 1f1e5c6567..da1d973bf5 100644 --- a/tools/libs/light/libxl_disk.c +++ b/tools/libs/light/libxl_disk.c @@ -829,21 +829,118 @@ int libxl_device_disk_getinfo(libxl_ctx *ctx, uint32_t domid, return rc; } +/* + * Search through the query-fdsets JSON looking for a matching devid. + * + * If found, return the fdset-id integer (>=0). + * + * If not found, return ERROR_NOTFOUND. + * + * On error, return libxl ERROR_*. + */ +static int query_fdsets_find_fdset(libxl__gc *gc, + const libxl__json_object *response, + int devid) +{ + const libxl__json_object *fdset; + const char *needle = GCSPRINTF("stub-devid:%d", devid); + int i, j, rc; + + /* query-fdsets returns: + * [ + * { "fds": [ + * { "fd": 30, + * "opaque": "stub-devid:2080" + * } + * ], + * "fdset-id": 1 + * } + * ] + */ + for (i = 0; (fdset = libxl__json_array_get(response, i)); i++) { + const libxl__json_object *fdset_id; + const libxl__json_object *fds; + const libxl__json_object *fd; + + fdset_id = libxl__json_map_get("fdset-id", fdset, JSON_INTEGER); + if (!fdset_id) { + rc = ERROR_QEMU_API; + goto out; + } + + fds = libxl__json_map_get("fds", fdset, JSON_ARRAY); + if (!fds) { + rc = ERROR_QEMU_API; + goto out; + } + for (j = 0; (fd = libxl__json_array_get(fds, j)); j++) { + const libxl__json_object *fd_num; + const libxl__json_object *opaque; + const char *opaque_str; + + fd_num = libxl__json_map_get("fd", fd, JSON_INTEGER); + if (!fd_num) { + rc = ERROR_QEMU_API; + goto out; + } + opaque = libxl__json_map_get("opaque", fd, JSON_STRING); + if (!opaque) { + continue; + } + + opaque_str = libxl__json_object_get_string(opaque); + if (strcmp(opaque_str, needle) == 0) { + return libxl__json_object_get_integer(fdset_id); + } + } + } + rc = ERROR_NOTFOUND; + + out: + return rc; +} + typedef struct { libxl__ao *ao; + libxl__ao_device aodev; libxl_domid domid; + libxl_domid disk_domid; libxl_device_disk *disk; libxl_device_disk disk_saved; libxl__ev_slowlock qmp_lock; int dm_ver; libxl__ev_time time; + libxl__ev_time retry_timer; libxl__ev_qmp qmp; + int stubdom_fdset; } libxl__cdrom_insert_state; static void cdrom_insert_lock_acquired(libxl__egc *, libxl__ev_slowlock *, int rc); static void cdrom_insert_qmp_connected(libxl__egc *, libxl__ev_qmp *, const libxl__json_object *, int rc); +static void cdrom_insert_stubdom_query_fdset_rm(libxl__egc *egc, + libxl__ev_qmp *qmp, + const libxl__json_object *resp, + int rc); +static void cdrom_insert_stubdom_parse_fdset_rm(libxl__egc *egc, + libxl__ev_qmp *qmp, + const libxl__json_object *resp, + int rc); +static void cdrom_insert_stubdom_ejected(libxl__egc *egc, libxl__ev_qmp *, + const libxl__json_object *, int rc); +static void cdrom_insert_stubdom_disk_remove_cb(libxl__egc *egc, + libxl__ao_device *aodev); +static void cdrom_insert_stubdom_disk_add_cb(libxl__egc *egc, + libxl__ao_device *aodev); +static void cdrom_insert_stubdom_query_fdset(libxl__egc *egc, + libxl__ev_time *ev, + const struct timeval *abs, + int rc); +static void cdrom_insert_stubdom_parse_fdset(libxl__egc *egc, + libxl__ev_qmp *qmp, + const libxl__json_object *response, + int rc); static void cdrom_insert_ejected(libxl__egc *egc, libxl__ev_qmp *, const libxl__json_object *, int rc); static void cdrom_insert_addfd_cb(libxl__egc *egc, libxl__ev_qmp *, @@ -865,6 +962,7 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, libxl_device_disk *disks = NULL; int rc; libxl__cdrom_insert_state *cis; + libxl_domid stubdomid; GCNEW(cis); cis->ao = ao; @@ -876,6 +974,8 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, cis->qmp_lock.ao = ao; cis->qmp_lock.domid = domid; libxl__ev_time_init(&cis->time); + libxl__ev_time_init(&cis->retry_timer); + cis->stubdom_fdset = -1; libxl__ev_qmp_init(&cis->qmp); cis->qmp.ao = ao; cis->qmp.domid = domid; @@ -892,12 +992,6 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, goto out; } - if (libxl_get_stubdom_id(ctx, domid) != 0) { - LOGD(ERROR, domid, "cdrom-insert doesn't work for stub domains"); - rc = ERROR_INVAL; - goto out; - } - cis->dm_ver = libxl__device_model_version_running(gc, domid); if (cis->dm_ver == -1) { LOGD(ERROR, domid, "Cannot determine device model version"); @@ -905,7 +999,22 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, goto out; } - disks = libxl__device_list(gc, &libxl__disk_devtype, domid, &num); + stubdomid = libxl_get_stubdom_id(CTX, cis->domid); + if (stubdomid == 0) { + cis->disk_domid = domid; + } else { + cis->disk_domid = stubdomid; + disk->backend = LIBXL_DISK_BACKEND_PHY; + } + + if (cis->dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL && + stubdomid) { + LOGD(ERROR, domid, "cdrom-insert doesn't work for Mini-OS stubdoms"); + rc = ERROR_INVAL; + goto out; + } + + disks = libxl__device_list(gc, &libxl__disk_devtype, cis->disk_domid, &num); for (i = 0; i < num; i++) { if (disks[i].is_cdrom && !strcmp(disk->vdev, disks[i].vdev)) { @@ -920,7 +1029,7 @@ int libxl_cdrom_insert(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *disk, goto out; } - rc = libxl__device_disk_setdefault(gc, domid, disk, false); + rc = libxl__device_disk_setdefault(gc, cis->disk_domid, disk, false); if (rc) goto out; if (!disk->pdev_path) { @@ -994,7 +1103,12 @@ static void cdrom_insert_qmp_connected(libxl__egc *egc, libxl__ev_qmp *qmp, QMP_PARAMETERS_SPRINTF(&args, "id", "ide-%i", devid); else QMP_PARAMETERS_SPRINTF(&args, "device", "ide-%i", devid); - qmp->callback = cdrom_insert_ejected; + + if (libxl_get_stubdom_id(CTX, cis->domid)) + qmp->callback = cdrom_insert_stubdom_query_fdset_rm; + else + qmp->callback = cdrom_insert_ejected; + rc = libxl__ev_qmp_send(egc, qmp, "eject", args); if (rc) goto out; return; @@ -1002,6 +1116,210 @@ out: cdrom_insert_done(egc, cis, rc); /* must be last */ } +static void cdrom_insert_stubdom_query_fdset_rm(libxl__egc *egc, + libxl__ev_qmp *qmp, + const libxl__json_object *resp, + int rc) +{ + libxl__cdrom_insert_state *cis = CONTAINER_OF(qmp, *cis, qmp); + + if (rc) goto out; + + /* Only called for qemu-xen/linux stubdom. */ + assert(cis->dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN); + + cis->qmp.callback = cdrom_insert_stubdom_parse_fdset_rm; + + rc = libxl__ev_qmp_send(egc, &cis->qmp, "query-fdsets", NULL); + if (rc) goto out; + + return; + + out: + cdrom_insert_done(egc, cis, rc); /* must be last */ +} + +static void cdrom_insert_stubdom_parse_fdset_rm(libxl__egc *egc, + libxl__ev_qmp *qmp, + const libxl__json_object *resp, + int rc) +{ + EGC_GC; + libxl__cdrom_insert_state *cis = CONTAINER_OF(qmp, *cis, qmp); + int devid; + int fdset; + + if (rc) goto out; + + /* Only called for qemu-xen/linux stubdom. */ + assert(cis->dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN); + + devid = libxl__device_disk_dev_number(cis->disk->vdev, NULL, NULL); + fdset = query_fdsets_find_fdset(gc, resp, devid); + if (fdset < 0) { + rc = fdset; + goto out; + } + + LOGD(DEBUG, cis->domid, "Found fdset %d", fdset); + + libxl__json_object *args = NULL; + + libxl__qmp_param_add_integer(gc, &args, "fdset-id", fdset); + + cis->qmp.callback = cdrom_insert_stubdom_ejected; + + rc = libxl__ev_qmp_send(egc, &cis->qmp, "remove-fd", args); + if (rc) goto out; + + return; + + out: + if (rc == ERROR_NOTFOUND) { + LOGD(DEBUG, cis->domid, "No fdset found - skipping remove-fd"); + cdrom_insert_stubdom_ejected(egc, qmp, resp, 0); /* must be last */ + } else { + cdrom_insert_done(egc, cis, rc); /* must be last */ + } +} + + +static void cdrom_insert_stubdom_ejected(libxl__egc *egc, libxl__ev_qmp *qmp, + const libxl__json_object *response, + int rc) +{ + libxl__cdrom_insert_state *cis = CONTAINER_OF(qmp, *cis, qmp); + libxl__device *device; + STATE_AO_GC(cis->ao); + domid_t stubdomid = cis->disk_domid; + + if (rc) goto out; + + GCNEW(device); + rc = libxl__device_from_disk(gc, stubdomid, cis->disk, device); + if (rc) goto out; + + /* stubdom PV block dev eject */ + libxl__prepare_ao_device(ao, &cis->aodev); + cis->aodev.action = LIBXL__DEVICE_ACTION_REMOVE; + cis->aodev.dev = device; + cis->aodev.callback = cdrom_insert_stubdom_disk_remove_cb; + cis->aodev.force.flag = LIBXL__FORCE_OFF; + libxl__initiate_device_generic_remove(egc, &cis->aodev); + return; + + out: + cdrom_insert_done(egc, cis, rc); /* must be last */ +} + +static void cdrom_insert_stubdom_disk_remove_cb(libxl__egc *egc, + libxl__ao_device *aodev) +{ + STATE_AO_GC(aodev->ao); + libxl__cdrom_insert_state *cis = CONTAINER_OF(aodev, *cis, aodev); + domid_t stubdomid = cis->disk_domid; + + if (aodev->rc) { + LOGD(ERROR, aodev->dev->domid, "Unable to remove stubdom PV disk id %u", + aodev->dev->devid); + goto out; + } + + /* block dev insert - this may be inserting an empty disk for eject. */ + libxl__prepare_ao_device(ao, &cis->aodev); + /* set an ao callback to end up in cdrom_insert_ejected */ + cis->aodev.callback = cdrom_insert_stubdom_disk_add_cb; + libxl__device_disk_add(egc, stubdomid, cis->disk, &cis->aodev); + + return; + + out: + cdrom_insert_done(egc, cis, aodev->rc); /* must be last */ +} + +static void cdrom_insert_stubdom_disk_add_cb(libxl__egc *egc, + libxl__ao_device *aodev) +{ + EGC_GC; + libxl__cdrom_insert_state *cis = CONTAINER_OF(aodev, *cis, aodev); + + if (aodev->rc) { + LOGD(ERROR, aodev->dev->domid, "Unable to insert stubdom PV disk id %u", + aodev->dev->devid); + goto out; + } + + cdrom_insert_stubdom_query_fdset(egc, &cis->retry_timer, NULL, + ERROR_TIMEDOUT); + return; + + out: + cdrom_insert_done(egc, cis, aodev->rc); /* must be last */ +} + +static void cdrom_insert_stubdom_query_fdset(libxl__egc *egc, + libxl__ev_time *ev, + const struct timeval *abs, + int rc) +{ + EGC_GC; + libxl__cdrom_insert_state *cis = CONTAINER_OF(ev, *cis, retry_timer); + + if (rc != ERROR_TIMEDOUT) goto out; + + /* Only called for qemu-xen/linux stubdom. */ + assert(cis->dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN); + + cis->qmp.callback = cdrom_insert_stubdom_parse_fdset; + + rc = libxl__ev_qmp_send(egc, &cis->qmp, "query-fdsets", NULL); + if (rc) goto out; + + return; + + out: + cdrom_insert_done(egc, cis, rc); /* must be last */ +} + +static void cdrom_insert_stubdom_parse_fdset(libxl__egc *egc, + libxl__ev_qmp *qmp, + const libxl__json_object *response, + int rc) +{ + EGC_GC; + libxl__cdrom_insert_state *cis = CONTAINER_OF(qmp, *cis, qmp); + int devid; + int fdset; + + if (rc) goto out; + + /* Only called for qemu-xen/linux stubdom. */ + assert(cis->dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN); + + devid = libxl__device_disk_dev_number(cis->disk->vdev, NULL, NULL); + fdset = query_fdsets_find_fdset(gc, response, devid); + if (fdset == ERROR_NOTFOUND) { + /* Give the stubdom a little time before trying again. */ + rc = libxl__ev_time_register_rel(cis->ao, &cis->retry_timer, + cdrom_insert_stubdom_query_fdset, + 200); + if (rc) goto out; + return; + } else if (fdset < 0) { + rc = fdset; + goto out; + } + + cis->stubdom_fdset = fdset; + + LOGD(DEBUG, cis->domid, "Found fdset %d", cis->stubdom_fdset); + cdrom_insert_ejected(egc, &cis->qmp, NULL, rc); + return; + + out: + cdrom_insert_done(egc, cis, rc); /* must be last */ +} + static void cdrom_insert_ejected(libxl__egc *egc, libxl__ev_qmp *qmp, const libxl__json_object *response, @@ -1026,7 +1344,7 @@ static void cdrom_insert_ejected(libxl__egc *egc, if (rc) goto out; - rc = libxl__device_from_disk(gc, domid, disk, &device); + rc = libxl__device_from_disk(gc, cis->disk_domid, disk, &device); if (rc) goto out; be_path = libxl__device_backend_path(gc, &device); libxl_path = libxl__device_libxl_path(gc, &device); @@ -1082,6 +1400,7 @@ static void cdrom_insert_ejected(libxl__egc *egc, if (rc) goto out; if (cis->dm_ver == LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN && + libxl_get_stubdom_id(CTX, cis->domid) == 0 && disk->format != LIBXL_DISK_FORMAT_EMPTY) { libxl__json_object *args = NULL; @@ -1094,7 +1413,7 @@ static void cdrom_insert_ejected(libxl__egc *egc, goto out; } - /* This free form parameter is not use by QEMU or libxl. */ + /* This free form parameter is not used by QEMU or non-stubdom libxl. */ QMP_PARAMETERS_SPRINTF(&args, "opaque", "%s:%s", libxl_disk_format_to_string(disk->format), disk->pdev_path); @@ -1116,7 +1435,15 @@ out: cdrom_insert_done(egc, cis, rc); /* must be last */ } else if (!has_callback) { /* Only called if no asynchronous callback are set. */ - cdrom_insert_inserted(egc, qmp, NULL, 0); /* must be last */ + if (libxl_get_stubdom_id(CTX, cis->domid) && + disk->format != LIBXL_DISK_FORMAT_EMPTY) { + LOGD(DEBUG, cis->domid, + "stubdom %d needs to perform add-fd internally", + libxl_get_stubdom_id(CTX, cis->domid)); + cdrom_insert_addfd_cb(egc, qmp, NULL, 0); /* must be last */ + } else { + cdrom_insert_inserted(egc, qmp, NULL, 0); /* must be last */ + } } } @@ -1135,17 +1462,25 @@ static void cdrom_insert_addfd_cb(libxl__egc *egc, /* convenience aliases */ libxl_device_disk *disk = cis->disk; - close(qmp->payload_fd); + if (qmp->payload_fd >= 0) + { + close(qmp->payload_fd); + } qmp->payload_fd = -1; if (rc) goto out; - o = libxl__json_map_get("fdset-id", response, JSON_INTEGER); - if (!o) { - rc = ERROR_FAIL; - goto out; + /* response non-NULL only for non-stubdom */ + if (cis->stubdom_fdset == -1) { + o = libxl__json_map_get("fdset-id", response, JSON_INTEGER); + if (!o) { + rc = ERROR_FAIL; + goto out; + } + fdset = libxl__json_object_get_integer(o); + } else { + fdset = cis->stubdom_fdset; } - fdset = libxl__json_object_get_integer(o); devid = libxl__device_disk_dev_number(disk->vdev, NULL, NULL); qmp->callback = cdrom_insert_inserted; @@ -1158,8 +1493,13 @@ static void cdrom_insert_addfd_cb(libxl__egc *egc, if (libxl__qmp_ev_qemu_compare_version(qmp, 2, 8, 0) >= 0) { QMP_PARAMETERS_SPRINTF(&args, "id", "ide-%i", devid); QMP_PARAMETERS_SPRINTF(&args, "filename", "/dev/fdset/%d", fdset); - libxl__qmp_param_add_string(gc, &args, "format", - libxl__qemu_disk_format_string(disk->format)); + if (response) { + libxl__qmp_param_add_string(gc, &args, "format", + libxl__qemu_disk_format_string(disk->format)); + } else { + /* Stubdom is using blockdev /dev/xvd* */ + libxl__qmp_param_add_string(gc, &args, "format", "host_device"); + } rc = libxl__ev_qmp_send(egc, qmp, "blockdev-change-medium", args); } else { QMP_PARAMETERS_SPRINTF(&args, "device", "ide-%i", devid); @@ -1196,7 +1536,7 @@ static void cdrom_insert_inserted(libxl__egc *egc, if (rc) goto out; - rc = libxl__device_from_disk(gc, domid, disk, &device); + rc = libxl__device_from_disk(gc, cis->disk_domid, disk, &device); if (rc) goto out; be_path = libxl__device_backend_path(gc, &device); libxl_path = libxl__device_libxl_path(gc, &device); @@ -1281,6 +1621,7 @@ static void cdrom_insert_done(libxl__egc *egc, EGC_GC; libxl__ev_time_deregister(gc, &cis->time); + libxl__ev_time_deregister(gc, &cis->retry_timer); libxl__ev_qmp_dispose(gc, &cis->qmp); if (cis->qmp.payload_fd >= 0) close(cis->qmp.payload_fd); libxl__ev_slowlock_unlock(gc, &cis->qmp_lock); -- generated by git-patchbot for /home/xen/git/xen.git#master From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 14:55:11 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 14:55:11 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768873.1179753 (Exim 4.92) (envelope-from ) id 1sZAjJ-0002el-03; Wed, 31 Jul 2024 14:55:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768873.1179753; Wed, 31 Jul 2024 14:55:04 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZAjI-0002ed-Ta; Wed, 31 Jul 2024 14:55:04 +0000 Received: by outflank-mailman (input) for mailman id 768873; Wed, 31 Jul 2024 14:55:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZAjI-0002eX-4d for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 14:55:04 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZAjH-0005m6-Nc for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 14:55:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZAjH-0007Q8-LD for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 14:55:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=Ws0WG8k6cGdgUpof+vXkYHVeZFmC035wrQgXib7qE60=; b=PQiEJSOyRcnoAsZeYBt9iqk24Z UhejIMg4m4J/mID1oCTr2xpqJxizSvfT09yjDR+KhfCRs1OI5GRjFnQ3p53l/A1fpQP7buTPg6414 FAuhAkPeMCkKu/e1EZT2qlO4crfSQrQomPfDOufh40IZPEOOZXcE3AckOY+PZ3aWa3X0=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/domain: Factor domlist_{insert,remove}() out of domain_{create,destroy}() Message-Id: Date: Wed, 31 Jul 2024 14:55:03 +0000 commit 19995bc70cc6f26e0af84a4a178f971bdcc3ccbe Author: Andrew Cooper AuthorDate: Fri Apr 23 15:02:54 2021 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 31 15:28:43 2024 +0100 xen/domain: Factor domlist_{insert,remove}() out of domain_{create,destroy}() These are opencoded linked list and hashtable manipulations. Factor them out into static inline helpers, and discuss the consequence for the domain. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- xen/common/domain.c | 81 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 25 deletions(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index 2566604738..8d8f40ccb2 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -64,6 +64,58 @@ DEFINE_RCU_READ_LOCK(domlist_read_lock); static struct domain *domain_hash[DOMAIN_HASH_SIZE]; struct domain *domain_list; +/* + * Insert a domain into the domlist/hash. This allows the domain to be looked + * up by domid, and therefore to be the subject of hypercalls/etc. + */ +static void domlist_insert(struct domain *d) +{ + struct domain **pd, *bucket; + + spin_lock(&domlist_update_lock); + + /* domain_list is maintained in domid order. */ + for ( pd = &domain_list; *pd != NULL; pd = &(*pd)->next_in_list ) + if ( (*pd)->domain_id > d->domain_id ) + break; + + bucket = domain_hash[DOMAIN_HASH(d->domain_id)]; + + d->next_in_list = *pd; + d->next_in_hashbucket = bucket; + rcu_assign_pointer(*pd, d); + rcu_assign_pointer(bucket, d); + + spin_unlock(&domlist_update_lock); +} + +/* + * Remove a domain from the domlist/hash. This means the domain can no longer + * be looked up by domid, and therefore can no longer be the subject of + * *subsequent* hypercalls/etc. In-progress hypercalls/etc can still operate + * on the domain. + */ +static void domlist_remove(struct domain *d) +{ + struct domain **pd; + + spin_lock(&domlist_update_lock); + + pd = &domain_list; + while ( *pd != d ) + pd = &(*pd)->next_in_list; + + rcu_assign_pointer(*pd, d->next_in_list); + + pd = &domain_hash[DOMAIN_HASH(d->domain_id)]; + while ( *pd != d ) + pd = &(*pd)->next_in_hashbucket; + + rcu_assign_pointer(*pd, d->next_in_hashbucket); + + spin_unlock(&domlist_update_lock); +} + struct domain *hardware_domain __read_mostly; #ifdef CONFIG_LATE_HWDOM @@ -589,7 +641,7 @@ struct domain *domain_create(domid_t domid, struct xen_domctl_createdomain *config, unsigned int flags) { - struct domain *d, **pd, *old_hwdom = NULL; + struct domain *d, *old_hwdom = NULL; enum { INIT_watchdog = 1u<<1, INIT_evtchn = 1u<<3, INIT_gnttab = 1u<<4, INIT_arch = 1u<<5 }; int err, init_status = 0; @@ -758,17 +810,7 @@ struct domain *domain_create(domid_t domid, * Must not fail beyond this point, as our caller doesn't know whether * the domain has been entered into domain_list or not. */ - - spin_lock(&domlist_update_lock); - pd = &domain_list; /* NB. domain_list maintained in order of domid. */ - for ( pd = &domain_list; *pd != NULL; pd = &(*pd)->next_in_list ) - if ( (*pd)->domain_id > d->domain_id ) - break; - d->next_in_list = *pd; - d->next_in_hashbucket = domain_hash[DOMAIN_HASH(domid)]; - rcu_assign_pointer(*pd, d); - rcu_assign_pointer(domain_hash[DOMAIN_HASH(domid)], d); - spin_unlock(&domlist_update_lock); + domlist_insert(d); memcpy(d->handle, config->handle, sizeof(d->handle)); @@ -1232,8 +1274,6 @@ static void cf_check complete_domain_destroy(struct rcu_head *head) /* Release resources belonging to task @p. */ void domain_destroy(struct domain *d) { - struct domain **pd; - BUG_ON(!d->is_dying); /* May be already destroyed, or get_domain() can race us. */ @@ -1242,17 +1282,8 @@ void domain_destroy(struct domain *d) TRACE_TIME(TRC_DOM0_DOM_REM, d->domain_id); - /* Delete from task list and task hashtable. */ - spin_lock(&domlist_update_lock); - pd = &domain_list; - while ( *pd != d ) - pd = &(*pd)->next_in_list; - rcu_assign_pointer(*pd, d->next_in_list); - pd = &domain_hash[DOMAIN_HASH(d->domain_id)]; - while ( *pd != d ) - pd = &(*pd)->next_in_hashbucket; - rcu_assign_pointer(*pd, d->next_in_hashbucket); - spin_unlock(&domlist_update_lock); + /* Remove from the domlist/hash. */ + domlist_remove(d); /* Schedule RCU asynchronous completion of domain destroy. */ call_rcu(&d->rcu, complete_domain_destroy); -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 15:33:13 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 15:33:13 +0000 Received: from list by lists.xenproject.org with outflank-mailman.768909.1179797 (Exim 4.92) (envelope-from ) id 1sZBK5-0003K5-Fj; Wed, 31 Jul 2024 15:33:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 768909.1179797; Wed, 31 Jul 2024 15:33:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZBK5-0003Jx-D7; Wed, 31 Jul 2024 15:33:05 +0000 Received: by outflank-mailman (input) for mailman id 768909; Wed, 31 Jul 2024 15:33:03 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZBK3-0003Jr-TO for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 15:33:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZBK3-0006QU-Nf for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 15:33:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZBK3-0001s6-Mi for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 15:33:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=FZa2AKSmoN+8CIeqL7A5bRjqr/dckTNZmnFDs++uvNs=; b=bxOdQFPS5KQk06Ge/A7JO+qyD6 bALQomYDgihGeeB3L5Hdd8EbxQadZdAWDPHU7jzw9ovYaJRucsQDcE/OaNmsLMu3I29Ix4nbs3YEC DO4zfTdIsjm8KZMuGQui/HyJQho9UaSMoNRaMKRXisvuinPPdhjcK1aBkj2FHPKHXSwk=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] xen/riscv: fix build issue for bullseye-riscv64 container Message-Id: Date: Wed, 31 Jul 2024 15:33:03 +0000 commit e05e3cedb6dbe50e43b1d6a647c16a47219fde1d Author: Oleksii Kurochko AuthorDate: Wed Jul 31 17:21:49 2024 +0200 Commit: Jan Beulich CommitDate: Wed Jul 31 17:21:49 2024 +0200 xen/riscv: fix build issue for bullseye-riscv64 container Address compilation error on bullseye-riscv64 container: undefined reference to `guest_physmap_remove_page` Since there is no current implementation of `guest_physmap_remove_page()`, a stub function has been added. Reported-by: Andrew Cooper Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich --- xen/arch/riscv/stubs.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/arch/riscv/stubs.c b/xen/arch/riscv/stubs.c index b67d99729f..3285d18899 100644 --- a/xen/arch/riscv/stubs.c +++ b/xen/arch/riscv/stubs.c @@ -381,6 +381,12 @@ int arch_get_paging_mempool_size(struct domain *d, uint64_t *size) BUG_ON("unimplemented"); } +int guest_physmap_remove_page(struct domain *d, gfn_t gfn, mfn_t mfn, + unsigned int page_order) +{ + BUG_ON("unimplemented"); +} + /* delay.c */ void udelay(unsigned long usecs) -- generated by git-patchbot for /home/xen/git/xen.git#staging From xen-changelog-bounces@lists.xenproject.org Wed Jul 31 22:33:14 2024 Return-path: Envelope-to: archives@lists.xen.org Delivery-date: Wed, 31 Jul 2024 22:33:14 +0000 Received: from list by lists.xenproject.org with outflank-mailman.769160.1180044 (Exim 4.92) (envelope-from ) id 1sZHsX-0005ts-1X; Wed, 31 Jul 2024 22:33:05 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 769160.1180044; Wed, 31 Jul 2024 22:33:05 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZHsW-0005tl-VM; Wed, 31 Jul 2024 22:33:04 +0000 Received: by outflank-mailman (input) for mailman id 769160; Wed, 31 Jul 2024 22:33:04 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZHsV-0005tf-Ts for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 22:33:03 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sZHsV-00069W-ID for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 22:33:03 +0000 Received: from xen by xenbits.xenproject.org with local (Exim 4.92) (envelope-from ) id 1sZHsV-0000SD-FE for xen-changelog@lists.xenproject.org; Wed, 31 Jul 2024 22:33:03 +0000 X-BeenThere: xen-changelog@lists.xenproject.org List-Id: "Change log for Mercurial \(receive only\)" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-changelog-bounces@lists.xenproject.org Precedence: list Sender: "Xen-changelog" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From; bh=DuCN+PU+0HOJe9auNfa12DFIA62+IDZZgVR+BMDAnls=; b=2G40H+LlzXMzP6HfRG6ZEckDZo AGOuPAlyE81WUnPg/WhrrzxjYKuBQ7qKPXL1Rd2d60tten1YE49hmFS8m5kfecS9Y12Zmp+RM8Pnk xl/LJJuR7YX+t3E0OYjvXkEWKR4CsY7+wQJ8yU1h/dERTE3mu1H1fqPKJI489ddmk3hQ=; From: patchbot@xen.org To: xen-changelog@lists.xenproject.org Reply-To: xen-devel@lists.xenproject.org Subject: [xen staging] x86/domain: Fix domlist_insert() updating the domain hash Message-Id: Date: Wed, 31 Jul 2024 22:33:03 +0000 commit 36f75d39b38d94a0d17119a4178c08de994ead23 Author: Andrew Cooper AuthorDate: Wed Jul 31 20:05:21 2024 +0100 Commit: Andrew Cooper CommitDate: Wed Jul 31 23:19:42 2024 +0100 x86/domain: Fix domlist_insert() updating the domain hash A last minute review request was to dedup the expression calculating the domain hash bucket. While the code reads correctly, it is buggy because rcu_assign_pointer() is a deeply misleading API assigning by name not value, and - contrary to it's name - does not hide an indirection. Therefore, rcu_assign_pointer(bucket, d); updates the local bucket variable on the stack, not domain_hash[], causing all subsequent domid lookups to fail. Rework the logic to use pd in the same way that domlist_remove() does. Fixes: 19995bc70cc6 ("xen/domain: Factor domlist_{insert,remove}() out of domain_{create,destroy}()") Signed-off-by: Andrew Cooper Reviewed-by: Stefano Stabellini --- xen/common/domain.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index 8d8f40ccb2..92263a4fbd 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -70,7 +70,7 @@ struct domain *domain_list; */ static void domlist_insert(struct domain *d) { - struct domain **pd, *bucket; + struct domain **pd; spin_lock(&domlist_update_lock); @@ -79,12 +79,12 @@ static void domlist_insert(struct domain *d) if ( (*pd)->domain_id > d->domain_id ) break; - bucket = domain_hash[DOMAIN_HASH(d->domain_id)]; - d->next_in_list = *pd; - d->next_in_hashbucket = bucket; rcu_assign_pointer(*pd, d); - rcu_assign_pointer(bucket, d); + + pd = &domain_hash[DOMAIN_HASH(d->domain_id)]; + d->next_in_hashbucket = *pd; + rcu_assign_pointer(*pd, d); spin_unlock(&domlist_update_lock); } -- generated by git-patchbot for /home/xen/git/xen.git#staging