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 378ACC19F32 for ; Fri, 7 Mar 2025 18:35:25 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.905314.1313184 (Exim 4.92) (envelope-from ) id 1tqcXK-0006uB-C0; Fri, 07 Mar 2025 18:35:06 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 905314.1313184; Fri, 07 Mar 2025 18:35:06 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tqcXK-0006u4-8E; Fri, 07 Mar 2025 18:35:06 +0000 Received: by outflank-mailman (input) for mailman id 905314; Fri, 07 Mar 2025 18:35:05 +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 1tqcXJ-0006ty-9U for xen-devel@lists.xenproject.org; Fri, 07 Mar 2025 18:35:05 +0000 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on20625.outbound.protection.outlook.com [2a01:111:f403:2414::625]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id e14d9284-fb82-11ef-9898-31a8f345e629; Fri, 07 Mar 2025 19:35:02 +0100 (CET) Received: from SJ0PR03CA0185.namprd03.prod.outlook.com (2603:10b6:a03:2ef::10) by SA1PR12MB9491.namprd12.prod.outlook.com (2603:10b6:806:458::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8511.19; Fri, 7 Mar 2025 18:34:57 +0000 Received: from MWH0EPF000971E2.namprd02.prod.outlook.com (2603:10b6:a03:2ef:cafe::7c) by SJ0PR03CA0185.outlook.office365.com (2603:10b6:a03:2ef::10) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8511.17 via Frontend Transport; Fri, 7 Mar 2025 18:34:57 +0000 Received: from SATLEXMB03.amd.com (165.204.84.17) by MWH0EPF000971E2.mail.protection.outlook.com (10.167.243.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8511.15 via Frontend Transport; Fri, 7 Mar 2025 18:34:56 +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; Fri, 7 Mar 2025 12:34:23 -0600 Received: from [172.20.156.222] (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Fri, 7 Mar 2025 12:34:22 -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: e14d9284-fb82-11ef-9898-31a8f345e629 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rI2oEv8RBh0otq4G24T0b8FxU73iTNf4ySzJfGAg3XTCaU4A3t9FlLt6IehN7b1btc3BxYVt+88xubT+vwuDGrcEgV2GPUbant4HJeiC7YfvtDD/q2OaltJ9YXOepC/YSYLXe7L9pO5GKO4+XCgWUj/RAGLvfDGFKBwEfFI6vqFq00n9o4PVp/qqI7Bd78ANMIFfif28+3zjnXun9G8vJmTBb7kjyx/YRsRJ7ZIKshUPZv3yk6PiwxvtaOC696fnqFTh24aGsTDXduvi4PKYyLdnRFB10FqjNrkma0JGY22iS9Qm5gZQyZu9KrdZASP0sQDnVo72Z6Z4mnUK37VXqw== 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=seKkujC0nE67B6XURNIfxyizCZTe4rYHhb47ttCs0mo=; b=lanpnsP8EQ6f/Tbi/ABW4ck3x1rZOfBjicesZNm5lbjZmBNPybITAv91i/UTLA7sxjsR6e0UVYbWNwWBGUvPNV4J+t76igFjDno/zAzGnmNpoA/F3g5urfFykRLyKBpNOVassFmvFsThafjY1AzuaLu8vdylDJoaOSkXvJjKii0ezoo8M2C0zG4pNvtmubp7Ci+bc3+FcAANs/FQEtaJetKGTgbyQW6xDgJK9sdsa9Tv2ZLWVzCfDG32+JY2NPQyW4jZS9NPgCBLMjv8dXzkhC2vSXTRneB1j0RdgJ4OGq7q5L9Q9IO9j8SMpdGNsvKh/nF9lHusjaysXe0zagD/7w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.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=seKkujC0nE67B6XURNIfxyizCZTe4rYHhb47ttCs0mo=; b=CgtUy5Pg00EPZ26X+94z56HBcuatNOnEAV1gHJpfpoZyFB0S5ZPsrILlGLlPbRZYeWCWsrk2YJen5UcbOrea0JnrEYDdf+q/gRCD4RZ83kzLiUCX1XLzyecI++pwoNxC82+GGMJVczGQ6tVp0ilCDDOYUtw/unJL4rrm3QOkAW8= 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 Message-ID: Date: Fri, 7 Mar 2025 13:34:24 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 08/23] xen/arm: dom0less seed xenstore grant table entry To: Stefano Stabellini CC: , Julien Grall , "Bertrand Marquis" , Michal Orzel , Volodymyr Babchuk , Andrew Cooper , Anthony PERARD , "Jan Beulich" , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= References: <20250306220343.203047-1-jason.andryuk@amd.com> <20250306220343.203047-9-jason.andryuk@amd.com> Content-Language: en-US From: Jason Andryuk In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: None (SATLEXMB03.amd.com: jason.andryuk@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E2:EE_|SA1PR12MB9491:EE_ X-MS-Office365-Filtering-Correlation-Id: 4d4e6f70-aa48-47c9-e719-08dd5da6c2c6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|82310400026|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?clYzZVdlcEwyNkJoWHFBSEx4SHBmaU5qblhNMEcyOHJUSFJYR0E4UFRqUXJ5?= =?utf-8?B?MWQ2RE94VEo2a3JVSGpRSnF2VStZbnF3Tjl0QTJwNmwyY1I0RzZoTEtkRWJV?= =?utf-8?B?eFQ2WEtOcFNORHVrTnArMTdIYSt6aEJLYkhKRWM5aUt3VmxPcFhmV2s1aXox?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NrVUdYZE1uKzRyaFhYYmFmWk00cGlveGtDMlVXUzlZ?= =?utf-8?Q?SzWI77B6HsSVZwKLKpDDN7/Wb6C5BI=3D?= 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);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Mar 2025 18:34:56.8685 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4d4e6f70-aa48-47c9-e719-08dd5da6c2c6 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: MWH0EPF000971E2.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB9491 On 2025-03-06 20:47, Stefano Stabellini wrote: > On Thu, 6 Mar 2025, Jason Andryuk wrote: >> With a split hardware and control domain, the control domain may still >> want and xenstore access. Currently this relies on init-dom0less to >> seed the grants. This is problematic since we don't want hardware >> domain to be able to map the control domain's resources. Instead have >> the hypervisor see the grant table entry. The grant is then accessible >> as normal. >> >> This is also useful with a xenstore stubdom to setup the xenbus page >> much earlier. > > Reading the patch, it seems that what is doing is letting the xenstore > domain map the domU's grant table page. Is that correct? The end result is everything is setup for xenstored to map GNTTAB_RESERVED_XENSTORE at some time later. > If so, I would suggest to update the commit message as follows: > > With split hardware/control/xenstore domains, the xenstore domain may > still want to access other domains' xenstore page. Currently this relies > on init-dom0less to seed the grants from Dom0. This is problematic > since we don't want the hardware domain to be able to map other domains' > resources without their permission. Instead have the hypervisor seed > the grant table entry for every dom0less domain. The grant is then > accessible as normal. I'll go with a tweaked version of yours: xenstored maps other domains' xenstore pages. Currently this relies on init-dom0less or xl to seed the grants from Dom0. With split hardware/control/xenstore domains, this is problematic since we don't want the hardware domain to be able to map other domains' resources without their permission. Instead have the hypervisor seed the grant table entry for every dom0less domain. The grant is then accessible as normal. Regards, Jason