[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 21/21] xen/arm: vIOMMU: Modify the partial device tree for dom0less
- To: Rahul Singh <rahul.singh@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
- Date: Tue, 3 Jan 2023 10:25:12 -0500
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.com 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
- 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=15mGA6wja2IZernS34ru3oqZcAZP2HDHZmQsJGvAPbA=; b=GiomPXlCx8eG93WtfhP2oxRrkuuHUOkqgYuR78ZkEh+u4kLlOfBhb5zLm9QcvUUIbD2fDMgqE3aSJu0IE0VllblJkvjCj0JUXFvLf7XZD99MBFDO3mjMrExhFCaVi0X9NAkaqqYk16D3SNab8JQ4OrEFbcXGrViz5K2i933CWiEJ8iR6zZDP5MfXDFmOoExAktu1N9zBKARjwHuZfiEnVDrQMhOTMB2vhiv7metyZdpYNpujhH/is5Ai9Ikn+A5iBJ8mdMZtBcj+1+rVxA5Cllup1Zxk5WDfxBhvi9twqHbnSj3oZImd1Lsw5WEjMlTjoENMKwIiAH8cSiH7qu64cQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fzQQXm6jCsEr6SEsVauW/nRsBpxPEIulDuuZEDFKFDu35RrtbCdoxhY9Eb7t+0pxrKPOTMi+V0XucCbE3RXdAl8mIFvou7IBTcqaKk8sp6oiGo8qBxAyM8YH/Amo2kaNW45N1HfQyCYKHcu6zQuBo/1ki1WBEhxB7ZaAShIhsUqYdQBV2dRdQWJjXEomUsPSLI5bnY833jr5E9tn2mLIT9gg/9TDyXCm8TX2DgoWs1GkT5yEQk6FXXpKY+gS7Oa/83mKq3jkN+m69LGGH6oaxJtt/U4HMdTzWSIr1er7CaZxFcVGxwt/gKvU13dgdFNJEhNlpYJdicSF82rfbhowUQ==
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Tue, 03 Jan 2023 15:25:29 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 12/1/22 11:02, Rahul Singh wrote:
> To configure IOMMU in guest for passthrough devices, user will need to
> copy the unmodified "iommus" property from host device tree to partial
> device tree. To enable the dom0 linux kernel to confiure the IOMMU
> correctly replace the phandle in partial device tree with virtual
> IOMMU phandle when "iommus" property is set.
>
> Signed-off-by: Rahul Singh <rahul.singh@xxxxxxx>
> ---
> xen/arch/arm/domain_build.c | 31 ++++++++++++++++++++++++++++++-
> 1 file changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index 7cd99a6771..afb3e76409 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -3235,7 +3235,35 @@ static int __init handle_prop_pfdt(struct kernel_info
> *kinfo,
> return ( propoff != -FDT_ERR_NOTFOUND ) ? propoff : 0;
> }
>
> -static int __init scan_pfdt_node(struct kernel_info *kinfo, const void *pfdt,
> +static void modify_pfdt_node(void *pfdt, int nodeoff)
This should have the __init attribute
|