From nobody Sun Nov 2 12:40:49 2025 Delivered-To: importer@patchew.org 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; Authentication-Results: mx.zohomail.com; dkim=pass header.i=teddy.astie@vates.tech; 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; dmarc=pass(p=quarantine dis=none) header.from=vates.tech ARC-Seal: i=1; a=rsa-sha256; t=1739787533; cv=none; d=zohomail.com; s=zohoarc; b=eZnc+PEIfMsDc3isNKUwTfbBU8dVfwB1D9t+mNegWYv7+eCuJjv8EnRu2dAA3sOJzxs9J2BTSAmg1s7bKnVMLEMnQAwIy6+/iAuXzO+NVJLyW9nCr+ouFQKtLYmJvJSqJ2qChZaIq5FCEHs/NvX9l/6RgnOpf1jBtfwkZLL8l5g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1739787533; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=4U0gQ1LwmfSJjBNx+a/TBnpKULERm/cQUAt5K2wmoPM=; b=NaC8hyDVjSgXVJX8Wa08RKAKD3xskazCpow5zaZFDaiu+fi6g4BfytNwiRf/s9ZO7YJzj54EvX4Wm+W7KIbPvYlJITojtvrZJYuwFhx++U9B5JvaM0b4Wy8VaYtZM6YO+wERbNIRMHKqXLOqOlfz8JoZBWrRpZ/8iWFGokcVaPA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=teddy.astie@vates.tech; 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; 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 1739787532990347.62665839422027; Mon, 17 Feb 2025 02:18:52 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.890007.1299077 (Exim 4.92) (envelope-from ) id 1tjyCq-000165-1M; Mon, 17 Feb 2025 10:18:28 +0000 Received: by outflank-mailman (output) from mailman id 890007.1299077; Mon, 17 Feb 2025 10:18:27 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1tjyCp-00014y-KV; Mon, 17 Feb 2025 10:18:27 +0000 Received: by outflank-mailman (input) for mailman id 890007; Mon, 17 Feb 2025 10:18:26 +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 1tjyCo-0008Nl-8u for xen-devel@lists.xenproject.org; Mon, 17 Feb 2025 10:18:26 +0000 Received: from mail178-27.suw51.mandrillapp.com (mail178-27.suw51.mandrillapp.com [198.2.178.27]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 853ebf0b-ed18-11ef-9aa6-95dc52dad729; Mon, 17 Feb 2025 11:18:25 +0100 (CET) Received: from pmta13.mandrill.prod.suw01.rsglab.com (localhost [127.0.0.1]) by mail178-27.suw51.mandrillapp.com (Mailchimp) with ESMTP id 4YxJWy43Xhz6CPyQG for ; Mon, 17 Feb 2025 10:18:22 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id 83694620b59941faaa58546f2c7bf24c; Mon, 17 Feb 2025 10:18:22 +0000 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: 853ebf0b-ed18-11ef-9aa6-95dc52dad729 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1739787502; x=1740057502; bh=4U0gQ1LwmfSJjBNx+a/TBnpKULERm/cQUAt5K2wmoPM=; h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=WHOegyZehYdUxq9ncTPTLcDG+LemZbXY3ePpQlwwB8qNFOcQfLtFZkhtuZ+qEKZa3 D1RzS1xoSgW44cHabMP6M93o2+zWPMWGKNpi4PyRsMJEsatJBhWTN0KnDPB4OpzH+K eafxDJvLsNmt5wyMtj/rtakJkVl57TgBEpo3Bj4xyg5vXOHKnaQZDglh+pBOPojjGt Wiru4nLcKO51RLYDn6O5Y1GzY4EsDOOPp0waVKHiuZiDjduf+xX9+qvOu1tx5WXrm2 Q9GagtHhRNHGHtz8ZmbSwrfXcUCFrV1YxF4wVnU8lcDBA3mJO3RIV3h/VfiGgPJd8g 0RKUOKF69ApbA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1739787502; x=1740048002; i=teddy.astie@vates.tech; bh=4U0gQ1LwmfSJjBNx+a/TBnpKULERm/cQUAt5K2wmoPM=; h=From:Subject:To:Cc:Message-Id:In-Reply-To:References:Feedback-ID: Date:MIME-Version:Content-Type:Content-Transfer-Encoding:CC:Date: Subject:From; b=qw3ThI/gyKATkVg6M3+CmClz8rrBmKerozE8KvgquMtkdN+gnf8NksoaRsSJttzLn HnnKYzCpMyFy4UerZ33DJRoYI/FQSZypbfREWpYbA2ZDd3S5PBOd3QEpBehBQtWjtt Q/6C6Cbs5x5LMZ23+6FaBjLWJDn3OF1ha5re2EJhGz2rRGCoQwbjvG1uxPMujKGQD0 KbdK/c6Lbhji3jVRy7BU9tAdSb7uT0Nq0YE7Gfa0X8aQFZrIpEoO1tzPU3D2bLD7RM 2C/XKHdYn+DY9CYsV1lE9R0vP5p5NpevBXgwLe6254U9i8qZs60QdSzNITn6njD67J TdmliTRamIFkQ== From: "Teddy Astie" Subject: =?utf-8?Q?[XEN=20RFC=20PATCH=20v6=2003/11]=20x86/domain:=20Defer=20domain=20iommu=20initialization.?= X-Mailer: git-send-email 2.47.2 X-Bm-Disclaimer: Yes X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1739787500080 To: xen-devel@lists.xenproject.org Cc: "Teddy Astie" , "Jan Beulich" , "Andrew Cooper" , "=?utf-8?Q?Roger=20Pau=20Monn=C3=A9?=" Message-Id: <03ef72e582221299e12c44176dbbe31ce5da9261.1739785339.git.teddy.astie@vates.tech> In-Reply-To: References: X-Native-Encoded: 1 X-Report-Abuse: =?UTF-8?Q?Please=20forward=20a=20copy=20of=20this=20message,=20including=20all=20headers,=20to=20abuse@mandrill.com.=20You=20can=20also=20report=20abuse=20here:=20https://mandrillapp.com/contact/abuse=3Fid=3D30504962.83694620b59941faaa58546f2c7bf24c?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20250217:md Date: Mon, 17 Feb 2025 10:18:22 +0000 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity teddy.astie@vates.tech) (identity @mandrillapp.com) X-ZM-MESSAGEID: 1739787535417019100 Content-Type: text/plain; charset="utf-8" For the IOMMU redesign, the iommu context pagetable is defined once during initialization. When reusing P2M pagetable, we want to ensure that this pagetable is properly initialized. Signed-off-by: Teddy Astie --- xen/arch/x86/domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index 78a13e6812..48bf9625e2 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -858,9 +858,6 @@ int arch_domain_create(struct domain *d, if ( (rc =3D init_domain_irq_mapping(d)) !=3D 0 ) goto fail; =20 - if ( (rc =3D iommu_domain_init(d, config->iommu_opts)) !=3D 0 ) - goto fail; - psr_domain_init(d); =20 if ( is_hvm_domain(d) ) @@ -879,6 +876,9 @@ int arch_domain_create(struct domain *d, else ASSERT_UNREACHABLE(); /* Not HVM and not PV? */ =20 + if ( (rc =3D iommu_domain_init(d, config->iommu_opts)) !=3D 0 ) + goto fail; + if ( (rc =3D tsc_set_info(d, XEN_CPUID_TSC_MODE_DEFAULT, 0, 0, 0)) != =3D 0 ) { ASSERT_UNREACHABLE(); --=20 2.47.2 Teddy Astie | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech