From patchwork Fri Feb 7 01:53:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13964218 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1EACCC0219C for ; Fri, 7 Feb 2025 01:54:04 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.883272.1293346 (Exim 4.92) (envelope-from ) id 1tgDZ6-0003wl-Cq; Fri, 07 Feb 2025 01:53:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 883272.1293346; Fri, 07 Feb 2025 01:53:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZ6-0003uL-77; Fri, 07 Feb 2025 01:53:56 +0000 Received: by outflank-mailman (input) for mailman id 883272; Fri, 07 Feb 2025 01:53:54 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZ4-0003b1-LI for xen-devel@lists.xenproject.org; Fri, 07 Feb 2025 01:53:54 +0000 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2062a.outbound.protection.outlook.com [2a01:111:f403:2009::62a]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 61948495-e4f6-11ef-b3ef-695165c68f79; Fri, 07 Feb 2025 02:53:52 +0100 (CET) Received: from BN9PR03CA0938.namprd03.prod.outlook.com (2603:10b6:408:108::13) by SN7PR12MB6716.namprd12.prod.outlook.com (2603:10b6:806:270::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8422.10; Fri, 7 Feb 2025 01:53:44 +0000 Received: from BL6PEPF00020E63.namprd04.prod.outlook.com (2603:10b6:408:108:cafe::5) by BN9PR03CA0938.outlook.office365.com (2603:10b6:408:108::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8398.27 via Frontend Transport; Fri, 7 Feb 2025 01:53:43 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by BL6PEPF00020E63.mail.protection.outlook.com (10.167.249.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8398.14 via Frontend Transport; Fri, 7 Feb 2025 01:53:43 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 6 Feb 2025 19:53:43 -0600 Received: from smtp.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 6 Feb 2025 19:53:42 -0600 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 61948495-e4f6-11ef-b3ef-695165c68f79 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xj30mxH/9cdcGpJg0s+eYDW8LMxu3g6B4zo9CbSyGFBy3RA6MhOKr8Nw1bGtYiklBbiTlu+KXhYWOuUuUuwfENm5LbU/uWMKQgc68JHc0yfZO4ZTYquxfAROEIazE5UAhsNwLSE9IvTFQVbv/0TV6yiACBZpDrQZUxRZpsgwvuNXEl9IZ5auUCp+lzAbzwBM+g0BZ4BDhK240Ng3SbQRb9HNUQE9tdIoVx5+7cG7A99Ux9m/tRg6vSX8dEQD/Suxxe/SnbJC8yyLXXE2+zh85MxjTqy9XMDfC+nx6u0f6/RSB25omvuxbEQ6SDATP9OzrFS4dq+9v67QrhjrNWD/bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JVw7d8gNfaaXnFYOAq45gurUF8bQfBjpMOEsqE5OT0s=; b=v1pGsIbZ+XV6KqnHWmiTtskiaW7RGBpzmWv4sgDrgj2d1xUkiYqiKOz19ZfdFtaet0IjCkPA8g5ZmO9J3WKbrtMt3/2Rers5+Z4Fo9Vxfvq1Th5gOA0LhVnmQtfa6zgr7fEDJiJMqJOY+sbjR3JyZId4RR+VUMd/mdShfw0WaXtiKROHXrNu/c19rXRAXIMZECEuVbTtmt99km/M2mRbMBSjHIU94R/BSu9+2noS618bZomfcStYbSzK9xCccXhPHNWTuPPZ7AMbTslz9GjL5yGQQ40rmY7P47WbSELBCbKvSVz/pz+By6gxSHztfiVlBMMwQpsPVQ8q996uwAAtyg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JVw7d8gNfaaXnFYOAq45gurUF8bQfBjpMOEsqE5OT0s=; b=kqV6BY5X36cJnGjFo0IREijeM3cvMRgs3mmnE3yuuOu7JUzZnl+Vw2MUOQ20oUfUa66P+AJEjCBNt1RUs2fG53/V3yZkckZJ3IMF3XPFLUzvIXLdpwL4UUjHBB62kxVrcbB60TomAA2xXO9hVqXJQ6fT3sHGRqDE1mKbkQFSjt4= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C From: Stefano Stabellini To: CC: , , , , , Stefano Stabellini Subject: [PATCH v6 1/7] automation: upgrade Linux kernel for arm64 tests to 6.6.74 Date: Thu, 6 Feb 2025 17:53:35 -0800 Message-ID: <20250207015341.1208429-1-stefano.stabellini@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: stefano.stabellini@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00020E63:EE_|SN7PR12MB6716:EE_ X-MS-Office365-Filtering-Correlation-Id: c808c684-b117-42e0-12e8-08dd471a40b1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|82310400026|36860700013|1800799024|13003099007|7053199007; X-Microsoft-Antispam-Message-Info: WPygDIJO4OeFQZaPaVBlNqvdcOkP3eoWMNsG+3CeYU7TeveVjVZvqnwuq/wWyNgfwzcoxGqRHVb8BG4Ie93S+7r61O8Xg0OByx9g4COhllwgnCwm5adcL8RVTv6elGid+yhdny/Cfg94EmO+34anLRB4q0rGfa0xU40ofI93rR8HwhICDxgr3z47Nm60/d95QX3BuTwBeDC276eYv6vBsNWhPScSGzwhywcWB4xLxlxIroSm7NeDa1i7uAPI/iei0KKB21YZyZeos/D9whgg5eEr/n3r+odmUBufTpM71Yc2t6TPEqxZNiEBp7ph3RICXjYQdbHFLaxK2AwIKzBNcHi4hORwtxWo4W7deXIGABfKz2Rr1UurAivF0LBq9wogpEPCoLuBUFx/kBiDX0dot9c5SGt8JxngdTeB9cvfHwCBLKlfID66tR2Rt038lb7irS/60Swq7P6wDsT5kowpzudWmq0BGYGc98t8gVWUEXBbPHwwSkqmXx50XGM6DNDzs+MeAgRfZ6c0AI1QEkohCneZrRnV99/qeNHGq/PFJuey0nKOrVOQw+NI7K/QUKK/9JyUiTeg8TaLgUe2gT8PX/u42EFtxzvUcX5uafOmdDuaUYo23mKAVuoUEyaaWfHt8OaHlnFAQyq7ZL4O8Nv+TXq5dwprUVdoxCe7CYXixneIOzRYMCoYqKP5nGXtdgimlJkX4QhUGVMWNswtut2FKKCRyDL/GYc2Iod3TqZUm3A77JD2hW2XRMpmokTYhTMJAIwJZHnIUtfbzSPLtcwQSqTlREsRRxxrDI2eDA4l++uxfyWooAIUEIhA+NikLNxquNEQaTFevKloadgoinFPCmP2cbwqQKW5rHX5UWBjK3d3HnjPc9FkXes4Fr+XGdEVpiX/HEoIuq6D2cbNwGeE7t83Gt3Y/0FaS8hGXM0Tr8H9FmmdjdufwZyyEayuWHXY90f5tvYbGxNZ2CPWQnS6kjlCZ4xQCHU4ql/6UDcioQlSBAOxjkY13s5gKn1m/dMrmHAYoLqWFpqaBz6EzDWrn8MIK0qLNvUGr+jmLoHYqADS8KpulZlSeFtdsu4F9BhnbcUgNXEIGO72LTzbeqbzRjmgVJkk/+5u40iGDnwPN6Tqh0GUGb60+U48Ru0jk0ZFGuQXlu3ufLJgtO10/q48mvSUGzBpGTQoEL0riwt7liCC9sQ7uxYsm3paq4dp88iv72WarRO0Jnv50z4tCOaF/D0jcxyPJiRI1LFqEM7I+wQ/VYkZ09MJAkQ8vbdQLXd3ZmEHzespEkkvqUEeVpFvQzLG/w1C6asiG3iKYNXrKDvnL2mWKp4kgWQ9Ppv9DAcKBu2Y1IeMJVIkojrEddHtkQKAHkZnBsbpOjbdaNzpvGK5mbfk1WO1CSS6OtdikeR8C45Sd6EyKM9Nboo739Z092+bUYKMIY+tiH4mzIQeE3g= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(82310400026)(36860700013)(1800799024)(13003099007)(7053199007);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2025 01:53:43.5765 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c808c684-b117-42e0-12e8-08dd471a40b1 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00020E63.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6716 Signed-off-by: Stefano Stabellini Reviewed-by: Michal Orzel --- automation/gitlab-ci/build.yaml | 4 ++-- automation/gitlab-ci/test.yaml | 2 +- .../{5.19-arm64v8.dockerfile => 6.6.74-arm64v8.dockerfile} | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) rename automation/tests-artifacts/kernel/{5.19-arm64v8.dockerfile => 6.6.74-arm64v8.dockerfile} (90%) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index bc4a8a5ad2..411b4902b5 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -269,9 +269,9 @@ alpine-3.18-arm64-rootfs-export: tags: - arm64 -kernel-5.19-arm64-export: +kernel-6.6.74-arm64-export: extends: .test-jobs-artifact-common - image: registry.gitlab.com/xen-project/xen/tests-artifacts/kernel:5.19-arm64v8 + image: registry.gitlab.com/xen-project/xen/tests-artifacts/kernel:6.6.74-arm64v8 script: - mkdir binaries && cp /Image binaries/Image artifacts: diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 1822e3ea5f..6ad45269ea 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -4,7 +4,7 @@ .arm64-test-needs: &arm64-test-needs - alpine-3.18-arm64-rootfs-export - - kernel-5.19-arm64-export + - kernel-6.6.74-arm64-export - qemu-system-aarch64-6.0.0-arm64-export .arm32-test-needs: &arm32-test-needs diff --git a/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile b/automation/tests-artifacts/kernel/6.6.74-arm64v8.dockerfile similarity index 90% rename from automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile rename to automation/tests-artifacts/kernel/6.6.74-arm64v8.dockerfile index 8e33995ba3..73e5145425 100644 --- a/automation/tests-artifacts/kernel/5.19-arm64v8.dockerfile +++ b/automation/tests-artifacts/kernel/6.6.74-arm64v8.dockerfile @@ -4,7 +4,7 @@ LABEL maintainer.name="The Xen Project" \ maintainer.email="xen-devel@lists.xenproject.org" ENV DEBIAN_FRONTEND=noninteractive -ENV LINUX_VERSION=5.19 +ENV LINUX_VERSION=6.6.74 ENV USER root RUN mkdir /build @@ -18,10 +18,11 @@ RUN apt-get update && \ curl \ flex \ bison \ + libssl-dev \ && \ \ # Build the kernel - curl -fsSLO https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-"$LINUX_VERSION".tar.xz && \ + curl -fsSLO https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-"$LINUX_VERSION".tar.xz && \ tar xvJf linux-"$LINUX_VERSION".tar.xz && \ cd linux-"$LINUX_VERSION" && \ make defconfig && \ From patchwork Fri Feb 7 01:53:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13964215 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 675C8C02194 for ; Fri, 7 Feb 2025 01:54:02 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.883268.1293319 (Exim 4.92) (envelope-from ) id 1tgDZ2-0003Mu-O5; Fri, 07 Feb 2025 01:53:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 883268.1293319; Fri, 07 Feb 2025 01:53:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZ2-0003Mn-Kh; Fri, 07 Feb 2025 01:53:52 +0000 Received: by outflank-mailman (input) for mailman id 883268; Fri, 07 Feb 2025 01:53:51 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZ1-00037W-DC for xen-devel@lists.xenproject.org; Fri, 07 Feb 2025 01:53:51 +0000 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2061a.outbound.protection.outlook.com [2a01:111:f403:2414::61a]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 607c06b7-e4f6-11ef-a073-877d107080fb; Fri, 07 Feb 2025 02:53:50 +0100 (CET) Received: from BN9PR03CA0932.namprd03.prod.outlook.com (2603:10b6:408:108::7) by PH7PR12MB6660.namprd12.prod.outlook.com (2603:10b6:510:212::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8422.11; Fri, 7 Feb 2025 01:53:45 +0000 Received: from BL6PEPF00020E63.namprd04.prod.outlook.com (2603:10b6:408:108:cafe::5a) by BN9PR03CA0932.outlook.office365.com (2603:10b6:408:108::7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8398.26 via Frontend Transport; Fri, 7 Feb 2025 01:53:44 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by BL6PEPF00020E63.mail.protection.outlook.com (10.167.249.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8398.14 via Frontend Transport; Fri, 7 Feb 2025 01:53:44 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 6 Feb 2025 19:53:43 -0600 Received: from smtp.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 6 Feb 2025 19:53:43 -0600 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 607c06b7-e4f6-11ef-a073-877d107080fb ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xhHNxHbDzCCXsN8vIx4ooUGyllbXHPtvFdejHfZc3rFGiP25tFuK9H//abRDq+6UtkyDU6MQgnI4uMgTlq9uOy7LD200A9KTdUzmyWJfxCq26WQ7WIn9z/tmHuUCUrWKVrJ6slevofSCu7rrVOfXAdA8ZZP3ojuas1Lv/cDONcWy4kaVqBOH+UAbvIbhyRb1U/jCrE7YIM5Gs+fie0d+MkD6t4uSMENvpjStTjakvJRlUzIWmS5ZFVRFJHQvJBTSir9MhJnaYyt7ElrZkXiIG2aj7Ym559U53kisWLHC7cMq6ljPEkOVs3VzH6Cj3lfxiSxsCsZ8KCLPNGboXOgMpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=P5E06qeBbZ3UkLus+GdYXMYW47OhjvFMpvVAs7aAOIc=; b=cOc2jdW8WTp9ATAZ4ZlbAK027MkcNm+E7TuiW2RwbySl8J6tPAReFcmPWOrtw8u3eEDJlnYXdm96tmpS9MVS9bV6KmXUqBzE+aaXita2htNyBXbDo5xOwCP80ivQBOiBl54d4H/28I7RUp8iV0zxTE/hzL1U7jW08z3WgAavBqvZuEAdtgOkOV6/Bzt1lwC5Fj0YiE0nae4JZ5SAWhNk327NA3qRjwxkZFF/dci7qWNIjQv6zLvV0g1GyQ/skIGDrjJCpcI66MwmhY4JSdP4Zj6PyWx7yx7HDfbrW8tTsafDXw/BQoklhG2e4kMdstXGuNWgaZesvhVw2sGin/LEow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=P5E06qeBbZ3UkLus+GdYXMYW47OhjvFMpvVAs7aAOIc=; b=XAOWLzJckBPQm57za0ZQmdB8D+niAhE4lM+kAd9KAeRp/5kV+z/3TxDn+eYl3ZHUL7Yr7by8/rSd+XOG/gLTU3BENFumVkc5jjdK5Go4VyZVjd/eH7PBDmO7U+rlxZyKCaJjglkh+E2OATFZ3dmWD9A0CUO1ChOKDtbvHrtJ5Jc= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C From: Stefano Stabellini To: CC: , , , , , Henry Wang , Alec Kwapis , "Stefano Stabellini" Subject: [PATCH v6 2/7] xen/arm: Alloc XenStore page for Dom0less DomUs from hypervisor Date: Thu, 6 Feb 2025 17:53:36 -0800 Message-ID: <20250207015341.1208429-2-stefano.stabellini@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: stefano.stabellini@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00020E63:EE_|PH7PR12MB6660:EE_ X-MS-Office365-Filtering-Correlation-Id: 505557a6-3ee8-4b49-1fae-08dd471a4140 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: KNtbSFMqubgosi7MDp9sPixbvgjO9tuBM+C3gN1JGCs5nYvCDM0DFU94V9zoaFkJFjJN2TupVcoSbcGvrSb5GzhHBs3zyUMD2Tux6N+ujM4ExjWKlvf91A8Iza146iMrJ1iL9fft+STxWXm1BXelldFjH72Dck+W06fS/a5qqjXLM/q1FOCNGPaGpucPdmyTlsOsqYKVWulvkRxZs0ePtrIKQJAUF2RsbjSnsNGgKXCb+0TU1hbPkJWArQX//OCKtADHpGGEHFv06he1/3IczqzP42E+dTDBxhwN5Qbs22CO25R+Dh7IHOZbbe5YfVatVonYurYkbo0ffeZXRLOtSxSXZCCo5BCAX391LcMlgU+xFlvyCNY5cL9j3+oyQW4ylmo/4SRqvm8gX93dLZXtWkf+PbRzq+GvcCXInc34tPjrLdocAjw2RntgCG8nfCir++y+YEmaO0pWf+OahJGOVYcZYuOq+fN/yTkg9zcgA/1dWEgXKRO3O0oXUc/2ypXtAw2XdvRKJkQt6ZWrv52oey/6dPd7bnad5UGJpMMpHXSNOECKoPcBPmqWKyRfpzWJ+BkI1bxwILHfA/E4QFjjBYUaVPPKMFYKV7V48iQ0Yt9+8gIUfwMZDkOIhzymyKDfw+8jt/IJVVYbr/ddQxn2vMf6m0MMNqm6ltZ9WuNATEiHuoFMsfYelaNiulbhdL1M4SjKn5GL2L0B1N+SCrNjMTKXl+4Vf0eXaA77d7RwxVBFcfG8iQuA6ncKrRIEMaDDyybdJYqTzHTWic/SAXjcDErddJ6vg+dvkaR0t0UbebOvWaRsj0AecfJGu4idO3VaPsDyyuwSfmsAXRov9RD6D7N66sP5Q4/oWvw4YhUdqNSI3dlD2uU9WyXbDFNIcFskIIKXzg0VjFKAoi0jmh823394mA6tuao55eE4/RetlDAPYN7dAJCBNSKsNpsJh3AA7Y7rVjVpkKowgshfJJ//aaAp8A4fuX8cbYDAeTVEPI/5V94J71EpvxEdldI3TS6JmbZE/15S/7dUG1hPwscusmCeFDIZX3Xy0WL4Q2QlVNQIGRREHyKmtnUp8+JdjUqEhzal3YdiNRj9QXIjEErUgwsFQfiy6k4BKnHpTopgPFz3bgt6nNpdmq2xqwoMZHp1CkYEkH+aRBoxZhoU0hC38jDsOUwcb3PllZeebSmxpQ2rpcurcPrEuuiNp54wNPaHoZPeOA/TW7c9u4omWikyldEy7EdKEJnyQ3VYFnhuu6JLsRfU/Rfji+bjGtzv8fiiLEY96WSihSWGHELwbvaxG290Qkj4YAclmimF3rCQQBNQQesgyIWLtZkNE+qS6VHbEIGzRGO9ivpFCsq3lZukuw+G+ei4xCJXGw1GosVI9Uw/+MeBtALj2UqeZtoWPoiPcP80+5zkxyLEngvN1QgpU4TdEW0/yrGeKk90JkMOEBJ4hthrzmqqISZ4ng+8bMJ7744/frs99P1Sgr01icX7infVCEP2KaojX7bz56my3ZU= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(82310400026)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2025 01:53:44.5140 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 505557a6-3ee8-4b49-1fae-08dd471a4140 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00020E63.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6660 From: Henry Wang There are use cases (for example using the PV driver) in Dom0less setup that require Dom0less DomUs start immediately with Dom0, but initialize XenStore later after Dom0's successful boot and call to the init-dom0less application. An error message can seen from the init-dom0less application on 1:1 direct-mapped domains: ``` Allocating magic pages memory.c:238:d0v0 mfn 0x39000 doesn't belong to d1 Error on alloc magic pages ``` The "magic page" is a terminology used in the toolstack as reserved pages for the VM to have access to virtual platform capabilities. Currently the magic pages for Dom0less DomUs are populated by the init-dom0less app through populate_physmap(), and populate_physmap() automatically assumes gfn == mfn for 1:1 direct mapped domains. This cannot be true for the magic pages that are allocated later from the init-dom0less application executed in Dom0. For domain using statically allocated memory but not 1:1 direct-mapped, similar error "failed to retrieve a reserved page" can be seen as the reserved memory list is empty at that time. Since for init-dom0less, the magic page region is only for XenStore. To solve above issue, this commit allocates the XenStore page for Dom0less DomUs at the domain construction time. The PFN will be noted and communicated to the init-dom0less application executed from Dom0. To keep the XenStore late init protocol, set the connection status to XENSTORE_RECONNECT. Since the guest magic region allocation from init-dom0less is for XenStore, and the XenStore page is now allocated from the hypervisor, instead of hardcoding the guest magic pages region, use xc_hvm_param_get() to get the XenStore page PFN. Rename alloc_xs_page() to get_xs_page() to reflect the changes. With this change, some existing code is not needed anymore, including: (1) The definition of the XenStore page offset. (2) Call to xc_domain_setmaxmem() and xc_clear_domain_page() as we don't need to set the max mem and clear the page anymore. (3) Foreign mapping of the XenStore page, setting of XenStore interface status and HVM_PARAM_STORE_PFN from init-dom0less, as they are set by the hypervisor. Take the opportunity to do some coding style improvements when possible. Reported-by: Alec Kwapis Signed-off-by: Henry Wang Signed-off-by: Stefano Stabellini Reviewed-by: Michal Orzel Tested-by: Michal Orzel --- Changes in v2: - merge patch #2 and #3 - add empty line tools/helpers/init-dom0less.c | 58 +++++++++-------------------------- xen/arch/arm/dom0less-build.c | 56 ++++++++++++++++++++++++++++++++- 2 files changed, 69 insertions(+), 45 deletions(-) diff --git a/tools/helpers/init-dom0less.c b/tools/helpers/init-dom0less.c index fee93459c4..2b51965fa7 100644 --- a/tools/helpers/init-dom0less.c +++ b/tools/helpers/init-dom0less.c @@ -16,30 +16,18 @@ #include "init-dom-json.h" -#define XENSTORE_PFN_OFFSET 1 #define STR_MAX_LENGTH 128 -static int alloc_xs_page(struct xc_interface_core *xch, - libxl_dominfo *info, - uint64_t *xenstore_pfn) +static int get_xs_page(struct xc_interface_core *xch, libxl_dominfo *info, + uint64_t *xenstore_pfn) { int rc; - const xen_pfn_t base = GUEST_MAGIC_BASE >> XC_PAGE_SHIFT; - xen_pfn_t p2m = (GUEST_MAGIC_BASE >> XC_PAGE_SHIFT) + XENSTORE_PFN_OFFSET; - rc = xc_domain_setmaxmem(xch, info->domid, - info->max_memkb + (XC_PAGE_SIZE/1024)); - if (rc < 0) - return rc; - - rc = xc_domain_populate_physmap_exact(xch, info->domid, 1, 0, 0, &p2m); - if (rc < 0) - return rc; - - *xenstore_pfn = base + XENSTORE_PFN_OFFSET; - rc = xc_clear_domain_page(xch, info->domid, *xenstore_pfn); - if (rc < 0) - return rc; + rc = xc_hvm_param_get(xch, info->domid, HVM_PARAM_STORE_PFN, xenstore_pfn); + if (rc < 0) { + printf("Failed to get HVM_PARAM_STORE_PFN\n"); + return 1; + } return 0; } @@ -100,6 +88,7 @@ static bool do_xs_write_vm(struct xs_handle *xsh, xs_transaction_t t, */ static int create_xenstore(struct xs_handle *xsh, libxl_dominfo *info, libxl_uuid uuid, + uint64_t xenstore_pfn, evtchn_port_t xenstore_port) { domid_t domid; @@ -145,8 +134,7 @@ static int create_xenstore(struct xs_handle *xsh, rc = snprintf(target_memkb_str, STR_MAX_LENGTH, "%"PRIu64, info->current_memkb); if (rc < 0 || rc >= STR_MAX_LENGTH) return rc; - rc = snprintf(ring_ref_str, STR_MAX_LENGTH, "%lld", - (GUEST_MAGIC_BASE >> XC_PAGE_SHIFT) + XENSTORE_PFN_OFFSET); + rc = snprintf(ring_ref_str, STR_MAX_LENGTH, "%"PRIu64, xenstore_pfn); if (rc < 0 || rc >= STR_MAX_LENGTH) return rc; rc = snprintf(xenstore_port_str, STR_MAX_LENGTH, "%u", xenstore_port); @@ -230,7 +218,6 @@ static int init_domain(struct xs_handle *xsh, libxl_uuid uuid; uint64_t xenstore_evtchn, xenstore_pfn; int rc; - struct xenstore_domain_interface *intf; printf("Init dom0less domain: %u\n", info->domid); @@ -245,20 +232,11 @@ static int init_domain(struct xs_handle *xsh, if (!xenstore_evtchn) return 0; - /* Alloc xenstore page */ - if (alloc_xs_page(xch, info, &xenstore_pfn) != 0) { - printf("Error on alloc magic pages\n"); - return 1; - } - - intf = xenforeignmemory_map(xfh, info->domid, PROT_READ | PROT_WRITE, 1, - &xenstore_pfn, NULL); - if (!intf) { - printf("Error mapping xenstore page\n"); + /* Get xenstore page */ + if (get_xs_page(xch, info, &xenstore_pfn) != 0) { + printf("Error on getting xenstore page\n"); return 1; } - intf->connection = XENSTORE_RECONNECT; - xenforeignmemory_unmap(xfh, intf, 1); rc = xc_dom_gnttab_seed(xch, info->domid, true, (xen_pfn_t)-1, xenstore_pfn, 0, 0); @@ -272,19 +250,11 @@ static int init_domain(struct xs_handle *xsh, if (rc) err(1, "gen_stub_json_config"); - /* Now everything is ready: set HVM_PARAM_STORE_PFN */ - rc = xc_hvm_param_set(xch, info->domid, HVM_PARAM_STORE_PFN, - xenstore_pfn); - if (rc < 0) - return rc; - - rc = create_xenstore(xsh, info, uuid, xenstore_evtchn); + rc = create_xenstore(xsh, info, uuid, xenstore_pfn, xenstore_evtchn); if (rc) err(1, "writing to xenstore"); - rc = xs_introduce_domain(xsh, info->domid, - (GUEST_MAGIC_BASE >> XC_PAGE_SHIFT) + XENSTORE_PFN_OFFSET, - xenstore_evtchn); + rc = xs_introduce_domain(xsh, info->domid, xenstore_pfn, xenstore_evtchn); if (!rc) err(1, "xs_introduce_domain"); return 0; diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-build.c index 49d1f14d65..6c51f91999 100644 --- a/xen/arch/arm/dom0less-build.c +++ b/xen/arch/arm/dom0less-build.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ #include +#include #include #include #include @@ -11,6 +12,8 @@ #include #include +#include + #include #include #include @@ -704,6 +707,54 @@ static int __init alloc_xenstore_evtchn(struct domain *d) return 0; } +#define XENSTORE_PFN_OFFSET 1 +static int __init alloc_xenstore_page(struct domain *d) +{ + struct page_info *xenstore_pg; + struct xenstore_domain_interface *interface; + mfn_t mfn; + gfn_t gfn; + int rc; + + if ( (UINT_MAX - d->max_pages) < 1 ) + { + printk(XENLOG_ERR "%pd: Over-allocation for d->max_pages by 1 page.\n", + d); + return -EINVAL; + } + + d->max_pages += 1; + xenstore_pg = alloc_domheap_page(d, MEMF_bits(32)); + if ( xenstore_pg == NULL && is_64bit_domain(d) ) + xenstore_pg = alloc_domheap_page(d, 0); + if ( xenstore_pg == NULL ) + return -ENOMEM; + + mfn = page_to_mfn(xenstore_pg); + if ( !mfn_x(mfn) ) + return -ENOMEM; + + if ( !is_domain_direct_mapped(d) ) + gfn = gaddr_to_gfn(GUEST_MAGIC_BASE + + (XENSTORE_PFN_OFFSET << PAGE_SHIFT)); + else + gfn = gaddr_to_gfn(mfn_to_maddr(mfn)); + + rc = guest_physmap_add_page(d, gfn, mfn, 0); + if ( rc ) + { + free_domheap_page(xenstore_pg); + return rc; + } + + d->arch.hvm.params[HVM_PARAM_STORE_PFN] = gfn_x(gfn); + interface = map_domain_page(mfn); + interface->connection = XENSTORE_RECONNECT; + unmap_domain_page(interface); + + return 0; +} + static int __init construct_domU(struct domain *d, const struct dt_device_node *node) { @@ -804,7 +855,10 @@ static int __init construct_domU(struct domain *d, rc = alloc_xenstore_evtchn(d); if ( rc < 0 ) return rc; - d->arch.hvm.params[HVM_PARAM_STORE_PFN] = ~0ULL; + + rc = alloc_xenstore_page(d); + if ( rc < 0 ) + return rc; } return rc; From patchwork Fri Feb 7 01:53:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13964214 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 03CE3C02198 for ; Fri, 7 Feb 2025 01:54:02 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.883269.1293329 (Exim 4.92) (envelope-from ) id 1tgDZ5-0003dO-43; Fri, 07 Feb 2025 01:53:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 883269.1293329; Fri, 07 Feb 2025 01:53:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZ5-0003dH-0V; Fri, 07 Feb 2025 01:53:55 +0000 Received: by outflank-mailman (input) for mailman id 883269; Fri, 07 Feb 2025 01:53:53 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZ3-00037W-SR for xen-devel@lists.xenproject.org; Fri, 07 Feb 2025 01:53:53 +0000 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on20609.outbound.protection.outlook.com [2a01:111:f403:2408::609]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 60bb2e77-e4f6-11ef-a073-877d107080fb; Fri, 07 Feb 2025 02:53:53 +0100 (CET) Received: from BN9PR03CA0944.namprd03.prod.outlook.com (2603:10b6:408:108::19) by SJ0PR12MB6904.namprd12.prod.outlook.com (2603:10b6:a03:483::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8422.11; Fri, 7 Feb 2025 01:53:46 +0000 Received: from BL6PEPF00020E63.namprd04.prod.outlook.com (2603:10b6:408:108:cafe::6b) by BN9PR03CA0944.outlook.office365.com (2603:10b6:408:108::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8398.26 via Frontend Transport; Fri, 7 Feb 2025 01:53:45 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by BL6PEPF00020E63.mail.protection.outlook.com (10.167.249.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8398.14 via Frontend Transport; Fri, 7 Feb 2025 01:53:45 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 6 Feb 2025 19:53:44 -0600 Received: from smtp.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 6 Feb 2025 19:53:44 -0600 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 60bb2e77-e4f6-11ef-a073-877d107080fb ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Vrx7TXj7AlCFVY8U3oupDb92Wtj/K1el1LpmPqzDOAviKFA7DYIKRFdUd9ct+T5JqV59rnDc/TVtx0lmQvbuPsoeIA9J3r64X2yS9VPKc/itLTRjTK/jNbMXnf9EbUMsg3NMQ8KVzq3ofWeLNVHxW63hzhkxHLAccwEgbpvy8EQ9oobfxq2vaXDBeeH8qQBkuc9aVgxmesdtGZFSHPMcJZUYScENuuPldGEl1+RuV625enDY5nf8S1vf5hJoBjRJQkR8Xa8JTS1EAoahyiBoABV/RlQHKkzuByWactsXQGU9BJdUSJekq4zRD9MrEd7MeS40lsoRzYqD/Vjo7LMjvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bm9n7d0lv39csuk5HxxqaBGOy78rYQuqOosnK5AZnWo=; b=XLTZuOXd0qodEwuse212RnmuHsYF1tT51IEXgfd/d6m0Qf2aphygHssKxPtz073P/lO8V4bM/Kb/dKEwZwK51u4H3GXKkf2+ZeG2D1NP27045Ry4p72Stocj2YMAqnFOuyxEMEgxcjn5pFieZpUNpmB9592SOV14h7kIDT3A/4WksELGrCO2jO95mUv/+h78b4KmFcjN18vi/oh0UImzfMhfYA0pjEpeACBvRAKTj19GwwL17r59pV9m3iDsZKx2xg3M4jFswW60U0XXXkI6YTxI7UyJKKANYWFd1SUpED3a+3S98JM4/2Hp+JKeu1anXds6p7TkWhXj9ZrfMEO9aA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bm9n7d0lv39csuk5HxxqaBGOy78rYQuqOosnK5AZnWo=; b=Ori03lIqE9xNUVR2F1GnRzptkVNHWF8MYaLLoW6qBiX+RhKRCciqqPnhQx2P1qLmXqVbox8qvnbjMUQR3qRMakv4A5mNyYclmx4nfJNhMaRsM31lkqTnCp3TWddsvFmUroDi5eV7jdLvxly1D6q5GdqnD9z40AhbLVzfzUGQk4g= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C From: Stefano Stabellini To: CC: , , , , , Henry Wang Subject: [PATCH v6 3/7] docs/features/dom0less: Update the late XenStore init protocol Date: Thu, 6 Feb 2025 17:53:37 -0800 Message-ID: <20250207015341.1208429-3-stefano.stabellini@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: stefano.stabellini@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00020E63:EE_|SJ0PR12MB6904:EE_ X-MS-Office365-Filtering-Correlation-Id: 55f49a20-2f93-4aca-a034-08dd471a4203 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: QoEI7lx2x8If5zo6YH+SGln8/ftWKvb88wpTJqHwXtrfBPZcIrMQPBNJ2LNdY96zaMQuUVmHYpUJ4eelSOzuM4dtzMzc5bCs+UqjaTO1HE3poZ18iXJ9y9YCO2USdanPrgtiPU0q3zdy35ZGSngt4ECEhx0Z746tXKHJpo2763zyZ5ceUApQQKsQwlTx3fygpxEXGYCwJq6NMFFkx8FqY+JsJ/k8/lPOWTWf4bUfQQTpGSGsrz0M9sMJg8dFgzdAmfUB1llg2PMdL3xds4ct5D3gtukcszc1e+bU0QpBNNbYO2B/uPp9ltc2pBr/EhpnBPh14HjbM75saOfDBH9FZl8F6EKJz/FPasDE4uQzPpIXXZR4k+EUm/uaIyZPTaVEeKv0sAnUNaEGEkYkXa5UvJq7D7oojbxxWBCO6IRynsyOQEAYVj8D6fFtYYqIxCrVC5zs1k0qVvLuKrgReixdKZ4hWrb+JCmMLWYv1x7fTF8s5VFl++708taJJ9O/8N+JF43PlU4Srnsih2CoQt7PcLhWI1A7Onl+K/PVxSecmOtDnDvt/V7hIppcYkdCXuKllHTrL3AgLhIuTo7XXmMdavSxCHIldl0hoLhnNfJlOca+BpKYYKlxcnLYKteDNlkkD6PUh+t82YP5dMY0PC1cuwpwMG/4HBBF6Za4ClzRYLt3FvZfLXH020sfETXBiUPUoC82bLkTdCSqme2H6Ybqj7u4xWc9N5BxpBAbKjeJG/dg3VPQKVtDIZd24JSiTX9IcDXLEB7xDND3VKSf0BXcnCxaCc/zOJ+SBCvgKcxxvlyy/IW28ULY8XChTHkoxwauB7a5JrtYmmQI0R928U4ljXs2PZPNvE51VsxMko11y5VGUaosTFm5gJg3svgFxY/whdriO1O8AY7UOxn8fLDHxTmvnME+TEbxfni7ZZCztzS5G3v7BEbl2QLBZWCxGb3uTS+jInsoVxGujLO4KLjk0w/wezfzUBRntgsEhNeM5FtUmX9DtxcohGOuBkmOS0M0Q/UeIkt1zhEcAOVn3KGzpY2iiv9okNo3LoNl8x5IjUY1V3zz31ZnolrEzQ5PSYP61tVMPDcFUO7akd7jkcbDTvUlIRP4Ge+0jSgeJuo5x7cQOcUrzyUb7HdkvbSG8Aj3zKjeHcMZj6C0loLeS/NuGpeIVp5JMwqhAKECD8voJWa0kggtzp/B8UITHujPCj9T7i/5cKnqRyXGriJ0CHn/QjiauAdzj6VMYjkFuMJqR2TF3i5ExF4xhw8slanSTPCVavpHn2S9whEgTS1gH3ZyEXQhEMTnBtjKXCk1TKDozsDGlrdUzoPAK9hh5AV1w1uNVqJsNq5e+WCYO2wRwN7wmQHWhdvvXzSQZbsszj+iKWpA2p86oGfRrgN4FZMF0TjdqUFr0nlh/5ZBXgo6G9yNwyEmyIbR0zBTK5vI6Nis/0LsWR3pSo+cRSD75zhTqNfAI+nc/N2EjeaFBvXDtd5ZptwVT5PG4fuHwziL9PbQGnM= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(82310400026)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2025 01:53:45.7952 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55f49a20-2f93-4aca-a034-08dd471a4203 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00020E63.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6904 From: Henry Wang With the new allocation strategy of Dom0less DomUs XenStore page, update the doc of the late XenStore init protocol accordingly. Signed-off-by: Henry Wang Reviewed-by: Michal Orzel --- docs/features/dom0less.pandoc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/features/dom0less.pandoc b/docs/features/dom0less.pandoc index 725afa0558..8b178edee0 100644 --- a/docs/features/dom0less.pandoc +++ b/docs/features/dom0less.pandoc @@ -110,9 +110,10 @@ hotplug PV drivers to dom0less guests. E.g. xl network-attach domU. The implementation works as follows: - Xen allocates the xenstore event channel for each dom0less domU that has the "xen,enhanced" property, and sets HVM_PARAM_STORE_EVTCHN -- Xen does *not* allocate the xenstore page and sets HVM_PARAM_STORE_PFN - to ~0ULL (invalid) -- Dom0less domU kernels check that HVM_PARAM_STORE_PFN is set to invalid +- Xen allocates the xenstore page and sets HVM_PARAM_STORE_PFN as well + as the connection status to XENSTORE_RECONNECT. +- Dom0less domU kernels check that HVM_PARAM_STORE_PFN is set to + ~0ULL (invalid) or the connection status is *not* XENSTORE_CONNECTED. - Old kernels will continue without xenstore support (Note: some old buggy kernels might crash because they don't check the validity of HVM_PARAM_STORE_PFN before using it! Disable "xen,enhanced" in @@ -121,13 +122,14 @@ The implementation works as follows: channel (HVM_PARAM_STORE_EVTCHN) before continuing with the initialization - Once dom0 is booted, init-dom0less is executed: - - it allocates the xenstore shared page and sets HVM_PARAM_STORE_PFN + - it gets the xenstore shared page from HVM_PARAM_STORE_PFN - it calls xs_introduce_domain - Xenstored notices the new domain, initializes interfaces as usual, and sends an event channel notification to the domain using the xenstore event channel (HVM_PARAM_STORE_EVTCHN) - The Linux domU kernel receives the event channel notification, checks - HVM_PARAM_STORE_PFN again and continue with the initialization + HVM_PARAM_STORE_PFN and the connection status again and continue with + the initialization Limitations From patchwork Fri Feb 7 01:53:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13964216 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7E3ABC0219B for ; Fri, 7 Feb 2025 01:54:03 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.883270.1293334 (Exim 4.92) (envelope-from ) id 1tgDZ5-0003g2-Cd; Fri, 07 Feb 2025 01:53:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 883270.1293334; Fri, 07 Feb 2025 01:53:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZ5-0003fL-7J; Fri, 07 Feb 2025 01:53:55 +0000 Received: by outflank-mailman (input) for mailman id 883270; Fri, 07 Feb 2025 01:53:54 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZ3-0003b1-Vo for xen-devel@lists.xenproject.org; Fri, 07 Feb 2025 01:53:53 +0000 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on20612.outbound.protection.outlook.com [2a01:111:f403:2416::612]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 604f9cc3-e4f6-11ef-b3ef-695165c68f79; Fri, 07 Feb 2025 02:53:51 +0100 (CET) Received: from BN9PR03CA0944.namprd03.prod.outlook.com (2603:10b6:408:108::19) by CY5PR12MB6201.namprd12.prod.outlook.com (2603:10b6:930:26::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8422.11; Fri, 7 Feb 2025 01:53:47 +0000 Received: from BL6PEPF00020E63.namprd04.prod.outlook.com (2603:10b6:408:108:cafe::a) by BN9PR03CA0944.outlook.office365.com (2603:10b6:408:108::19) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8398.26 via Frontend Transport; Fri, 7 Feb 2025 01:53:46 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by BL6PEPF00020E63.mail.protection.outlook.com (10.167.249.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8398.14 via Frontend Transport; Fri, 7 Feb 2025 01:53:46 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 6 Feb 2025 19:53:45 -0600 Received: from smtp.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 6 Feb 2025 19:53:44 -0600 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 604f9cc3-e4f6-11ef-b3ef-695165c68f79 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xwh5qN1XChZy8uTrGnB0z2wZ5a3hwaJ5sTeDq6LHGX8HkMVG55P9+mm4ccwP8kE7tx+G8MtZkmAjH4aPzy4t7nfTxndwIX1lAJgEs4ll67oCPu+rW1H3DTJqB1Ryta2r0x1dABpYg4HAL7PL6j8404QVW8/nQHPfSxxHMAIN1yPOmRSEws2xO6ZK1IHtCxr8H1zhB5gkb+HWGzwSWclSO/HOcJWflcawta7erAEDe8qJLJL/TzG3pge+FLpZbbl7wNuOABNMJJNCY61TvEjfQ0Zq/vYXhK13CBUdKZK893eWVoLXTXTTrjxXgCGJFBXU+Gy6S1vPd9Jj1euHHxM0jA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DdNnZPT/EWWNxVMQKl2mVk9CKJViJCGFeX7uqj/5yiU=; b=K8Nj9EHfniP8aatN3jWblCWPSLjgfFyX8EG2at2bEbn5UO6hIBCsFbqO5vJtMXWpJ6EVgc6bry404Dii2HVbeHwhgc8GsPBE9Av3qHxgE4Or1bnE+lJtX4Ohf/yRjyJBJe5C9wce0aj/QtSIckWT2WBQjGeyIoJ8rWKVZ4WWNnTj/BI/XwI8WfUD0EzknI5kCDxdTedIpiMSIKFR73H6QQl+Z/q/ZnzbkLwfx/RMPEedZR3eHso/EQ61GOYjVRMOa74r5oqRpMcYROm4u51O+xtA2SJw8VhbsB/jgnHi/BZWVvb+4K7Up2svXrHBW4rcwMxWmYfdB9kZFm6KFHxH1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DdNnZPT/EWWNxVMQKl2mVk9CKJViJCGFeX7uqj/5yiU=; b=Aoes1rfEnwH8YP7xS5f5AKOaHxgiDTwIvpioMcXrv9rWQMxVcJ7oKvq8VTktMZTmjn2zqyzd28k+u3ZNEgj2EyySKCWUGPYUpZi0i5NPAWdEJ4kXo2qYMVlHtwXArlRhf3SW+VsVB6wcsMge8l2ZotfBe/mP/CpvBow1QrruDGY= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C From: Stefano Stabellini To: CC: , , , , , Stefano Stabellini Subject: [PATCH v6 4/7] automation: add ping test to static-mem test Date: Thu, 6 Feb 2025 17:53:38 -0800 Message-ID: <20250207015341.1208429-4-stefano.stabellini@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: stefano.stabellini@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00020E63:EE_|CY5PR12MB6201:EE_ X-MS-Office365-Filtering-Correlation-Id: 87d84034-3f6a-427e-5d9e-08dd471a42a3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: UoCdwgCLVBxqS74stUzjhaDhftB7rhVtkjsZOA1t4YeYl+qLoblCZkvLYKf/YnutNdNyy6MJ9STTsInAsDjEfOLYS3mzRGvXsHKzb0r0Gk7tQ+ENjf1vMT5uuBT3RXmF10x1GLIcyZh5nfWzRl0qRc0Y0AN9+bEXH2doSagrdv6ZbR/yj6m1OxjY7A3rGkwNannxZREnJANYleblrXejBrXNpDt0SkVNaKix+FD2i+3izpeHXTjnFmAa2NFiOpYW14ATLXRmAibeSP/eRE5yrC1wlXFe10k8yWMz0ScmJ4zFaEpSvpFMUiDccs53QK4IRCRhXM2u7bbcwYGA2iZ6RpV8bQTUEoCye4961bTG33U93t5xH7oEWabTNwOJeOQuojI8fhLVtko7oHnplAKzV8GfZYz9YwtUJBD94ldvy7JwYI/fjDrn44FxaaY8VbnqT+5K5qRUqYEeD0S0r1cbYHByfK0Itv4gqLGnXnnkwNeiDigPIdbLfmEqhqktphb8YWmXyNvK2X2XLRXLiAyHxdeg2qTYMVjF0bYxOoOeO5kxPnzUIasEpkBXryCeaHidst0h1mRpU07wuZSsj6JnTopldE7/FN/CzfsmY7UhxABPcy1Z/CTRxJ1VHgYdlcEhvORQJi+k/M4W32YttORklFX7naK+3y1HrobXQDqT8BjHlXrtuhrezxcvqVByy2Fim1n4JrU5fiK62VSVbMs5lma6tcRrKstQXTTvFAp5/2PrCE0jVtODEp5PBnOVvMD2hsGa54SCUHTJx0JypUZG9DeG8gLLMou7p7USDSQyjyAEOzSogQ0asvDbtpveZ7kETRZ/9hlhJl9ihTRNthqMF9tPfky9TEH/Ly4K3CNq2Bm4JXVwq3nczuMBGyoo62S7ApBQNnZxTFgUDjAgxJxUgW96s/7L235gC3cbb84N6yjVosazQALX0keksJKwhKFanRCp/k14Fs0TbXKLqGHSJw2kUjlUfdQ9H5aztgLtR+/JM/CrUk3UdMS1yT6ICf/W74jTNliUFXK/Pa4u0UIog9DdpxVIzJqKqUzo5kORB8URgLfDEq6TFcyCiY5AJlDffMxunU1XkYwREi0f7oe4wSE0ITtArXHBEhv3Vj4WhS74BDkAfq8uBGCrZ4W7vfUcvwu9b1Jz8jBfNYrOp8mTm141Dl/DNOIePBFeomS+/lJRLVBYT/jEuFRwsgPrFgmIZXmgknrd2c0QwzmmQLHRuOROjHouI+KWaMN4jvURe2rSjHwLmnFGDf8aktGpH5MI/S8HeBXPzvdTcGxJ1UYlDymxg/59winsiEnptA5xRuNR0/yGE1W8qPqmsxEa9iS9yxf7z4hAxqeexBkyIhsfaR/78GhJguqZ6yKs+Y2e5C8lE4cvi4CVTTVnxR5vJyEjqTUvGeHxG0J6EIaH0IPmV6g8Akr/0L1gK4oRCOW8PFvniXdGavIkDqbyYthrJ2iuJ6DMAfBy7w2LJvasWy8V9Q3GiUSAyTRubkGyuB+naRA= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2025 01:53:46.8421 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 87d84034-3f6a-427e-5d9e-08dd471a42a3 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00020E63.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6201 With the recent fixes, Dom0less direct mapped domains can use PV drivers. Extend the existing PV network ping tests to direct mapped guests. Signed-off-by: Stefano Stabellini Reviewed-by: Michal Orzel --- automation/scripts/qemu-smoke-dom0less-arm64.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/automation/scripts/qemu-smoke-dom0less-arm64.sh b/automation/scripts/qemu-smoke-dom0less-arm64.sh index 83e1866ca6..f72d209361 100755 --- a/automation/scripts/qemu-smoke-dom0less-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0less-arm64.sh @@ -25,6 +25,9 @@ if [[ "${test_variant}" == "static-mem" ]]; then domU_check=" mem_range=$(printf \"%08x-%08x\" ${domu_base} $(( ${domu_base} + ${domu_size} - 1 ))) if grep -q -x \"\${mem_range} : System RAM\" /proc/iomem; then + until ifconfig eth0 192.168.0.2 &> /dev/null && ping -c 10 192.168.0.1; do + sleep 30 + done echo \"${passed}\" fi " From patchwork Fri Feb 7 01:53:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13964217 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B7E1CC0219D for ; Fri, 7 Feb 2025 01:54:04 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.883271.1293341 (Exim 4.92) (envelope-from ) id 1tgDZ5-0003n6-VC; Fri, 07 Feb 2025 01:53:55 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 883271.1293341; Fri, 07 Feb 2025 01:53:55 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZ5-0003mY-Jn; Fri, 07 Feb 2025 01:53:55 +0000 Received: by outflank-mailman (input) for mailman id 883271; Fri, 07 Feb 2025 01:53:54 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZ4-00037W-4H for xen-devel@lists.xenproject.org; Fri, 07 Feb 2025 01:53:54 +0000 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on20602.outbound.protection.outlook.com [2a01:111:f403:2408::602]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 61c1b3cb-e4f6-11ef-a073-877d107080fb; Fri, 07 Feb 2025 02:53:53 +0100 (CET) Received: from BN9PR03CA0958.namprd03.prod.outlook.com (2603:10b6:408:108::33) by CY8PR12MB7708.namprd12.prod.outlook.com (2603:10b6:930:87::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8422.11; Fri, 7 Feb 2025 01:53:47 +0000 Received: from BL6PEPF00020E63.namprd04.prod.outlook.com (2603:10b6:408:108:cafe::ce) by BN9PR03CA0958.outlook.office365.com (2603:10b6:408:108::33) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8398.25 via Frontend Transport; Fri, 7 Feb 2025 01:53:47 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by BL6PEPF00020E63.mail.protection.outlook.com (10.167.249.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8398.14 via Frontend Transport; Fri, 7 Feb 2025 01:53:47 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 6 Feb 2025 19:53:46 -0600 Received: from smtp.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 6 Feb 2025 19:53:45 -0600 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 61c1b3cb-e4f6-11ef-a073-877d107080fb ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=loReiXQFvbnrEuDRZj7LRuZ11cw9JNvVPmKNtKFDSut1j0QnLF3lIhS1znbvfeDFBq13bs1G/koanw9vxfS/uutQ8mw9/J04DcoW9A01tozgE9vpDagMZ/+H0zGiEY9c0iCT70ds44DM9JCH62jew1tdBuA7q155D6PK4BRcBvxnoWbo+dcU4xtikv1TCD7TLAh27+NvWKTvCTDIX5QshErBGSZySq2k3Vmpr4yUsGv3KMSSiPxHbtolgw5Doj1f7KocijPyrPiu4SBtRA9CS87bi/h7IRws8yHO3m6xRDdVGuDKFqYvY/qyK2hgpBghsKas2NJx4+Qh8hOr+y1V5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1YraUCzpyaHUtOgiiBuxVZ3aTJyofgwv2U7kMIKg8sQ=; b=qxQ6Qi3fPrSbsYgjc+I/5Rlygmua0kipS2Z+zM980TYZR8uNHJDgi3WG5GNiuCDkrghxUXhXVECRnfVXVmG5EMXkr5UAh51rcv77MexPw0gk0Bs8U+3xSvBs0pY7eKvlAHMLGm0n0UPdPndaCwOTecPDU0Bvh1GMOERbam0OQ/uXB6TdOUHFPYBPTAyMfwFaBFMenmj2OVrHrWh+2OAAcr23L36AdFykp+BPDvWUXE+Pzi2WELtJFiRZ1MXKRF7nGG335XnuXV/MaG+KZX7Ay8ZQEsxNX3SI9ulAj4L7fdO54mhj+rRyHZm4mGx8JytiAL28YkFBkfsrL+WG7t/XfQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1YraUCzpyaHUtOgiiBuxVZ3aTJyofgwv2U7kMIKg8sQ=; b=qJXQhn+vDujUSPYcZYu9VnrrrT7EJJX7Q7aiJ5KJTwUbjqgLN6jg+h2Ggz3kvUHIBO2UPP3j/8RjBdX0Xa3HHveJ1AuOUmXZWDox2u1woN5yZ89DuHKnXNXVMUaei6wipHwMyt9v1VD/StcLVzlLDIcqV6othKUt8pmHOP0cCas= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C From: Stefano Stabellini To: CC: , , , , , Stefano Stabellini Subject: [PATCH v6 5/7] init-dom0less: allocate xenstore page is not already allocated Date: Thu, 6 Feb 2025 17:53:39 -0800 Message-ID: <20250207015341.1208429-5-stefano.stabellini@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: stefano.stabellini@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00020E63:EE_|CY8PR12MB7708:EE_ X-MS-Office365-Filtering-Correlation-Id: b2c393b6-fb7a-4f60-6d30-08dd471a42f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info: jbZYKao19QXMWdf+cOl07l7AJzUtEcgA7y0C6wBuP1Y50ezPyWURE4dlGmw0aHzL82nIXyorTvzAGWU//v6tpk5LNGkrc+/ZJ6sMj53B7BA0t152VXBpryxyEy4LTUace4r+S/Moj4CBMCV52vK/NnOGagJ0OEZ2OqhLH00N104sj70FvQfE6wWc096d0fzXDjeCPiTn8CkOOW/SDslB7Qbw0qNSlI+xyyILejQirffFomZeWTJpr62UXTnBT6jZAfWy+9GPrbnWiUCYjGC15nOFkVZ7iY+4TbqvhbW4nPEJDoYUUjRNY5v8sxrd2GvSt84KjFIHRvhAJwMYW3jhJ0ylpVlzAZ5+2IrWNHFXnjNzEmE2cJMoH082Mh0WpacRC9s8oSIyVl6VOp8RA3/0kmViRaE2+n56IcnXGlQ7AJfdLFP4Hy4hV20bca2km59EzYgQsR9gaa7ALNbZf4KFLjaLEnXapyKXTskH/QvE0mqMQLYo5S+0maDeLrWnddCHRKZKDg5D9zvzjeovDrCISDZQRXNKPvbYXxZg5O6ajIGIG85v6KsmrqWSiEvGBwXGaE/hhKMx4IxoBqK0q5x3OE8xZDt8fvrOHfR7aF5LU5MWHdZpIY8SoG081hD8LRxtN/C8MvpTnFM4i1n4A4AbAtlvMUrRV8ofgxQ2YjW7aB8Rga4cNtnNXP5SoTNKAoXIHak5OxAepD3HGEjWqErDWyqWLRpME5RP+AHDQDvj6RY+ShlrxuBiCPDhtEeGc3tWXUYe3B8Yx5Ml7jkMy9/bCZHaNQEYad7xOM1zYOoCzuPA9ocCCVll95g2Ug3dMgiMjxP89LqDIt6iucpIIqcyaQAYwMCpA28xGe5PJcvb1oHAHpQC7pr8mj2HxXwe5XZhyHTR3bf6sB0U4U3lyQqeSERtjq+uAmmnvLQxYbrqYOkn2w4ODWdRw6bEXEi8wToeIdaT797v0PwS1BLim85xi8OV73B1lp1hHF5h2Tr1y8ayRGKC83Yo9vEYdBO29knY4iZMwr2vt37DPbNNEf6BbZLuJZj5jCoBodssdCPrNLqmpGjAsTlOin/eO3AH0E5eiwbslwte6TToli01hWZihqAQKkrdhEcCRBlpj46WnLtHjD8ZEFdREujRQSW8Dlww9PBjiy79gTQaDHJQ4Y4FehFJ4gNaEAPZKE7HY1J0BhmJ5SaWGSOWO2EGiyI1jt0/a2Mgh2bphFktPN3AcjVaKghNAOWkYKTDgaYdwjAnSGPvyFxgsBBBFteu4WZg5zLT4VGkLZMhKG2RbemMt1LvKU2Jgjf39vwBM0cFZuEDvS0qZky2OCpelWhW3vt5H6lc0zmLbyjYWys7rRwNPV2Hh1gdSSeb4eNkielLHSKfbDEHjpPjQ+187Qficng0baq84yvGZF2RHzCq4ZqMuFsLbpCaAu2jYWjZP2uxEtvEjp1EPIpVt48TWdkdR1WOUEMhXWXzlxsvXxfv46gcqQGuQ/YoRwrR5UVwOu4RYnqrFjA= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(1800799024)(376014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2025 01:53:47.3734 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b2c393b6-fb7a-4f60-6d30-08dd471a42f4 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00020E63.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7708 We check if the xenstore page is already allocated. If yes, there is nothing to do. If no, we proceed allocating it. Signed-off-by: Stefano Stabellini Reviewed-by: Michal Orzel --- Changes in v6: - remove double blank lines tools/helpers/init-dom0less.c | 53 +++++++++++++++++++++++++++++++++-- 1 file changed, 50 insertions(+), 3 deletions(-) diff --git a/tools/helpers/init-dom0less.c b/tools/helpers/init-dom0less.c index 2b51965fa7..78c59ec5e7 100644 --- a/tools/helpers/init-dom0less.c +++ b/tools/helpers/init-dom0less.c @@ -16,8 +16,34 @@ #include "init-dom-json.h" +#define XENSTORE_PFN_OFFSET 1 #define STR_MAX_LENGTH 128 +static int alloc_xs_page(struct xc_interface_core *xch, + libxl_dominfo *info, + uint64_t *xenstore_pfn) +{ + int rc; + const xen_pfn_t base = GUEST_MAGIC_BASE >> XC_PAGE_SHIFT; + xen_pfn_t p2m = (GUEST_MAGIC_BASE >> XC_PAGE_SHIFT) + XENSTORE_PFN_OFFSET; + + rc = xc_domain_setmaxmem(xch, info->domid, + info->max_memkb + (XC_PAGE_SIZE/1024)); + if (rc < 0) + return rc; + + rc = xc_domain_populate_physmap_exact(xch, info->domid, 1, 0, 0, &p2m); + if (rc < 0) + return rc; + + *xenstore_pfn = base + XENSTORE_PFN_OFFSET; + rc = xc_clear_domain_page(xch, info->domid, *xenstore_pfn); + if (rc < 0) + return rc; + + return 0; +} + static int get_xs_page(struct xc_interface_core *xch, libxl_dominfo *info, uint64_t *xenstore_pfn) { @@ -233,9 +259,30 @@ static int init_domain(struct xs_handle *xsh, return 0; /* Get xenstore page */ - if (get_xs_page(xch, info, &xenstore_pfn) != 0) { - printf("Error on getting xenstore page\n"); - return 1; + if (get_xs_page(xch, info, &xenstore_pfn) != 0 || xenstore_pfn == ~0ULL) { + struct xenstore_domain_interface *intf; + + rc = alloc_xs_page(xch, info, &xenstore_pfn); + if (rc != 0) { + printf("Error on getting xenstore page\n"); + return 1; + } + + intf = xenforeignmemory_map(xfh, info->domid, PROT_READ | PROT_WRITE, 1, + &xenstore_pfn, NULL); + if (!intf) { + printf("Error mapping xenstore page\n"); + return 1; + } + + intf->connection = XENSTORE_RECONNECT; + xenforeignmemory_unmap(xfh, intf, 1); + + /* Now everything is ready: set HVM_PARAM_STORE_PFN */ + rc = xc_hvm_param_set(xch, info->domid, HVM_PARAM_STORE_PFN, + xenstore_pfn); + if (rc < 0) + return rc; } rc = xc_dom_gnttab_seed(xch, info->domid, true, From patchwork Fri Feb 7 01:53:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13964219 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B2DFC02198 for ; Fri, 7 Feb 2025 01:54:06 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.883273.1293353 (Exim 4.92) (envelope-from ) id 1tgDZ6-00045S-Ty; Fri, 07 Feb 2025 01:53:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 883273.1293353; Fri, 07 Feb 2025 01:53:56 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZ6-00042y-KN; Fri, 07 Feb 2025 01:53:56 +0000 Received: by outflank-mailman (input) for mailman id 883273; Fri, 07 Feb 2025 01:53:54 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZ4-00037W-Sb for xen-devel@lists.xenproject.org; Fri, 07 Feb 2025 01:53:54 +0000 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on20630.outbound.protection.outlook.com [2a01:111:f403:2414::630]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 62174e09-e4f6-11ef-a073-877d107080fb; Fri, 07 Feb 2025 02:53:54 +0100 (CET) Received: from BN9PR03CA0935.namprd03.prod.outlook.com (2603:10b6:408:108::10) by IA1PR12MB7565.namprd12.prod.outlook.com (2603:10b6:208:42f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8422.12; Fri, 7 Feb 2025 01:53:48 +0000 Received: from BL6PEPF00020E63.namprd04.prod.outlook.com (2603:10b6:408:108:cafe::f) by BN9PR03CA0935.outlook.office365.com (2603:10b6:408:108::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8398.25 via Frontend Transport; Fri, 7 Feb 2025 01:53:48 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by BL6PEPF00020E63.mail.protection.outlook.com (10.167.249.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8398.14 via Frontend Transport; Fri, 7 Feb 2025 01:53:48 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 6 Feb 2025 19:53:47 -0600 Received: from smtp.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 6 Feb 2025 19:53:46 -0600 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 62174e09-e4f6-11ef-a073-877d107080fb ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=MTeOt02Wwcbra0RLf5PIPQZowSpRMUYm8xvpOu1/MQJinp9iwhV8u4FvuA1CbNXQ40KvrtU/EAt2+/U7P2CmG5qUjoHY1+6Osmrms034bg3seEZbs573or6BK0Hvf+/0VofrfWg+WWLoVL39aQmiZl6YlnspvJpBr639zvpBkP+mC2QXTRtnKWEJinPlftuWaguW+DvcLSzj+ZAw6BIF73B0bzxpOi2D3xSXPkGQzdTeuae7fOPZeyulsR4EJot2X84nOx1MZjpCYS7SxyLynh7WEf8OujtEnhQa3wa9+0iLk4D+M1CSQO8ei1dlyfr1/HlTk20xuBosZmXv5OD5/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UGe/XBgMugcNKASwUB0TyRCApWu2fqFJMMjLoHkb8Fo=; b=EcPNON3gECH+q5qarUWeB3iPvozLLgBeEkLEOHoIOdUTuf73jNVDB+y8pPzEH0sdoSaMsW4ugQOTCi98CoGL3GV9+3ubEIMzESVs+S9+JYfUA9WKIN673K9Mv8Bxpt2ZI+/s+Wt+Bp7qiHdivsGzrl1bZ7/Alt/f3QGKmbWOpYlZRLmWfMcZR1jfYfotxDwl0Wli0HBeH8RNwsAiEf3efP0undPgFd8m6LV9SJhILXDvJoJA7TvBalXb0zJMhMgG5Ni24ShlA7UpY+0q4gbOLXl22ILxbOzAuGJtQ5tg8+I6hz0n4uDAEHHW/8UFf5K2/+wygaG/EzLaEDIrEMhYmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UGe/XBgMugcNKASwUB0TyRCApWu2fqFJMMjLoHkb8Fo=; b=NaUtHYqRPqrgTxvlNtgmqdahtw1krqNRaO5oO/YS8+vK0lqYXz21qoVjjw8ZCKTCOb0acPXIy68jvP44e022IQqJY34vQYJ6z1GoZEkMko0BPzSuqyHcO8s508R4vnPQR2/Q17ZWsPlty6IbMpC8jyyFnlye/x5vDZ06NkcdENk= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C From: Stefano Stabellini To: CC: , , , , , Stefano Stabellini Subject: [PATCH v6 6/7] xen/arm: introduce legacy dom0less option for xenstore allocation Date: Thu, 6 Feb 2025 17:53:40 -0800 Message-ID: <20250207015341.1208429-6-stefano.stabellini@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: stefano.stabellini@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00020E63:EE_|IA1PR12MB7565:EE_ X-MS-Office365-Filtering-Correlation-Id: 30fe636c-d758-415e-79a1-08dd471a4383 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: JVhhSSzBHBN15pFLFXyT5xW/aPk2afhkxwz+yDTL+x/KVMdQp0nNemyY1oFRH3PHogltgIqSwGr7uRUayIHYyM5s5OWgAalRtWPt9ckM6gN3aZZXgX5W0PSTCBVO6aLdbNrY6G8rRAOYdp1TLkvY1OOAGhCFea/IK0LyoodAMkv0P9ZfX7T62RSUHrW8U6iZAi2aQAb+jttnB8UUAuDnMW9i6OYRmMfyK4UJRNWoS5N3SeGKhGD9WYDhZIcbXxfPNe94WyWFc1MwsEeCXCkTsls3NHmhzFNqciqw0ekfFIRvBlmEld50oL436QxPPwlq/Oa9lkM6CGHmYTtKOjBSE/biadq6++bIlg2up/Q5AKbnmZyFa3iKG+cNxoKUBvVUzjwqOg6pfsG9Sj0HEzsxXyeuf53RjyUxQINyMO81IRl4f+nkC/QRjxL0bhT261EZbuYPHDUQZX23EYAmJm5cAQegv2w75Aukw7NZM54IGC28JoYqUC3E2+UGOhHxn7XTuXPO8afME6ltQsjfFStLT/25tVHC1M37qV9TOKvseBLuyb29v6wj1g/sn2L7iDteyI9Lorh+GpdgDUtbXRqqXYyFAJ4SSEHLEDSXJaLa6FnFWRh6hSBNg9oyABvAIBX0N/mMx0Dc4QW8M2cJiORBdR3yYhZ1kAPXgbTNM8E7C4NLnkLVpyFa314k4PChAXgxUnX98UzqT/X/zEHce+UELIHxdKD+iLWoTo/p3wKbDmiHGz7+DNq9QnXJEeVo2ym4UqZuYY90Iax50mOFH4geRP3VDvItTrkdzQISJ33EXhtbpMhTIJHa3vPGbUPkRBGa35Cbure98M2r6TtbymbyyfrLmdFMX7y0Af8ckva33KOtpTt8/EejYUf9jEMuzEjdfG6g9kbZX2J6KmfO0EQoFwHFE9ePVX5xow4FeVxsrnGX8Sa7077WN1aHa2tv/3F57Mah8BC6UWYDTs37ORGNa1qKHT2BpYESLfiITP8kIH+pgn4UREgXFzkexmCAdSnBmoeniODGjzJPeiaI54VFm9Vsfm5dxCj0XWEduB4volThWAqU0IccXHfa7qyasutA7XQ3W+RFYIH1bmI7pgOmD3glrxXrzFO1J0js4cDlo1jqAKM61d8u3aicCqrfqiz4tSjOuA6pe7IL66u6biPtJegA+Xv7sFP3ziP287vi/vblPmX4JCBsWCYI7aYyZ/lljC+St7oRZL1ZCByPISUVr7TDEAY6cjpEorDWW8a0bR4MtrQDVAUWUFA+TUITCkuUyJ7TY6l2Zlw+S3Y6zO+AMQrJDCDn0Dqob14l6b9TCWqTXGGoM5hvdSTB3um4tlrdORcws9YPHeaFTxTXLLNvG0TroBEAh50lM+slbX8u6/frcPGyVsSnnlwv7HFsaN+YRcDpTaZgGTOJEQ66pfV/HJCEs6409jvbfDmcHDTAKL4UR18XdCpeCDWV+9f0CZaahl8VKy1JlP1YeZi7IC+IU3Lrmt/rJBl1y5LYQLX2PZo= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(36860700013)(1800799024)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2025 01:53:48.3108 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 30fe636c-d758-415e-79a1-08dd471a4383 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00020E63.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7565 The new xenstore page allocation scheme might break older unpatches Linux kernels that do not check for the Xenstore connection status before proceeding with Xenstore initialization. Introduce a dom0less configuration option to retain the older behavior. The older behavior triggered by this option is to allocate the xenstore page in init-dom0less. That does not work with static-mem guests. However, it will make it possible to run as regular guests older Linux kernel versions that are left unpatched. Signed-off-by: Stefano Stabellini Reviewed-by: Michal Orzel --- Changes in v6: - improve wording in commit message and doc - code style - add separate alloc_xenstore_params function docs/misc/arm/device-tree/booting.txt | 5 +++ xen/arch/arm/dom0less-build.c | 45 +++++++++++++++++++-------- xen/arch/arm/include/asm/kernel.h | 30 +++++++++++------- 3 files changed, 56 insertions(+), 24 deletions(-) diff --git a/docs/misc/arm/device-tree/booting.txt b/docs/misc/arm/device-tree/booting.txt index 9c881baccc..4d6d859c66 100644 --- a/docs/misc/arm/device-tree/booting.txt +++ b/docs/misc/arm/device-tree/booting.txt @@ -222,6 +222,11 @@ with the following properties: Xen PV interfaces, including grant-table and xenstore, will be enabled for the VM. + - "legacy" + Same as above, but the way the xenstore page is allocated is not + compatible with static-mem guests. On the other hand, it works with + older Linux kernels. + - "disabled" Xen PV interfaces are disabled. diff --git a/xen/arch/arm/dom0less-build.c b/xen/arch/arm/dom0less-build.c index 6c51f91999..56eb5c6da6 100644 --- a/xen/arch/arm/dom0less-build.c +++ b/xen/arch/arm/dom0less-build.c @@ -755,6 +755,30 @@ static int __init alloc_xenstore_page(struct domain *d) return 0; } +static int __init alloc_xenstore_params(struct domain *d, + struct kernel_info *kinfo) +{ + int rc = 0; + + if ( kinfo->dom0less_feature & (DOM0LESS_XENSTORE | DOM0LESS_XS_LEGACY) ) + { + ASSERT(hardware_domain); + rc = alloc_xenstore_evtchn(d); + if ( rc < 0 ) + return rc; + d->arch.hvm.params[HVM_PARAM_STORE_PFN] = ~0ULL; + } + + if ( kinfo->dom0less_feature & DOM0LESS_XENSTORE ) + { + rc = alloc_xenstore_page(d); + if ( rc < 0 ) + return rc; + } + + return rc; +} + static int __init construct_domU(struct domain *d, const struct dt_device_node *node) { @@ -800,6 +824,13 @@ static int __init construct_domU(struct domain *d, else panic("At the moment, Xenstore support requires dom0 to be present\n"); } + else if ( rc == 0 && !strcmp(dom0less_enhanced, "legacy") ) + { + if ( hardware_domain ) + kinfo.dom0less_feature = DOM0LESS_ENHANCED_LEGACY; + else + panic("At the moment, Xenstore support requires dom0 to be present\n"); + } else if ( rc == 0 && !strcmp(dom0less_enhanced, "no-xenstore") ) kinfo.dom0less_feature = DOM0LESS_ENHANCED_NO_XS; @@ -849,19 +880,7 @@ static int __init construct_domU(struct domain *d, if ( rc < 0 ) return rc; - if ( kinfo.dom0less_feature & DOM0LESS_XENSTORE ) - { - ASSERT(hardware_domain); - rc = alloc_xenstore_evtchn(d); - if ( rc < 0 ) - return rc; - - rc = alloc_xenstore_page(d); - if ( rc < 0 ) - return rc; - } - - return rc; + return alloc_xenstore_params(d, &kinfo); } void __init create_domUs(void) diff --git a/xen/arch/arm/include/asm/kernel.h b/xen/arch/arm/include/asm/kernel.h index de3f945ae5..bdc96f4c18 100644 --- a/xen/arch/arm/include/asm/kernel.h +++ b/xen/arch/arm/include/asm/kernel.h @@ -13,20 +13,28 @@ /* * List of possible features for dom0less domUs * - * DOM0LESS_ENHANCED_NO_XS: Notify the OS it is running on top of Xen. All the - * default features (excluding Xenstore) will be - * available. Note that an OS *must* not rely on the - * availability of Xen features if this is not set. - * DOM0LESS_XENSTORE: Xenstore will be enabled for the VM. This feature - * can't be enabled without the - * DOM0LESS_ENHANCED_NO_XS. - * DOM0LESS_ENHANCED: Notify the OS it is running on top of Xen. All the - * default features (including Xenstore) will be - * available. Note that an OS *must* not rely on the - * availability of Xen features if this is not set. + * DOM0LESS_ENHANCED_NO_XS: Notify the OS it is running on top of Xen. All the + * default features (excluding Xenstore) will be + * available. Note that an OS *must* not rely on the + * availability of Xen features if this is not set. + * DOM0LESS_XENSTORE: Xenstore will be enabled for the VM. The + * xenstore page allocation is done by Xen at + * domain creation. This feature can't be + * enabled without the DOM0LESS_ENHANCED_NO_XS. + * DOM0LESS_XS_LEGACY Xenstore will be enabled for the VM, the + * xenstore page allocation will happen in + * init-dom0less. This feature can't be enabled + * without the DOM0LESS_ENHANCED_NO_XS. + * DOM0LESS_ENHANCED: Notify the OS it is running on top of Xen. All the + * default features (including Xenstore) will be + * available. Note that an OS *must* not rely on the + * availability of Xen features if this is not set. + * DOM0LESS_ENHANCED_LEGACY: Same as before, but using DOM0LESS_XS_LEGACY. */ #define DOM0LESS_ENHANCED_NO_XS BIT(0, U) #define DOM0LESS_XENSTORE BIT(1, U) +#define DOM0LESS_XS_LEGACY BIT(2, U) +#define DOM0LESS_ENHANCED_LEGACY (DOM0LESS_ENHANCED_NO_XS | DOM0LESS_XS_LEGACY) #define DOM0LESS_ENHANCED (DOM0LESS_ENHANCED_NO_XS | DOM0LESS_XENSTORE) struct kernel_info { From patchwork Fri Feb 7 01:53:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 13964220 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0129AC02194 for ; Fri, 7 Feb 2025 01:54:29 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.883304.1293379 (Exim 4.92) (envelope-from ) id 1tgDZW-0006DX-9j; Fri, 07 Feb 2025 01:54:22 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 883304.1293379; Fri, 07 Feb 2025 01:54:22 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZW-0006DQ-62; Fri, 07 Feb 2025 01:54:22 +0000 Received: by outflank-mailman (input) for mailman id 883304; Fri, 07 Feb 2025 01:54:21 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tgDZU-0003b1-Vw for xen-devel@lists.xenproject.org; Fri, 07 Feb 2025 01:54:20 +0000 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on20615.outbound.protection.outlook.com [2a01:111:f403:2418::615]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 710ee2e2-e4f6-11ef-b3ef-695165c68f79; Fri, 07 Feb 2025 02:54:19 +0100 (CET) Received: from MN2PR04CA0020.namprd04.prod.outlook.com (2603:10b6:208:d4::33) by SJ2PR12MB8782.namprd12.prod.outlook.com (2603:10b6:a03:4d0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8422.11; Fri, 7 Feb 2025 01:54:15 +0000 Received: from BL6PEPF00020E60.namprd04.prod.outlook.com (2603:10b6:208:d4:cafe::d9) by MN2PR04CA0020.outlook.office365.com (2603:10b6:208:d4::33) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8398.28 via Frontend Transport; Fri, 7 Feb 2025 01:54:14 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by BL6PEPF00020E60.mail.protection.outlook.com (10.167.249.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8398.14 via Frontend Transport; Fri, 7 Feb 2025 01:54:13 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Thu, 6 Feb 2025 19:53:47 -0600 Received: from smtp.xilinx.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Thu, 6 Feb 2025 19:53:47 -0600 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 710ee2e2-e4f6-11ef-b3ef-695165c68f79 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vTsfhD3EcRtRxCZyWWD+vzeZneWaMsfX1HP6fzbHmbuBE30I9h6D+eNy/OhnB9tGTuLy+K/ucgQFgZZTOQX9ZKTKaWEl+mxg0/KXqCMRtVOeuKCLboFTOxkvdvREPZ2D6XvlfmttuFfP5TTi0gp2vdeAE7jtmiDnn71PhkqP98LUAlOgZ4nGLGIwO3Cpf0OVbJWam044hClBVYPgjxyVrrtJRkhzC3vIkyZk01jeSBPxLgIyYsoeVPIaGRsXmtM8Ql5oI8HJ2V5LsUHZ5QoR1NoAmuu+ysj/vymAy7EDDVIga1RN+BM9YvwVywG0XDGZmQRbUbAKZC+UWhweiqi6kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=sZVSMrbZ1nm/qxWuwEbr55z3NXMCsSyc2dendwsVuj4=; b=dt92ARsoFXL3jx3J5zJ42H6kS5muKjXM8qATNa3UtgxuECGJm1yy1vTzNq6mphXDcH8dSr/WrdMQzld92YrP9QDY92T97xLP2odAzy198Vr56WiDATIp2+4uZBonmXziTt7MQWMDHIcEPfjuaMStpadZEfSRT/jCzgGrkPdasfUbaYFmGhymZQhvrYM6/F8Ffi7yrxWG4dFrPBOw671OrSb0xNCp8fYDdmbcM7pWmVNQMd+eqo6BykCmQskpffVngM/dOGDgYFL9ZWqm1Ykb75PDAAxgVLnWbif6YoX/ReqQqRaf1eqmG1+9QoSwRDTU3K+IwcmGHHB6wkcaZxBYFw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sZVSMrbZ1nm/qxWuwEbr55z3NXMCsSyc2dendwsVuj4=; b=NcN4LsqwUKlfw0Q4oy+MSOHlkCCMsHP5aulyL1klw+GyWEvz4529adiL/yPLQ3k5/2nobFbdCmwX3en3/e9m5b/mtzjgzYiiUVgO7zjqOHsSq0r6ag1fD3KbYyeJmIDkzN+5WIPHyajQnAdtFC4SrQve6E+/C1l5JTs9gqrMemY= X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C From: Stefano Stabellini To: CC: , , , , , Stefano Stabellini Subject: [PATCH v6 7/7] [DO NOT COMMIT] automation: add one test using an older unpatched Linux kernel Date: Thu, 6 Feb 2025 17:53:41 -0800 Message-ID: <20250207015341.1208429-7-stefano.stabellini@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: stefano.stabellini@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00020E60:EE_|SJ2PR12MB8782:EE_ X-MS-Office365-Filtering-Correlation-Id: f1dbec53-721a-4e0b-fed0-08dd471a52c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|82310400026|1800799024|13003099007; X-Microsoft-Antispam-Message-Info: 0ycECRAqyaGWD1i/odLRN3qr0HMjjD5RZhjSBM3YjhgTn0gZrImEmnmVNkWiV0VV5jph75kwiDjgPhs3tMmxcw/bx/VsjP3cl2saU4GqRK7DuUcFMnkqxokMpfp92Esn5bHAg0w7cAPkTi3rqjzGzhok+bewUfdbFp5dYYmQ661EG68mz0SaQmqBKt5yhr+TN7mx/9DGcSovKvJ4lfg/D0oAmCZFfkfRsQKNLnsF+Ewto2Ogpursf0On09lGfrLSXn3SL46cZM7DTNzX56hdw7s1eJIVHStLefIWqIYpiOs8HcY8N49nHQEvdYhYXPILLaKHG9EXa5deW8rJrebbBf3IVtI81uQa6ceP7SsOJtUDcqLQ1UnWeCtNjFiDIudDEH9yaq07aYvo8pBrScYUlJUR1VvbM4cETcA8W2B0CIItKM0Odfht8UHax2JeAvaaXBjAMq+SfeuGLyFkIM8wsjazMvOL1K5YJAruxf05oGXE/Z8tpgBzG8WaPhuZrLVaNtbeUVkIcTIgmbQ9/uIi/dSTq07Tb4HSIoh1J9OCX2WovbvaoENE27CI4gkSfEzLqa9IrxverUq0yKLKnpDVHpHjVafvuYNNBcx++b4gOIXX/ICqsO2C6Ilruoo67m9AfXMp/vFXbleHA7HG+TP1K85qvEq8uu/+pmyEPbMVv9FQb0YUWBQtizIGB6qPMXESwGzjkVlDqpUlsQ+ae+7HbxGgppEyd0rLtNOtZP9YHYtFmTo6dzwbu9hzbHf137R4CTibAC5vkYeI+njMsjytbjrYpzn9K1kScety6hapIvEe7D+p2ycilcnVfGoV3S7MzR95cldzoWckjcCOTtibnW2nTO6y7x1cEKfFPE0QZpKs/fo3aZbXLWpHOgzqaGHRcddQMuEhx/mA9ncPpAmvDvS7vIKmO5HsGvBAvRSJZibW9lpp4o9B0oiCgPMkzwZgFZFdbdT0DAhMIEuFhYVl6pwDSlqZMQR0Tcs5d6opDs5fXEJzZ6pETwEFpXWMF5f4S3vYQVVxPM1edWVWdQks5HAiGHYTA5Av9DETS9nTPI+hUYNHEAMWacusFjYud2NAIWTKg6G5RrNSq6r9G4lrXF2xwm1hX32+Iwn5GIbht1kJ5iQfbI5bL4oj4YcPS5rnSSYiXl3Zrl+NZzftB/IKt3EMdKNTcpm8jVtf8vfVZ02KPbcViGSeYvPNAl2nXppqCRkjY9cGrjmZ0WMEXevCv6Jj/Geq0LhomjHzI9N4wUmvGI+1VXbrmGIgurxZXpM4KJ7TUBH4UkYslq2KEtK5Yd9VDeRDRLNnIQNAc3eyNy8jObm74sZg39bodndcoaiTCQSzL6J3sqw5BDDjQJy9NdY5/+HE+W2CZn/lHt3na787ysvRwzmh6xktydpgh9FpEdVB8ChvRFCb1Dpg6eV+7oiQNbTZpDzw1tZV1cxYaS0= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(36860700013)(82310400026)(1800799024)(13003099007);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2025 01:54:13.9323 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f1dbec53-721a-4e0b-fed0-08dd471a52c8 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00020E60.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8782 The original patch series broke compatibility with older Linux kernels. In the meantime, Linux backported a fix that improves the general behavior and also resolve the problem. However, we still want to check Xen against possible regressions, even against old unpatches kernels. We can use the older Linux kernel version we had to do that. Signed-off-by: Stefano Stabellini --- automation/gitlab-ci/build.yaml | 11 +++++++++++ automation/gitlab-ci/test.yaml | 10 ++++++++++ automation/scripts/qemu-smoke-dom0less-arm64.sh | 7 +++++-- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index 411b4902b5..0a867c3ced 100644 --- a/automation/gitlab-ci/build.yaml +++ b/automation/gitlab-ci/build.yaml @@ -269,6 +269,17 @@ alpine-3.18-arm64-rootfs-export: tags: - arm64 +kernel-5.19-arm64-export: + extends: .test-jobs-artifact-common + image: registry.gitlab.com/xen-project/xen/tests-artifacts/kernel:5.19-arm64v8 + script: + - mkdir binaries && cp /Image binaries/Image + artifacts: + paths: + - binaries/Image + tags: + - arm64 + kernel-6.6.74-arm64-export: extends: .test-jobs-artifact-common image: registry.gitlab.com/xen-project/xen/tests-artifacts/kernel:6.6.74-arm64v8 diff --git a/automation/gitlab-ci/test.yaml b/automation/gitlab-ci/test.yaml index 6ad45269ea..06ee2fcc7e 100644 --- a/automation/gitlab-ci/test.yaml +++ b/automation/gitlab-ci/test.yaml @@ -335,6 +335,16 @@ qemu-smoke-dom0less-arm64-gcc-debug: - *arm64-test-needs - alpine-3.18-gcc-debug-arm64 +qemu-smoke-dom0less-arm64-gcc-debug-old: + extends: .qemu-arm64 + script: + - ./automation/scripts/qemu-smoke-dom0less-arm64.sh old 2>&1 | tee ${LOGFILE} + needs: + - alpine-3.18-arm64-rootfs-export + - qemu-system-aarch64-6.0.0-arm64-export + - alpine-3.18-gcc-debug-arm64 + - kernel-5.19-arm64-export + qemu-smoke-dom0less-arm64-gcc-debug-gicv3: extends: .qemu-arm64 script: diff --git a/automation/scripts/qemu-smoke-dom0less-arm64.sh b/automation/scripts/qemu-smoke-dom0less-arm64.sh index f72d209361..ddb158987a 100755 --- a/automation/scripts/qemu-smoke-dom0less-arm64.sh +++ b/automation/scripts/qemu-smoke-dom0less-arm64.sh @@ -7,7 +7,7 @@ test_variant=$1 # Default GIC version gic_version="2" -if [ -z "${test_variant}" ]; then +if [ -z "${test_variant}" -o "${test_variant}" == "old" ]; then passed="ping test passed" domU_check=" until ifconfig eth0 192.168.0.2 &> /dev/null && ping -c 10 192.168.0.1; do @@ -203,7 +203,10 @@ fi rm -rf imagebuilder git clone --depth 1 https://gitlab.com/xen-project/imagebuilder.git bash imagebuilder/scripts/uboot-script-gen -t tftp -d binaries/ -c binaries/config - +if [ "${test_variant}" == "old" ]; then + sed -i "s/enabled/legacy/g" binaries/boot.source + mkimage -A arm64 -T script -C none -a 0x40200000 -e 0x40200000 -d binaries/boot.source binaries/boot.scr +fi # Run the test rm -f smoke.serial