From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 32C2FCCA462 for ; Thu, 15 Oct 2026 23:55:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UBqQ7ghCuooVG9o3eRuCaR0n/wsxAVlivPgrOcQJv54=; b=OWZ9iBB4oKRkfY RPpnq4BSKCF9Et72m2ONYIIMiuhSXb6ic2dINRm944hmPLjqJgF7eEtRxJt6e2O/rlqW0XqGyPEPM 9FpmYCGm9LreCHlA5I596WFGONHnUqtFuSUEN5jlRKClv2CgF96KZoKxItUa5XnVSjdaELmvXIK/B Ke0Syo31cg/BTy0oniaJTCCQZej6jRxtdsXoBAxMWmMQGVrdV9T0D2v+ZirVd9c4fEVastegopJnY wHotCT4BNa3AryStjVJnGBkClBlw1b0q6ytkG+JWHIs23ZHG5fwk6rJ90uRTKGgqlnfJejV9oxhU6 OkEOJ2JDF4c0It2mS2Mw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHVIQ-00000001aJa-3k0d; Thu, 15 Oct 2026 23:55:38 +0000 Received: from mail-qt1-x82e.google.com ([2607:f8b0:4864:20::82e]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHVIP-00000001aIv-0iN4 for kvm-riscv@lists.infradead.org; Thu, 15 Oct 2026 23:55:38 +0000 Received: by mail-qt1-x82e.google.com with SMTP id d75a77b69052e-53606d2351aso20868901cf.3 for ; Thu, 15 Oct 2026 16:55:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1792108536; x=1792713336; darn=lists.infradead.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Q9upklymhAO5QkQciFGrhvMFEHYA5CmaaRGixe6VBms=; b=GVedO2+kVvGVxz9rokzYgbowi+WZ7rv+JxXFw8cc8AXb8IwqsUjL7ISEEMqNfYIfNq WVU47ggnBZ44df+q4AstlVnd2et+S+guir+e1/e0GW+pOVtfXplF0cZ7QRhzdIrfAvkX 9xa0wu0I/wm1Q2xsCF7GWdtHgcM2xmvr2sZ1FHDQ816+SHHPc9/v6RgK4w/p0eyxXGEk Hkvnasc/RAeGdLE1Ca8LBN+qOzofyEUb6d9hNyqUEZlB/CJqHQMD8HEhu/B4MGJ3jEDL w8R1BoCR3N7CysIEjj3niozFngTmTewlzrS7Xb3da1/zZVoUq8GDjbhxUACHwJFxno36 mKuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792108536; x=1792713336; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Q9upklymhAO5QkQciFGrhvMFEHYA5CmaaRGixe6VBms=; b=cdwJgmH6etq0GNON4wxmHOG5QkzQEVEuoxFYjHbrWvHYrenc5x90zgN/L4AJbm7uwx +wVop7lwIE+qmmvffvGS4/pr4QRmwWbpcTLDxCHezYBOYi4SJ/+SkppmlM+F+c/dshlI 9lLztejhob04Rr/rf+RJ6soQF69ndW6qWdfjalqQoHpjoh8aUdzsSGoTvQJn5qOCR2cu eVewCgqw7N2z1oYbX8D+U0uZF0FgtMjTbKvg0iHxC23jeZXQZNzTCjUiKQR/INOP4uKN 2nETV3zI7myLp1U5l+DSbvYsztuX+4Pq86sGtc1241lYMd9vCdInoL6ufr4AaMgDnuDK /NYw== X-Forwarded-Encrypted: i=1; AKwUvBwuC7ynI5Bq61UFWRsioThcY4KV6Bwtf7OizK5Dp0nwtVpw65hzN2/5J+jLHo1W4vzqiGxamUAxf4U=@lists.infradead.org X-Gm-Message-State: AFq9FYJBfpHedyh7TmZ9FeJ/zzcVHTw81aRE5MDZf4i8hv7JniyNEOiq hKB3dm128QywA1IezO/ecRhH5OG5ErEb5Sm/GQXY//sYFiXRCnPwyQRS2PC85OG3mOs= X-Gm-Gg: AYBFou3MeVNCf30oS/Fon76G2TLxQIq2zlMG2lp7OOM0LI0ywXaIUL+HvQW+DmIQ/GH nZpdhaxIYz74K996a1o0dU9w5KPwa+/HzZ2vFFCyBAEHQ6cvanGOuit1cd8YT8Tbc4uaZm3eNWh 1/ybWZeYIvWCFpY85xq8BxD1MzOflVuirWYivKJNRC47HkrPvgSMiE273szYxbLGfQgwhNAXGLF t+WuEWyejy0YjbD9fDA+/nDZLKDTOOEWJ96sKIECeQTnbyxdW3Xel2hxnV77Zs6r4oMwVu1tDSd RAmJSPo0ltf+QRtTFDLTSA+9D6Bmj+qF2yrmEz4r618pqyRC+mgEe7jjqX1Hcgvcy/AiE43RIe5 icOYpiDTwWlmBN4DVqM2aTpbqLt9AXXim4MA+WWQfnCin5X8xRpSk+IuP1w3h5oUbgLumcQb1YU 87V6QUUgzN40Q0F4+p9nTpcFf74dcgH1VVPOlyWNF7jtCFXsj4l0vT4ncSe/m120fa6XCjxNbsF Nuw8fl9C6+Hfr6eBW+ylZbi3mZeFL4cMY2jUxFaZR9RRJ1c+9nDWHFi X-Received: by 2002:a05:622a:251a:b0:532:f124:18dd with SMTP id d75a77b69052e-5359f49891emr329059071cf.11.1792108535894; Thu, 15 Oct 2026 16:55:35 -0700 (PDT) Received: from ziepe.ca (hlfxns010zw-159-2-239-150.pppoe-dynamic.high-speed.ns.bellaliant.net. [159.2.239.150]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-91bcba4db4csm8430526d6.16.2026.10.15.16.55.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Oct 2026 16:55:35 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1xHVIM-00000000Gew-3ViJ; Thu, 15 Oct 2026 20:55:34 -0300 Date: Thu, 15 Oct 2026 20:55:34 -0300 From: Jason Gunthorpe To: Gong Shuai Cc: kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Tomasz Jeznach , "Joerg Roedel (AMD)" , Will Deacon , Robin Murphy , Paolo Bonzini , Sean Christopherson , Kevin Tian , Andrew Jones , Fangyu Yu , Wu Fei , Zhao Qingye , Gong Shuai Subject: Re: [RFC PATCH 07/12] iommufd: Add RISC-V IOMMU hardware info type Message-ID: <20261015235534.GA14213@ziepe.ca> References: <20261015065232.604503-1-gong.shuai@sanechips.com.cn> <20261015065232.604503-8-gong.shuai@sanechips.com.cn> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20261015065232.604503-8-gong.shuai@sanechips.com.cn> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261015_165537_220280_77D7D8C0 X-CRM114-Status: GOOD ( 13.89 ) X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+kvm-riscv=archiver.kernel.org@lists.infradead.org On Thu, Oct 15, 2026 at 02:52:27PM +0800, Gong Shuai wrote: > From: Wu Fei > > Add IOMMU_HW_INFO_TYPE_RISCV and struct iommu_hw_info_riscv, which > reports the RISC-V IOMMU Capabilities register through > IOMMU_GET_HW_INFO. > > Signed-off-by: Wu Fei > Signed-off-by: Gong Shuai > --- > include/uapi/linux/iommufd.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h > index 36e6187bb34b..acfef0338cd1 100644 > --- a/include/uapi/linux/iommufd.h > +++ b/include/uapi/linux/iommufd.h > @@ -716,6 +716,14 @@ struct iommu_hw_info_amd { > __aligned_u64 efr2; > }; > > +/** > + * struct iommu_hw_info_riscv - RISC-V IOMMU device info > + * @capabilities: Value of RISC-V IOMMU Capabilities register > + */ > +struct iommu_hw_info_riscv { > + __u64 capabilities; > +}; > + Same here, spec reference. Also be careful to always use __aligned_u64, check all the patches. JAson -- kvm-riscv mailing list kvm-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kvm-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F18F536B923 for ; Thu, 15 Oct 2026 23:55:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792108538; cv=none; b=B3O2//c97p4VEhoxYFZ6FtyHlyXPJhOEXgoBAiEZiperKbYmwhiD6JZHe6GUd4YDqyjgPp3QFRZ8WSJTBaEy9NfyPK1IhchLwmRFnuG4rl6VVVYA10B/Gybr48b35xa30UhRdBrxeS/nSxta/TxOuVN9Sbn7emxOVZlI9IpdsTU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792108538; c=relaxed/simple; bh=Ehw6rvE7MggWEFaG3dtW8QCrQMJWKzz2aYrhccXAY7o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Y9QUG9oUYSsijRlCXYWkCd9fCQfofpqLjBk2QPdY/ihTa7qFy3RsawOpkR/RvkTviqoHwACfJlp9QvnauT2r85a1i/2l2mP3YcBQHbeiMp8LDhZcViPGL/t50rklX4xq0SlrxqVGc4bqWWlkbK/v89tekHwvf8LQUIfhdtvMYvU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=hgQHEGP4; arc=none smtp.client-ip=209.85.160.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="hgQHEGP4" Received: by mail-qt1-f181.google.com with SMTP id d75a77b69052e-533972e0cccso66149181cf.0 for ; Thu, 15 Oct 2026 16:55:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1792108536; x=1792713336; darn=lists.linux.dev; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Q9upklymhAO5QkQciFGrhvMFEHYA5CmaaRGixe6VBms=; b=hgQHEGP4oW2/iO60mpMFo7bZtDgEMuXFXHH2zabCLpqGWWov4WeYzCMQoqdv8m086L Vs4Ucb4jJCcsKmLDx6MIQLrAXRaU4p83ZKcjJ3Oky6r846mMoragkBc3yfMWLrG27X5i AqS2Rn+HvYz9ug7Uqs4MOMDUOY7WrjIEO41fA4+qD93yhWHnVhupW9jwz0sBHm4rxcDs IRWdVIe+IXyjHxhCNoEd8eFWJn3s+wa26NpSGBT1V8fJPXqUibYgrAVYEnKMJDq2EYDL vkUoitPfi12dAXRlWKqzdOsYM3WZUPsA3IDzTnjjcJdB2rneE95qpPP1BHbebNXERRsm ogNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792108536; x=1792713336; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Q9upklymhAO5QkQciFGrhvMFEHYA5CmaaRGixe6VBms=; b=KZiHzUzhX0prnz5lloKx2wcPb1V1CLLpyMlq4E7OnDF33CvGd8GOHbLgezZvp6XRC4 SfvIZR9qzTx6qTuNeaqvvBQ3Hjfr5zPgog0QKcqPQntyZwJmLqK3BEb6sFi3MzLpNLaa u25xpd+KEuE5CDzkn8rnmL02joR29r6h1IpgV1IpO0WWpieYx+3XosYTliMPWQsRnC4R ZNwBjLXSv6jHiQyn1rrlqZrbdDR5DSoaylDsimbZp8V9ifHJRvS+jI4m2ZILwKVOeSYW WV82OYhSwwzK4yxGI/ghY8xgWDiyoq3SUsiKXNFw/LdPBT41YVYGa51giZ5qO0IOvvlr hP6w== X-Forwarded-Encrypted: i=1; AKwUvBzphx1YShfX99d+b3iRPoX5zluwyYKQJddvzfZRTBviSiT68fMT4DJmLT/a0SrrvU7x+wVCcA==@lists.linux.dev X-Gm-Message-State: AFq9FYI40MMo701IjCP2YN/WoUj7ZzVDiJjN3BzbQUXmLokEbHaYBm3l c4XE5x7Kqa5qksoNkGn5BFQeR9oX4BCCcOF5GqYy7cuqMZDOOYkPInnN0l6Qy6nzbqk= X-Gm-Gg: AYBFou2LrW57et99JVw5a8jsl+eVSuAR982RM8ncKRF1kjjmF9fxmDQKWTEPaYlJ97H 1oItQ0MBFfBuEf+mk4tbDPzXCSrkIh4LiRp0zfYjroSaDBp3m0tAKB4s9ESPSO7yV5CJ5gfPyD+ 1haxn+GBrr3S0AHZVpvnqHhVp9phvqGUW+n3T1s1T2OWlsfJrwd9EEzyEym6BvZ4mlUviSKb3Ec PPmWVt0BMAVZ6JxVNkIFzOUePmiCXBmvAQdD/W6Rj1WtLtnn5pqIawQ827xNKkMu+JcrNg6rJrJ T9w9qMyjXYoYiUX3WmUVqyO7mhIDBoWfk42FIjZG0HzhP7/LfNf4VXu/QOO8dN6ga6cOIezCD32 2zJApkk7McDLNxBNhKMMzcwPhQjDolV+1LmbU3cOTlfx+2ibiICqymEvSp8ubj0bKgpPbTeJl+5 FGoAgJ69T1/xV/n7Yp5Ge34jqZaiUvuWylJDdumMrzkkWb02EQuBNf6R4Be689utHLQAR3mCCPD KXzroOyNCiyF7M8DFZ61w1PL9jC76Tz/NGT2DqRVrZ/Nbsd5u0YVgkH X-Received: by 2002:a05:622a:251a:b0:532:f124:18dd with SMTP id d75a77b69052e-5359f49891emr329059071cf.11.1792108535894; Thu, 15 Oct 2026 16:55:35 -0700 (PDT) Received: from ziepe.ca (hlfxns010zw-159-2-239-150.pppoe-dynamic.high-speed.ns.bellaliant.net. [159.2.239.150]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-91bcba4db4csm8430526d6.16.2026.10.15.16.55.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Oct 2026 16:55:35 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1xHVIM-00000000Gew-3ViJ; Thu, 15 Oct 2026 20:55:34 -0300 Date: Thu, 15 Oct 2026 20:55:34 -0300 From: Jason Gunthorpe To: Gong Shuai Cc: kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Tomasz Jeznach , "Joerg Roedel (AMD)" , Will Deacon , Robin Murphy , Paolo Bonzini , Sean Christopherson , Kevin Tian , Andrew Jones , Fangyu Yu , Wu Fei , Zhao Qingye , Gong Shuai Subject: Re: [RFC PATCH 07/12] iommufd: Add RISC-V IOMMU hardware info type Message-ID: <20261015235534.GA14213@ziepe.ca> References: <20261015065232.604503-1-gong.shuai@sanechips.com.cn> <20261015065232.604503-8-gong.shuai@sanechips.com.cn> Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261015065232.604503-8-gong.shuai@sanechips.com.cn> On Thu, Oct 15, 2026 at 02:52:27PM +0800, Gong Shuai wrote: > From: Wu Fei > > Add IOMMU_HW_INFO_TYPE_RISCV and struct iommu_hw_info_riscv, which > reports the RISC-V IOMMU Capabilities register through > IOMMU_GET_HW_INFO. > > Signed-off-by: Wu Fei > Signed-off-by: Gong Shuai > --- > include/uapi/linux/iommufd.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h > index 36e6187bb34b..acfef0338cd1 100644 > --- a/include/uapi/linux/iommufd.h > +++ b/include/uapi/linux/iommufd.h > @@ -716,6 +716,14 @@ struct iommu_hw_info_amd { > __aligned_u64 efr2; > }; > > +/** > + * struct iommu_hw_info_riscv - RISC-V IOMMU device info > + * @capabilities: Value of RISC-V IOMMU Capabilities register > + */ > +struct iommu_hw_info_riscv { > + __u64 capabilities; > +}; > + Same here, spec reference. Also be careful to always use __aligned_u64, check all the patches. JAson From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DEC25CCA462 for ; Thu, 15 Oct 2026 23:55:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dTUjgUZ5+tcD/mjhFov7B1SWvO8UlmcxStK4WzOLm0A=; b=SygrpmHnXy8dM7 Z6Yn5vsRD9QoE4pNlVCTR9PUeJMiZ/Oo3aHitWLCtv7cJZIuwf/0RNqqdVJ3JgWsBBd0ASqYl5UAI YqszKt0EEc1QMLuguvan75IZWI/uZ0fOTzZlMh8u6mC27hjayBKtUTFd6Dk08c49c25VrodgTSVCg yznAYVdSCCSTRR6X7uTky7CBUHeANUtou+wKKNT18gnIHOrpa3ENlERlLYSITDBsum09RgetodpPj tvGoWmgyIUqsef1+Qv6hxjLNgm4F0PwudDfb85iXhPLawNnLLoRZnlEAQlyTyJCFUA9pEHONwLwiK 6OLu5RoFdUzM2OTNfByA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHVIR-00000001aJw-3xJu; Thu, 15 Oct 2026 23:55:39 +0000 Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHVIP-00000001aIw-0ijs for linux-riscv@lists.infradead.org; Thu, 15 Oct 2026 23:55:38 +0000 Received: by mail-qt1-x82a.google.com with SMTP id d75a77b69052e-533972e0cccso66149201cf.0 for ; Thu, 15 Oct 2026 16:55:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1792108536; x=1792713336; darn=lists.infradead.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Q9upklymhAO5QkQciFGrhvMFEHYA5CmaaRGixe6VBms=; b=GVedO2+kVvGVxz9rokzYgbowi+WZ7rv+JxXFw8cc8AXb8IwqsUjL7ISEEMqNfYIfNq WVU47ggnBZ44df+q4AstlVnd2et+S+guir+e1/e0GW+pOVtfXplF0cZ7QRhzdIrfAvkX 9xa0wu0I/wm1Q2xsCF7GWdtHgcM2xmvr2sZ1FHDQ816+SHHPc9/v6RgK4w/p0eyxXGEk Hkvnasc/RAeGdLE1Ca8LBN+qOzofyEUb6d9hNyqUEZlB/CJqHQMD8HEhu/B4MGJ3jEDL w8R1BoCR3N7CysIEjj3niozFngTmTewlzrS7Xb3da1/zZVoUq8GDjbhxUACHwJFxno36 mKuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792108536; x=1792713336; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Q9upklymhAO5QkQciFGrhvMFEHYA5CmaaRGixe6VBms=; b=oxjlktg3gjsUezTDoCh/+F/SXAB3b8E/pyyLRZdYWQlLR1DCBnPuOBUkCv73xkz5vd rzM7Tri/gqx4oUEdmtJx1sJi8rOMJM9tSKkWimDOx+q+1oGz95pwAz2SfjIUxTrTCa2s 2gfUqPM8pL3vM5BxvYeUFkwVHsSp2F3JNWzF7580ow9o6HfNXwfbpjgq3leQ1QTKStn8 odnqyOabpCnk/stciPKUkyvhT4piw/rfyJNKNJISEbIRFd4e7CDBN3rRBG78POPjtZ7o KJntXtbsFm3qEdqg1jID2L2HnZMWpCPxC/NhKtUaOYXPe8fYkMKJmO8FsO3HkURV8ykk 2P2w== X-Forwarded-Encrypted: i=1; AKwUvBxAU3SH+TseoyuHr0cHvUrq8SQpyFcBWZbw4koXlVPVGJ7f2vYzaPS04JMdQ2b1PhS+pvTLnDsVLow5EA==@lists.infradead.org X-Gm-Message-State: AFq9FYJQBEvugLLeB2beuob7bd5Zyw5lQLTgd2kkMVrjVfsy3ZhqrE/4 ln5l+3b07AdBU7sucMMyi1V+xDGaJsj2M0vSMHeKFZVHTnd2tKGoEssY1cmugIhEaeQ= X-Gm-Gg: AYBFou3SbVlJIt8xysvG2v1uHUZhS4OQ4sCG50AhHESSLPGrFuOyGNTtl66GD4LvZeL 3y71sq4JfpZBRBRvhPDb0k+tMguw5DGHqCr7BMzJapfBMsIO/69PTy8XtXME9FjquVlu80l7JoB VHxn4ETKi+/DuntdjqXFZltn7F6zthQ+3yhkaqTSe0QnjWhyinX/vVztz+S+MrBHyUHuBf34VVc 9WrBr+64U7hTA0GD/wxmMQwfmjoZdstvZnBS9tJaDhdnF56P9jQGIQpQvKsUi8c/6f4ubEOeiHY rZsr3uUn8mPtdCBPPJ2fKEUXsAZPdVEEGdDqY4H7vmH6Cg8rJtjAQxlBAYr6RVBM6/fFLtkts8s V/GvxmqOb1pl0EKJolZ7ugPGwQiXHWjZoz3Folq7DvtyEWu80SJyhwKIlTvg5X7CqhfusGj07lb ZBevJ0png8pfrtbNlXJ/DVkrQt/vAnG47Deyl7bi/BBTjaw68bOf4vXvNPF4e40xQr50qKLoQJi 3A6KOL1Ig8IIKqQZZjrkSt9/pRl/G4uhMOg2f0VSiRGPKCBXqYVz1by X-Received: by 2002:a05:622a:251a:b0:532:f124:18dd with SMTP id d75a77b69052e-5359f49891emr329059071cf.11.1792108535894; Thu, 15 Oct 2026 16:55:35 -0700 (PDT) Received: from ziepe.ca (hlfxns010zw-159-2-239-150.pppoe-dynamic.high-speed.ns.bellaliant.net. [159.2.239.150]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-91bcba4db4csm8430526d6.16.2026.10.15.16.55.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Oct 2026 16:55:35 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1xHVIM-00000000Gew-3ViJ; Thu, 15 Oct 2026 20:55:34 -0300 Date: Thu, 15 Oct 2026 20:55:34 -0300 From: Jason Gunthorpe To: Gong Shuai Cc: kvm@vger.kernel.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, Anup Patel , Atish Patra , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Tomasz Jeznach , "Joerg Roedel (AMD)" , Will Deacon , Robin Murphy , Paolo Bonzini , Sean Christopherson , Kevin Tian , Andrew Jones , Fangyu Yu , Wu Fei , Zhao Qingye , Gong Shuai Subject: Re: [RFC PATCH 07/12] iommufd: Add RISC-V IOMMU hardware info type Message-ID: <20261015235534.GA14213@ziepe.ca> References: <20261015065232.604503-1-gong.shuai@sanechips.com.cn> <20261015065232.604503-8-gong.shuai@sanechips.com.cn> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20261015065232.604503-8-gong.shuai@sanechips.com.cn> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261015_165537_219874_16D8D206 X-CRM114-Status: GOOD ( 13.89 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Thu, Oct 15, 2026 at 02:52:27PM +0800, Gong Shuai wrote: > From: Wu Fei > > Add IOMMU_HW_INFO_TYPE_RISCV and struct iommu_hw_info_riscv, which > reports the RISC-V IOMMU Capabilities register through > IOMMU_GET_HW_INFO. > > Signed-off-by: Wu Fei > Signed-off-by: Gong Shuai > --- > include/uapi/linux/iommufd.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/uapi/linux/iommufd.h b/include/uapi/linux/iommufd.h > index 36e6187bb34b..acfef0338cd1 100644 > --- a/include/uapi/linux/iommufd.h > +++ b/include/uapi/linux/iommufd.h > @@ -716,6 +716,14 @@ struct iommu_hw_info_amd { > __aligned_u64 efr2; > }; > > +/** > + * struct iommu_hw_info_riscv - RISC-V IOMMU device info > + * @capabilities: Value of RISC-V IOMMU Capabilities register > + */ > +struct iommu_hw_info_riscv { > + __u64 capabilities; > +}; > + Same here, spec reference. Also be careful to always use __aligned_u64, check all the patches. JAson _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv