From nobody Fri Nov 22 07:28:21 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass(p=quarantine dis=none) header.from=amd.com ARC-Seal: i=2; a=rsa-sha256; t=1719215798; cv=pass; d=zohomail.com; s=zohoarc; b=iiI56uTS7+T2i+Cp4rGonbPNM0OwvD93ROg+D0bvICEWK2aW3eNdAd2WUR4YJOaivm8yVovGVZwfIWYlWrbtBWdh7KaN3Oa45j2A4eqNuYr4gE0TDytnA3RG4C1S3SgM8xhfhtK9yJ+LoW7MiTCRvyfSWkVVHHGpcEnAFz6UEmM= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719215798; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8p9N3jX+sDeQrnUZwbq8aFuht35rrHShuG3TJ+r3T7g=; b=mEIbx72rgypIVP5txhwYzDOM/FVJp34+wfr5aol8QNiRfn4KicEUH3FSj7tmyjMRzmfhCKBVAQZdQSpHKxMkCbKQiCJ4bcuUaFs6EuFL+zrtsNCyxsPOHf2x0MokeqSKALQeTER++CXg0XmZLQiqVMUvY/amqQP7lCPtRZL5AmM= ARC-Authentication-Results: i=2; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; arc=pass (i=1 dmarc=pass fromdomain=amd.com); dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1719215798658776.0593425225893; Mon, 24 Jun 2024 00:56:38 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.746157.1153120 (Exim 4.92) (envelope-from ) id 1sLeYp-0002Xf-7E; Mon, 24 Jun 2024 07:56:23 +0000 Received: by outflank-mailman (output) from mailman id 746157.1153120; Mon, 24 Jun 2024 07:56:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sLeYp-0002XY-3n; Mon, 24 Jun 2024 07:56:23 +0000 Received: by outflank-mailman (input) for mailman id 746157; Mon, 24 Jun 2024 07:56:21 +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 1sLeYn-0002Wx-MH for xen-devel@lists.xenproject.org; Mon, 24 Jun 2024 07:56:21 +0000 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on20613.outbound.protection.outlook.com [2a01:111:f400:7e88::613]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 3d90a4a2-31ff-11ef-90a3-e314d9c70b13; Mon, 24 Jun 2024 09:56:20 +0200 (CEST) Received: from CH5P220CA0024.NAMP220.PROD.OUTLOOK.COM (2603:10b6:610:1ef::23) by DM4PR12MB7600.namprd12.prod.outlook.com (2603:10b6:8:108::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.28; Mon, 24 Jun 2024 07:56:16 +0000 Received: from CH1PEPF0000AD78.namprd04.prod.outlook.com (2603:10b6:610:1ef:cafe::3a) by CH5P220CA0024.outlook.office365.com (2603:10b6:610:1ef::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.38 via Frontend Transport; Mon, 24 Jun 2024 07:56:16 +0000 Received: from SATLEXMB04.amd.com (165.204.84.17) by CH1PEPF0000AD78.mail.protection.outlook.com (10.167.244.56) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Mon, 24 Jun 2024 07:56:16 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 24 Jun 2024 02:56:16 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 24 Jun 2024 02:56:15 -0500 Received: from XIR-MICHALO-L1.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 24 Jun 2024 02:56:14 -0500 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 3d90a4a2-31ff-11ef-90a3-e314d9c70b13 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OYJOOumKGL8/qdyEgk6IVSIxUBPeowec3pZmn1WTpU3bJWjRypUZxWNrwuBok7T1we9VU/xYBqPbkNxA5xCLU6yG0m5OKXG0hAmUTWnSi3wFsRnyJVg99Mz0OdwBN6wVJtwkT7uRGp7jlJM5WQ/cWKXi1ewpUyX9fICTfrG9rfUXFsiIFWDdC+gTXNMQ88lDJwmpyHXvFx+AhdCI1mtfC+5M0YKBc1CpDe6tTFasaXIIFjG78hLXVLsjeD87Px+QmZ0t6bd4p/LsCvFeaCBVDImDo+BEWb6vV8T4sidp/qcGGrM4FZ1MOJi2OoFx2JtoNJrw8QPi8wZfQ/r2fvWCGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=8p9N3jX+sDeQrnUZwbq8aFuht35rrHShuG3TJ+r3T7g=; b=fkHf79Lv81MQRfWysQ3HPIBNtkKKDXine1dbhUZDr2ihzBgdwP08Xeso48NuBm2WiRzGFQaquEQOwK8UNl5hFt5VEhIlL6aGNnahd8t1ZgAnbR2RS2D4tmo/RFWJJMofPJVEs9L+wvope5CTB3f6w/XQzFBsFvfu1ht7Bnthx6d5RA2heKhyyYkxuPAU9nkoufQJD/1CUavIS3HMNwhZ0NVyvc8cs4wY4cgTJiH8n2w5qqH2fPAdt4SPydnvGu5cnEDsrIKG8802wIDfmSf2A3iNT3S2NnjhV4k5NwdyUFB+mCeDFPC1gkwRcJZ+AajX+A0esIoai6fWQvDevIpTbw== 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=8p9N3jX+sDeQrnUZwbq8aFuht35rrHShuG3TJ+r3T7g=; b=rLULqj/LSPaCy9tKVC0l01wGK9mSr8t5/yDZXMXMOyBT/TUgtO08RpzcO5mOvjuyy68Vq+FzDqtq69ARRrzM6p+/mvuQSOinlQchQ5K9EV2AMk/uUxCSX6ySupPm00k3c9FPByK8SV30tJmSoRnWvFpW0BtwC0jxwXOFRWZGLw8= 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 (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; 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=SATLEXMB04.amd.com; pr=C From: Michal Orzel To: CC: , Michal Orzel Subject: [ImageBuilder] Add support for omitting host paddr for static shmem regions Date: Mon, 24 Jun 2024 09:55:59 +0200 Message-ID: <20240624075559.15484-1-michal.orzel@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000AD78:EE_|DM4PR12MB7600:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a92ad91-15ab-4bc9-5d04-08dc94232046 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|36860700010|82310400023|376011|1800799021; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?PT/c3GCqyRHV/iWkE8GwQw9vL1ztAdaZKc6zZN/7UEpOWtHvDoqv30XvQ5J8?= =?us-ascii?Q?XB97cou/D1ew7IcMEbDlUVn/eDsvlFj8uVYDJAP97mIyLLT7mt5G1yjMeTEO?= =?us-ascii?Q?7P1I5jMKjOrCpaO+4HOQavWEA+DSRjwoOUApTaJJupV+8m1UBZigmdOVqhO4?= =?us-ascii?Q?SvPRLAtv2bN+5CoGM1hkP3ASq4NC6tj9Z/Imm5RAMqhxgOoyMkCUl7RuICQi?= =?us-ascii?Q?AqDnSul/9Ks9tg4YRLFO/kmlGK/cLiz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Yi3yb4xKn5b2ZBnb42CrlUka7a9TIOp8MtD/Klum2jl8+m9Ixlpjxf+J?= =?us-ascii?Q?bJ1BclwW5A3ffmtLAdB9CRRpBIOvhOjsNf7KYYSe/LqGFpOs4OXPO6hU/sHP?= =?us-ascii?Q?vvGnvO1qe/p85sA1mt/O9Gk78kYK+yag2s5h0JNVrTohXsrVDN8J621QDLcy?= =?us-ascii?Q?45R4DLaGq7CmMmyasGzCCxgbApWrDEi0E4CBqQgH1m002XnyYWo8waGWihh8?= =?us-ascii?Q?6Z30qf/WQ1zrsicLKCmkISvmNNYeOwQ7MPHjNwaVY8o6s/AZ/Q=3D=3D?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230037)(36860700010)(82310400023)(376011)(1800799021);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jun 2024 07:56:16.5234 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6a92ad91-15ab-4bc9-5d04-08dc94232046 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=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH1PEPF0000AD78.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7600 X-ZohoMail-DKIM: pass (identity @amd.com) X-ZM-MESSAGEID: 1719215799546100001 Content-Type: text/plain; charset="utf-8" Reflect the latest Xen support to be able to omit the host physical address for static shared memory regions, in which case the address will come from the Xen heap. Signed-off-by: Michal Orzel Reviewed-by: Stefano Stabellini --- README.md | 7 ++++--- scripts/uboot-script-gen | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 7683492a6f7f..4fcd908c2c2f 100644 --- a/README.md +++ b/README.md @@ -199,9 +199,10 @@ Where: =20 - DOMU_SHARED_MEM[number]=3D"SHM-ID HPA GPA size" if specified, indicate SHM-ID represents the unique identifier of the sh= ared - memory region, the host physical address HPA will get mapped at guest - address GPA in domU and the memory of size will be reserved to be shared - memory. The shared memory is used between two dom0less domUs. + memory region. The host physical address HPA is optional, if specified, = will + get mapped at guest address GPA in domU (otherwise it will come from Xen= heap) + and the memory of size will be reserved to be shared memory. The shared = memory + is used between two dom0less domUs. =20 Below is an example: NUM_DOMUS=3D2 diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen index 20cc6ef7f892..8b664e711b10 100755 --- a/scripts/uboot-script-gen +++ b/scripts/uboot-script-gen @@ -211,18 +211,25 @@ function add_device_tree_static_shared_mem() local shared_mem_id=3D${shared_mem%% *} local regions=3D"${shared_mem#* }" local cells=3D() - local shared_mem_host=3D${regions%% *} - - dt_mknode "${path}" "shared-mem@${shared_mem_host}" + local node_name=3D =20 for val in ${regions[@]} do cells+=3D("$(split_value $val)") done =20 - dt_set "${path}/shared-mem@${shared_mem_host}" "compatible" "str" "xen= ,domain-shared-memory-v1" - dt_set "${path}/shared-mem@${shared_mem_host}" "xen,shm-id" "str" "${s= hared_mem_id}" - dt_set "${path}/shared-mem@${shared_mem_host}" "xen,shared-mem" "hex" = "${cells[*]}" + # Less than 3 cells means host address not provided + if [ ${#cells[@]} -lt 3 ]; then + node_name=3D"shared-mem-${shared_mem_id}" + else + node_name=3D"shared-mem@${regions%% *}" + fi + + dt_mknode "${path}" "${node_name}" + + dt_set "${path}/${node_name}" "compatible" "str" "xen,domain-shared-me= mory-v1" + dt_set "${path}/${node_name}" "xen,shm-id" "str" "${shared_mem_id}" + dt_set "${path}/${node_name}" "xen,shared-mem" "hex" "${cells[*]}" } =20 function add_device_tree_cpupools() --=20 2.25.1