From xen-changelog-bounces@lists.xenproject.org Thu Jan 05 08:44:07 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 05 Jan 2023 08:44:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.471728.731688 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDLr0-0005RY-Hs; Thu, 05 Jan 2023 08:44:02 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 471728.731688; Thu, 05 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDLr0-0005RQ-Em; Thu, 05 Jan 2023 08:44:02 +0000
Received: by outflank-mailman (input) for mailman id 471728;
 Thu, 05 Jan 2023 08:44:01 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLqz-0005RI-O4
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLqz-0003o6-NO
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLqz-0005dy-MQ
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Hf+8cf5S4g2QD+cbjpUfw7n+9fwROvaODqWtj8p+hr0=; b=AdHXKNCrE7SgGFwjV5K/AtBQQY
	S1vP2mNliDsvaEeTC2+aZIetvNH9Y2BsPDBc385cQKZ/FML06AeaUQM4xIuosS/+Aohfh8wm+ptmJ
	dXQ8s1PVtGY0zAXd29seF9LTml16g6wXP+sKzE7kK0tcJIDP3mgAixupJl/dhqdyBRWY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] CI: Drop automation/configs/
Message-Id: <E1pDLqz-0005dy-MQ@xenbits.xenproject.org>
Date: Thu, 05 Jan 2023 08:44:01 +0000

commit 7b20009a812f26e74bdbde2ab96165376b3dad34
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Dec 29 15:39:13 2022 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Jan 4 13:22:59 2023 +0000

    CI: Drop automation/configs/
    
    Having 3 extra hypervisor builds on the end of a full build is deeply
    confusing to debug if one of them fails, because the .config file presented in
    the artefacts is not the one which caused a build failure.  Also, the log
    tends to be truncated in the UI.
    
    PV-only is tested as part of PV-Shim in a full build anyway, so doesn't need
    repeating.  HVM-only and neither appear frequently in randconfig, so drop all
    the logic here to simplify things.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 automation/configs/x86/hvm_only_config  |  3 ---
 automation/configs/x86/no_hvm_pv_config |  3 ---
 automation/configs/x86/pv_only_config   |  3 ---
 automation/scripts/build                | 21 ---------------------
 4 files changed, 30 deletions(-)

diff --git a/automation/configs/x86/hvm_only_config b/automation/configs/x86/hvm_only_config
deleted file mode 100644
index 9efbddd535..0000000000
--- a/automation/configs/x86/hvm_only_config
+++ /dev/null
@@ -1,3 +0,0 @@
-CONFIG_HVM=y
-# CONFIG_PV is not set
-# CONFIG_DEBUG is not set
diff --git a/automation/configs/x86/no_hvm_pv_config b/automation/configs/x86/no_hvm_pv_config
deleted file mode 100644
index 0bf6a8e468..0000000000
--- a/automation/configs/x86/no_hvm_pv_config
+++ /dev/null
@@ -1,3 +0,0 @@
-# CONFIG_HVM is not set
-# CONFIG_PV is not set
-# CONFIG_DEBUG is not set
diff --git a/automation/configs/x86/pv_only_config b/automation/configs/x86/pv_only_config
deleted file mode 100644
index e9d8b4a7c7..0000000000
--- a/automation/configs/x86/pv_only_config
+++ /dev/null
@@ -1,3 +0,0 @@
-CONFIG_PV=y
-# CONFIG_HVM is not set
-# CONFIG_DEBUG is not set
diff --git a/automation/scripts/build b/automation/scripts/build
index a593419063..5dafa72ba5 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -85,24 +85,3 @@ if [[ "${XEN_TARGET_ARCH}" != "x86_32" ]]; then
         cp -r dist binaries/
     fi
 fi
-
-if [[ "${hypervisor_only}" == "y" ]]; then
-    # If we are build testing a specific Kconfig exit now, there's no point in
-    # testing all the possible configs.
-    exit 0
-fi
-
-# Build all the configs we care about
-case ${XEN_TARGET_ARCH} in
-    x86_64) arch=x86 ;;
-    *) exit 0 ;;
-esac
-
-cfg_dir="automation/configs/${arch}"
-for cfg in `ls ${cfg_dir}`; do
-    echo "Building $cfg"
-    make -j$(nproc) -C xen clean
-    rm -f xen/.config
-    make -C xen KBUILD_DEFCONFIG=../../../../${cfg_dir}/${cfg} defconfig
-    make -j$(nproc) -C xen
-done
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Jan 05 08:44:12 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 05 Jan 2023 08:44:12 +0000
Received: from list by lists.xenproject.org with outflank-mailman.471729.731691 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDLrA-0005UE-J2; Thu, 05 Jan 2023 08:44:12 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 471729.731691; Thu, 05 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDLrA-0005U6-GJ; Thu, 05 Jan 2023 08:44:12 +0000
Received: by outflank-mailman (input) for mailman id 471729;
 Thu, 05 Jan 2023 08:44:11 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLr9-0005Tu-RC
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:11 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLr9-0003oA-QN
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLr9-0005eV-PQ
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=cLUSBdl97iUVjJKTLAzdT7+wNI+sEpge70+XVSUpIuc=; b=IMGGW4Ujfp/o28NMHHij2bU0tc
	e7JlRp8i9e28Oj0PoINfLcJ8jvDoNgOc9Zber77otYjMQdaHDa2equafUZhjNwMh6d8YbxHy1uNCb
	G/qT9vDnqlgM5Q6g4I9urVNKG5e8UjnwImgQdZKwQLQZ95/EjX++3wJBkxWSUe5QCNY4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] CI: Remove guesswork about which artefacts to preserve
Message-Id: <E1pDLr9-0005eV-PQ@xenbits.xenproject.org>
Date: Thu, 05 Jan 2023 08:44:11 +0000

commit b67625568448480eaa432d9637431ff7b1f62aa0
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Dec 29 20:01:52 2022 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Jan 4 13:22:59 2023 +0000

    CI: Remove guesswork about which artefacts to preserve
    
    Preserve the artefacts based on the `make` rune we actually ran, rather than
    guesswork about which rune we would have run based on other settings.
    
    Note that the ARM qemu smoke tests depend on finding binaries/xen even from
    full builds.  Also the Jessie-32 containers build tools but not Xen.
    
    This means the x86_32 builds now store relevant artefacts.  No change in other
    configurations.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 automation/scripts/build | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/automation/scripts/build b/automation/scripts/build
index 5dafa72ba5..8dee1cbbc2 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -70,18 +70,24 @@ if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
     cfgargs+=("--with-system-seabios=/bin/false")
 fi
 
+# Directory for the artefacts to be dumped into
+mkdir binaries
+
 if [[ "${hypervisor_only}" == "y" ]]; then
+    # Xen-only build
     make -j$(nproc) xen
+
+    # Preserve artefacts
+    cp xen/xen binaries/xen
 else
+    # Full build
     ./configure "${cfgargs[@]}"
     make -j$(nproc) dist
-fi
 
-# Extract artifacts to avoid getting rewritten by customised builds
-mkdir binaries
-if [[ "${XEN_TARGET_ARCH}" != "x86_32" ]]; then
-    cp xen/xen binaries/xen
-    if [[ "${hypervisor_only}" != "y" ]]; then
-        cp -r dist binaries/
-    fi
+    # Preserve artefacts
+    # Note: Some smoke tests depending on finding binaries/xen on a full build
+    # even though dist/ contains everything, while some containers don't even
+    # build Xen
+    cp -r dist binaries/
+    if [[ -f xen/xen ]] ; then cp xen/xen binaries/xen; fi
 fi
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Jan 05 08:44:22 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 05 Jan 2023 08:44:22 +0000
Received: from list by lists.xenproject.org with outflank-mailman.471732.731695 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDLrK-0005Xu-M0; Thu, 05 Jan 2023 08:44:22 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 471732.731695; Thu, 05 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDLrK-0005Xm-JI; Thu, 05 Jan 2023 08:44:22 +0000
Received: by outflank-mailman (input) for mailman id 471732;
 Thu, 05 Jan 2023 08:44:21 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLrJ-0005Xc-Tv
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:21 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLrJ-0003p2-TF
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:21 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLrJ-0005f0-SL
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:21 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ALJRheQmkFZxLDDc2o8JIzIRDEHzdOMUO9QA8/HZ5/U=; b=an7Jo2AMAsleri7HXWT/XE2bjB
	HiY2kv4tt4mdvyAZoR15On11QyuMNd7k4xDWPC6XmoBLDj5CamYhe+F68ciqCJ5piMaMsEDMmUZGB
	3nEoco6QzAXmNYu83Lod+N53KGUkxN25+A2xdRyBakzt/nov29X1s7Bcyfz3FTknAX64=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] CI: Only calculate ./configure args if needed
Message-Id: <E1pDLrJ-0005f0-SL@xenbits.xenproject.org>
Date: Thu, 05 Jan 2023 08:44:21 +0000

commit 2eb750242101f0b9c17688a09825ba6befbab113
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Dec 29 20:05:33 2022 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Jan 4 13:22:59 2023 +0000

    CI: Only calculate ./configure args if needed
    
    This is purely code motion of the cfgargs construction, into the case where it
    is used.
    
    No practical change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 automation/scripts/build | 63 ++++++++++++++++++++++++------------------------
 1 file changed, 31 insertions(+), 32 deletions(-)

diff --git a/automation/scripts/build b/automation/scripts/build
index 8dee1cbbc2..f2301d0878 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -39,37 +39,6 @@ if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then
     hypervisor_only="y"
 fi
 
-# build up our configure options
-cfgargs=()
-cfgargs+=("--enable-docs")
-
-if [[ "${CC}" == "clang"* ]]; then
-    # SeaBIOS cannot be built with clang
-    cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
-    # iPXE cannot be built with clang
-    cfgargs+=("--with-system-ipxe=/usr/lib/ipxe/ipxe.pxe")
-    # newlib cannot be built with clang so we cannot build stubdoms
-    cfgargs+=("--disable-stubdom")
-fi
-
-if ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then
-    # disable --disable-werror for QEMUU when building with MUSL
-    cfgargs+=("--with-extra-qemuu-configure-args=\"--disable-werror\"")
-    # SeaBIOS doesn't build on MUSL systems
-    cfgargs+=("--with-system-seabios=/bin/false")
-fi
-
-# Qemu requires Python 3.5 or later, and ninja
-if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); exit(not(res))" \
-        || ! type ninja; then
-    cfgargs+=("--with-system-qemu=/bin/false")
-fi
-
-# SeaBIOS requires GCC 4.6 or later
-if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
-    cfgargs+=("--with-system-seabios=/bin/false")
-fi
-
 # Directory for the artefacts to be dumped into
 mkdir binaries
 
@@ -80,7 +49,37 @@ if [[ "${hypervisor_only}" == "y" ]]; then
     # Preserve artefacts
     cp xen/xen binaries/xen
 else
-    # Full build
+    # Full build.  Figure out our ./configure options
+    cfgargs=()
+    cfgargs+=("--enable-docs")
+
+    if [[ "${CC}" == "clang"* ]]; then
+        # SeaBIOS cannot be built with clang
+        cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
+        # iPXE cannot be built with clang
+        cfgargs+=("--with-system-ipxe=/usr/lib/ipxe/ipxe.pxe")
+        # newlib cannot be built with clang so we cannot build stubdoms
+        cfgargs+=("--disable-stubdom")
+    fi
+
+    if  ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then
+        # disable --disable-werror for QEMUU when building with MUSL
+        cfgargs+=("--with-extra-qemuu-configure-args=\"--disable-werror\"")
+        # SeaBIOS doesn't build on MUSL systems
+        cfgargs+=("--with-system-seabios=/bin/false")
+    fi
+
+    # Qemu requires Python 3.5 or later, and ninja
+    if ! type python3 || python3 -c "import sys; res = sys.version_info < (3, 5); exit(not(res))" \
+            || ! type ninja; then
+        cfgargs+=("--with-system-qemu=/bin/false")
+    fi
+
+    # SeaBIOS requires GCC 4.6 or later
+    if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
+        cfgargs+=("--with-system-seabios=/bin/false")
+    fi
+
     ./configure "${cfgargs[@]}"
     make -j$(nproc) dist
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Jan 05 08:44:32 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 05 Jan 2023 08:44:32 +0000
Received: from list by lists.xenproject.org with outflank-mailman.471733.731699 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDLrU-0005aS-Na; Thu, 05 Jan 2023 08:44:32 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 471733.731699; Thu, 05 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDLrU-0005aK-Kq; Thu, 05 Jan 2023 08:44:32 +0000
Received: by outflank-mailman (input) for mailman id 471733;
 Thu, 05 Jan 2023 08:44:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLrU-0005a9-0e
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLrT-0003pF-WE
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLrT-0005fV-VG
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:31 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=VJut4ZSPDBJX57Iqpwazn8AARD614Jl4tbW3ezTmpig=; b=uGWVBPNchrCbWTCQQolzE1eRBy
	HkcmBpYb9scLkfuOUMON1A0ii4j2qGqRgetdUnGE5YZWxPHJI0Q8YUhCqhQPGBdvR+hhjzk5Kx9Fj
	YFQe1/2OM+Ius2Z4VgxMfK8hYzUGs9b27i7pDddn9SH/Ml3lL8U4+juIih5y1qGtEN8E=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] CI: Express HYPERVISOR_ONLY in build.yml
Message-Id: <E1pDLrT-0005fV-VG@xenbits.xenproject.org>
Date: Thu, 05 Jan 2023 08:44:31 +0000

commit d329ca6baf51b229f866af2542cfdc0d5f5a4c2c
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Dec 29 15:52:50 2022 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Jan 4 13:22:59 2023 +0000

    CI: Express HYPERVISOR_ONLY in build.yml
    
    Whether to build only Xen, or everything, is a property of container,
    toolchain and/or testcase.  It is not a property of XEN_TARGET_ARCH.
    
    Capitalise HYPERVISOR_ONLY and have it set by all the
    debian-unstable-gcc-arm32-* testcases at the point that arm32 get matched with
    a container that can only build Xen.
    
    To reduce the churn elsewhere, retain the RANDCONFIG implies HYPERVISOR_ONLY
    property.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 automation/gitlab-ci/build.yaml |  4 ++++
 automation/scripts/build        | 11 ++++-------
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index 93d9ff69a9..43dbef8aba 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -516,22 +516,26 @@ debian-unstable-gcc-arm32:
   extends: .gcc-arm32-cross-build
   variables:
     CONTAINER: debian:unstable-arm32-gcc
+    HYPERVISOR_ONLY: y
 
 debian-unstable-gcc-arm32-debug:
   extends: .gcc-arm32-cross-build-debug
   variables:
     CONTAINER: debian:unstable-arm32-gcc
+    HYPERVISOR_ONLY: y
 
 debian-unstable-gcc-arm32-randconfig:
   extends: .gcc-arm32-cross-build
   variables:
     CONTAINER: debian:unstable-arm32-gcc
+    HYPERVISOR_ONLY: y
     RANDCONFIG: y
 
 debian-unstable-gcc-arm32-debug-randconfig:
   extends: .gcc-arm32-cross-build-debug
   variables:
     CONTAINER: debian:unstable-arm32-gcc
+    HYPERVISOR_ONLY: y
     RANDCONFIG: y
 
 # Arm builds
diff --git a/automation/scripts/build b/automation/scripts/build
index f2301d0878..4c6d1f3b70 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -19,7 +19,9 @@ if [[ "${RANDCONFIG}" == "y" ]]; then
     fi
 
     make -j$(nproc) -C xen KCONFIG_ALLCONFIG=tools/kconfig/allrandom.config randconfig
-    hypervisor_only="y"
+
+    # RANDCONFIG implies HYPERVISOR_ONLY
+    HYPERVISOR_ONLY="y"
 else
     echo "CONFIG_DEBUG=${debug}" > xen/.config
 
@@ -34,15 +36,10 @@ fi
 # to exit early -- bash is invoked with -e.
 cp xen/.config xen-config
 
-# arm32 only cross-compiles the hypervisor
-if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then
-    hypervisor_only="y"
-fi
-
 # Directory for the artefacts to be dumped into
 mkdir binaries
 
-if [[ "${hypervisor_only}" == "y" ]]; then
+if [[ "${HYPERVISOR_ONLY}" == "y" ]]; then
     # Xen-only build
     make -j$(nproc) xen
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Jan 05 08:44:43 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 05 Jan 2023 08:44:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.471734.731703 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDLre-0005cr-P4; Thu, 05 Jan 2023 08:44:42 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 471734.731703; Thu, 05 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDLre-0005cj-MH; Thu, 05 Jan 2023 08:44:42 +0000
Received: by outflank-mailman (input) for mailman id 471734;
 Thu, 05 Jan 2023 08:44:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLre-0005cZ-3c
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLre-0003pU-2z
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLre-0005g1-22
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=8vuco/u6zcd37r7bnlkgNowGHoYQkpArnbfnp3DfbSo=; b=JG3h0Ar4YMf1cOkoLgcZeAXetD
	nkmQkkZkKeKko7R5FLBRceHXoTHZA8T3LNyA1q1LaYkNmKql7mG5ADKaqoJqidaVPjbZrjNm+tE27
	61KGHUlqtoAalACCxZrtXWtc5k5b56T4UBByl3yNpZZyoDhpmpJr7CgNt/KSbY7yWCIw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] CI: Fix build script when CROSS_COMPILE is in use
Message-Id: <E1pDLre-0005g1-22@xenbits.xenproject.org>
Date: Thu, 05 Jan 2023 08:44:42 +0000

commit df57a2c8da7acb14f3feac823f2fcbeef56899b2
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Dec 29 21:46:50 2022 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Jan 4 13:22:59 2023 +0000

    CI: Fix build script when CROSS_COMPILE is in use
    
    Some testcases use a cross compiler.  Presently it's only arm32 and due to
    previous cleanup the only thing which is now wrong is printing the compiler
    version at the start of day.
    
    Construct $cc to match what `make` will eventually choose given CROSS_COMPILE,
    taking care not to modify $CC.  Use $cc throughout the rest of the script.
    
    Also correct the compiler detection logic.  Plain "gcc" was wrong, and
    "clang"* was a bodge highlighting the issue, but neither survive the
    CROSS_COMPILE correction.  Instead, construct cc_is_{gcc,clang} booleans like
    we do elsewhere in the build system, by querying the --version text for gcc or
    clang.
    
    While making this change, adjust cc_ver to be calculated once at the same time
    as cc_is_* are calculated.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 automation/scripts/build | 22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/automation/scripts/build b/automation/scripts/build
index 4c6d1f3b70..206312ecc7 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -2,13 +2,12 @@
 
 test -f /etc/os-release && cat "$_"
 
-$CC --version
+# Construct $cc such that it matches what `make` will chose when taking
+# CROSS_COMPILE into account.  Do not modify $CC directly, as that will cause
+# `make` to double-account CROSS_COMPILE.
+cc="${CROSS_COMPILE}${CC}"
 
-# Express the compiler version as an integer.  e.g. GCC 4.9.2 => 0x040902
-cc-ver()
-{
-    $CC -dumpversion | awk -F. '{ printf "0x%02x%02x%02x", $1, $2, $3 }'
-}
+$cc --version
 
 # random config or default config
 if [[ "${RANDCONFIG}" == "y" ]]; then
@@ -50,7 +49,14 @@ else
     cfgargs=()
     cfgargs+=("--enable-docs")
 
-    if [[ "${CC}" == "clang"* ]]; then
+    # booleans for which compiler is in use
+    cc_is_gcc="$($cc --version | grep -q gcc && echo "y" || :)"
+    cc_is_clang="$($cc --version | grep -q clang && echo "y" || :)"
+
+    # The compiler version as an integer.  e.g. GCC 4.9.2 => 0x040902
+    cc_ver="$($cc -dumpversion | awk -F. '{ printf "0x%02x%02x%02x", $1, $2, $3 }')"
+
+    if [[ "${cc_is_clang}" == "y" ]]; then
         # SeaBIOS cannot be built with clang
         cfgargs+=("--with-system-seabios=/usr/share/seabios/bios.bin")
         # iPXE cannot be built with clang
@@ -73,7 +79,7 @@ else
     fi
 
     # SeaBIOS requires GCC 4.6 or later
-    if [[ "${CC}" == "gcc" && `cc-ver` -lt 0x040600 ]]; then
+    if [[ "${cc_is_gcc}" == "y" && "${cc_ver}" -lt 0x040600 ]]; then
         cfgargs+=("--with-system-seabios=/bin/false")
     fi
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Jan 05 08:44:53 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 05 Jan 2023 08:44:53 +0000
Received: from list by lists.xenproject.org with outflank-mailman.471735.731707 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDLro-0005fW-QY; Thu, 05 Jan 2023 08:44:52 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 471735.731707; Thu, 05 Jan 2023 08:44:52 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDLro-0005fO-Nm; Thu, 05 Jan 2023 08:44:52 +0000
Received: by outflank-mailman (input) for mailman id 471735;
 Thu, 05 Jan 2023 08:44:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLro-0005fH-85
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLro-0003pf-5v
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDLro-0005gS-51
 for xen-changelog@lists.xenproject.org; Thu, 05 Jan 2023 08:44:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=GPyMw/jQ059TLY0XACXyxbaflzEKs8NaU18Fr5NCUns=; b=w6x44Hf1vCl2LfyuMq10xfeNP0
	Iqk95X9VabikSKocrLPOGNS4ZrM9eqJhArCjc4Dsi64gRTXLl2zUq3nIAdnTc1KKvWNUH8JmAMeJu
	H+3jok0geuodhS2bbov2GNzVQAQJ+TcSBHofEFEVFDBcfQ2qJsiKRqOpkhPvzR4JgZj0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] CI: Simplify the MUSL check
Message-Id: <E1pDLro-0005gS-51@xenbits.xenproject.org>
Date: Thu, 05 Jan 2023 08:44:52 +0000

commit c1df06afe578f698ebe91a1e3817463b9d165123
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Dec 29 22:19:40 2022 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Jan 4 13:22:59 2023 +0000

    CI: Simplify the MUSL check
    
    There's no need to do ad-hoc string parsing.  Use grep -q instead.
    
    No functional change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 automation/scripts/build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/automation/scripts/build b/automation/scripts/build
index 206312ecc7..f2f5e55bc0 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -65,7 +65,7 @@ else
         cfgargs+=("--disable-stubdom")
     fi
 
-    if  ! test -z "$(ldd /bin/ls|grep musl|head -1)"; then
+    if ldd /bin/ls | grep -q musl; then
         # disable --disable-werror for QEMUU when building with MUSL
         cfgargs+=("--with-extra-qemuu-configure-args=\"--disable-werror\"")
         # SeaBIOS doesn't build on MUSL systems
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 06 08:33:11 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 06 Jan 2023 08:33:11 +0000
Received: from list by lists.xenproject.org with outflank-mailman.472374.732563 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDi9v-0007Ko-Lz; Fri, 06 Jan 2023 08:33:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 472374.732563; Fri, 06 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDi9v-0007Kg-Ip; Fri, 06 Jan 2023 08:33:03 +0000
Received: by outflank-mailman (input) for mailman id 472374;
 Fri, 06 Jan 2023 08:33:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDi9u-0007KU-Az
 for xen-changelog@lists.xenproject.org; Fri, 06 Jan 2023 08:33:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDi9u-0000uQ-8P
 for xen-changelog@lists.xenproject.org; Fri, 06 Jan 2023 08:33:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDi9u-0005O9-7M
 for xen-changelog@lists.xenproject.org; Fri, 06 Jan 2023 08:33:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Enq4zPKTt/Fi25kMSkePPG32Oad7vyzuz0s+Hx/5YyE=; b=GGpxIjixUnXDuGYAKk5OjknDII
	Q4Iy5gGrPfrFCby8OHWlSxRf1/h4qb6ieOqJaC72LTQKfYwmB+yr/+ga4DYxODvIqkCeyWz896XGK
	bBg8WkYw2mMDZSOPzt/HIkIfsT8MPUlpZyaehVsRFJtS4gjsB2I4dPis8URYj0D+B73U=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/mm: avoid hard-coding PAT in get_page_from_l1e()
Message-Id: <E1pDi9u-0005O9-7M@xenbits.xenproject.org>
Date: Fri, 06 Jan 2023 08:33:02 +0000

commit 40b05620e24a936ad03c21c6fba4d48202c5f0d4
Author:     Demi Marie Obenour <demi@invisiblethingslab.com>
AuthorDate: Thu Jan 5 16:19:43 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 5 16:19:43 2023 +0100

    x86/mm: avoid hard-coding PAT in get_page_from_l1e()
    
    get_page_from_l1e() relied on Xen's choice of PAT, which is brittle in
    the face of future PAT changes.  Instead, compute the actual cacheability
    used by the CPU and switch on that, as this will work no matter what PAT
    Xen uses.
    
    No functional change intended.  This code is itself questionable and may
    be removed in the future, but removing it would be an observable
    behavior change and so is out of scope for this patch series.
    
    Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/mm.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 8fa29d5c8b..0fe14faa5f 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -956,14 +956,17 @@ get_page_from_l1e(
             flip = _PAGE_RW;
         }
 
-        switch ( l1f & PAGE_CACHE_ATTRS )
+        switch ( 0xFF & (XEN_MSR_PAT >> (8 * pte_flags_to_cacheattr(l1f))) )
         {
-        case 0: /* WB */
-            flip |= _PAGE_PWT | _PAGE_PCD;
+        case X86_MT_UC:
+        case X86_MT_UCM:
+        case X86_MT_WC:
+            /* not cacheable, allow */
             break;
-        case _PAGE_PWT: /* WT */
-        case _PAGE_PWT | _PAGE_PAT: /* WP */
-            flip |= _PAGE_PCD | (l1f & _PAGE_PAT);
+
+        default:
+            /* potentially cacheable, force to UC */
+            flip |= ((l1f & PAGE_CACHE_ATTRS) ^ _PAGE_UC);
             break;
         }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 06 08:33:13 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 06 Jan 2023 08:33:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.472375.732567 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDiA5-0007MW-N9; Fri, 06 Jan 2023 08:33:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 472375.732567; Fri, 06 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDiA5-0007MP-Kb; Fri, 06 Jan 2023 08:33:13 +0000
Received: by outflank-mailman (input) for mailman id 472375;
 Fri, 06 Jan 2023 08:33:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDiA4-0007MB-Cq
 for xen-changelog@lists.xenproject.org; Fri, 06 Jan 2023 08:33:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDiA4-0000uU-Bx
 for xen-changelog@lists.xenproject.org; Fri, 06 Jan 2023 08:33:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDiA4-0005OY-Ae
 for xen-changelog@lists.xenproject.org; Fri, 06 Jan 2023 08:33:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=DpUSmK2MUqUsUzaarpbHHRey99WjPg1HYJo6ZRzf3kc=; b=QtwNyGs5JJLjRzI6P8UIxSwQVd
	/TIacOpMNlAtv7/ZJ/jFpcXiAya5IVupC6N1IVhyoXxP+tEoK26UdDzgBsyKG45O0NKWlZe46nfew
	nDnvQDWw1mXAa845bxer9IPIlmVoefFFklLjFtaPM8amOI4Ky5OP7NBV9q8EzqZ/Dz7s=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] hvmloader: use memory type constants
Message-Id: <E1pDiA4-0005OY-Ae@xenbits.xenproject.org>
Date: Fri, 06 Jan 2023 08:33:12 +0000

commit 671f50ffab3329c5497208da89620322b9721a77
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Jan 5 16:21:13 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 5 16:21:13 2023 +0100

    hvmloader: use memory type constants
    
    Now that we have them available in a header which is okay to use from
    hvmloader sources, do away with respective literal numbers and silent
    assumptions.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper@citrix.com>
---
 tools/firmware/hvmloader/cacheattr.c | 19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/tools/firmware/hvmloader/cacheattr.c b/tools/firmware/hvmloader/cacheattr.c
index 1c67819748..b7215fba2e 100644
--- a/tools/firmware/hvmloader/cacheattr.c
+++ b/tools/firmware/hvmloader/cacheattr.c
@@ -22,6 +22,8 @@
 #include "util.h"
 #include "config.h"
 
+#include <xen/asm/x86-defns.h>
+
 #define MSR_MTRRphysBase(reg) (0x200 + 2 * (reg))
 #define MSR_MTRRphysMask(reg) (0x200 + 2 * (reg) + 1)
 #define MSR_MTRRcap          0x00fe
@@ -71,23 +73,28 @@ void cacheattr_init(void)
 
     addr_mask = ((1ull << phys_bits) - 1) & ~((1ull << 12) - 1);
     mtrr_cap = rdmsr(MSR_MTRRcap);
-    mtrr_def = (1u << 11) | 6; /* E, default type WB */
+    mtrr_def = (1u << 11) | X86_MT_WB; /* E, default type WB */
 
     /* Fixed-range MTRRs supported? */
     if ( mtrr_cap & (1u << 8) )
     {
+#define BCST(mt) ((mt) * 0x0101010101010101ULL)
         /* 0x00000-0x9ffff: Write Back (WB) */
-        content = 0x0606060606060606ull;
+        content = BCST(X86_MT_WB);
         wrmsr(MSR_MTRRfix64K_00000, content);
         wrmsr(MSR_MTRRfix16K_80000, content);
+
         /* 0xa0000-0xbffff: Write Combining (WC) */
         if ( mtrr_cap & (1u << 10) ) /* WC supported? */
-            content = 0x0101010101010101ull;
+            content = BCST(X86_MT_WC);
         wrmsr(MSR_MTRRfix16K_A0000, content);
+
         /* 0xc0000-0xfffff: Write Back (WB) */
-        content = 0x0606060606060606ull;
+        content = BCST(X86_MT_WB);
         for ( i = 0; i < 8; i++ )
             wrmsr(MSR_MTRRfix4K_C0000 + i, content);
+#undef BCST
+
         mtrr_def |= 1u << 10; /* FE */
         printf("fixed MTRRs ... ");
     }
@@ -106,7 +113,7 @@ void cacheattr_init(void)
             while ( ((base + size) < base) || ((base + size) > pci_mem_end) )
                 size >>= 1;
 
-            wrmsr(MSR_MTRRphysBase(i), base);
+            wrmsr(MSR_MTRRphysBase(i), base | X86_MT_UC);
             wrmsr(MSR_MTRRphysMask(i), (~(size - 1) & addr_mask) | (1u << 11));
 
             base += size;
@@ -121,7 +128,7 @@ void cacheattr_init(void)
             while ( (base + size < base) || (base + size > pci_hi_mem_end) )
                 size >>= 1;
 
-            wrmsr(MSR_MTRRphysBase(i), base);
+            wrmsr(MSR_MTRRphysBase(i), base | X86_MT_UC);
             wrmsr(MSR_MTRRphysMask(i), (~(size - 1) & addr_mask) | (1u << 11));
 
             base += size;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 06 17:44:07 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 06 Jan 2023 17:44:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.472846.733232 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDql9-0001jf-1G; Fri, 06 Jan 2023 17:44:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 472846.733232; Fri, 06 Jan 2023 17: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDql8-0001jY-Uc; Fri, 06 Jan 2023 17:44:02 +0000
Received: by outflank-mailman (input) for mailman id 472846;
 Fri, 06 Jan 2023 17:44:01 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDql7-0001jS-Pb
 for xen-changelog@lists.xenproject.org; Fri, 06 Jan 2023 17:44:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDql7-0005mR-Ni
 for xen-changelog@lists.xenproject.org; Fri, 06 Jan 2023 17:44:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDql7-0007eo-MX
 for xen-changelog@lists.xenproject.org; Fri, 06 Jan 2023 17:44:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Xnoq1egtBnQ5kTt4bvhfz1vsCjxGqAHwmfxT/whPM/Q=; b=skQzbINcBE/dM64AbCN4gUVWOX
	yWFMVv4CePHtP3YyLOuZRogSJZVDBrOFnRVU80KAUOrh1hDg0GI1ZBK52GRtYYw0zzF8VYwkAhFU5
	qHdTf6uKKhz6nx5PIZO4dc9EgAKk55Pid9bpM7GXPisnbRhx1nzCGSByWJ4M4lsSv3zo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: Initial RISC-V support to build/run minimal Xen
Message-Id: <E1pDql7-0007eo-MX@xenbits.xenproject.org>
Date: Fri, 06 Jan 2023 17:44:01 +0000

commit bb62c25e3e5c3ff0c61a0351b7c4c65ff11ce9d9
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Thu Jan 5 14:01:45 2023 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Jan 5 16:35:55 2023 +0000

    xen/riscv: Initial RISC-V support to build/run minimal Xen
    
    The patch provides a minimal amount of changes to start
    build and run minimal Xen binary at GitLab CI&CD that will
    allow continuous checking of the build status of RISC-V Xen.
    
    Except introduction of new files the following changes were done:
    * Redefinition of ALIGN define from '.align 2' to '.align 4', as 2 was
      incorrect choice done previously.
    * ALL_OBJ-y and ALL_LIBS-y were temporary overwritted to produce
      a minimal hypervisor image otherwise it will be required to push
      huge amount of headers and stubs for common, drivers, libs etc which
      aren't necessary for now.
    * Section changed from .text to .text.header for start function
      to make it the first one executed.
    * Rework riscv64/Makefile logic to rebase over changes since the first
      RISC-V commit.
    
    RISC-V Xen can be built by the following instructions:
      $ CONTAINER=riscv64 ./automation/scripts/containerize \
           make XEN_TARGET_ARCH=riscv64 -C xen tiny64_defconfig
      $ CONTAINER=riscv64 ./automation/scripts/containerize \
           make XEN_TARGET_ARCH=riscv64 -C xen build
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/riscv/Makefile             |  14 ++++
 xen/arch/riscv/arch.mk              |   4 +
 xen/arch/riscv/include/asm/config.h |   9 +-
 xen/arch/riscv/riscv64/Makefile     |   2 +-
 xen/arch/riscv/riscv64/head.S       |   4 +-
 xen/arch/riscv/xen.lds.S            | 158 ++++++++++++++++++++++++++++++++++++
 6 files changed, 186 insertions(+), 5 deletions(-)

diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile
index 942e4ffbc1..248f2cbb3e 100644
--- a/xen/arch/riscv/Makefile
+++ b/xen/arch/riscv/Makefile
@@ -1,2 +1,16 @@
+obj-$(CONFIG_RISCV_64) += riscv64/
+
+$(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 $@
+	$(NM) -pa --format=sysv $(@D)/$(@F) \
+		| $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
+		>$(@D)/$(@F).map
+
+$(obj)/xen.lds: $(src)/xen.lds.S FORCE
+	$(call if_changed_dep,cpp_lds_S)
+
 .PHONY: include
 include:
diff --git a/xen/arch/riscv/arch.mk b/xen/arch/riscv/arch.mk
index ae8fe9dec7..012dc677c3 100644
--- a/xen/arch/riscv/arch.mk
+++ b/xen/arch/riscv/arch.mk
@@ -11,3 +11,7 @@ riscv-march-$(CONFIG_RISCV_ISA_C)       := $(riscv-march-y)c
 # -mcmodel=medlow would force Xen into the lower half.
 
 CFLAGS += -march=$(riscv-march-y) -mstrict-align -mcmodel=medany
+
+# TODO: Drop override when more of the build is working
+override ALL_OBJS-y = arch/$(TARGET_ARCH)/built_in.o
+override ALL_LIBS-y =
diff --git a/xen/arch/riscv/include/asm/config.h b/xen/arch/riscv/include/asm/config.h
index e2ae21de61..0370f865f3 100644
--- a/xen/arch/riscv/include/asm/config.h
+++ b/xen/arch/riscv/include/asm/config.h
@@ -1,6 +1,9 @@
 #ifndef __RISCV_CONFIG_H__
 #define __RISCV_CONFIG_H__
 
+#include <xen/const.h>
+#include <xen/page-size.h>
+
 #if defined(CONFIG_RISCV_64)
 # define LONG_BYTEORDER 3
 # define ELFSIZE 64
@@ -28,7 +31,7 @@
 
 /* Linkage for RISCV */
 #ifdef __ASSEMBLY__
-#define ALIGN .align 2
+#define ALIGN .align 4
 
 #define ENTRY(name)                                \
   .globl name;                                     \
@@ -36,6 +39,10 @@
   name:
 #endif
 
+#define XEN_VIRT_START  _AT(UL, 0x80200000)
+
+#define SMP_CACHE_BYTES (1 << 6)
+
 #endif /* __RISCV_CONFIG_H__ */
 /*
  * Local variables:
diff --git a/xen/arch/riscv/riscv64/Makefile b/xen/arch/riscv/riscv64/Makefile
index 15a4a65f66..3340058c08 100644
--- a/xen/arch/riscv/riscv64/Makefile
+++ b/xen/arch/riscv/riscv64/Makefile
@@ -1 +1 @@
-extra-y += head.o
+obj-y += head.o
diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S
index 0dbc27ba75..990edb70a0 100644
--- a/xen/arch/riscv/riscv64/head.S
+++ b/xen/arch/riscv/riscv64/head.S
@@ -1,6 +1,4 @@
-#include <asm/config.h>
-
-        .text
+        .section .text.header, "ax", %progbits
 
 ENTRY(start)
         j  start
diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S
new file mode 100644
index 0000000000..ca57cce75c
--- /dev/null
+++ b/xen/arch/riscv/xen.lds.S
@@ -0,0 +1,158 @@
+#include <xen/xen.lds.h>
+
+#undef ENTRY
+#undef ALIGN
+
+OUTPUT_ARCH(riscv)
+ENTRY(start)
+
+PHDRS
+{
+    text PT_LOAD ;
+#if defined(BUILD_ID)
+    note PT_NOTE ;
+#endif
+}
+
+SECTIONS
+{
+    . = XEN_VIRT_START;
+    _start = .;
+    .text : {
+        _stext = .;            /* Text section */
+        *(.text.header)
+
+        *(.text.cold)
+        *(.text.unlikely .text.*_unlikely .text.unlikely.*)
+
+        *(.text)
+#ifdef CONFIG_CC_SPLIT_SECTIONS
+        *(.text.*)
+#endif
+
+        *(.fixup)
+        *(.gnu.warning)
+        . = ALIGN(POINTER_ALIGN);
+        _etext = .;             /* End of text section */
+    } :text
+
+    . = ALIGN(PAGE_SIZE);
+    .rodata : {
+        _srodata = .;          /* Read-only data */
+        *(.rodata)
+        *(.rodata.*)
+        *(.data.rel.ro)
+        *(.data.rel.ro.*)
+
+        VPCI_ARRAY
+
+        . = ALIGN(POINTER_ALIGN);
+        _erodata = .;        /* End of read-only data */
+    } :text
+
+    #if defined(BUILD_ID)
+    . = ALIGN(4);
+    .note.gnu.build-id : {
+        __note_gnu_build_id_start = .;
+        *(.note.gnu.build-id)
+        __note_gnu_build_id_end = .;
+    } :note :text
+    #endif
+    _erodata = .;                /* End of read-only data */
+
+    . = ALIGN(PAGE_SIZE);
+    .data.ro_after_init : {
+        __ro_after_init_start = .;
+        *(.data.ro_after_init)
+        . = ALIGN(PAGE_SIZE);
+        __ro_after_init_end = .;
+    } : text
+
+    .data.read_mostly : {
+        *(.data.read_mostly)
+    } :text
+
+    . = ALIGN(PAGE_SIZE);
+    .data : {                    /* Data */
+        *(.data.page_aligned)
+        . = ALIGN(8);
+        __start_schedulers_array = .;
+        *(.data.schedulers)
+        __end_schedulers_array = .;
+
+        HYPFS_PARAM
+
+        *(.data .data.*)
+        CONSTRUCTORS
+    } :text
+
+    . = ALIGN(PAGE_SIZE);             /* Init code and data */
+    __init_begin = .;
+    .init.text : {
+        _sinittext = .;
+        *(.init.text)
+        _einittext = .;
+        . = ALIGN(PAGE_SIZE);        /* Avoid mapping alt insns executable */
+    } :text
+    . = ALIGN(PAGE_SIZE);
+    .init.data : {
+        *(.init.rodata)
+        *(.init.rodata.*)
+
+        . = ALIGN(POINTER_ALIGN);
+        __setup_start = .;
+        *(.init.setup)
+        __setup_end = .;
+
+        __initcall_start = .;
+        *(.initcallpresmp.init)
+        __presmp_initcall_end = .;
+        *(.initcall1.init)
+        __initcall_end = .;
+
+        LOCK_PROFILE_DATA
+
+        *(.init.data)
+        *(.init.data.rel)
+        *(.init.data.rel.*)
+
+        . = ALIGN(8);
+        __ctors_start = .;
+        *(.ctors)
+        *(.init_array)
+        *(SORT(.init_array.*))
+        __ctors_end = .;
+    } :text
+    . = ALIGN(POINTER_ALIGN);
+    __init_end = .;
+
+    .bss : {                     /* BSS */
+        __bss_start = .;
+        *(.bss.stack_aligned)
+        . = ALIGN(PAGE_SIZE);
+        *(.bss.page_aligned)
+        . = ALIGN(PAGE_SIZE);
+        __per_cpu_start = .;
+        *(.bss.percpu.page_aligned)
+        *(.bss.percpu)
+        . = ALIGN(SMP_CACHE_BYTES);
+        *(.bss.percpu.read_mostly)
+        . = ALIGN(SMP_CACHE_BYTES);
+        __per_cpu_data_end = .;
+        *(.bss .bss.*)
+        . = ALIGN(POINTER_ALIGN);
+        __bss_end = .;
+    } :text
+    _end = . ;
+
+    /* Section for the device tree blob (if any). */
+    .dtb : { *(.dtb) } :text
+
+    DWARF2_DEBUG_SECTIONS
+
+    DISCARD_SECTIONS
+
+    STABS_DEBUG_SECTIONS
+
+    ELF_DETAILS_SECTIONS
+}
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 06 17:44:13 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 06 Jan 2023 17:44:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.472847.733236 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDqlJ-0001lV-2l; Fri, 06 Jan 2023 17:44:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 472847.733236; Fri, 06 Jan 2023 17: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pDqlJ-0001lN-04; Fri, 06 Jan 2023 17:44:13 +0000
Received: by outflank-mailman (input) for mailman id 472847;
 Fri, 06 Jan 2023 17:44:11 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDqlH-0001lH-SL
 for xen-changelog@lists.xenproject.org; Fri, 06 Jan 2023 17:44:11 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDqlH-0005mZ-Ra
 for xen-changelog@lists.xenproject.org; Fri, 06 Jan 2023 17:44:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pDqlH-0007fG-Pi
 for xen-changelog@lists.xenproject.org; Fri, 06 Jan 2023 17:44:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=cuYPVo3Wt47Ubu5aSulgzy7xQtHpAUH42AkZj5RIoKM=; b=TT5t7PXvoswVCwlXbIyszY5FyC
	B/RsfhEo2wOiBfkQXdrXKdlTH13VjB1e62Rkf7N2i8mojMbDJ0Gt1TKcXvMaT2/RFTd8t6JaCfQuJ
	7t8EVQMWQon2VHyTNHiN1VEN6fv0ml84CtM2+EMRMWCDC8/pr8PrTTaFC+POlEYQccmg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] automation: Add RISC-V 64 cross-build tests for Xen
Message-Id: <E1pDqlH-0007fG-Pi@xenbits.xenproject.org>
Date: Fri, 06 Jan 2023 17:44:11 +0000

commit 2b21cbbb339fb14414f357a6683b1df74c36fda2
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Thu Jan 5 14:01:46 2023 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Jan 5 16:35:55 2023 +0000

    automation: Add RISC-V 64 cross-build tests for Xen
    
    Add build jobs to cross-compile Xen-only for RISC-V 64.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Alistair Francis <alistair.francis@wdc.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 automation/gitlab-ci/build.yaml | 56 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index 43dbef8aba..6784974619 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -172,6 +172,33 @@
   variables:
     <<: *gcc
 
+.riscv64-cross-build-tmpl:
+  <<: *build
+  variables:
+    XEN_TARGET_ARCH: riscv64
+  tags:
+    - x86_64
+
+.riscv64-cross-build:
+  extends: .riscv64-cross-build-tmpl
+  variables:
+    debug: n
+
+.riscv64-cross-build-debug:
+  extends: .riscv64-cross-build-tmpl
+  variables:
+    debug: y
+
+.gcc-riscv64-cross-build:
+  extends: .riscv64-cross-build
+  variables:
+    <<: *gcc
+
+.gcc-riscv64-cross-build-debug:
+  extends: .riscv64-cross-build-debug
+  variables:
+    <<: *gcc
+
 # Jobs below this line
 
 archlinux-gcc:
@@ -619,6 +646,35 @@ alpine-3.12-gcc-debug-arm64-boot-cpupools:
     EXTRA_XEN_CONFIG: |
       CONFIG_BOOT_TIME_CPUPOOLS=y
 
+# RISC-V 64 cross-build
+riscv64-cross-gcc:
+  extends: .gcc-riscv64-cross-build
+  variables:
+    CONTAINER: archlinux:riscv64
+    KBUILD_DEFCONFIG: tiny64_defconfig
+    HYPERVISOR_ONLY: y
+
+riscv64-cross-gcc-debug:
+  extends: .gcc-riscv64-cross-build-debug
+  variables:
+    CONTAINER: archlinux:riscv64
+    KBUILD_DEFCONFIG: tiny64_defconfig
+    HYPERVISOR_ONLY: y
+
+riscv64-cross-gcc-randconfig:
+  extends: .gcc-riscv64-cross-build
+  variables:
+    CONTAINER: archlinux:riscv64
+    KBUILD_DEFCONFIG: tiny64_defconfig
+    RANDCONFIG: y
+
+riscv64-cross-gcc-debug-randconfig:
+  extends: .gcc-riscv64-cross-build-debug
+  variables:
+    CONTAINER: archlinux:riscv64
+    KBUILD_DEFCONFIG: tiny64_defconfig
+    RANDCONFIG: y
+
 ## Test artifacts common
 
 .test-jobs-artifact-common:
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Jan 09 23:44:09 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 09 Jan 2023 23:44:09 +0000
Received: from list by lists.xenproject.org with outflank-mailman.474137.735097 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pF1oB-0008BP-7B; Mon, 09 Jan 2023 23:44:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 474137.735097; Mon, 09 Jan 2023 23: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pF1oB-0008BH-4F; Mon, 09 Jan 2023 23:44:03 +0000
Received: by outflank-mailman (input) for mailman id 474137;
 Mon, 09 Jan 2023 23:44:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1o9-0008BB-UP
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1o9-0004OR-TF
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1o9-0007gT-SH
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Kjx2GG+H8x2zHOrSp9tuSRMI/hSo3sFpC1xpFkXivU0=; b=k2n5PrJXyoi7wvNYFLyYrdUMxn
	h93pA3E+K03/rn134gUxMMy4/+qm5ZXxk3zsPgKnCB1Fgh0JHyYDH2KSybEAqMi4x2F71W/BGkX6N
	5BuvllFdWaUHownYh4ZoDb5xLsLTMJaIuMUVvmLY/E7qEVrrJMTu1CbWyzuzam5u1tTU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/shadow: convert sh_audit_flags()'es 1st parameter to domain
Message-Id: <E1pF1o9-0007gT-SH@xenbits.xenproject.org>
Date: Mon, 09 Jan 2023 23:44:01 +0000

commit 0dcc86d0c0048e094936e666de9f85c9ebe15eec
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Jan 9 14:24:18 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 9 14:24:18 2023 +0100

    x86/shadow: convert sh_audit_flags()'es 1st parameter to domain
    
    Nothing in there is vCPU-specific.
    
    With the introduction of the local variable in sh_audit_l1_table(),
    convert other uses of v->domain as well.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/mm/shadow/multi.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c
index f5f7ff021b..e9e80cbaeb 100644
--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -3916,13 +3916,13 @@ static void cf_check sh_pagetable_dying(paddr_t gpa)
     done = 1;                                                           \
 } while (0)
 
-static const char *sh_audit_flags(struct vcpu *v, int level,
+static const char *sh_audit_flags(const struct domain *d, int level,
                                   int gflags, int sflags)
 /* Common code for auditing flag bits */
 {
     if ( (sflags & _PAGE_PRESENT) && !(gflags & _PAGE_PRESENT) )
         return "shadow is present but guest is not present";
-    if ( (sflags & _PAGE_GLOBAL) && !is_hvm_vcpu(v) )
+    if ( (sflags & _PAGE_GLOBAL) && !is_hvm_domain(d) )
         return "global bit set in PV shadow";
     if ( level == 2 && (sflags & _PAGE_PSE) )
         return "PS bit set in shadow";
@@ -3945,6 +3945,7 @@ static const char *sh_audit_flags(struct vcpu *v, int level,
 
 int cf_check sh_audit_l1_table(struct vcpu *v, mfn_t sl1mfn, mfn_t x)
 {
+    struct domain *d = v->domain;
     guest_l1e_t *gl1e, *gp;
     shadow_l1e_t *sl1e;
     mfn_t mfn, gmfn, gl1mfn;
@@ -3961,7 +3962,7 @@ int cf_check sh_audit_l1_table(struct vcpu *v, mfn_t sl1mfn, mfn_t x)
     /* Out-of-sync l1 shadows can contain anything: just check the OOS hash */
     if ( page_is_out_of_sync(mfn_to_page(gl1mfn)) )
     {
-        oos_audit_hash_is_present(v->domain, gl1mfn);
+        oos_audit_hash_is_present(d, gl1mfn);
         return 0;
     }
 #endif
@@ -3991,7 +3992,7 @@ int cf_check sh_audit_l1_table(struct vcpu *v, mfn_t sl1mfn, mfn_t x)
         }
         else
         {
-            s = sh_audit_flags(v, 1, guest_l1e_get_flags(*gl1e),
+            s = sh_audit_flags(d, 1, guest_l1e_get_flags(*gl1e),
                                shadow_l1e_get_flags(*sl1e));
             if ( s ) AUDIT_FAIL(1, "%s", s);
 
@@ -3999,7 +4000,7 @@ int cf_check sh_audit_l1_table(struct vcpu *v, mfn_t sl1mfn, mfn_t x)
             {
                 gfn = guest_l1e_get_gfn(*gl1e);
                 mfn = shadow_l1e_get_mfn(*sl1e);
-                gmfn = get_gfn_query_unlocked(v->domain, gfn_x(gfn), &p2mt);
+                gmfn = get_gfn_query_unlocked(d, gfn_x(gfn), &p2mt);
                 if ( !p2m_is_grant(p2mt) && !mfn_eq(gmfn, mfn) )
                     AUDIT_FAIL(1, "bad translation: gfn %" SH_PRI_gfn
                                " --> %" PRI_mfn " != mfn %" PRI_mfn,
@@ -4061,8 +4062,8 @@ int cf_check sh_audit_l2_table(struct vcpu *v, mfn_t sl2mfn, mfn_t x)
     gl2e = gp = map_domain_page(gl2mfn);
     SHADOW_FOREACH_L2E(sl2mfn, sl2e, &gl2e, done, d, {
 
-        s = sh_audit_flags(v, 2, guest_l2e_get_flags(*gl2e),
-                            shadow_l2e_get_flags(*sl2e));
+        s = sh_audit_flags(d, 2, guest_l2e_get_flags(*gl2e),
+                           shadow_l2e_get_flags(*sl2e));
         if ( s ) AUDIT_FAIL(2, "%s", s);
 
         if ( SHADOW_AUDIT & SHADOW_AUDIT_ENTRIES_MFNS )
@@ -4113,8 +4114,8 @@ int cf_check sh_audit_l3_table(struct vcpu *v, mfn_t sl3mfn, mfn_t x)
     gl3e = gp = map_domain_page(gl3mfn);
     SHADOW_FOREACH_L3E(sl3mfn, sl3e, &gl3e, done, {
 
-        s = sh_audit_flags(v, 3, guest_l3e_get_flags(*gl3e),
-                            shadow_l3e_get_flags(*sl3e));
+        s = sh_audit_flags(d, 3, guest_l3e_get_flags(*gl3e),
+                           shadow_l3e_get_flags(*sl3e));
         if ( s ) AUDIT_FAIL(3, "%s", s);
 
         if ( SHADOW_AUDIT & SHADOW_AUDIT_ENTRIES_MFNS )
@@ -4161,8 +4162,8 @@ int cf_check sh_audit_l4_table(struct vcpu *v, mfn_t sl4mfn, mfn_t x)
     gl4e = gp = map_domain_page(gl4mfn);
     SHADOW_FOREACH_L4E(sl4mfn, sl4e, &gl4e, done, d,
     {
-        s = sh_audit_flags(v, 4, guest_l4e_get_flags(*gl4e),
-                            shadow_l4e_get_flags(*sl4e));
+        s = sh_audit_flags(d, 4, guest_l4e_get_flags(*gl4e),
+                           shadow_l4e_get_flags(*sl4e));
         if ( s ) AUDIT_FAIL(4, "%s", s);
 
         if ( SHADOW_AUDIT & SHADOW_AUDIT_ENTRIES_MFNS )
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Jan 09 23:44:13 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 09 Jan 2023 23:44:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.474138.735101 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pF1oL-0008D3-8c; Mon, 09 Jan 2023 23:44:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 474138.735101; Mon, 09 Jan 2023 23: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pF1oL-0008Cv-5h; Mon, 09 Jan 2023 23:44:13 +0000
Received: by outflank-mailman (input) for mailman id 474138;
 Mon, 09 Jan 2023 23:44:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oK-0008Cp-35
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oK-0004Oo-2C
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oJ-0007gv-Vh
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=O1dzzctKdOciRLOmNg98qPgtliqm7NxcdxoFC/osZa4=; b=TbqFE6TS+Ohb9C3P/TXSfYAL/V
	rP33KgQXXwG9PVc/sDB8UR30k/Rcp48W51jh2ZzMmOUBB/ZhtGLkWaHAwauOPM0atfunXLW0nVZPW
	HQhvoPA0MYzh0n3L16FhcUGQce0BwvvwvEXcn65U3djoRYSb6ozD1PzZwnmZJw9gF3zE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/shadow: move bogus HVM checks in sh_pagetable_dying()
Message-Id: <E1pF1oJ-0007gv-Vh@xenbits.xenproject.org>
Date: Mon, 09 Jan 2023 23:44:11 +0000

commit eb47953c55e4ace50de233d12e2a9a7f93423f20
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Jan 9 14:25:29 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 9 14:25:29 2023 +0100

    x86/shadow: move bogus HVM checks in sh_pagetable_dying()
    
    Perhaps these should have been dropped right in 2fb2dee1ac62 ("x86/mm:
    pagetable_dying() is HVM-only"). Convert both to assertions, noting that
    in particular the one in the 3-level variant of the function came too
    late anyway - first thing there we access the HVM part of a union.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/mm/shadow/multi.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c
index e9e80cbaeb..5595f42162 100644
--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -3777,6 +3777,8 @@ static void cf_check sh_pagetable_dying(paddr_t gpa)
     unsigned long l3gfn;
     mfn_t l3mfn;
 
+    ASSERT(is_hvm_domain(d));
+
     gcr3 = v->arch.hvm.guest_cr[3];
     /* fast path: the pagetable belongs to the current context */
     if ( gcr3 == gpa )
@@ -3819,7 +3821,7 @@ static void cf_check sh_pagetable_dying(paddr_t gpa)
                    : shadow_hash_lookup(d, mfn_x(gmfn), SH_type_l2_pae_shadow);
         }
 
-        if ( mfn_valid(smfn) && is_hvm_domain(d) )
+        if ( mfn_valid(smfn) )
         {
             gmfn = _mfn(mfn_to_page(smfn)->v.sh.back);
             mfn_to_page(gmfn)->pagetable_dying = true;
@@ -3851,6 +3853,8 @@ static void cf_check sh_pagetable_dying(paddr_t gpa)
     mfn_t smfn, gmfn;
     p2m_type_t p2mt;
 
+    ASSERT(is_hvm_domain(d));
+
     gmfn = get_gfn_query(d, _gfn(gpa >> PAGE_SHIFT), &p2mt);
     paging_lock(d);
 
@@ -3860,7 +3864,7 @@ static void cf_check sh_pagetable_dying(paddr_t gpa)
     smfn = shadow_hash_lookup(d, mfn_x(gmfn), SH_type_l4_64_shadow);
 #endif
 
-    if ( mfn_valid(smfn) && is_hvm_domain(d) )
+    if ( mfn_valid(smfn) )
     {
         mfn_to_page(gmfn)->pagetable_dying = true;
         shadow_unhook_mappings(d, smfn, 1/* user pages only */);
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Jan 09 23:44:23 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 09 Jan 2023 23:44:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.474139.735105 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pF1oV-0008GF-9q; Mon, 09 Jan 2023 23:44:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 474139.735105; Mon, 09 Jan 2023 23: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pF1oV-0008G7-7E; Mon, 09 Jan 2023 23:44:23 +0000
Received: by outflank-mailman (input) for mailman id 474139;
 Mon, 09 Jan 2023 23:44:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oU-0008Fd-6P
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oU-0004PD-5X
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oU-0007hW-4V
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=AaZLDwwr6oFSXeO4IaTb8Qrk3QRTufobR+0GIBmcvXk=; b=JwdBwLVkRoFw7/m3j69SH6Swmc
	g7BkXDJtupwWb+tQWFK8GKnZVamxexXZGYBOklfbbmXwGVUUK7MbEAkgeFPohe3zTcYcDCEIRtfLs
	86xz4G5ZTNWIx7r6hg84AI3y+oRM2vmcD/TkhSczS0smbS+ZY7mlQtfnAYlfMYqVzluw=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/shadow: simplify conditionals in sh_{get,put}_ref()
Message-Id: <E1pF1oU-0007hW-4V@xenbits.xenproject.org>
Date: Mon, 09 Jan 2023 23:44:22 +0000

commit e4fb1750487b296858dfd6f9ed3c306b25100388
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Jan 9 14:26:12 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 9 14:26:12 2023 +0100

    x86/shadow: simplify conditionals in sh_{get,put}_ref()
    
    In both cases the "entry_pa != 0" check is redundant; storing 0 when the
    field already is 0 is quite fine. Move the cheaper remaining part first
    in sh_get_ref(). In sh_put_ref() convert the has-up-pointer check into
    an assertion (requiring the zero check to be retained there).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/mm/shadow/private.h | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/mm/shadow/private.h b/xen/arch/x86/mm/shadow/private.h
index 2c2c18985d..e5329e0d0c 100644
--- a/xen/arch/x86/mm/shadow/private.h
+++ b/xen/arch/x86/mm/shadow/private.h
@@ -583,9 +583,7 @@ static inline int sh_get_ref(struct domain *d, mfn_t smfn, paddr_t entry_pa)
     sp->u.sh.count = nx;
 
     /* We remember the first shadow entry that points to each shadow. */
-    if ( entry_pa != 0
-         && sh_type_has_up_pointer(d, sp->u.sh.type)
-         && sp->up == 0 )
+    if ( !sp->up && sh_type_has_up_pointer(d, sp->u.sh.type) )
         sp->up = entry_pa;
 
     return 1;
@@ -604,10 +602,11 @@ static inline void sh_put_ref(struct domain *d, mfn_t smfn, paddr_t entry_pa)
     ASSERT(!(sp->count_info & PGC_count_mask));
 
     /* If this is the entry in the up-pointer, remove it */
-    if ( entry_pa != 0
-         && sh_type_has_up_pointer(d, sp->u.sh.type)
-         && sp->up == entry_pa )
+    if ( sp->up == entry_pa )
+    {
+        ASSERT(!entry_pa || sh_type_has_up_pointer(d, sp->u.sh.type));
         sp->up = 0;
+    }
 
     x = sp->u.sh.count;
     nx = x - 1;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Jan 09 23:44:33 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 09 Jan 2023 23:44:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.474140.735109 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pF1of-0008Ip-BN; Mon, 09 Jan 2023 23:44:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 474140.735109; Mon, 09 Jan 2023 23: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pF1of-0008Ih-8e; Mon, 09 Jan 2023 23:44:33 +0000
Received: by outflank-mailman (input) for mailman id 474140;
 Mon, 09 Jan 2023 23:44:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oe-0008IW-9g
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oe-0004PP-8o
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oe-0007hz-7v
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=ooYwEQ0nnPIWDIow9zRO6SAClLwAoo8RtngUM+9DoL0=; b=0y1NhNd9OKasE2lk7KpyX/vMBy
	UCK+y4FJpv50wv5zAqat6BSO5BadN6uj22RjdeHelklT0rbKWl5Hlcbs5khvQnIMxASvt8HAq1ddS
	UOifUiRFK6/CRF0/H0+q0Uu98iffpu921CGiwlLQ+OUrMAV4o+KAxX9azQRKjancqBgg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/shadow: correct shadow type bounds checks
Message-Id: <E1pF1oe-0007hz-7v@xenbits.xenproject.org>
Date: Mon, 09 Jan 2023 23:44:32 +0000

commit 065be673bb82572ac5e34019c09a8b7db96360d3
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Jan 9 14:26:54 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 9 14:26:54 2023 +0100

    x86/shadow: correct shadow type bounds checks
    
    In sh_remove_shadow_via_pointer() the type range checks, besides being
    bogus (should be ">= min && <= max"), are fully redundant with the has-
    up-pointer assertion. In sh_hash_audit_bucket() properly use "min"
    instead of assuming a certain order of type numbers.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/mm/shadow/common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index e1db6cf890..d561f08822 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -1422,7 +1422,7 @@ static void sh_hash_audit_bucket(struct domain *d, int bucket)
         /* Not a shadow? */
         BUG_ON( (sp->count_info & PGC_count_mask )!= 0 ) ;
         /* Bogus type? */
-        BUG_ON( sp->u.sh.type == 0 );
+        BUG_ON( sp->u.sh.type < SH_type_min_shadow );
         BUG_ON( sp->u.sh.type > SH_type_max_shadow );
         /* Wrong page of a multi-page shadow? */
         BUG_ON( !sp->u.sh.head );
@@ -2120,8 +2120,6 @@ static int sh_remove_shadow_via_pointer(struct domain *d, mfn_t smfn)
     l1_pgentry_t *vaddr;
     int rc;
 
-    ASSERT(sp->u.sh.type > 0);
-    ASSERT(sp->u.sh.type < SH_type_max_shadow);
     ASSERT(sh_type_has_up_pointer(d, sp->u.sh.type));
 
     if (sp->up == 0) return 0;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Jan 09 23:44:44 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 09 Jan 2023 23:44:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.474141.735113 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pF1oq-0008LG-Cr; Mon, 09 Jan 2023 23:44:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 474141.735113; Mon, 09 Jan 2023 23: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pF1oq-0008L8-AA; Mon, 09 Jan 2023 23:44:44 +0000
Received: by outflank-mailman (input) for mailman id 474141;
 Mon, 09 Jan 2023 23:44:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oo-0008Kw-Cm
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oo-0004Pa-C2
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oo-0007iS-BD
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=8lffrGW+xq6pY/rW/pFjaW/0xZIpTEmwnBMYN9R9EJA=; b=pkTk9BfAHnZ4sFW4caMS3RPJTj
	X0LyxqZ5URgwDdwGkdRl8rf1OBO9UUzH5bYy0JFb98kaEAvVmbu0eR50uJsZtV02LMtRLXF3NHPeW
	Y/LWSS3ninGPuYj+LcnhcPQSfd6QIVwMzuNwt2bG6rpXYZrPr2B15cS89jXHUsAIY91o=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/shadow: sh_remove_all_mappings() is HVM-only
Message-Id: <E1pF1oo-0007iS-BD@xenbits.xenproject.org>
Date: Mon, 09 Jan 2023 23:44:42 +0000

commit ba6d62ad71798b76b1c10b42e7d1c38d0429e45f
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Mon Jan 9 14:29:13 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 9 14:29:13 2023 +0100

    x86/shadow: sh_remove_all_mappings() is HVM-only
    
    All callers live in hvm.c. Moving the function there is undesirable, as
    hash walking is local to common.c and probably better remains so. Hence
    move an #endif, allowing to drop an #ifdef.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/mm/shadow/common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index d561f08822..6f2685d4cf 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -2035,7 +2035,6 @@ int sh_remove_write_access(struct domain *d, mfn_t gmfn,
     /* We killed at least one writeable mapping, so must flush TLBs. */
     return 1;
 }
-#endif /* CONFIG_HVM */
 
 /**************************************************************************/
 /* Remove all mappings of a guest frame from the shadow tables.
@@ -2047,12 +2046,10 @@ int sh_remove_all_mappings(struct domain *d, mfn_t gmfn, gfn_t gfn)
 
     /* Dispatch table for getting per-type functions */
     static const hash_domain_callback_t callbacks[SH_type_unused] = {
-#ifdef CONFIG_HVM
         [SH_type_l1_32_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 2),
         [SH_type_fl1_32_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 2),
         [SH_type_l1_pae_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 3),
         [SH_type_fl1_pae_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 3),
-#endif
         [SH_type_l1_64_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 4),
         [SH_type_fl1_64_shadow] = SHADOW_INTERNAL_NAME(sh_rm_mappings_from_l1, 4),
     };
@@ -2107,6 +2104,7 @@ int sh_remove_all_mappings(struct domain *d, mfn_t gmfn, gfn_t gfn)
     return 1;
 }
 
+#endif /* CONFIG_HVM */
 
 /**************************************************************************/
 /* Remove all shadows of a guest frame from the shadow tables */
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Jan 09 23:44:54 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 09 Jan 2023 23:44:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.474142.735117 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pF1p0-0008Nd-EN; Mon, 09 Jan 2023 23:44:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 474142.735117; Mon, 09 Jan 2023 23: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pF1p0-0008NV-Bc; Mon, 09 Jan 2023 23:44:54 +0000
Received: by outflank-mailman (input) for mailman id 474142;
 Mon, 09 Jan 2023 23:44:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oy-0008NB-GI
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oy-0004Pl-F0
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pF1oy-0007it-EG
 for xen-changelog@lists.xenproject.org; Mon, 09 Jan 2023 23:44:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=4jZsHejQYR8mNuI+Ml9q/jpC6nOE8VIrC2UJmlEwHyw=; b=kafgRnVFMIhoQl7eYhZzv6lYaq
	xUVJmrWEWpwJWwuQLSH8JusXNmBFhkvOZUqtm/HOMCez2sz15rlpZePtMAEsukrIz0RlmP+yERIoX
	FQ3TkiON3FKWDK/utfnSv4uiEf+jU408gkSqc03YLo2Ds6sbKA22rlVOUNyXE4vRh010=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/include: include <asm/types.h> in <xen/early_printk.h>
Message-Id: <E1pF1oy-0007it-EG@xenbits.xenproject.org>
Date: Mon, 09 Jan 2023 23:44:52 +0000

commit 38525f6f73f906699f77a1af86c16b4eaad48e04
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Mon Jan 9 14:29:49 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Mon Jan 9 14:29:49 2023 +0100

    xen/include: include <asm/types.h> in <xen/early_printk.h>
    
    <asm/types.h> should be included because second argument of
    early_puts has type 'size_t' which is defined in <asm/types.h>
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Julien Grall <jgrall@amazon.com>
---
 xen/include/xen/early_printk.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/include/xen/early_printk.h b/xen/include/xen/early_printk.h
index 0f76c3a74f..abb34687da 100644
--- a/xen/include/xen/early_printk.h
+++ b/xen/include/xen/early_printk.h
@@ -4,6 +4,8 @@
 #ifndef __XEN_EARLY_PRINTK_H__
 #define __XEN_EARLY_PRINTK_H__
 
+#include <asm/types.h>
+
 #ifdef CONFIG_EARLY_PRINTK
 void early_puts(const char *s, size_t nr);
 #else
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Jan 10 09:33:08 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 10 Jan 2023 09:33:08 +0000
Received: from list by lists.xenproject.org with outflank-mailman.474580.735813 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFB0B-0003yG-E6; Tue, 10 Jan 2023 09:33:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 474580.735813; Tue, 10 Jan 2023 09: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFB0B-0003y9-B0; Tue, 10 Jan 2023 09:33:03 +0000
Received: by outflank-mailman (input) for mailman id 474580;
 Tue, 10 Jan 2023 09:33:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFB0A-0003y3-Ca
 for xen-changelog@lists.xenproject.org; Tue, 10 Jan 2023 09:33:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFB0A-0001g1-Bd
 for xen-changelog@lists.xenproject.org; Tue, 10 Jan 2023 09:33:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFB0A-0008Uh-9D
 for xen-changelog@lists.xenproject.org; Tue, 10 Jan 2023 09:33:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=/EKpZIbHRApAHJ0Jty7kNLZOINBG9VbI75zEawtOwZI=; b=wfyJkKEbbqjc37bQyI1wFYR2ch
	Nc9Pg9pxWnX07dYzdBRMb6QGBzx6hs57FAffWwc1B8UKIhElOPv+3LdR95SRRJ/vumPIYfdLwTd8H
	ApNWtnh71ybvHCdNzxZK3Ddya7bPLfGj0eE1SZS//biwiNbQgrJrqnYRh5K355rQiqK4=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] MAINTAINERS: Clarify check-in requirements for mixed-author patches
Message-Id: <E1pFB0A-0008Uh-9D@xenbits.xenproject.org>
Date: Tue, 10 Jan 2023 09:33:02 +0000

commit c9e4365d34b8aaaa84ef29142e1876338ce4f97a
Author:     George Dunlap <george.dunlap@cloud.com>
AuthorDate: Mon Dec 5 16:41:39 2022 +0000
Commit:     George Dunlap <george.dunlap@cloud.com>
CommitDate: Mon Jan 9 16:32:26 2023 +0000

    MAINTAINERS: Clarify check-in requirements for mixed-author patches
    
    There was a question raised recently about the requirements for
    checking in a patch which was originally written by one maintainer,
    then picked up and modified by a second maintainer, and which they now both
    agree should be checked in.
    
    It was proposed that in that case, the following set of tags would suffice:
    
       Signed-off-by: First Author <...>
       Signed-off-by: Second Author <...>
       Reviewed-by: First Author <...>
    
    The rationale was as follows:
    
    1. The patch will be a mix of code, whose copyright is owned by the
    various authors (or the companies they work for).  It's important to
    keep this information around in the event, for instance, of a license
    change or something else requiring knowledge of the copyright owner.
    
    2. The Signed-off-by of the Second Author approves not only their own
    code, but First Author's code; the Reviewed-by of the First Author
    approves not only their own code, but the Second Author's code.  Thus
    all the code has been approved by a maintainer, as well as someone who
    was not the author.
    
    In support of this, several arguments were put forward:
    
    * We shouldn't make it harder for maintainers to get their code in
      than for non-maintainers
    
    * The system we set up should not add pointless bureaucracy; nor
      discourage collaboration; nor encourage contributors to get around
      the rules by dropping important information.  (For instance, by
      removing the first SoB, so that the patch appears to have been
      written entirely by Second Author.)
    
    Concerns were raised about two maintainers from the same company
    colluding to get a patch in from their company; but such maintainers
    could already collude, by working on the patch in secret, and posting
    it publicly with only a single author's SoB, and having the other
    person review it.
    
    There's also something slightly strange about adding "Reviewed-by" to
    code that you've written; but in the end you're reviewing not only the
    code itself, but the final arrangement of it.  There's no need to
    overcomplicate things.
    
    Encode this in MAINTAINERS as follows:
    
    * Refine the wording of requirement #2 in the check-in policy; such
    that *each change* must have approval from someone other than *the
    person who wrote it*.
    
    * Add a paragraph explicitly stating that the multiple-SoB-approval
      system satisfies the requirements, and why.
    
    Signed-off-by: George Dunlap <george.dunlap@cloud.com>
    Acked-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Julien Grall <jgrall@amazon.com>
---
 MAINTAINERS | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 175f10f33f..0e5eba2312 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -120,8 +120,8 @@ must be met:
 
    See below for rules on nested maintainership.
 
-2. It must have appropriate approval from someone other than the
-   submitter.  This can be either:
+2. Each change must have appropriate approval from someone other than
+   the person who wrote it.  This can be either:
 
   a. An Acked-by from a maintainer of the code being touched (a
      co-maintainer if available, or a more general level maintainer if
@@ -150,6 +150,20 @@ give their co-maintainer opportunity to give feedback, perhaps
 declaring their intention to check it in without their co-maintainers
 ack a day before doing so.
 
+In the case where two people collaborate on a patch, at least one of
+whom is a maintainer -- typically where one maintainer will do an
+early version of the patch, and another maintainer will pick it up and
+revise it -- there should be two Signed-off-by's and one Acked-by or
+Reviewed-by; with the maintainer who did the most recent change
+sending the patch, and an Acked-by or Reviewed-by coming from the
+maintainer who did not most recently edit the patch.  This satisfies
+the requirement #2 because a) the Signed-off-by of the sender approves
+the final version of the patch; including all parts of the patch that
+the sender did not write b) the Reviewed-by approves the final version
+of the patch, including all patches that the reviewer did not write.
+Thus all code in the patch has been approved by someone who did not
+write it.
+
 Maintainers may choose to override non-maintainer objections in the
 case that consensus can't be reached.
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Jan 10 09:33:13 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 10 Jan 2023 09:33:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.474581.735817 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFB0L-000416-Hx; Tue, 10 Jan 2023 09:33:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 474581.735817; Tue, 10 Jan 2023 09: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFB0L-00040y-FF; Tue, 10 Jan 2023 09:33:13 +0000
Received: by outflank-mailman (input) for mailman id 474581;
 Tue, 10 Jan 2023 09:33:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFB0K-00040p-G0
 for xen-changelog@lists.xenproject.org; Tue, 10 Jan 2023 09:33:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFB0K-0001g5-F7
 for xen-changelog@lists.xenproject.org; Tue, 10 Jan 2023 09:33:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFB0K-0008VH-E3
 for xen-changelog@lists.xenproject.org; Tue, 10 Jan 2023 09:33:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=GKM61E+5Qvi6P7BmgJvb37kM/Em4GozrhHMm0gPveK0=; b=S8uStbdto0vEPU6R+FQaYO4jVj
	d8jAfgxyk9LYZfPwqMXB3VG0wAi1QfE6kO7CRgt7FY/AcQScVk6OHhyvrkZEvxXlXxp0K+QCvOgYy
	ZepcA0OJTYI0Nw0uf6e434zd7OY/3rZBbewxbYHPRjOU/Bn4FHBW4i/AZ2Mdl3jQKQL8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] automation: temporarily disable CONFIG_COVERAGE for RISC-V randconfig jobs
Message-Id: <E1pFB0K-0008VH-E3@xenbits.xenproject.org>
Date: Tue, 10 Jan 2023 09:33:12 +0000

commit da95e369750525d4acdb0597092ae99ca10b759e
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Fri Jan 6 12:28:01 2023 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Jan 9 17:20:19 2023 +0000

    automation: temporarily disable CONFIG_COVERAGE for RISC-V randconfig jobs
    
    As common isn't built for RISC-V architecture now, accordingly,
    common/coverage (where __gconv_* function are defined) isn't built either
    but randconfig may decide to enable CONFIG_COVERAGE which will lead to
    the following compilation error:
    
    riscv64-linux-gnu-ld: prelink.o: in function `.L0 ':
    arch/riscv/early_printk.c:(.text+0x18):
        undefined reference to `__gcov_init'
    riscv64-linux-gnu-ld: arch/riscv/early_printk.c:(.text+0x40):
        undefined reference to `__gcov_exit'
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 automation/gitlab-ci/build.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
index 6784974619..a292f0fb18 100644
--- a/automation/gitlab-ci/build.yaml
+++ b/automation/gitlab-ci/build.yaml
@@ -667,6 +667,8 @@ riscv64-cross-gcc-randconfig:
     CONTAINER: archlinux:riscv64
     KBUILD_DEFCONFIG: tiny64_defconfig
     RANDCONFIG: y
+    EXTRA_FIXED_RANDCONFIG:
+      CONFIG_COVERAGE=n
 
 riscv64-cross-gcc-debug-randconfig:
   extends: .gcc-riscv64-cross-build-debug
@@ -674,6 +676,8 @@ riscv64-cross-gcc-debug-randconfig:
     CONTAINER: archlinux:riscv64
     KBUILD_DEFCONFIG: tiny64_defconfig
     RANDCONFIG: y
+    EXTRA_FIXED_RANDCONFIG:
+      CONFIG_COVERAGE=n
 
 ## Test artifacts common
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Tue Jan 10 09:33:23 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Tue, 10 Jan 2023 09:33:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.474582.735823 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFB0V-00045i-KE; Tue, 10 Jan 2023 09:33:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 474582.735823; Tue, 10 Jan 2023 09: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFB0V-00045a-Gi; Tue, 10 Jan 2023 09:33:23 +0000
Received: by outflank-mailman (input) for mailman id 474582;
 Tue, 10 Jan 2023 09:33:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFB0U-00045N-Il
 for xen-changelog@lists.xenproject.org; Tue, 10 Jan 2023 09:33:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFB0U-0001gk-Hv
 for xen-changelog@lists.xenproject.org; Tue, 10 Jan 2023 09:33:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFB0U-0008Vk-HK
 for xen-changelog@lists.xenproject.org; Tue, 10 Jan 2023 09:33:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=xoebcgVshD6VnTBkMZwA1Tx7p/kohpY1o4U+vEXSYUM=; b=B8iBhoDe/iHWWFggfa/pQg7xYB
	su9JrIU6pgik2YC/EPEhAu7nXeDWsknBHD++OQYU79FmrcDRpOTbfa1tpB/MFXQO9FqllGhLZjjYA
	oW1VHuZ5CKnTAkPOaiUiJa4ajn5FvalofEXvXOQ1eRWxhbZYng815DdRNfKTZZH9+X0k=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] automation: add qemu-system-riscv to riscv64.dockerfile
Message-Id: <E1pFB0U-0008Vk-HK@xenbits.xenproject.org>
Date: Tue, 10 Jan 2023 09:33:22 +0000

commit 692d04a9ca429ca574d859fa8f43578e03b9f8b3
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Mon Jan 9 11:50:32 2023 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Jan 9 17:22:47 2023 +0000

    automation: add qemu-system-riscv to riscv64.dockerfile
    
    qemu-system-riscv will be used to run RISC-V Xen binary and
    gather logs for smoke tests.
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 automation/build/archlinux/riscv64.dockerfile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/automation/build/archlinux/riscv64.dockerfile b/automation/build/archlinux/riscv64.dockerfile
index ff8b2b955d..abf8e7bf0b 100644
--- a/automation/build/archlinux/riscv64.dockerfile
+++ b/automation/build/archlinux/riscv64.dockerfile
@@ -9,7 +9,9 @@ RUN pacman --noconfirm --needed -Syu \
     inetutils \
     riscv64-linux-gnu-binutils \
     riscv64-linux-gnu-gcc \
-    riscv64-linux-gnu-glibc
+    riscv64-linux-gnu-glibc \
+    # For test phase
+    qemu-system-riscv
 
 # Add compiler path
 ENV CROSS_COMPILE=riscv64-linux-gnu-
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Jan 11 08:11:07 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 11 Jan 2023 08:11:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.475114.736637 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFWCN-00059C-EW; Wed, 11 Jan 2023 08:11:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 475114.736637; Wed, 11 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFWCN-000594-BZ; Wed, 11 Jan 2023 08:11:03 +0000
Received: by outflank-mailman (input) for mailman id 475114;
 Wed, 11 Jan 2023 08:11:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFWCM-00058y-0Z
 for xen-changelog@lists.xenproject.org; Wed, 11 Jan 2023 08:11:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFWCL-0000WV-Rj
 for xen-changelog@lists.xenproject.org; Wed, 11 Jan 2023 08:11:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFWCL-0003mz-Pz
 for xen-changelog@lists.xenproject.org; Wed, 11 Jan 2023 08:11:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=6Q1sOPwTovOyIwxw9XSPQgRUVdE6ICob+HSn4fL0JFI=; b=S23m1zWsco2HnVOlwBnocLXGMZ
	P454cMtam6/oSh70DpW1jwUwxWM3UBPkl70CF6f6NcVMWoMIajdBCCFC0+weUcRUJu0JPD1h37GuV
	fEtnZtXOXu4V27BGpkcFCh+9vmM3vz7IRhCb9PeMKMmbBApKx6LRrf7ID4sGp3ucG3vY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen: Drop $ARCH/trace.h
Message-Id: <E1pFWCL-0003mz-Pz@xenbits.xenproject.org>
Date: Wed, 11 Jan 2023 08:11:01 +0000

commit 4c5edd2449bc7033821d39ac4ab7b964aeff44b9
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Sep 20 17:12:56 2021 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Jan 10 21:17:02 2023 +0000

    xen: Drop $ARCH/trace.h
    
    Each architecture's main trace.h is empty.  Drop them all, so as not force all
    new architectures to create an empty file too.
    
    While moving the declaration of tb_init_done, change from int to bool.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Julien Grall <jgrall@amazon.com>
---
 xen/arch/arm/include/asm/trace.h | 12 ------------
 xen/arch/x86/include/asm/trace.h |  4 ----
 xen/common/trace.c               |  2 +-
 xen/include/xen/trace.h          | 13 +++++--------
 4 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/xen/arch/arm/include/asm/trace.h b/xen/arch/arm/include/asm/trace.h
deleted file mode 100644
index e06def61f6..0000000000
--- a/xen/arch/arm/include/asm/trace.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef __ASM_TRACE_H__
-#define __ASM_TRACE_H__
-
-#endif /* __ASM_TRACE_H__ */
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff --git a/xen/arch/x86/include/asm/trace.h b/xen/arch/x86/include/asm/trace.h
deleted file mode 100644
index edef1bb099..0000000000
--- a/xen/arch/x86/include/asm/trace.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef __ASM_TRACE_H__
-#define __ASM_TRACE_H__
-
-#endif /* __ASM_TRACE_H__ */
diff --git a/xen/common/trace.c b/xen/common/trace.c
index fb3752ce62..9b4c696843 100644
--- a/xen/common/trace.c
+++ b/xen/common/trace.c
@@ -67,7 +67,7 @@ static DEFINE_PER_CPU(unsigned long, lost_records_first_tsc);
 
 /* a flag recording whether initialization has been done */
 /* or more properly, if the tbuf subsystem is enabled right now */
-int tb_init_done __read_mostly;
+bool __read_mostly tb_init_done;
 
 /* which CPUs tracing is enabled on */
 static cpumask_t tb_cpu_mask;
diff --git a/xen/include/xen/trace.h b/xen/include/xen/trace.h
index 3cbb542af8..055883287e 100644
--- a/xen/include/xen/trace.h
+++ b/xen/include/xen/trace.h
@@ -21,19 +21,14 @@
 #ifndef __XEN_TRACE_H__
 #define __XEN_TRACE_H__
 
-/* Put 'tb_init_done' here because 'asm/trace.h' may use it */
-#ifdef CONFIG_TRACEBUFFER
-extern int tb_init_done;
-#else
-#define tb_init_done false
-#endif
-
 #include <xen/types.h>
 #include <public/sysctl.h>
 #include <public/trace.h>
-#include <asm/trace.h>
 
 #ifdef CONFIG_TRACEBUFFER
+
+extern bool tb_init_done;
+
 /* Used to initialise trace buffer functionality */
 void init_trace_bufs(void);
 
@@ -58,6 +53,8 @@ void __trace_hypercall(uint32_t event, unsigned long op,
 
 #include <xen/errno.h>
 
+#define tb_init_done false
+
 static inline void init_trace_bufs(void) {}
 static inline int tb_control(struct xen_sysctl_tbuf_op *tbc)
 {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Wed Jan 11 08:11:12 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Wed, 11 Jan 2023 08:11:12 +0000
Received: from list by lists.xenproject.org with outflank-mailman.475115.736640 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFWCW-0005B2-Fi; Wed, 11 Jan 2023 08:11:12 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 475115.736640; Wed, 11 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFWCW-0005Av-DE; Wed, 11 Jan 2023 08:11:12 +0000
Received: by outflank-mailman (input) for mailman id 475115;
 Wed, 11 Jan 2023 08:11:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFWCV-0005An-VZ
 for xen-changelog@lists.xenproject.org; Wed, 11 Jan 2023 08:11:11 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFWCV-0000Wp-Uk
 for xen-changelog@lists.xenproject.org; Wed, 11 Jan 2023 08:11:11 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFWCV-0003nQ-Tr
 for xen-changelog@lists.xenproject.org; Wed, 11 Jan 2023 08:11:11 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=zmA1HkCajPsKju0dvgTKRfreVtWyX3jLEvcNpUONXoo=; b=Pi6RNi1MW+mN9EtrYc1FZPQff8
	IrkHb4qLUyMvXqP9Ona31x326g2Ikfr9RwZEhB/znCgzHxOO6uOin7Xd43DQ9THQr0ruegNuks9XT
	Qu3zAXj53eigf5RIGhhI8VmOWfCD4DkDBKAfuxzViL3Rpilaq8g9mdpASG+HgmWzljH8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/S3: Restore Xen's MSR_PAT value on S3 resume
Message-Id: <E1pFWCV-0003nQ-Tr@xenbits.xenproject.org>
Date: Wed, 11 Jan 2023 08:11:11 +0000

commit 4d975798e11579fdf405b348543061129e01b0fb
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Thu Jan 5 20:42:58 2023 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Tue Jan 10 21:21:30 2023 +0000

    x86/S3: Restore Xen's MSR_PAT value on S3 resume
    
    There are two paths in the trampoline, and Xen's PAT needs setting up in both,
    not just the boot path.
    
    Fixes: 4304ff420e51 ("x86/S3: Drop {save,restore}_rest_processor_state() completely")
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/arch/x86/boot/wakeup.S | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/xen/arch/x86/boot/wakeup.S b/xen/arch/x86/boot/wakeup.S
index c17d613b61..08447e1934 100644
--- a/xen/arch/x86/boot/wakeup.S
+++ b/xen/arch/x86/boot/wakeup.S
@@ -130,6 +130,11 @@ wakeup_32:
         and     %edi, %edx
         wrmsr
 1:
+        /* Set up PAT before enabling paging. */
+        mov     $XEN_MSR_PAT & 0xffffffff, %eax
+        mov     $XEN_MSR_PAT >> 32, %edx
+        mov     $MSR_IA32_CR_PAT, %ecx
+        wrmsr
 
         /* Set up EFER (Extended Feature Enable Register). */
         movl    $MSR_EFER,%ecx
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Jan 12 01:44:08 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 12 Jan 2023 01:44:08 +0000
Received: from list by lists.xenproject.org with outflank-mailman.475796.737645 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFmdP-0003Ov-5Q; Thu, 12 Jan 2023 01:44:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 475796.737645; Thu, 12 Jan 2023 01: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFmdP-0003On-2J; Thu, 12 Jan 2023 01:44:03 +0000
Received: by outflank-mailman (input) for mailman id 475796;
 Thu, 12 Jan 2023 01:44:01 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFmdN-0003OK-TI
 for xen-changelog@lists.xenproject.org; Thu, 12 Jan 2023 01:44:01 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFmdN-00087A-SU
 for xen-changelog@lists.xenproject.org; Thu, 12 Jan 2023 01:44:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFmdN-0003i0-Qf
 for xen-changelog@lists.xenproject.org; Thu, 12 Jan 2023 01:44:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=DsUWc4JOvg3FiDaRUi1/cFL2PmNhekcf+SBwyGJKgbI=; b=vHm1RBHr9lbR7yAKbTn75mY+4d
	HhYIyvpwOIOtdQ63fQd6qlmcAfbR9Ury9W4mHh7LE4GDAAzk02IqfPclMb7SIkh8yS/CaM6K/rtdV
	IxFYWxtedTVRIJO5/Iu0uzOjprRlpVis8dWQCuZd7hYkPdaKKWvZ21NBetQubFWx8xrU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] tools: Fix build with recent QEMU, use "--enable-trace-backends"
Message-Id: <E1pFmdN-0003i0-Qf@xenbits.xenproject.org>
Date: Thu, 12 Jan 2023 01:44:01 +0000

commit e66d450b6e0ffec635639df993ab43ce28b3383f
Author:     Anthony PERARD <anthony.perard@citrix.com>
AuthorDate: Wed Jan 11 10:45:29 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Wed Jan 11 10:45:29 2023 +0100

    tools: Fix build with recent QEMU, use "--enable-trace-backends"
    
    The configure option "--enable-trace-backend" isn't accepted anymore
    and we should use "--enable-trace-backends" instead which was
    introduce in 2014 and allow multiple backends.
    
    "--enable-trace-backends" was introduced by:
        5b808275f3bb ("trace: Multi-backend tracing")
    The backward compatible option "--enable-trace-backend" is removed by
        10229ec3b0ff ("configure: remove backwards-compatibility and obsolete options")
    
    As we already use ./configure options that wouldn't be accepted by
    older version of QEMU's configure, we will simply use the new spelling
    for the option and avoid trying to detect which spelling to use.
    
    We already make use if "--firmwarepath=" which was introduced by
        3d5eecab4a5a ("Add --firmwarepath to configure")
    which already include the new spelling for "--enable-trace-backends".
    
    Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
    Reviewed-by: Jason Andryuk <jandryuk@gmail.com>
---
 tools/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/Makefile b/tools/Makefile
index 9e28027835..4906fdbc23 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -218,9 +218,9 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
 	mkdir -p qemu-xen-build; \
 	cd qemu-xen-build; \
 	if $$source/scripts/tracetool.py --check-backend --backend log ; then \
-		enable_trace_backend='--enable-trace-backend=log'; \
+		enable_trace_backend="--enable-trace-backends=log"; \
 	elif $$source/scripts/tracetool.py --check-backend --backend stderr ; then \
-		enable_trace_backend='--enable-trace-backend=stderr'; \
+		enable_trace_backend='--enable-trace-backends=stderr'; \
 	else \
 		enable_trace_backend='' ; \
 	fi ; \
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Thu Jan 12 09:33:07 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Thu, 12 Jan 2023 09:33:07 +0000
Received: from list by lists.xenproject.org with outflank-mailman.475920.737825 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFtxG-0008PY-Vo; Thu, 12 Jan 2023 09:33:02 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 475920.737825; Thu, 12 Jan 2023 09: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pFtxG-0008PQ-Sm; Thu, 12 Jan 2023 09:33:02 +0000
Received: by outflank-mailman (input) for mailman id 475920;
 Thu, 12 Jan 2023 09:33:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFtxG-0008PK-8Q
 for xen-changelog@lists.xenproject.org; Thu, 12 Jan 2023 09:33:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFtxG-0003WS-3c
 for xen-changelog@lists.xenproject.org; Thu, 12 Jan 2023 09:33:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pFtxG-0007Of-2l
 for xen-changelog@lists.xenproject.org; Thu, 12 Jan 2023 09:33:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=StDO2cdu5+1VOjLFnAT2cs9/x+eDUqolIokaP/bUe74=; b=6+xUpdzH/ETewwGKjwz3JK4vyM
	Rtt9wyck9UqI3Z/5Ai5D0sC1QDb5on8Ml1ZRa0Ce1HszfwCNu/iVd8PNRGeY19JBnDY7ZvcNBhS0b
	ACZtjlnaEa+r0XSjsKnPtyNOr4vunEkK+P9XKcXU7OPO6dyCgIRpa49FloHpcozLgU80=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen: Remove the arch specific header init.h
Message-Id: <E1pFtxG-0007Of-2l@xenbits.xenproject.org>
Date: Thu, 12 Jan 2023 09:33:02 +0000

commit fd42170b152b19ff12121f3b63674e882c087849
Author:     Julien Grall <jgrall@amazon.com>
AuthorDate: Wed Jan 11 11:44:09 2023 +0000
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Wed Jan 11 17:52:07 2023 +0000

    xen: Remove the arch specific header init.h
    
    Both x86 and (soon) RISC-V version of init.h are empty. On Arm, it contains
    a structure that should not be used by any common code.
    
    The structure init_info is used to store information to setup the CPU
    currently being brought-up. setup.h seems to be more suitable even though
    the header is getting quite crowded.
    
    Looking through the history, <asm/init.h> was introduced at the same
    time as the ia64 port because for some reasons most of the macros
    where duplicated. This was changed in 72c07f413879 and I don't
    foresee any reason to require arch specific definition for init.h
    in the near future.
    
    Therefore remove asm/init.h for both x86 and arm (the only definition
    is moved in setup.h). With that RISC-V will not need to introduce
    an empty header.
    
    Suggested-by: Jan Beulich <jbeulich@suse.com>
    Signed-off-by: Julien Grall <jgrall@amazon.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
    Acked-by: Alistair Francis <alistair.francis@wdc.com>
---
 xen/arch/arm/arm32/asm-offsets.c |  1 +
 xen/arch/arm/arm64/asm-offsets.c |  1 +
 xen/arch/arm/include/asm/init.h  | 20 --------------------
 xen/arch/arm/include/asm/setup.h |  8 ++++++++
 xen/arch/x86/acpi/power.c        |  1 -
 xen/arch/x86/include/asm/init.h  |  4 ----
 xen/include/xen/init.h           |  2 --
 7 files changed, 10 insertions(+), 27 deletions(-)

diff --git a/xen/arch/arm/arm32/asm-offsets.c b/xen/arch/arm/arm32/asm-offsets.c
index 2116ba5b95..05c692bb28 100644
--- a/xen/arch/arm/arm32/asm-offsets.c
+++ b/xen/arch/arm/arm32/asm-offsets.c
@@ -11,6 +11,7 @@
 #include <public/xen.h>
 #include <asm/current.h>
 #include <asm/procinfo.h>
+#include <asm/setup.h>
 
 #define DEFINE(_sym, _val)                                                 \
     asm volatile ("\n.ascii\"==>#define " #_sym " %0 /* " #_val " */<==\"" \
diff --git a/xen/arch/arm/arm64/asm-offsets.c b/xen/arch/arm/arm64/asm-offsets.c
index 280ddb55bf..7226cd9b2e 100644
--- a/xen/arch/arm/arm64/asm-offsets.c
+++ b/xen/arch/arm/arm64/asm-offsets.c
@@ -10,6 +10,7 @@
 #include <xen/bitops.h>
 #include <public/xen.h>
 #include <asm/current.h>
+#include <asm/setup.h>
 #include <asm/smccc.h>
 
 #define DEFINE(_sym, _val)                                                 \
diff --git a/xen/arch/arm/include/asm/init.h b/xen/arch/arm/include/asm/init.h
deleted file mode 100644
index 5ac8cf8797..0000000000
--- a/xen/arch/arm/include/asm/init.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#ifndef _XEN_ASM_INIT_H
-#define _XEN_ASM_INIT_H
-
-struct init_info
-{
-    /* Pointer to the stack, used by head.S when entering in C */
-    unsigned char *stack;
-    /* Logical CPU ID, used by start_secondary */
-    unsigned int cpuid;
-};
-
-#endif /* _XEN_ASM_INIT_H */
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */
diff --git a/xen/arch/arm/include/asm/setup.h b/xen/arch/arm/include/asm/setup.h
index fdbf68aadc..a926f30a2b 100644
--- a/xen/arch/arm/include/asm/setup.h
+++ b/xen/arch/arm/include/asm/setup.h
@@ -168,6 +168,14 @@ int map_range_to_domain(const struct dt_device_node *dev,
 
 extern const char __ro_after_init_start[], __ro_after_init_end[];
 
+struct init_info
+{
+    /* Pointer to the stack, used by head.S when entering in C */
+    unsigned char *stack;
+    /* Logical CPU ID, used by start_secondary */
+    unsigned int cpuid;
+};
+
 #endif
 /*
  * Local variables:
diff --git a/xen/arch/x86/acpi/power.c b/xen/arch/x86/acpi/power.c
index b76f673acb..d23335391c 100644
--- a/xen/arch/x86/acpi/power.c
+++ b/xen/arch/x86/acpi/power.c
@@ -17,7 +17,6 @@
 #include <xen/sched.h>
 #include <asm/acpi.h>
 #include <asm/irq.h>
-#include <asm/init.h>
 #include <xen/spinlock.h>
 #include <xen/sched.h>
 #include <xen/domain.h>
diff --git a/xen/arch/x86/include/asm/init.h b/xen/arch/x86/include/asm/init.h
deleted file mode 100644
index 5295b35e63..0000000000
--- a/xen/arch/x86/include/asm/init.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef _XEN_ASM_INIT_H
-#define _XEN_ASM_INIT_H
-
-#endif /* _XEN_ASM_INIT_H */
diff --git a/xen/include/xen/init.h b/xen/include/xen/init.h
index 0af0e234ec..1d7c0216bc 100644
--- a/xen/include/xen/init.h
+++ b/xen/include/xen/init.h
@@ -1,8 +1,6 @@
 #ifndef _LINUX_INIT_H
 #define _LINUX_INIT_H
 
-#include <asm/init.h>
-
 /*
  * Mark functions and data as being only used at initialization
  * or exit time.
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 04:33:08 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 04:33:08 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481444.746318 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pIj5L-0001i5-Be; Fri, 20 Jan 2023 04:33:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481444.746318; Fri, 20 Jan 2023 04: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pIj5L-0001hw-8Z; Fri, 20 Jan 2023 04:33:03 +0000
Received: by outflank-mailman (input) for mailman id 481444;
 Fri, 20 Jan 2023 04:33:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pIj5K-0001hq-02
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 04:33:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pIj5J-0008FT-T5
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 04:33:01 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pIj5J-0004Hx-S3
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 04:33:01 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=l+FEGwvv1d2Nfq5iMOKJG/A0gzxeXuhQ2ufgNDkzvas=; b=b59nXTx8CNI9tHIJTV/ZRSJoMg
	JY39TNt271EavTzOoEIqhE2TZIXbm/ZKVWHkD1uOorU6pTJjFdYz3/fNs02g8uZRJfkxPKVItHDv1
	J5Kx/RxzlI71RtmJ2JwjfwytpCZgVPXpK8m5p4P8LYGM6z/CRtzTkNh/1mcn1OVEorB0=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [qemu-xen master] configure: Expand test which disable -Wmissing-braces
Message-Id: <E1pIj5J-0004Hx-S3@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 04:33:01 +0000

commit 625eb5e96dc96aa7fddef59a08edae215527f19c
Author:     Anthony PERARD <anthony.perard@citrix.com>
AuthorDate: Fri Jan 6 15:21:10 2023 +0100
Commit:     Anthony PERARD <anthony.perard@citrix.com>
CommitDate: Tue Jan 17 15:10:57 2023 +0000

    configure: Expand test which disable -Wmissing-braces
    
    With "clang 6.0.0-1ubuntu2" on Ubuntu Bionic, the test with build
    fine, but clang still suggest braces around the zero initializer in a
    few places, where there is a subobject. Expand test to include a sub
    struct which doesn't build on clang 6.0.0-1ubuntu2, and give:
        config-temp/qemu-conf.c:7:8: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
        } x = {0};
               ^
               {}
    
    These are the error reported by clang on QEMU's code (v7.2.0):
    hw/pci-bridge/cxl_downstream.c:101:51: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
        dvsec = (uint8_t *)&(CXLDVSECPortExtensions){ 0 };
    
    hw/pci-bridge/cxl_root_port.c:62:51: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
        dvsec = (uint8_t *)&(CXLDVSECPortExtensions){ 0 };
    
    tests/qtest/virtio-net-test.c:322:34: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
        QOSGraphTestOptions opts = { 0 };
    
    Reported-by: Andrew Cooper <Andrew.Cooper3@citrix.com>
    Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
    Message-Id: <20230106142110.672-1-anthony.perard@citrix.com>
---
 configure | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure b/configure
index 26c7bc5154..08eac0d42c 100755
--- a/configure
+++ b/configure
@@ -1288,7 +1288,11 @@ fi
 # Disable -Wmissing-braces on older compilers that warn even for
 # the "universal" C zero initializer {0}.
 cat > $TMPC << EOF
+struct s {
+  void *a;
+};
 struct {
+  struct s s;
   int a[2];
 } x = {0};
 EOF
--
generated by git-patchbot for /home/xen/git/qemu-xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 08:33:10 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 08:33:10 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481478.746365 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImpb-0002MZ-IK; Fri, 20 Jan 2023 08:33:03 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481478.746365; Fri, 20 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImpb-0002MR-Ep; Fri, 20 Jan 2023 08:33:03 +0000
Received: by outflank-mailman (input) for mailman id 481478;
 Fri, 20 Jan 2023 08:33:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImpa-0002ML-C1
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImpa-0007S8-98
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImpa-0001pX-85
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=kfgeU7XAlwJ21ldoK7e0z9LdCm6+zin04YMzEF0zXSY=; b=dRx1/QmtAHvp7xEolUexGpiomC
	teZHMPCxVYAYr3wk6GPy63aF2gIt/Kx3YJBLnlgbT6zwzNIm0aOSedN8C2KH6tIlWXbss+3OXIiCM
	fbH9uHSMhyJOum/mMWyNnHrQquuhzq08zrXZ/qr+cjsmM4qO77Kn3XTuHjGTUNkHzHG8=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/riscv: introduce stack stuff
Message-Id: <E1pImpa-0001pX-85@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 08:33:02 +0000

commit 83d9679db057d5736c7b5a56db06bb6bb66c3914
Author:     Oleksii Kurochko <oleksii.kurochko@gmail.com>
AuthorDate: Tue Jan 10 17:17:56 2023 +0200
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Wed Jan 11 23:46:12 2023 +0000

    xen/riscv: introduce stack stuff
    
    The patch introduces and sets up a stack in order to go to C environment
    
    Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
    Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/riscv/Makefile             |  1 +
 xen/arch/riscv/include/asm/config.h |  2 ++
 xen/arch/riscv/riscv64/head.S       |  6 +++++-
 xen/arch/riscv/setup.c              | 14 ++++++++++++++
 4 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/xen/arch/riscv/Makefile b/xen/arch/riscv/Makefile
index 248f2cbb3e..5a67a3f493 100644
--- a/xen/arch/riscv/Makefile
+++ b/xen/arch/riscv/Makefile
@@ -1,4 +1,5 @@
 obj-$(CONFIG_RISCV_64) += riscv64/
+obj-y += setup.o
 
 $(TARGET): $(TARGET)-syms
 	$(OBJCOPY) -O binary -S $< $@
diff --git a/xen/arch/riscv/include/asm/config.h b/xen/arch/riscv/include/asm/config.h
index 0370f865f3..763a922a04 100644
--- a/xen/arch/riscv/include/asm/config.h
+++ b/xen/arch/riscv/include/asm/config.h
@@ -43,6 +43,8 @@
 
 #define SMP_CACHE_BYTES (1 << 6)
 
+#define STACK_SIZE PAGE_SIZE
+
 #endif /* __RISCV_CONFIG_H__ */
 /*
  * Local variables:
diff --git a/xen/arch/riscv/riscv64/head.S b/xen/arch/riscv/riscv64/head.S
index 990edb70a0..d444dd8aad 100644
--- a/xen/arch/riscv/riscv64/head.S
+++ b/xen/arch/riscv/riscv64/head.S
@@ -1,4 +1,8 @@
         .section .text.header, "ax", %progbits
 
 ENTRY(start)
-        j  start
+        la      sp, cpu0_boot_stack
+        li      t0, STACK_SIZE
+        add     sp, sp, t0
+
+        tail    start_xen
diff --git a/xen/arch/riscv/setup.c b/xen/arch/riscv/setup.c
new file mode 100644
index 0000000000..13e24e2fe1
--- /dev/null
+++ b/xen/arch/riscv/setup.c
@@ -0,0 +1,14 @@
+#include <xen/compile.h>
+#include <xen/init.h>
+
+/* Xen stack for bringing up the first CPU. */
+unsigned char __initdata cpu0_boot_stack[STACK_SIZE]
+    __aligned(STACK_SIZE);
+
+void __init noreturn start_xen(void)
+{
+    for ( ;; )
+        asm volatile ("wfi");
+
+    unreachable();
+}
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 08:33:13 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 08:33:13 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481479.746368 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImpl-0002OD-Iy; Fri, 20 Jan 2023 08:33:13 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481479.746368; Fri, 20 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImpl-0002O5-GL; Fri, 20 Jan 2023 08:33:13 +0000
Received: by outflank-mailman (input) for mailman id 481479;
 Fri, 20 Jan 2023 08:33:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImpk-0002Nz-DJ
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImpk-0007SE-Cd
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImpk-0001qI-Bc
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Cc54JD2edn3s4mVGQPH5M/1ABMAkU3w+hx/EVafOgiU=; b=mV6T5PRHedhtYl91H6/QVe9KbQ
	Ml9feK4QlyZNiKFCZ6E9zTAb/+SYorgIHLu0dVNPe3rhh72QiZkLc4GM97ZrlD9ZkqinwsqdYedyr
	mGulJ9IqYfC9ZMCT5X5e5jIDhH1tZWo3v+Gllsp7SalWooR1o0IbajJe4ghDjBb+M8kE=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/iommu: introduce AMD-Vi and Intel VT-d Kconfig options
Message-Id: <E1pImpk-0001qI-Bc@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 08:33:12 +0000

commit c47e5d94d0bd0c283bf7f1b31e42314065d82be4
Author:     Xenia Ragiadakou <burzalodowa@gmail.com>
AuthorDate: Thu Jan 12 11:09:16 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 12 11:09:16 2023 +0100

    x86/iommu: introduce AMD-Vi and Intel VT-d Kconfig options
    
    Introduce two new Kconfig options, AMD_IOMMU and INTEL_IOMMU, to allow code
    specific to each IOMMU technology to be separated and, when not required,
    stripped. AMD_IOMMU will be used to enable IOMMU support for platforms that
    implement the AMD I/O Virtualization Technology. INTEL_IOMMU will be used to
    enable IOMMU support for platforms that implement the Intel Virtualization
    Technology for Directed I/O.
    
    Since, at this point, disabling any of them would cause Xen to not compile,
    the options are not visible to the user and are enabled by default if X86.
    
    Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/passthrough/Kconfig  | 6 ++++++
 xen/drivers/passthrough/Makefile | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/xen/drivers/passthrough/Kconfig b/xen/drivers/passthrough/Kconfig
index 479d7de57a..5c65567744 100644
--- a/xen/drivers/passthrough/Kconfig
+++ b/xen/drivers/passthrough/Kconfig
@@ -37,6 +37,12 @@ config IPMMU_VMSA
 
 endif
 
+config AMD_IOMMU
+	def_bool y if X86
+
+config INTEL_IOMMU
+	def_bool y if X86
+
 config IOMMU_FORCE_PT_SHARE
 	bool
 
diff --git a/xen/drivers/passthrough/Makefile b/xen/drivers/passthrough/Makefile
index a5efa22714..a1621540b7 100644
--- a/xen/drivers/passthrough/Makefile
+++ b/xen/drivers/passthrough/Makefile
@@ -1,5 +1,5 @@
-obj-$(CONFIG_X86) += vtd/
-obj-$(CONFIG_X86) += amd/
+obj-$(CONFIG_INTEL_IOMMU) += vtd/
+obj-$(CONFIG_AMD_IOMMU) += amd/
 obj-$(CONFIG_X86) += x86/
 obj-$(CONFIG_ARM) += arm/
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 08:33:23 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 08:33:23 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481480.746372 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImpv-0002Rz-KX; Fri, 20 Jan 2023 08:33:23 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481480.746372; Fri, 20 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImpv-0002Rs-Hq; Fri, 20 Jan 2023 08:33:23 +0000
Received: by outflank-mailman (input) for mailman id 481480;
 Fri, 20 Jan 2023 08:33:22 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImpu-0002Ri-H0
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:22 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImpu-0007Sd-GE
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:22 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImpu-0001qj-FI
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:22 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=nRSTdOskMVGBQjPtgDpATMnY6iqisxYAJAnqQjCqwEs=; b=oFuMHwXanrauvRcHKmhEJlSyGQ
	WV/WT/yEMDTOrZPiwcFLPAY/PsXquKa6M865klCXAJ4Z2BtkzgUPt1k6M2uzGXnW5P4W862kJ10wd
	FmcNI8nBmKGMUbwv2Bay5Efi1wGDz2uwQez+bk5McrrARvdAx82bEzWyddqbj90APFLA=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/shadow: drop a few uses of mfn_valid()
Message-Id: <E1pImpu-0001qj-FI@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 08:33:22 +0000

commit 2497cb428250de36df088b36a47f89a10c115b94
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Jan 12 11:11:47 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 12 11:11:47 2023 +0100

    x86/shadow: drop a few uses of mfn_valid()
    
    v->arch.paging.shadow.shadow_table[], v->arch.paging.shadow.oos[],
    v->arch.paging.shadow.oos_{snapshot[],fixup[].smfn[]} as well as the
    hash table are all only ever written with valid MFNs or INVALID_MFN.
    Avoid the somewhat expensive mfn_valid() when checking MFNs coming from
    these arrays.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/mm/shadow/common.c  | 21 ++++++++++-----------
 xen/arch/x86/mm/shadow/multi.c   |  8 ++++----
 xen/arch/x86/mm/shadow/private.h |  4 +++-
 3 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index 6f2685d4cf..3f2caf1598 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -171,7 +171,7 @@ static void sh_oos_audit(struct domain *d)
         for ( idx = 0; idx < SHADOW_OOS_PAGES; idx++ )
         {
             mfn_t *oos = v->arch.paging.shadow.oos;
-            if ( !mfn_valid(oos[idx]) )
+            if ( mfn_eq(oos[idx], INVALID_MFN) )
                 continue;
 
             expected_idx = mfn_x(oos[idx]) % SHADOW_OOS_PAGES;
@@ -327,8 +327,7 @@ void oos_fixup_add(struct domain *d, mfn_t gmfn,
             int i;
             for ( i = 0; i < SHADOW_OOS_FIXUPS; i++ )
             {
-                if ( mfn_valid(oos_fixup[idx].smfn[i])
-                     && mfn_eq(oos_fixup[idx].smfn[i], smfn)
+                if ( mfn_eq(oos_fixup[idx].smfn[i], smfn)
                      && (oos_fixup[idx].off[i] == off) )
                     return;
             }
@@ -461,7 +460,7 @@ static void oos_hash_add(struct vcpu *v, mfn_t gmfn)
     idx = mfn_x(gmfn) % SHADOW_OOS_PAGES;
     oidx = idx;
 
-    if ( mfn_valid(oos[idx])
+    if ( !mfn_eq(oos[idx], INVALID_MFN)
          && (mfn_x(oos[idx]) % SHADOW_OOS_PAGES) == idx )
     {
         /* Punt the current occupant into the next slot */
@@ -470,8 +469,8 @@ static void oos_hash_add(struct vcpu *v, mfn_t gmfn)
         swap = 1;
         idx = (idx + 1) % SHADOW_OOS_PAGES;
     }
-    if ( mfn_valid(oos[idx]) )
-   {
+    if ( !mfn_eq(oos[idx], INVALID_MFN) )
+    {
         /* Crush the current occupant. */
         _sh_resync(v, oos[idx], &oos_fixup[idx], oos_snapshot[idx]);
         perfc_incr(shadow_unsync_evict);
@@ -607,7 +606,7 @@ void sh_resync_all(struct vcpu *v, int skip, int this, int others)
 
     /* First: resync all of this vcpu's oos pages */
     for ( idx = 0; idx < SHADOW_OOS_PAGES; idx++ )
-        if ( mfn_valid(oos[idx]) )
+        if ( !mfn_eq(oos[idx], INVALID_MFN) )
         {
             /* Write-protect and sync contents */
             _sh_resync(v, oos[idx], &oos_fixup[idx], oos_snapshot[idx]);
@@ -630,7 +629,7 @@ void sh_resync_all(struct vcpu *v, int skip, int this, int others)
 
         for ( idx = 0; idx < SHADOW_OOS_PAGES; idx++ )
         {
-            if ( !mfn_valid(oos[idx]) )
+            if ( mfn_eq(oos[idx], INVALID_MFN) )
                 continue;
 
             if ( skip )
@@ -2231,7 +2230,7 @@ void sh_remove_shadows(struct domain *d, mfn_t gmfn, int fast, int all)
          !(pg->shadow_flags & (1 << t)) )                               \
         break;                                                          \
     smfn = shadow_hash_lookup(d, mfn_x(gmfn), t);                       \
-    if ( unlikely(!mfn_valid(smfn)) )                                   \
+    if ( unlikely(mfn_eq(smfn, INVALID_MFN)) )                          \
     {                                                                   \
         printk(XENLOG_G_ERR "gmfn %"PRI_mfn" has flags %#x"             \
                " but no type-%#x shadow\n",                             \
@@ -2822,7 +2821,7 @@ void shadow_teardown(struct domain *d, bool *preempted)
             int i;
             mfn_t *oos_snapshot = v->arch.paging.shadow.oos_snapshot;
             for ( i = 0; i < SHADOW_OOS_PAGES; i++ )
-                if ( mfn_valid(oos_snapshot[i]) )
+                if ( !mfn_eq(oos_snapshot[i], INVALID_MFN) )
                 {
                     shadow_free(d, oos_snapshot[i]);
                     oos_snapshot[i] = INVALID_MFN;
@@ -3005,7 +3004,7 @@ static int shadow_one_bit_disable(struct domain *d, u32 mode)
                 int i;
                 mfn_t *oos_snapshot = v->arch.paging.shadow.oos_snapshot;
                 for ( i = 0; i < SHADOW_OOS_PAGES; i++ )
-                    if ( mfn_valid(oos_snapshot[i]) )
+                    if ( !mfn_eq(oos_snapshot[i], INVALID_MFN) )
                     {
                         shadow_free(d, oos_snapshot[i]);
                         oos_snapshot[i] = INVALID_MFN;
diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c
index 5595f42162..e76c1cdb93 100644
--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -110,7 +110,7 @@ get_fl1_shadow_status(struct domain *d, gfn_t gfn)
 /* Look for FL1 shadows in the hash table */
 {
     mfn_t smfn = shadow_hash_lookup(d, gfn_x(gfn), SH_type_fl1_shadow);
-    ASSERT(!mfn_valid(smfn) || mfn_to_page(smfn)->u.sh.head);
+    ASSERT(mfn_eq(smfn, INVALID_MFN) || mfn_to_page(smfn)->u.sh.head);
     return smfn;
 }
 
@@ -2677,7 +2677,7 @@ static int cf_check sh_page_fault(
                 mfn_t smfn = pagetable_get_mfn(
                                  v->arch.paging.shadow.shadow_table[i]);
 
-                if ( mfn_valid(smfn) && (mfn_x(smfn) != 0) )
+                if ( mfn_x(smfn) )
                 {
                     used |= (mfn_to_page(smfn)->v.sh.back == mfn_x(gmfn));
 
@@ -3821,7 +3821,7 @@ static void cf_check sh_pagetable_dying(paddr_t gpa)
                    : shadow_hash_lookup(d, mfn_x(gmfn), SH_type_l2_pae_shadow);
         }
 
-        if ( mfn_valid(smfn) )
+        if ( !mfn_eq(smfn, INVALID_MFN) )
         {
             gmfn = _mfn(mfn_to_page(smfn)->v.sh.back);
             mfn_to_page(gmfn)->pagetable_dying = true;
@@ -3864,7 +3864,7 @@ static void cf_check sh_pagetable_dying(paddr_t gpa)
     smfn = shadow_hash_lookup(d, mfn_x(gmfn), SH_type_l4_64_shadow);
 #endif
 
-    if ( mfn_valid(smfn) )
+    if ( !mfn_eq(smfn, INVALID_MFN) )
     {
         mfn_to_page(gmfn)->pagetable_dying = true;
         shadow_unhook_mappings(d, smfn, 1/* user pages only */);
diff --git a/xen/arch/x86/mm/shadow/private.h b/xen/arch/x86/mm/shadow/private.h
index e5329e0d0c..f080baff79 100644
--- a/xen/arch/x86/mm/shadow/private.h
+++ b/xen/arch/x86/mm/shadow/private.h
@@ -764,8 +764,10 @@ get_shadow_status(struct domain *d, mfn_t gmfn, u32 shadow_type)
 /* Look for shadows in the hash table */
 {
     mfn_t smfn = shadow_hash_lookup(d, mfn_x(gmfn), shadow_type);
-    ASSERT(!mfn_valid(smfn) || mfn_to_page(smfn)->u.sh.head);
+
+    ASSERT(mfn_eq(smfn, INVALID_MFN) || mfn_to_page(smfn)->u.sh.head);
     perfc_incr(shadow_get_shadow_status);
+
     return smfn;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 08:33:33 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 08:33:33 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481481.746377 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImq5-0002UM-M4; Fri, 20 Jan 2023 08:33:33 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481481.746377; Fri, 20 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImq5-0002UE-JO; Fri, 20 Jan 2023 08:33:33 +0000
Received: by outflank-mailman (input) for mailman id 481481;
 Fri, 20 Jan 2023 08:33:32 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImq4-0002U5-K2
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:32 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImq4-0007Sq-JI
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:32 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImq4-0001rM-IW
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:32 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=Q5ySNGvlCgANcP9s3D5B802NM/1wdQ8yWGJrqP79lhs=; b=jUFuL7Letd1csoLG5vc7DJH/jo
	CfbDf3pEHCwyYNPLVkY6/IPeF2DmX7mlb4+8aMsHvmZeqbzZH1a8zuqpnOPdzz9EYwBibzvBEaajv
	UZ74DeeP2/GPV0gfyzqiI5vf7MgeQc3iY188b/mNUm7/Psf7r1iDLxCmKjMmHLwqU77I=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/shadow: reduce effort of hash calculation
Message-Id: <E1pImq4-0001rM-IW@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 08:33:32 +0000

commit d2123363788cc60b1d33123d93d27a49e5a37a43
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Jan 12 11:12:35 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 12 11:12:35 2023 +0100

    x86/shadow: reduce effort of hash calculation
    
    The "n" input is a GFN/MFN value and hence bounded by the physical
    address bits in use on a system. The hash quality won't improve by also
    including the upper always-zero bits in the calculation. To keep things
    as compile-time-constant as they were before, use PADDR_BITS (not
    paddr_bits) for loop bounding. This reduces loop iterations from 8 to 5.
    
    While there also drop the unnecessary conversion to an array of unsigned
    char, moving the value off the stack altogether (at least with
    optimization enabled).
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/mm/shadow/common.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index 3f2caf1598..0c405ea5f3 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -1397,10 +1397,13 @@ static unsigned int shadow_get_allocation(struct domain *d)
 typedef u32 key_t;
 static inline key_t sh_hash(unsigned long n, unsigned int t)
 {
-    unsigned char *p = (unsigned char *)&n;
     key_t k = t;
     int i;
-    for ( i = 0; i < sizeof(n) ; i++ ) k = (u32)p[i] + (k<<6) + (k<<16) - k;
+
+    BUILD_BUG_ON(PADDR_BITS > BITS_PER_LONG + PAGE_SHIFT);
+    for ( i = 0; i < (PADDR_BITS - PAGE_SHIFT + 7) / 8; i++, n >>= 8 )
+        k = (uint8_t)n + (k << 6) + (k << 16) - k;
+
     return k % SHADOW_HASH_BUCKETS;
 }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 08:33:44 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 08:33:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481482.746382 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImqF-0002XP-Ox; Fri, 20 Jan 2023 08:33:43 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481482.746382; Fri, 20 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImqF-0002XH-LG; Fri, 20 Jan 2023 08:33:43 +0000
Received: by outflank-mailman (input) for mailman id 481482;
 Fri, 20 Jan 2023 08:33:42 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqE-0002X4-NM
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:42 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqE-0007T2-Me
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:42 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqE-0001rv-Lm
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:42 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=UxPmI+LXToKnaECu6FiDiywcSnKW6McUxIn6MGFWQHo=; b=ZVPyc4ZHTCOLEEo3BUas/3uqfP
	pvTwsdcgA3+NmhfqbeZCkAh4fxP8ciWVe/uCzaYFDunfU81jT2z0HjJvX3P27rEqeLOUqHnwkBpWt
	Wn0aDKBC7omzCgLIZscHSUHVOKz3j99Pldjap4zMZe0jHwMS9G8FJLnEo23S5tmomjfo=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/shadow: call sh_detach_old_tables() directly
Message-Id: <E1pImqE-0001rv-Lm@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 08:33:42 +0000

commit 661489874e87c0f6e21ac298b039aab9379f6ee0
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Jan 12 11:14:50 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 12 11:14:50 2023 +0100

    x86/shadow: call sh_detach_old_tables() directly
    
    There's nothing really mode specific in this function anymore (the
    varying number of valid entries in v->arch.paging.shadow.shadow_table[]
    is dealt with fine by the zero check, and we have other similar cases of
    iterating through the full array in common.c), and hence there's neither
    a need to have multiple instances of it, nor does it need calling
    through a function pointer.
    
    While moving the function drop a non-conforming and not very useful
    (anymore) comment.
    
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
 xen/arch/x86/include/asm/paging.h |  1 -
 xen/arch/x86/mm/shadow/common.c   | 25 ++++++++++++++++++++++---
 xen/arch/x86/mm/shadow/multi.c    | 25 -------------------------
 xen/arch/x86/mm/shadow/types.h    |  1 -
 4 files changed, 22 insertions(+), 30 deletions(-)

diff --git a/xen/arch/x86/include/asm/paging.h b/xen/arch/x86/include/asm/paging.h
index b2b243a4ff..8c0b0ef29a 100644
--- a/xen/arch/x86/include/asm/paging.h
+++ b/xen/arch/x86/include/asm/paging.h
@@ -98,7 +98,6 @@
 
 struct shadow_paging_mode {
 #ifdef CONFIG_SHADOW_PAGING
-    void          (*detach_old_tables     )(struct vcpu *v);
 #ifdef CONFIG_PV
     void          (*write_guest_entry     )(struct vcpu *v, intpte_t *p,
                                             intpte_t new, mfn_t gmfn);
diff --git a/xen/arch/x86/mm/shadow/common.c b/xen/arch/x86/mm/shadow/common.c
index 0c405ea5f3..8b4bea5f92 100644
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -2302,6 +2302,25 @@ void shadow_prepare_page_type_change(struct domain *d,
     shadow_remove_all_shadows(d, page_to_mfn(page));
 }
 
+/*
+ * Removes v->arch.paging.shadow.shadow_table[].
+ * Does all appropriate management/bookkeeping/refcounting/etc...
+ */
+static void sh_detach_old_tables(struct vcpu *v)
+{
+    struct domain *d = v->domain;
+    unsigned int i;
+
+    for ( i = 0; i < ARRAY_SIZE(v->arch.paging.shadow.shadow_table); ++i )
+    {
+        mfn_t smfn = pagetable_get_mfn(v->arch.paging.shadow.shadow_table[i]);
+
+        if ( mfn_x(smfn) )
+            sh_put_ref(d, smfn, 0);
+        v->arch.paging.shadow.shadow_table[i] = pagetable_null();
+    }
+}
+
 /**************************************************************************/
 
 /* Reset the up-pointers of every L3 shadow to 0.
@@ -2373,7 +2392,7 @@ static void sh_update_paging_modes(struct vcpu *v)
     // First, tear down any old shadow tables held by this vcpu.
     //
     if ( v->arch.paging.mode )
-        v->arch.paging.mode->shadow.detach_old_tables(v);
+        sh_detach_old_tables(v);
 
 #ifdef CONFIG_HVM
     if ( is_hvm_domain(d) )
@@ -2761,7 +2780,7 @@ void shadow_vcpu_teardown(struct vcpu *v)
     if ( !paging_mode_shadow(d) || !v->arch.paging.mode )
         goto out;
 
-    v->arch.paging.mode->shadow.detach_old_tables(v);
+    sh_detach_old_tables(v);
 #ifdef CONFIG_HVM
     if ( shadow_mode_external(d) )
     {
@@ -2996,7 +3015,7 @@ static int shadow_one_bit_disable(struct domain *d, u32 mode)
         for_each_vcpu(d, v)
         {
             if ( v->arch.paging.mode )
-                v->arch.paging.mode->shadow.detach_old_tables(v);
+                sh_detach_old_tables(v);
             if ( !(v->arch.flags & TF_kernel_mode) )
                 make_cr3(v, pagetable_get_mfn(v->arch.guest_table_user));
             else
diff --git a/xen/arch/x86/mm/shadow/multi.c b/xen/arch/x86/mm/shadow/multi.c
index e76c1cdb93..cd5a778d52 100644
--- a/xen/arch/x86/mm/shadow/multi.c
+++ b/xen/arch/x86/mm/shadow/multi.c
@@ -3200,30 +3200,6 @@ sh_update_linear_entries(struct vcpu *v)
     sh_flush_local(d);
 }
 
-
-/*
- * Removes v->arch.paging.shadow.shadow_table[].
- * Does all appropriate management/bookkeeping/refcounting/etc...
- */
-static void cf_check sh_detach_old_tables(struct vcpu *v)
-{
-    struct domain *d = v->domain;
-    mfn_t smfn;
-    unsigned int i;
-
-    ////
-    //// vcpu->arch.paging.shadow.shadow_table[]
-    ////
-
-    for_each_shadow_table(v, i)
-    {
-        smfn = pagetable_get_mfn(v->arch.paging.shadow.shadow_table[i]);
-        if ( mfn_x(smfn) )
-            sh_put_ref(d, smfn, 0);
-        v->arch.paging.shadow.shadow_table[i] = pagetable_null();
-    }
-}
-
 static void cf_check sh_update_cr3(struct vcpu *v, int do_locking, bool noflush)
 /* Updates vcpu->arch.cr3 after the guest has changed CR3.
  * Paravirtual guests should set v->arch.guest_table (and guest_table_user,
@@ -4206,7 +4182,6 @@ const struct paging_mode sh_paging_mode = {
     .update_paging_modes           = shadow_update_paging_modes,
     .flush_tlb                     = shadow_flush_tlb,
     .guest_levels                  = GUEST_PAGING_LEVELS,
-    .shadow.detach_old_tables      = sh_detach_old_tables,
 #ifdef CONFIG_PV
     .shadow.write_guest_entry      = sh_write_guest_entry,
     .shadow.cmpxchg_guest_entry    = sh_cmpxchg_guest_entry,
diff --git a/xen/arch/x86/mm/shadow/types.h b/xen/arch/x86/mm/shadow/types.h
index 814a401853..fac59522b0 100644
--- a/xen/arch/x86/mm/shadow/types.h
+++ b/xen/arch/x86/mm/shadow/types.h
@@ -236,7 +236,6 @@ static inline shadow_l4e_t shadow_l4e_from_mfn(mfn_t mfn, u32 flags)
 #define sh_unhook_pae_mappings     INTERNAL_NAME(sh_unhook_pae_mappings)
 #define sh_unhook_64b_mappings     INTERNAL_NAME(sh_unhook_64b_mappings)
 #define sh_paging_mode             INTERNAL_NAME(sh_paging_mode)
-#define sh_detach_old_tables       INTERNAL_NAME(sh_detach_old_tables)
 #define sh_audit_l1_table          INTERNAL_NAME(sh_audit_l1_table)
 #define sh_audit_fl1_table         INTERNAL_NAME(sh_audit_fl1_table)
 #define sh_audit_l2_table          INTERNAL_NAME(sh_audit_l2_table)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 08:33:54 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 08:33:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481483.746385 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImqQ-0002ai-Rk; Fri, 20 Jan 2023 08:33:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481483.746385; Fri, 20 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImqQ-0002aa-Oy; Fri, 20 Jan 2023 08:33:54 +0000
Received: by outflank-mailman (input) for mailman id 481483;
 Fri, 20 Jan 2023 08:33:52 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqO-0002aI-QD
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:52 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqO-0007TV-PZ
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:52 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqO-0001sL-Oj
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:33:52 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=mhjRGMRvwTDnm0MGnY6tQ07vYWSWt9Wda6XnYyiXxNc=; b=j3Z4awyME+XHcK4kVHbAvG/fNK
	EhwlCGGWTimqDdB/VzIpeO5JICraLABD6avGVUW3bfwW1hzsrBeR42qh8NuL/+tcS3qEpRl4gsDsR
	uoOyPyHb/HaCVMkad6jsO2FszmrPxzGEseBeY6zCACSTwhljT+UptsKt07KY+SNzXdgg=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] include/compat: produce stubs for headers not otherwise generated
Message-Id: <E1pImqO-0001sL-Oj@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 08:33:52 +0000

commit 6bec713f871f21c6254a5783c1e39867ea828256
Author:     Jan Beulich <jbeulich@suse.com>
AuthorDate: Thu Jan 12 16:17:54 2023 +0100
Commit:     Jan Beulich <jbeulich@suse.com>
CommitDate: Thu Jan 12 16:17:54 2023 +0100

    include/compat: produce stubs for headers not otherwise generated
    
    Public headers can include other public headers. Such interdependencies
    are retained in their compat counterparts. Since some compat headers are
    generated only in certain configurations, the referenced headers still
    need to exist. The lack thereof was observed with hvm/hvm_op.h needing
    trace.h, where generation of the latter depends on TRACEBUFFER=y. Make
    empty stubs in such cases (as generating the extra headers is relatively
    slow and hence better to avoid). Changes to .config and incrementally
    (re-)building is covered by the respective .*.cmd then no longer
    matching the command to be used, resulting in the necessary re-creation
    of the (possibly stub) header.
    
    Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Signed-off-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
---
 xen/include/Makefile | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/xen/include/Makefile b/xen/include/Makefile
index 65be310eca..cfd7851614 100644
--- a/xen/include/Makefile
+++ b/xen/include/Makefile
@@ -34,6 +34,8 @@ headers-$(CONFIG_TRACEBUFFER) += compat/trace.h
 headers-$(CONFIG_XENOPROF) += compat/xenoprof.h
 headers-$(CONFIG_XSM_FLASK) += compat/xsm/flask_op.h
 
+headers-n := $(filter-out $(headers-y),$(headers-n) $(headers-))
+
 cppflags-y                := -include public/xen-compat.h -DXEN_GENERATING_COMPAT_HEADERS
 cppflags-$(CONFIG_X86)    += -m32
 
@@ -43,13 +45,16 @@ public-$(CONFIG_X86) := $(wildcard $(srcdir)/public/arch-x86/*.h $(srcdir)/publi
 public-$(CONFIG_ARM) := $(wildcard $(srcdir)/public/arch-arm/*.h $(srcdir)/public/arch-arm/*/*.h)
 
 .PHONY: all
-all: $(addprefix $(obj)/,$(headers-y))
+all: $(addprefix $(obj)/,$(headers-y) $(headers-n))
 
 quiet_cmd_compat_h = GEN     $@
 cmd_compat_h = \
     $(PYTHON) $(srctree)/tools/compat-build-header.py <$< $(patsubst $(obj)/%,%,$@) >>$@.new; \
     mv -f $@.new $@
 
+quiet_cmd_stub_h = GEN     $@
+cmd_stub_h = echo '/* empty */' >$@
+
 quiet_cmd_compat_i = CPP     $@
 cmd_compat_i = $(CPP) $(filter-out -Wa$(comma)% -include %/include/xen/config.h,$(XEN_CFLAGS)) $(cppflags-y) -o $@ $<
 
@@ -69,6 +74,13 @@ targets += $(headers-y)
 $(obj)/compat/%.h: $(obj)/compat/%.i $(srctree)/tools/compat-build-header.py FORCE
 	$(call if_changed,compat_h)
 
+# Placeholders may be needed in case files in $(headers-y) include files we
+# don't otherwise generate.  Real dependencies would need spelling out explicitly,
+# for them to appear in $(headers-y) instead.
+targets += $(headers-n)
+$(addprefix $(obj)/,$(headers-n)): FORCE
+	$(call if_changed,stub_h)
+
 .PRECIOUS: $(obj)/compat/%.i
 targets += $(patsubst %.h, %.i, $(headers-y))
 $(obj)/compat/%.i: $(obj)/compat/%.c FORCE
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 08:34:04 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 08:34:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481484.746389 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImqa-0002dN-TC; Fri, 20 Jan 2023 08:34:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481484.746389; Fri, 20 Jan 2023 08:34:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImqa-0002dG-Qb; Fri, 20 Jan 2023 08:34:04 +0000
Received: by outflank-mailman (input) for mailman id 481484;
 Fri, 20 Jan 2023 08:34:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqY-0002d6-TG
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqY-0007U3-SU
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqY-0001sx-Ri
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=bnuB/0pjYXUoRL2qa+q71l3PNCwfUrL7joNv+x6NuMI=; b=wk4p7bggw1gxBKq4pfKWqTBqey
	S0ahL7JYkx8X5sgzkgYDvZDoK0bnFEm1RUjZaD1cEWFkT2xRzlhB5trWt4+TpHDIO/ua+b4Z7WAtM
	YVNU8CNvWmLd1eayKI2otim0LqWetEwFfO8Wd6KqyyIs5YP8PZqsMQH0GpLOM8xkeD4E=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] public/version: Change xen_feature_info to have a fixed size
Message-Id: <E1pImqY-0001sx-Ri@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 08:34:02 +0000

commit 73f0696dc1d31a987563184ce1d01cbf5d12d6ab
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Dec 20 15:51:07 2022 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Jan 12 18:42:00 2023 +0000

    public/version: Change xen_feature_info to have a fixed size
    
    This is technically an ABI change, but Xen doesn't operate in any environment
    where "unsigned int" is different to uint32_t, so switch to the explicit form.
    This avoids the need to derive (identical) compat logic for handling the
    subop.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Acked-by: Julien Grall <jgrall@amazon.com>
---
 xen/include/public/version.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/include/public/version.h b/xen/include/public/version.h
index 9c78b4f3b6..0ff8bd9077 100644
--- a/xen/include/public/version.h
+++ b/xen/include/public/version.h
@@ -50,7 +50,7 @@ typedef struct xen_platform_parameters xen_platform_parameters_t;
 
 #define XENVER_get_features 6
 struct xen_feature_info {
-    unsigned int submap_idx;    /* IN: which 32-bit submap to return */
+    uint32_t     submap_idx;    /* IN: which 32-bit submap to return */
     uint32_t     submap;        /* OUT: 32-bit submap */
 };
 typedef struct xen_feature_info xen_feature_info_t;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 08:34:15 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 08:34:15 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481485.746394 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImql-0002fs-0J; Fri, 20 Jan 2023 08:34:15 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481485.746394; Fri, 20 Jan 2023 08:34:14 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImqk-0002fi-SH; Fri, 20 Jan 2023 08:34:14 +0000
Received: by outflank-mailman (input) for mailman id 481485;
 Fri, 20 Jan 2023 08:34:13 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqj-0002fS-04
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:13 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqi-0007UM-Vc
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqi-0001ue-Un
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=PgndqHPEoSzxEoAmmw15CRS3l0Swjfr0f7JWJ3SBpWE=; b=znX5yyZkrvMjP2U2RHyBQNDsVY
	+Z+9KQi4ROQNS5eo/UI+nxl9B2f9Yef+cRh1TX3sOQijADEXFeXIqyfC2e+r5MWeahnGsLR2ZeEQj
	RoYCD+TSidpSRVEzgII0uW2h3b+draN76O+OMqQSo/K0bSWxLawFfuiF+iyQP+3j5+TI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/version: Drop compat/kernel.c
Message-Id: <E1pImqi-0001ue-Un@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 08:34:12 +0000

commit e6ee01ad24b6a1c3b922579964deebb119a90a48
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Tue Jan 3 15:08:56 2023 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Jan 12 18:42:00 2023 +0000

    xen/version: Drop compat/kernel.c
    
    kernel.c is mostly in an #ifndef COMPAT guard, because compat/kernel.c
    re-includes kernel.c to recompile xen_version() in a compat form.
    
    However, the xen_version hypercall is almost guest-ABI-agnostic; only
    XENVER_platform_parameters has a compat split.  Handle this locally, and do
    away with the re-include entirely.  Also drop the CHECK_TYPE()'s between types
    that are simply char-arrays in their native and compat form.
    
    In particular, this removed the final instances of obfuscation via the DO()
    macro.
    
    No functional change.  Also saves 2k of of .text in the x86 build.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
 xen/common/Makefile          |  2 +-
 xen/common/compat/kernel.c   | 53 --------------------------------------------
 xen/common/kernel.c          | 43 ++++++++++++++++++++++-------------
 xen/include/hypercall-defs.c |  2 +-
 xen/include/xlat.lst         |  3 +++
 5 files changed, 33 insertions(+), 70 deletions(-)

diff --git a/xen/common/Makefile b/xen/common/Makefile
index 9a3a12b12d..bbd75b4be6 100644
--- a/xen/common/Makefile
+++ b/xen/common/Makefile
@@ -59,7 +59,7 @@ obj-y += xmalloc_tlsf.o
 
 obj-bin-$(CONFIG_X86) += $(foreach n,decompress bunzip2 unxz unlzma lzo unlzo unlz4 unzstd earlycpio,$(n).init.o)
 
-obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o kernel.o memory.o multicall.o xlat.o)
+obj-$(CONFIG_COMPAT) += $(addprefix compat/,domain.o memory.o multicall.o xlat.o)
 
 ifneq ($(CONFIG_PV_SHIM_EXCLUSIVE),y)
 obj-y += domctl.o
diff --git a/xen/common/compat/kernel.c b/xen/common/compat/kernel.c
deleted file mode 100644
index 804b919bdc..0000000000
--- a/xen/common/compat/kernel.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/******************************************************************************
- * kernel.c
- */
-
-EMIT_FILE;
-
-#include <xen/init.h>
-#include <xen/lib.h>
-#include <xen/errno.h>
-#include <xen/version.h>
-#include <xen/sched.h>
-#include <xen/guest_access.h>
-#include <asm/current.h>
-#include <compat/xen.h>
-#include <compat/version.h>
-
-extern xen_commandline_t saved_cmdline;
-
-#define xen_extraversion compat_extraversion
-#define xen_extraversion_t compat_extraversion_t
-
-#define xen_compile_info compat_compile_info
-#define xen_compile_info_t compat_compile_info_t
-
-CHECK_TYPE(capabilities_info);
-
-#define xen_platform_parameters compat_platform_parameters
-#define xen_platform_parameters_t compat_platform_parameters_t
-#undef HYPERVISOR_VIRT_START
-#define HYPERVISOR_VIRT_START HYPERVISOR_COMPAT_VIRT_START(current->domain)
-
-#define xen_changeset_info compat_changeset_info
-#define xen_changeset_info_t compat_changeset_info_t
-
-#define xen_feature_info compat_feature_info
-#define xen_feature_info_t compat_feature_info_t
-
-CHECK_TYPE(domain_handle);
-
-#define DO(fn) int compat_##fn
-#define COMPAT
-
-#include "../kernel.c"
-
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * tab-width: 4
- * indent-tabs-mode: nil
- * End:
- */
diff --git a/xen/common/kernel.c b/xen/common/kernel.c
index f8134d3e7a..4f268d83e3 100644
--- a/xen/common/kernel.c
+++ b/xen/common/kernel.c
@@ -18,7 +18,13 @@
 #include <asm/current.h>
 #include <public/version.h>
 
-#ifndef COMPAT
+#ifdef CONFIG_COMPAT
+#include <compat/version.h>
+
+CHECK_build_id;
+CHECK_compile_info;
+CHECK_feature_info;
+#endif
 
 enum system_state system_state = SYS_STATE_early_boot;
 
@@ -463,15 +469,7 @@ static int __init cf_check param_init(void)
 __initcall(param_init);
 #endif
 
-# define DO(fn) long do_##fn
-
-#endif
-
-/*
- * Simple hypercalls.
- */
-
-DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
+long do_xen_version(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
 {
     bool_t deny = !!xsm_xen_version(XSM_OTHER, cmd);
 
@@ -520,12 +518,27 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
     
     case XENVER_platform_parameters:
     {
-        xen_platform_parameters_t params = {
-            .virt_start = HYPERVISOR_VIRT_START
-        };
+#ifdef CONFIG_COMPAT
+        if ( current->hcall_compat )
+        {
+            compat_platform_parameters_t params = {
+                .virt_start = HYPERVISOR_COMPAT_VIRT_START(current->domain),
+            };
+
+            if ( copy_to_guest(arg, &params, 1) )
+                return -EFAULT;
+        }
+        else
+#endif
+        {
+            xen_platform_parameters_t params = {
+                .virt_start = HYPERVISOR_VIRT_START,
+            };
+
+            if ( copy_to_guest(arg, &params, 1) )
+                return -EFAULT;
+        }
 
-        if ( copy_to_guest(arg, &params, 1) )
-            return -EFAULT;
         return 0;
         
     }
diff --git a/xen/include/hypercall-defs.c b/xen/include/hypercall-defs.c
index 41e1af01f6..6d361ddfce 100644
--- a/xen/include/hypercall-defs.c
+++ b/xen/include/hypercall-defs.c
@@ -245,7 +245,7 @@ multicall                          compat:2 do:2     compat   do       do
 update_va_mapping                  compat   do       -        -        -
 set_timer_op                       compat   do       compat   do       -
 event_channel_op_compat            do       do       -        -        dep
-xen_version                        compat   do       compat   do       do
+xen_version                        do       do       do       do       do
 console_io                         do       do       do       do       do
 physdev_op_compat                  compat   do       -        -        dep
 #if defined(CONFIG_GRANT_TABLE)
diff --git a/xen/include/xlat.lst b/xen/include/xlat.lst
index 65f7fe3811..d601a8a984 100644
--- a/xen/include/xlat.lst
+++ b/xen/include/xlat.lst
@@ -169,6 +169,9 @@
 !	vcpu_runstate_info		vcpu.h
 ?	vcpu_set_periodic_timer		vcpu.h
 !	vcpu_set_singleshot_timer	vcpu.h
+?	build_id                        version.h
+?	compile_info                    version.h
+?	feature_info                    version.h
 ?	xenoprof_init			xenoprof.h
 ?	xenoprof_passive		xenoprof.h
 ?	flask_access			xsm/flask_op.h
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 08:34:25 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 08:34:25 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481486.746397 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImqv-0002ip-0l; Fri, 20 Jan 2023 08:34:25 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481486.746397; Fri, 20 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImqu-0002ih-Ty; Fri, 20 Jan 2023 08:34:24 +0000
Received: by outflank-mailman (input) for mailman id 481486;
 Fri, 20 Jan 2023 08:34:23 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqt-0002iS-2u
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:23 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqt-0007UY-2J
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:23 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImqt-0001vP-1f
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:23 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=7ZvDYJsKLkDozK0AbH7v+9jAupQwZ20bRRdli9Q16t4=; b=yEfifKosT4PrBNhAumW+F7I30u
	EY7cWF+DjXPjC//Cwy9Uyyiwnuib+n1H6k2yWaIbf2c0ftU3HJVygXtp131z8Xe5koRwe21v2JTIe
	txraMxyVTkjVZii+9Fe/Zn9pyoW42AUIL4rhCY2/gy7bgz/NEnS6DsK9R42pOP4B6gdU=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/vmx: Calculate model-specific LBRs once at start of day
Message-Id: <E1pImqt-0001vP-1f@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 08:34:23 +0000

commit e94af0d58f86c3a914b9cbbf4d9ed3d43b974771
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Jan 9 11:42:22 2023 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Jan 12 18:42:00 2023 +0000

    x86/vmx: Calculate model-specific LBRs once at start of day
    
    There is no point repeating this calculation at runtime, especially as it is
    in the fallback path of the WRSMR/RDMSR handlers.
    
    Move the infrastructure higher in vmx.c to avoid forward declarations,
    renaming last_branch_msr_get() to get_model_specific_lbr() to highlight that
    these are model-specific only.
    
    No practical change.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/hvm/vmx/vmx.c | 276 +++++++++++++++++++++++----------------------
 1 file changed, 139 insertions(+), 137 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 43a4865d1c..9f58c408da 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -396,6 +396,142 @@ void vmx_pi_hooks_deassign(struct domain *d)
     domain_unpause(d);
 }
 
+static const struct lbr_info {
+    u32 base, count;
+} p4_lbr[] = {
+    { MSR_P4_LER_FROM_LIP,          1 },
+    { MSR_P4_LER_TO_LIP,            1 },
+    { MSR_P4_LASTBRANCH_TOS,        1 },
+    { MSR_P4_LASTBRANCH_0_FROM_LIP, NUM_MSR_P4_LASTBRANCH_FROM_TO },
+    { MSR_P4_LASTBRANCH_0_TO_LIP,   NUM_MSR_P4_LASTBRANCH_FROM_TO },
+    { 0, 0 }
+}, c2_lbr[] = {
+    { MSR_IA32_LASTINTFROMIP,       1 },
+    { MSR_IA32_LASTINTTOIP,         1 },
+    { MSR_C2_LASTBRANCH_TOS,        1 },
+    { MSR_C2_LASTBRANCH_0_FROM_IP,  NUM_MSR_C2_LASTBRANCH_FROM_TO },
+    { MSR_C2_LASTBRANCH_0_TO_IP,    NUM_MSR_C2_LASTBRANCH_FROM_TO },
+    { 0, 0 }
+}, nh_lbr[] = {
+    { MSR_IA32_LASTINTFROMIP,       1 },
+    { MSR_IA32_LASTINTTOIP,         1 },
+    { MSR_NHL_LBR_SELECT,           1 },
+    { MSR_NHL_LASTBRANCH_TOS,       1 },
+    { MSR_P4_LASTBRANCH_0_FROM_LIP, NUM_MSR_P4_LASTBRANCH_FROM_TO },
+    { MSR_P4_LASTBRANCH_0_TO_LIP,   NUM_MSR_P4_LASTBRANCH_FROM_TO },
+    { 0, 0 }
+}, sk_lbr[] = {
+    { MSR_IA32_LASTINTFROMIP,       1 },
+    { MSR_IA32_LASTINTTOIP,         1 },
+    { MSR_NHL_LBR_SELECT,           1 },
+    { MSR_NHL_LASTBRANCH_TOS,       1 },
+    { MSR_SKL_LASTBRANCH_0_FROM_IP, NUM_MSR_SKL_LASTBRANCH },
+    { MSR_SKL_LASTBRANCH_0_TO_IP,   NUM_MSR_SKL_LASTBRANCH },
+    { MSR_SKL_LASTBRANCH_0_INFO,    NUM_MSR_SKL_LASTBRANCH },
+    { 0, 0 }
+}, at_lbr[] = {
+    { MSR_IA32_LASTINTFROMIP,       1 },
+    { MSR_IA32_LASTINTTOIP,         1 },
+    { MSR_C2_LASTBRANCH_TOS,        1 },
+    { MSR_C2_LASTBRANCH_0_FROM_IP,  NUM_MSR_ATOM_LASTBRANCH_FROM_TO },
+    { MSR_C2_LASTBRANCH_0_TO_IP,    NUM_MSR_ATOM_LASTBRANCH_FROM_TO },
+    { 0, 0 }
+}, sm_lbr[] = {
+    { MSR_IA32_LASTINTFROMIP,       1 },
+    { MSR_IA32_LASTINTTOIP,         1 },
+    { MSR_SM_LBR_SELECT,            1 },
+    { MSR_SM_LASTBRANCH_TOS,        1 },
+    { MSR_C2_LASTBRANCH_0_FROM_IP,  NUM_MSR_ATOM_LASTBRANCH_FROM_TO },
+    { MSR_C2_LASTBRANCH_0_TO_IP,    NUM_MSR_ATOM_LASTBRANCH_FROM_TO },
+    { 0, 0 }
+}, gm_lbr[] = {
+    { MSR_IA32_LASTINTFROMIP,       1 },
+    { MSR_IA32_LASTINTTOIP,         1 },
+    { MSR_SM_LBR_SELECT,            1 },
+    { MSR_SM_LASTBRANCH_TOS,        1 },
+    { MSR_GM_LASTBRANCH_0_FROM_IP,  NUM_MSR_GM_LASTBRANCH_FROM_TO },
+    { MSR_GM_LASTBRANCH_0_TO_IP,    NUM_MSR_GM_LASTBRANCH_FROM_TO },
+    { 0, 0 }
+};
+static const struct lbr_info *__ro_after_init model_specific_lbr;
+
+static const struct lbr_info *__init get_model_specific_lbr(void)
+{
+    switch ( boot_cpu_data.x86 )
+    {
+    case 6:
+        switch ( boot_cpu_data.x86_model )
+        {
+        /* Core2 Duo */
+        case 0x0f:
+        /* Enhanced Core */
+        case 0x17:
+        /* Xeon 7400 */
+        case 0x1d:
+            return c2_lbr;
+        /* Nehalem */
+        case 0x1a: case 0x1e: case 0x1f: case 0x2e:
+        /* Westmere */
+        case 0x25: case 0x2c: case 0x2f:
+        /* Sandy Bridge */
+        case 0x2a: case 0x2d:
+        /* Ivy Bridge */
+        case 0x3a: case 0x3e:
+        /* Haswell */
+        case 0x3c: case 0x3f: case 0x45: case 0x46:
+        /* Broadwell */
+        case 0x3d: case 0x47: case 0x4f: case 0x56:
+            return nh_lbr;
+        /* Skylake */
+        case 0x4e: case 0x5e:
+        /* Xeon Scalable */
+        case 0x55:
+        /* Cannon Lake */
+        case 0x66:
+        /* Goldmont Plus */
+        case 0x7a:
+        /* Ice Lake */
+        case 0x6a: case 0x6c: case 0x7d: case 0x7e:
+        /* Tiger Lake */
+        case 0x8c: case 0x8d:
+        /* Tremont */
+        case 0x86:
+        /* Kaby Lake */
+        case 0x8e: case 0x9e:
+        /* Comet Lake */
+        case 0xa5: case 0xa6:
+            return sk_lbr;
+        /* Atom */
+        case 0x1c: case 0x26: case 0x27: case 0x35: case 0x36:
+            return at_lbr;
+        /* Silvermont */
+        case 0x37: case 0x4a: case 0x4d: case 0x5a: case 0x5d:
+        /* Xeon Phi Knights Landing */
+        case 0x57:
+        /* Xeon Phi Knights Mill */
+        case 0x85:
+        /* Airmont */
+        case 0x4c:
+            return sm_lbr;
+        /* Goldmont */
+        case 0x5c: case 0x5f:
+            return gm_lbr;
+        }
+        break;
+
+    case 15:
+        switch ( boot_cpu_data.x86_model )
+        {
+        /* Pentium4/Xeon with em64t */
+        case 3: case 4: case 6:
+            return p4_lbr;
+        }
+        break;
+    }
+
+    return NULL;
+}
+
 static int cf_check vmx_domain_initialise(struct domain *d)
 {
     static const struct arch_csw csw = {
@@ -2846,6 +2982,7 @@ const struct hvm_function_table * __init start_vmx(void)
         vmx_function_table.tsc_scaling.setup = vmx_setup_tsc_scaling;
     }
 
+    model_specific_lbr = get_model_specific_lbr();
     lbr_tsx_fixup_check();
     ler_to_fixup_check();
 
@@ -2992,141 +3129,6 @@ static int vmx_cr_access(cr_access_qual_t qual)
     return X86EMUL_OKAY;
 }
 
-static const struct lbr_info {
-    u32 base, count;
-} p4_lbr[] = {
-    { MSR_P4_LER_FROM_LIP,          1 },
-    { MSR_P4_LER_TO_LIP,            1 },
-    { MSR_P4_LASTBRANCH_TOS,        1 },
-    { MSR_P4_LASTBRANCH_0_FROM_LIP, NUM_MSR_P4_LASTBRANCH_FROM_TO },
-    { MSR_P4_LASTBRANCH_0_TO_LIP,   NUM_MSR_P4_LASTBRANCH_FROM_TO },
-    { 0, 0 }
-}, c2_lbr[] = {
-    { MSR_IA32_LASTINTFROMIP,       1 },
-    { MSR_IA32_LASTINTTOIP,         1 },
-    { MSR_C2_LASTBRANCH_TOS,        1 },
-    { MSR_C2_LASTBRANCH_0_FROM_IP,  NUM_MSR_C2_LASTBRANCH_FROM_TO },
-    { MSR_C2_LASTBRANCH_0_TO_IP,    NUM_MSR_C2_LASTBRANCH_FROM_TO },
-    { 0, 0 }
-}, nh_lbr[] = {
-    { MSR_IA32_LASTINTFROMIP,       1 },
-    { MSR_IA32_LASTINTTOIP,         1 },
-    { MSR_NHL_LBR_SELECT,           1 },
-    { MSR_NHL_LASTBRANCH_TOS,       1 },
-    { MSR_P4_LASTBRANCH_0_FROM_LIP, NUM_MSR_P4_LASTBRANCH_FROM_TO },
-    { MSR_P4_LASTBRANCH_0_TO_LIP,   NUM_MSR_P4_LASTBRANCH_FROM_TO },
-    { 0, 0 }
-}, sk_lbr[] = {
-    { MSR_IA32_LASTINTFROMIP,       1 },
-    { MSR_IA32_LASTINTTOIP,         1 },
-    { MSR_NHL_LBR_SELECT,           1 },
-    { MSR_NHL_LASTBRANCH_TOS,       1 },
-    { MSR_SKL_LASTBRANCH_0_FROM_IP, NUM_MSR_SKL_LASTBRANCH },
-    { MSR_SKL_LASTBRANCH_0_TO_IP,   NUM_MSR_SKL_LASTBRANCH },
-    { MSR_SKL_LASTBRANCH_0_INFO,    NUM_MSR_SKL_LASTBRANCH },
-    { 0, 0 }
-}, at_lbr[] = {
-    { MSR_IA32_LASTINTFROMIP,       1 },
-    { MSR_IA32_LASTINTTOIP,         1 },
-    { MSR_C2_LASTBRANCH_TOS,        1 },
-    { MSR_C2_LASTBRANCH_0_FROM_IP,  NUM_MSR_ATOM_LASTBRANCH_FROM_TO },
-    { MSR_C2_LASTBRANCH_0_TO_IP,    NUM_MSR_ATOM_LASTBRANCH_FROM_TO },
-    { 0, 0 }
-}, sm_lbr[] = {
-    { MSR_IA32_LASTINTFROMIP,       1 },
-    { MSR_IA32_LASTINTTOIP,         1 },
-    { MSR_SM_LBR_SELECT,            1 },
-    { MSR_SM_LASTBRANCH_TOS,        1 },
-    { MSR_C2_LASTBRANCH_0_FROM_IP,  NUM_MSR_ATOM_LASTBRANCH_FROM_TO },
-    { MSR_C2_LASTBRANCH_0_TO_IP,    NUM_MSR_ATOM_LASTBRANCH_FROM_TO },
-    { 0, 0 }
-}, gm_lbr[] = {
-    { MSR_IA32_LASTINTFROMIP,       1 },
-    { MSR_IA32_LASTINTTOIP,         1 },
-    { MSR_SM_LBR_SELECT,            1 },
-    { MSR_SM_LASTBRANCH_TOS,        1 },
-    { MSR_GM_LASTBRANCH_0_FROM_IP,  NUM_MSR_GM_LASTBRANCH_FROM_TO },
-    { MSR_GM_LASTBRANCH_0_TO_IP,    NUM_MSR_GM_LASTBRANCH_FROM_TO },
-    { 0, 0 }
-};
-
-static const struct lbr_info *last_branch_msr_get(void)
-{
-    switch ( boot_cpu_data.x86 )
-    {
-    case 6:
-        switch ( boot_cpu_data.x86_model )
-        {
-        /* Core2 Duo */
-        case 0x0f:
-        /* Enhanced Core */
-        case 0x17:
-        /* Xeon 7400 */
-        case 0x1d:
-            return c2_lbr;
-        /* Nehalem */
-        case 0x1a: case 0x1e: case 0x1f: case 0x2e:
-        /* Westmere */
-        case 0x25: case 0x2c: case 0x2f:
-        /* Sandy Bridge */
-        case 0x2a: case 0x2d:
-        /* Ivy Bridge */
-        case 0x3a: case 0x3e:
-        /* Haswell */
-        case 0x3c: case 0x3f: case 0x45: case 0x46:
-        /* Broadwell */
-        case 0x3d: case 0x47: case 0x4f: case 0x56:
-            return nh_lbr;
-        /* Skylake */
-        case 0x4e: case 0x5e:
-        /* Xeon Scalable */
-        case 0x55:
-        /* Cannon Lake */
-        case 0x66:
-        /* Goldmont Plus */
-        case 0x7a:
-        /* Ice Lake */
-        case 0x6a: case 0x6c: case 0x7d: case 0x7e:
-        /* Tiger Lake */
-        case 0x8c: case 0x8d:
-        /* Tremont */
-        case 0x86:
-        /* Kaby Lake */
-        case 0x8e: case 0x9e:
-        /* Comet Lake */
-        case 0xa5: case 0xa6:
-            return sk_lbr;
-        /* Atom */
-        case 0x1c: case 0x26: case 0x27: case 0x35: case 0x36:
-            return at_lbr;
-        /* Silvermont */
-        case 0x37: case 0x4a: case 0x4d: case 0x5a: case 0x5d:
-        /* Xeon Phi Knights Landing */
-        case 0x57:
-        /* Xeon Phi Knights Mill */
-        case 0x85:
-        /* Airmont */
-        case 0x4c:
-            return sm_lbr;
-        /* Goldmont */
-        case 0x5c: case 0x5f:
-            return gm_lbr;
-        }
-        break;
-
-    case 15:
-        switch ( boot_cpu_data.x86_model )
-        {
-        /* Pentium4/Xeon with em64t */
-        case 3: case 4: case 6:
-            return p4_lbr;
-        }
-        break;
-    }
-
-    return NULL;
-}
-
 enum
 {
     LBR_FORMAT_32                 = 0x0, /* 32-bit record format */
@@ -3233,7 +3235,7 @@ static void __init ler_to_fixup_check(void)
 
 static int is_last_branch_msr(u32 ecx)
 {
-    const struct lbr_info *lbr = last_branch_msr_get();
+    const struct lbr_info *lbr = model_specific_lbr;
 
     if ( lbr == NULL )
         return 0;
@@ -3572,7 +3574,7 @@ static int cf_check vmx_msr_write_intercept(
         if ( !(v->arch.hvm.vmx.lbr_flags & LBR_MSRS_INSERTED) &&
              (msr_content & IA32_DEBUGCTLMSR_LBR) )
         {
-            const struct lbr_info *lbr = last_branch_msr_get();
+            const struct lbr_info *lbr = model_specific_lbr;
 
             if ( unlikely(!lbr) )
             {
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 08:34:35 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 08:34:35 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481487.746401 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImr5-0002m7-4N; Fri, 20 Jan 2023 08:34:35 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481487.746401; Fri, 20 Jan 2023 08:34:35 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImr5-0002lx-1T; Fri, 20 Jan 2023 08:34:35 +0000
Received: by outflank-mailman (input) for mailman id 481487;
 Fri, 20 Jan 2023 08:34:33 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImr3-0002lj-6I
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:33 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImr3-0007Ul-5a
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:33 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImr3-0001wM-4c
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:33 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=UsTKgQJl2iMLgnGn+z3j9ROPtZrP/ccEs5Gl7ywxbwA=; b=g5WZK5N5Rtk4H4ozUISroUbcCr
	VHumADnrq+dcjw3x2ZQ1UX7tlV1t6OUt8gGoR+JUVx3PP8wjp7S8RrjTu7NFLNDFx+YYI4X2SxIGy
	zGLes2Hwj7zOuyOUS9vAEcgNitpmfwOpOfblEM6DjBCHaJ1DVH4BhvAT6xM19B3a8oHI=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] x86/vmx: Support for CPUs without model-specific LBR
Message-Id: <E1pImr3-0001wM-4c@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 08:34:33 +0000

commit 3edca52ce736297d7fcf293860cd94ef62638052
Author:     Andrew Cooper <andrew.cooper3@citrix.com>
AuthorDate: Mon Jan 9 10:58:31 2023 +0000
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Thu Jan 12 18:42:00 2023 +0000

    x86/vmx: Support for CPUs without model-specific LBR
    
    Ice Lake (server at least) has both architectural LBR and model-specific LBR.
    Sapphire Rapids does not have model-specific LBR at all.  I.e. On SPR and
    later, model_specific_lbr will always be NULL, so we must make changes to
    avoid reliably hitting the domain_crash().
    
    The Arch LBR spec states that CPUs without model-specific LBR implement
    MSR_DBG_CTL.LBR by discarding writes and always returning 0.
    
    Do this for any CPU for which we lack model-specific LBR information.
    
    Adjust the now-stale comment, now that the Arch LBR spec has created a way to
    signal "no model specific LBR" to guests.
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
    Reviewed-by: Jan Beulich <jbeulich@suse.com>
    Reviewed-by: Kevin Tian <kevin.tian@intel.com>
---
 xen/arch/x86/hvm/vmx/vmx.c | 31 ++++++++++++++++---------------
 1 file changed, 16 insertions(+), 15 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c
index 9f58c408da..15a07933ee 100644
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -3554,18 +3554,26 @@ static int cf_check vmx_msr_write_intercept(
         if ( msr_content & rsvd )
             goto gp_fault;
 
+        /*
+         * The Arch LBR spec (new in Ice Lake) states that CPUs with no
+         * model-specific LBRs implement MSR_DBG_CTL.LBR by discarding writes
+         * and always returning 0.
+         *
+         * Use this property in all cases where we don't know any
+         * model-specific LBR information, as it matches real hardware
+         * behaviour on post-Ice Lake systems.
+         */
+        if ( !model_specific_lbr )
+            msr_content &= ~IA32_DEBUGCTLMSR_LBR;
+
         /*
          * When a guest first enables LBR, arrange to save and restore the LBR
          * MSRs and allow the guest direct access.
          *
-         * MSR_DEBUGCTL and LBR has existed almost as long as MSRs have
-         * existed, and there is no architectural way to hide the feature, or
-         * fail the attempt to enable LBR.
-         *
-         * Unknown host LBR MSRs or hitting -ENOSPC with the guest load/save
-         * list are definitely hypervisor bugs, whereas -ENOMEM for allocating
-         * the load/save list is simply unlucky (and shouldn't occur with
-         * sensible management by the toolstack).
+         * Hitting -ENOSPC with the guest load/save list is definitely a
+         * hypervisor bug, whereas -ENOMEM for allocating the load/save list
+         * is simply unlucky (and shouldn't occur with sensible management by
+         * the toolstack).
          *
          * Either way, there is nothing we can do right now to recover, and
          * the guest won't execute correctly either.  Simply crash the domain
@@ -3576,13 +3584,6 @@ static int cf_check vmx_msr_write_intercept(
         {
             const struct lbr_info *lbr = model_specific_lbr;
 
-            if ( unlikely(!lbr) )
-            {
-                gprintk(XENLOG_ERR, "Unknown Host LBR MSRs\n");
-                domain_crash(v->domain);
-                return X86EMUL_OKAY;
-            }
-
             for ( ; lbr->count; lbr++ )
             {
                 unsigned int i;
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 08:34:44 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 08:34:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481488.746405 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImrE-0002om-5k; Fri, 20 Jan 2023 08:34:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481488.746405; Fri, 20 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImrE-0002oe-2z; Fri, 20 Jan 2023 08:34:44 +0000
Received: by outflank-mailman (input) for mailman id 481488;
 Fri, 20 Jan 2023 08:34:43 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImrD-0002oW-9B
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:43 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImrD-0007Uw-8b
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:43 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImrD-0001xD-7g
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:43 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=YVwRy/1WcAw2iXrF0lBhug8oG3SkfYfJUGn8P5X8V5E=; b=TwNBbtUxbKu3fs405o6X6PpFJp
	17bVcCR0JOiQzDXW+YEV+m/DhhP8ipw4c9NN81FCL8m7GuPlaJEyjQxeS50hKvDWOHWlGWgHycIHk
	5d6vmsnVL1F4uXBXM0WhjaBARjTq97oC131JQf7dD5sF8vakD/bViNq/9XDX560Dhh54=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/arm: linker: Indent correctly _stext
Message-Id: <E1pImrD-0001xD-7g@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 08:34:43 +0000

commit 22a9981ba2443bd569bad6b772fb6e7e64f0d714
Author:     Julien Grall <jgrall@amazon.com>
AuthorDate: Thu Jan 12 22:06:42 2023 +0000
Commit:     Julien Grall <julien@xen.org>
CommitDate: Thu Jan 12 22:09:33 2023 +0000

    xen/arm: linker: Indent correctly _stext
    
    _stext is indented by one space more compare to the lines. This doesn't
    seem warrant, so delete the extra space.
    
    Signed-off: Julien Grall <jgrall@amazon.com>
    Acked-by: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/arch/arm/xen.lds.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
index 92c2984052..ae8c3b4c6c 100644
--- a/xen/arch/arm/xen.lds.S
+++ b/xen/arch/arm/xen.lds.S
@@ -31,7 +31,7 @@ SECTIONS
   . = XEN_VIRT_START;
   _start = .;
   .text : {
-        _stext = .;            /* Text section */
+       _stext = .;             /* Text section */
        *(.text.header)
 
        *(.text.cold)
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 08:34:54 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 08:34:54 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481489.746409 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImrO-0002rG-7W; Fri, 20 Jan 2023 08:34:54 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481489.746409; Fri, 20 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImrO-0002r8-4f; Fri, 20 Jan 2023 08:34:54 +0000
Received: by outflank-mailman (input) for mailman id 481489;
 Fri, 20 Jan 2023 08:34:53 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImrN-0002qx-CG
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:53 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImrN-0007VQ-BY
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:53 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImrN-0001y4-Aq
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:34:53 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=GEqt3isik3pv6bVrEqxmjukj6LRpkRoh9Ksy9AwG+14=; b=vNQDMEGGIjwBJgrpZpn/pEvfU1
	3xAyMlnMwSAJVrWJX0Vi1THz4vA7sS112ugtZcTtiDL0W11U2fxHLMg7+/cZ1Z+dmwiopRdgahoWW
	puMYJg0R0K3zh+y6zwMS0bSo9gDhDZ/lytf6b8Fi8V5/UwcQpYxR2usAS48bTRqZwo+k=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/arm: linker: The identitymap check should cover the whole .text.header
Message-Id: <E1pImrN-0001y4-Aq@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 08:34:53 +0000

commit 229ebd517b9df0e2d2f9e3ea50b57ca716334826
Author:     Julien Grall <jgrall@amazon.com>
AuthorDate: Thu Jan 12 22:07:42 2023 +0000
Commit:     Julien Grall <julien@xen.org>
CommitDate: Thu Jan 12 22:09:33 2023 +0000

    xen/arm: linker: The identitymap check should cover the whole .text.header
    
    At the moment, we are only checking that only some part of .text.header
    is part of the identity mapping. However, this doesn't take into account
    the literal pool which will be located at the end of the section.
    
    While we could try to avoid using a literal pool, in the near future we
    will also want to use an identity mapping for switch_ttbr().
    
    Not everything in .text.header requires to be part of the identity
    mapping. But it is below a page size (i.e. 4KB) so take a shortcut and
    check that .text.header is smaller than a page size.
    
    With that _end_boot can be removed as it is now unused. Take the
    opportunity to avoid assuming that a page size is always 4KB in the
    error message and comment.
    
    Signed-off-by: Julien Grall <jgrall@amazon.com>
    Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
---
 xen/arch/arm/arm32/head.S |  2 --
 xen/arch/arm/arm64/head.S |  2 --
 xen/arch/arm/xen.lds.S    | 10 +++++++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
index a558c2a687..5c10447103 100644
--- a/xen/arch/arm/arm32/head.S
+++ b/xen/arch/arm/arm32/head.S
@@ -659,8 +659,6 @@ fail:   PRINT("- Boot failed -\r\n")
         b     1b
 ENDPROC(fail)
 
-GLOBAL(_end_boot)
-
 /*
  * Switch TTBR
  * r1:r0       ttbr
diff --git a/xen/arch/arm/arm64/head.S b/xen/arch/arm/arm64/head.S
index ad014716db..4a3f87117c 100644
--- a/xen/arch/arm/arm64/head.S
+++ b/xen/arch/arm/arm64/head.S
@@ -811,8 +811,6 @@ fail:   PRINT("- Boot failed -\r\n")
         b     1b
 ENDPROC(fail)
 
-GLOBAL(_end_boot)
-
 /*
  * Switch TTBR
  *
diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S
index ae8c3b4c6c..3f7ebd19f3 100644
--- a/xen/arch/arm/xen.lds.S
+++ b/xen/arch/arm/xen.lds.S
@@ -32,7 +32,9 @@ SECTIONS
   _start = .;
   .text : {
        _stext = .;             /* Text section */
+       _idmap_start = .;
        *(.text.header)
+       _idmap_end = .;
 
        *(.text.cold)
        *(.text.unlikely .text.*_unlikely .text.unlikely.*)
@@ -225,10 +227,12 @@ SECTIONS
 }
 
 /*
- * We require that Xen is loaded at a 4K boundary, so this ensures that any
- * code running on the boot time identity map cannot cross a section boundary.
+ * We require that Xen is loaded at a page boundary, so this ensures that any
+ * code running on the identity map cannot cross a section boundary.
  */
-ASSERT( _end_boot - start <= PAGE_SIZE, "Boot code is larger than 4K")
+ASSERT(IS_ALIGNED(_idmap_start, PAGE_SIZE), "_idmap_start should be page-aligned")
+ASSERT(_idmap_end - _idmap_start <= PAGE_SIZE, "Identity mapped code is larger than a page size")
+
 /*
  * __init_[begin|end] MUST be at word size boundary otherwise we cannot
  * write fault instructions in the space properly.
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Fri Jan 20 08:35:04 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Fri, 20 Jan 2023 08:35:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.481490.746412 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImrY-0002ua-8x; Fri, 20 Jan 2023 08:35:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 481490.746412; Fri, 20 Jan 2023 08: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pImrY-0002uT-6F; Fri, 20 Jan 2023 08:35:04 +0000
Received: by outflank-mailman (input) for mailman id 481490;
 Fri, 20 Jan 2023 08:35:03 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImrX-0002uL-FD
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:35:03 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImrX-0007Vu-Ea
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:35:03 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pImrX-0001z4-Dq
 for xen-changelog@lists.xenproject.org; Fri, 20 Jan 2023 08:35:03 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=CGBBV6sPhaLzyu6l6wjdr+rUUbrYoWXBWrJ/5hL/P9w=; b=p/QbeoNCQgu9XtiEK4/zcN1e6+
	mHEwahR/hjrob5MAsWVqNCS6d5fuNASbz92ftfsKAV4sWy35IfzbpTlqV9SmunybS2jIon9SQ+L2C
	rbDaVIyM3cxcnW2Wbr417m79g3A4wJlZGB8QINdwYMervkUF6sK25XDAGmp5xtDswW+g=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [xen master] xen/arm: Add 0x prefix when printing memory size in construct_domU
Message-Id: <E1pImrX-0001z4-Dq@xenbits.xenproject.org>
Date: Fri, 20 Jan 2023 08:35:03 +0000

commit f588e7b7cb70800533aaa8a2a9d7a4b32d10b363
Author:     Michal Orzel <michal.orzel@amd.com>
AuthorDate: Tue Jan 3 11:25:19 2023 +0100
Commit:     Julien Grall <jgrall@amazon.com>
CommitDate: Fri Jan 13 10:04:42 2023 +0000

    xen/arm: Add 0x prefix when printing memory size in construct_domU
    
    Printing memory size in hex without 0x prefix can be misleading, so
    add it. Also, take the opportunity to adhere to 80 chars line length
    limit by moving the printk arguments to the next line.
    
    Signed-off-by: Michal Orzel <michal.orzel@amd.com>
    Reviewed-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
    Acked-by: Julien Grall <jgrall@amazon.com>
---
 xen/arch/arm/domain_build.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 829cea8de8..f35f4d2456 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -3774,7 +3774,8 @@ static int __init construct_domU(struct domain *d,
     if ( rc != 0 )
         return rc;
 
-    printk("*** LOADING DOMU cpus=%u memory=%"PRIx64"KB ***\n", d->max_vcpus, mem);
+    printk("*** LOADING DOMU cpus=%u memory=%#"PRIx64"KB ***\n",
+           d->max_vcpus, mem);
 
     kinfo.vpl011 = dt_property_read_bool(node, "vpl011");
 
--
generated by git-patchbot for /home/xen/git/xen.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Jan 30 15:00:09 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 30 Jan 2023 15:00:09 +0000
Received: from list by lists.xenproject.org with outflank-mailman.487038.754515 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pMVdc-0006lI-Fn; Mon, 30 Jan 2023 15:00:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 487038.754515; Mon, 30 Jan 2023 15: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pMVdc-0006kv-Cp; Mon, 30 Jan 2023 15:00:04 +0000
Received: by outflank-mailman (input) for mailman id 487038;
 Mon, 30 Jan 2023 15:00:02 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pMVda-0006VC-PR
 for xen-changelog@lists.xenproject.org; Mon, 30 Jan 2023 15:00:02 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pMVda-0003dE-Nn
 for xen-changelog@lists.xenproject.org; Mon, 30 Jan 2023 15:00:02 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pMVda-0006kI-Mp
 for xen-changelog@lists.xenproject.org; Mon, 30 Jan 2023 15:00:02 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=tudVL4tWuepLAft7Kg1deJ59xdx9+P/dAXCv50Id2OI=; b=MBftZgKCv6peiU7H4I8HBKiA7L
	bGEFG9NXOpnRjXhN2bGtjZ0B729cLDxMaqmPhdUOxR0IIbi/tfRrpj1y6TVeUdJGVT3GGLgbsS1l9
	kJQWdOc5PuQdbiQDOVJKacowO34CDNJfzJ7Ynl4Z1n5M7GpP7y85rBScYyJPS/KBVydY=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [mini-os master] Mini-OS: remove stale subdirs from Makefile
Message-Id: <E1pMVda-0006kI-Mp@xenbits.xenproject.org>
Date: Mon, 30 Jan 2023 15:00:02 +0000

commit 6211e1ef5d78d66d6573f941b704609dfdf8d3d7
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Fri Jan 27 08:32:44 2023 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Jan 30 14:55:59 2023 +0000

    Mini-OS: remove stale subdirs from Makefile
    
    The SUBDIRS make variable has some stale entries, remove them.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index f3acdd2..747c7c0 100644
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@ EXTRA_OBJS =
 TARGET := mini-os
 
 # Subdirectories common to mini-os
-SUBDIRS := lib xenbus console
+SUBDIRS := lib
 
 src-$(CONFIG_BLKFRONT) += blkfront.c
 src-$(CONFIG_CONSFRONT) += consfront.c
--
generated by git-patchbot for /home/xen/git/mini-os.git#master


From xen-changelog-bounces@lists.xenproject.org Mon Jan 30 15:00:14 2023
Return-path: <xen-changelog-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xen.org
Delivery-date: Mon, 30 Jan 2023 15:00:14 +0000
Received: from list by lists.xenproject.org with outflank-mailman.487039.754520 (Exim 4.92)
	(envelope-from <xen-changelog-bounces@lists.xenproject.org>)
	id 1pMVdm-00079c-Ha; Mon, 30 Jan 2023 15:00:14 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 487039.754520; Mon, 30 Jan 2023 15: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 <xen-changelog-bounces@lists.xenproject.org>)
	id 1pMVdm-00079U-ES; Mon, 30 Jan 2023 15:00:14 +0000
Received: by outflank-mailman (input) for mailman id 487039;
 Mon, 30 Jan 2023 15:00:12 +0000
Received: from mail.xenproject.org ([104.130.215.37])
 by lists.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pMVdk-00079I-Sy
 for xen-changelog@lists.xenproject.org; Mon, 30 Jan 2023 15:00:12 +0000
Received: from xenbits.xenproject.org ([104.239.192.120])
 by mail.xenproject.org with esmtp (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pMVdk-0003dI-RI
 for xen-changelog@lists.xenproject.org; Mon, 30 Jan 2023 15:00:12 +0000
Received: from xen by xenbits.xenproject.org with local (Exim 4.92)
 (envelope-from <ian.jackson@eu.citrix.com>) id 1pMVdk-0006mA-Q4
 for xen-changelog@lists.xenproject.org; Mon, 30 Jan 2023 15:00:12 +0000
X-BeenThere: xen-changelog@lists.xenproject.org
List-Id: "Change log for Mercurial \(receive only\)"
 <xen-changelog.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:xen-changelog@lists.xenproject.org>
List-Help: <mailto:xen-changelog-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-changelog>, 
 <mailto:xen-changelog-request@lists.xenproject.org?subject=subscribe>
Errors-To: xen-changelog-bounces@lists.xenproject.org
Precedence: list
Sender: "Xen-changelog" <xen-changelog-bounces@lists.xenproject.org>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org;
	s=20200302mail; h=Date:Message-Id:Subject:Reply-To:To:From;
	bh=+khDxqGlYbhNG7a3HIEk8XNKvjdtPmF+vxd2iVjvdwg=; b=UOdpkvW1u9CzkljVv8mA47tiX2
	T+KoJBplB+z7iQ0uS9tOEC1w3sFJiyESkL6G0UVsrhITZq3P75CAnhi69tfZzg5q0qkE11X1kE2Ib
	yDNbJeiA5/du8mLY39VDz7eHUTxsqA6KSn2tPBM77po+8CI7gCuJuRugCCEGbkw4bQ2k=;
From: patchbot@xen.org
To: xen-changelog@lists.xenproject.org
Reply-To: xen-devel@lists.xenproject.org
Subject: [mini-os master] Mini-OS: move xenbus test code into test.c
Message-Id: <E1pMVdk-0006mA-Q4@xenbits.xenproject.org>
Date: Mon, 30 Jan 2023 15:00:12 +0000

commit 5ff9d4afa5fbed083f8e6c10a5f29b62423e7db8
Author:     Juergen Gross <jgross@suse.com>
AuthorDate: Fri Jan 27 08:33:46 2023 +0100
Commit:     Andrew Cooper <andrew.cooper3@citrix.com>
CommitDate: Mon Jan 30 14:55:59 2023 +0000

    Mini-OS: move xenbus test code into test.c
    
    The test code in xenbus.c can easily be moved into test.c.
    
    Signed-off-by: Juergen Gross <jgross@suse.com>
    Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 test.c   | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 xenbus.c | 113 ---------------------------------------------------------------
 2 files changed, 106 insertions(+), 115 deletions(-)

diff --git a/test.c b/test.c
index 42a2666..465c54e 100644
--- a/test.c
+++ b/test.c
@@ -44,6 +44,7 @@
 #include <fcntl.h>
 #include <xen/features.h>
 #include <xen/version.h>
+#include <xen/io/xs_wire.h>
 
 #ifdef CONFIG_XENBUS
 static unsigned int do_shutdown = 0;
@@ -52,11 +53,114 @@ static DECLARE_WAIT_QUEUE_HEAD(shutdown_queue);
 #endif
 
 #ifdef CONFIG_XENBUS
-void test_xenbus(void);
+/* Send a debug message to xenbus.  Can block. */
+static void xenbus_debug_msg(const char *msg)
+{
+    int len = strlen(msg);
+    struct write_req req[] = {
+        { "print", sizeof("print") },
+        { msg, len },
+        { "", 1 }};
+    struct xsd_sockmsg *reply;
+
+    reply = xenbus_msg_reply(XS_DEBUG, 0, req, ARRAY_SIZE(req));
+    printk("Got a reply, type %d, id %d, len %d.\n",
+           reply->type, reply->req_id, reply->len);
+}
+
+static void do_ls_test(const char *pre)
+{
+    char **dirs, *msg;
+    int x;
+
+    printk("ls %s...\n", pre);
+    msg = xenbus_ls(XBT_NIL, pre, &dirs);
+    if ( msg )
+    {
+        printk("Error in xenbus ls: %s\n", msg);
+        free(msg);
+        return;
+    }
+
+    for ( x = 0; dirs[x]; x++ )
+    {
+        printk("ls %s[%d] -> %s\n", pre, x, dirs[x]);
+        free(dirs[x]);
+    }
+
+    free(dirs);
+}
+
+static void do_read_test(const char *path)
+{
+    char *res, *msg;
+
+    printk("Read %s...\n", path);
+    msg = xenbus_read(XBT_NIL, path, &res);
+    if ( msg )
+    {
+        printk("Error in xenbus read: %s\n", msg);
+        free(msg);
+        return;
+    }
+    printk("Read %s -> %s.\n", path, res);
+    free(res);
+}
+
+static void do_write_test(const char *path, const char *val)
+{
+    char *msg;
+
+    printk("Write %s to %s...\n", val, path);
+    msg = xenbus_write(XBT_NIL, path, val);
+    if ( msg )
+    {
+        printk("Result %s\n", msg);
+        free(msg);
+    }
+    else
+        printk("Success.\n");
+}
+
+static void do_rm_test(const char *path)
+{
+    char *msg;
+
+    printk("rm %s...\n", path);
+    msg = xenbus_rm(XBT_NIL, path);
+    if ( msg )
+    {
+        printk("Result %s\n", msg);
+        free(msg);
+    }
+    else
+        printk("Success.\n");
+}
 
 static void xenbus_tester(void *p)
 {
-    test_xenbus();
+    printk("Doing xenbus test.\n");
+    xenbus_debug_msg("Testing xenbus...\n");
+
+    printk("Doing ls test.\n");
+    do_ls_test("device");
+    do_ls_test("device/vif");
+    do_ls_test("device/vif/0");
+
+    printk("Doing read test.\n");
+    do_read_test("device/vif/0/mac");
+    do_read_test("device/vif/0/backend");
+
+    printk("Doing write test.\n");
+    do_write_test("device/vif/0/flibble", "flobble");
+    do_read_test("device/vif/0/flibble");
+    do_write_test("device/vif/0/flibble", "widget");
+    do_read_test("device/vif/0/flibble");
+
+    printk("Doing rm test.\n");
+    do_rm_test("device/vif/0/flibble");
+    do_read_test("device/vif/0/flibble");
+    printk("(Should have said ENOENT)\n");
 }
 #endif
 
diff --git a/xenbus.c b/xenbus.c
index aa1fe7b..81e9b65 100644
--- a/xenbus.c
+++ b/xenbus.c
@@ -964,119 +964,6 @@ domid_t xenbus_get_self_id(void)
     return ret;
 }
 
-#ifdef CONFIG_TEST
-/* Send a debug message to xenbus.  Can block. */
-static void xenbus_debug_msg(const char *msg)
-{
-    int len = strlen(msg);
-    struct write_req req[] = {
-        { "print", sizeof("print") },
-        { msg, len },
-        { "", 1 }};
-    struct xsd_sockmsg *reply;
-
-    reply = xenbus_msg_reply(XS_DEBUG, 0, req, ARRAY_SIZE(req));
-    printk("Got a reply, type %d, id %d, len %d.\n",
-           reply->type, reply->req_id, reply->len);
-}
-
-static void do_ls_test(const char *pre)
-{
-    char **dirs, *msg;
-    int x;
-
-    printk("ls %s...\n", pre);
-    msg = xenbus_ls(XBT_NIL, pre, &dirs);
-    if ( msg )
-    {
-        printk("Error in xenbus ls: %s\n", msg);
-        free(msg);
-        return;
-    }
-
-    for ( x = 0; dirs[x]; x++ )
-    {
-        printk("ls %s[%d] -> %s\n", pre, x, dirs[x]);
-        free(dirs[x]);
-    }
-
-    free(dirs);
-}
-
-static void do_read_test(const char *path)
-{
-    char *res, *msg;
-
-    printk("Read %s...\n", path);
-    msg = xenbus_read(XBT_NIL, path, &res);
-    if ( msg )
-    {
-        printk("Error in xenbus read: %s\n", msg);
-        free(msg);
-        return;
-    }
-    printk("Read %s -> %s.\n", path, res);
-    free(res);
-}
-
-static void do_write_test(const char *path, const char *val)
-{
-    char *msg;
-
-    printk("Write %s to %s...\n", val, path);
-    msg = xenbus_write(XBT_NIL, path, val);
-    if ( msg )
-    {
-        printk("Result %s\n", msg);
-        free(msg);
-    }
-    else
-        printk("Success.\n");
-}
-
-static void do_rm_test(const char *path)
-{
-    char *msg;
-
-    printk("rm %s...\n", path);
-    msg = xenbus_rm(XBT_NIL, path);
-    if ( msg )
-    {
-        printk("Result %s\n", msg);
-        free(msg);
-    }
-    else
-        printk("Success.\n");
-}
-
-/* Simple testing thing */
-void test_xenbus(void)
-{
-    printk("Doing xenbus test.\n");
-    xenbus_debug_msg("Testing xenbus...\n");
-
-    printk("Doing ls test.\n");
-    do_ls_test("device");
-    do_ls_test("device/vif");
-    do_ls_test("device/vif/0");
-
-    printk("Doing read test.\n");
-    do_read_test("device/vif/0/mac");
-    do_read_test("device/vif/0/backend");
-
-    printk("Doing write test.\n");
-    do_write_test("device/vif/0/flibble", "flobble");
-    do_read_test("device/vif/0/flibble");
-    do_write_test("device/vif/0/flibble", "widget");
-    do_read_test("device/vif/0/flibble");
-
-    printk("Doing rm test.\n");
-    do_rm_test("device/vif/0/flibble");
-    do_read_test("device/vif/0/flibble");
-    printk("(Should have said ENOENT)\n");
-}
-#endif /* CONFIG_TEST */
-
 /*
  * Local variables:
  * mode: C
--
generated by git-patchbot for /home/xen/git/mini-os.git#master


