From nobody Tue Feb 10 03:39:30 2026 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=1713183416; cv=none; d=zohomail.com; s=zohoarc; b=Rumbinty6BtDFjp2zK6PcNRlPptuI/u+A/JKL/d1J1US8m/DyrpCp/fbkaTkvlHo3kMoSZRIZtRMMyBuoaw9aIYvj9C5pvgHokrxjTdzVtKOPchDxlNYYvRit+vJwz5poPUI73MznvBb5Ztf7dvaB/SUhyvEfpswXA4ncIsZPoc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1713183416; 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=B+c7RehFkAuxaWjjcCy94ZxQGcqvvJ7UfjtxAPt1lFo=; b=ALr1s9SrZHVL3WcVS0m7qPYeeIZ3siLYFN7r6+Qc4pAvHTJ9XN7w525u7+wx/ZrYZV7yM5UOGzRLcGP0kuC89PejfNXTai0EY8BD4mK7cHtNN/GAytKYQS0necPNdMcToFRlmmtSCTMOC+CtK52p5bMmpwQWLOCle1rk4PkXixQ= 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 1713183416183869.6345850652145; Mon, 15 Apr 2024 05:16:56 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.706126.1103194 (Exim 4.92) (envelope-from ) id 1rwLGE-00079B-J6; Mon, 15 Apr 2024 12:16:34 +0000 Received: by outflank-mailman (output) from mailman id 706126.1103194; Mon, 15 Apr 2024 12:16:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1rwLGE-00075v-Dz; Mon, 15 Apr 2024 12:16:34 +0000 Received: by outflank-mailman (input) for mailman id 706126; Mon, 15 Apr 2024 12:16:33 +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 1rwLGD-0006Sb-K3 for xen-devel@lists.xenproject.org; Mon, 15 Apr 2024 12:16:33 +0000 Received: from mail145-16.atl61.mandrillapp.com (mail145-16.atl61.mandrillapp.com [198.2.145.16]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id fe1b57c1-fb21-11ee-b908-491648fe20b8; Mon, 15 Apr 2024 14:16:31 +0200 (CEST) Received: from pmta06.mandrill.prod.atl01.rsglab.com (localhost [127.0.0.1]) by mail145-16.atl61.mandrillapp.com (Mailchimp) with ESMTP id 4VJ5kP5ZkLz8XRtNC for ; Mon, 15 Apr 2024 12:16:29 +0000 (GMT) Received: from [37.26.189.201] by mandrillapp.com id caa6bf1133c14d1cae10a4a7408ac7e0; Mon, 15 Apr 2024 12:16:29 +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: fe1b57c1-fb21-11ee-b908-491648fe20b8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; s=mte1; t=1713183389; x=1713443889; bh=B+c7RehFkAuxaWjjcCy94ZxQGcqvvJ7UfjtxAPt1lFo=; 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=tJWK3kjKGaJ5ODKmCTaMtkpaAF3SUTDZLG4NY4MZ5cniSka81DmQxs5DWkMbE49DC gXqfMSEnMxibuJO+vl261kCg26QdXwDT5bufrCwbDFVT9ZwDS7jmBGbAz0VCQ24x13 NM2XWVFymftX1VfAjoYQW3i3g5gBqIb4D5EmCdC97UDIlBX5W+Fam0znXwdOT+l8IG LuPrZaDrCG4w5GKRvRVQbNcdasvCXYjrFqoB2gk611z4qpsKkYv1nb6HxFxQ6a4iw3 SbXIN1pLe5jYqnzmjowJ6/B8BK8cUpylyZWfexe9onQLIeuHB8JnNywgLhWXWhly5n HMpx/kNXgDNUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vates.tech; s=mte1; t=1713183389; x=1713443889; i=teddy.astie@vates.tech; bh=B+c7RehFkAuxaWjjcCy94ZxQGcqvvJ7UfjtxAPt1lFo=; 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=q03gxlrm5nJiiJuHIPlVeR0H0pmoUMGynKNNJ8AIketBg/xvhJe9Eq7Icj3r4brOc mOvWK14uNZBWgob5C/w11EKDOz1F60WtOj1llO1bfTTKPDscA1EK/ME1NuTx0HQwZa d/Rmn39iqvHXOXsmlhx6+AxG73wYF9PW8QdFJJPYg79NtXuvfPTPjntMY5xKTvOqB1 IpGM0Fv+CO0qJ2jGfBXmdZ8g/0FSbu6DzxUK/37+ZrdE4CZ+nJsWbAWIDGx+Ue+nKK +RYqCBayUsoA58e/8elFYemTw5Y1oJplaibW135CNcghDh1lIk5IzV+Feo0m2GCegZ oOY9NXhxg4sTg== From: Teddy Astie Subject: =?utf-8?Q?[XEN=20PATCH=20v4=205/5]=20AMD-Vi:=20Disable=20intrerrupt=20remapping=20if=20cx16=20is=20not=20supported?= X-Mailer: git-send-email 2.44.0 X-Bm-Disclaimer: Yes X-Bm-Milter-Handled: 4ffbd6c1-ee69-4e1b-aabd-f977039bd3e2 X-Bm-Transport-Timestamp: 1713183387341 To: xen-devel@lists.xenproject.org Cc: Teddy Astie , Andrew Cooper Message-Id: <26557d23386030166e89dfee240d99d07def6021.1713174878.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.caa6bf1133c14d1cae10a4a7408ac7e0?= X-Mandrill-User: md_30504962 Feedback-ID: 30504962:30504962.20240415:md Date: Mon, 15 Apr 2024 12:16:29 +0000 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @mandrillapp.com) (identity teddy.astie@vates.tech) X-ZM-MESSAGEID: 1713183417530100001 Content-Type: text/plain; charset="utf-8" All hardware with AMD-Vi has CMPXCHG16 support. Check this at initialisati= on time, and remove the effectively-dead logic for the non-cx16 case. Suggested-by: Andrew Cooper Signed-off-by: Teddy Astie --- xen/drivers/passthrough/amd/iommu_intr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/drivers/passthrough/amd/iommu_intr.c b/xen/drivers/passthr= ough/amd/iommu_intr.c index 7fc796dec2..9ab7c68749 100644 --- a/xen/drivers/passthrough/amd/iommu_intr.c +++ b/xen/drivers/passthrough/amd/iommu_intr.c @@ -649,6 +649,12 @@ bool __init cf_check iov_supports_xt(void) if ( !iommu_enable || !iommu_intremap ) return false; =20 + if ( unlikely(!cpu_has_cx16) ) + { + AMD_IOMMU_WARN("CPU doesn't support CMPXCHG16B, disable interrupt = remapping\n"); + return false; + } + if ( amd_iommu_prepare(true) ) return false; =20 --=20 2.44.0 Teddy Astie | Vates XCP-ng Intern XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech