[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH v6 02/11] xen/arm: add iounmap after initrd has been loaded in domain_build
- To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Wei Chen <Wei.Chen@xxxxxxx>
- Date: Tue, 8 Nov 2022 02:14:27 +0000
- Accept-language: en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; 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=SjF17iVkr4reWQKsw0Uv9LswPpcZegPaSK5J0X+Nzrs=; b=fVWk4lKwADXg2udKY/8in2Iziu9XTlUKO/PR4XIULzVvFaWWP9acoYFdMoBEgMFKwcKcxnVrlkZPvp8uz10Yrp5a/+cn+Ylu6Aj8fvcgoXpAiDIu3yVDJ0EhkL3X1vxsVaGvVsYNxzPeq1ZVAPW8SC9G+MoZ1jjeYv3lNbkzHSY9yEy8S8OYBT4R15p82dhMyypberqJ/EjwrNzHcKu2ijY9K52jDE08pLG517UHOcWT5RcvIwSPpqoFjl6VpApX8SqcvRw/alcNDyfnxvZaYtGWi9E3/F6PZhiDVdZyS+580WUIJEPIJcUAaZx1H1EeL6EgyGBwUr25bagRaX0T1A==
- 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=SjF17iVkr4reWQKsw0Uv9LswPpcZegPaSK5J0X+Nzrs=; b=WRNIgZA0lp2GDbyFNltdLvPVhXEDeKBzMY8tx1JIz1U/wneTs43l0LUrx5+qyjfe99ddF/otBSgPv5qrpgAJHd5B4psp6d97LbX0CTknV+LOv7vNS00/1N8FMV6//ya47WuVVJ8+BQ/u6Egs8/rU8kjTFM9KPFezQB1TJgqNehM3t6829gu7DcurbXLIguO5vqpgtdviYsSGXXJTun6swxtU6vz5UIFUrAjLLiLh/osSgDNAG3KCJSiavmMHK5JKRJTYFUMPQYmB2EQpnzQkEGuew2pdr6XPaTSJKg66CCIFWh4dlYX7Tuk1p7zOIHLmLmTdHbnVGOY0cFQkm8OuQg==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=m5aQKG5Q2Uu7r/MCFgtCxoOsLVFC3iNeE7P1+tgzGM0qZ1F1cwB4cgHcjilML6yNwIV1YkUEV//PZwVNO/0Bty0Kl7T54iDRQlcC/lRuqUwa4NsJcgIhvvRuJvycfZeC6fXL2/hpLxJh0jbZRUP6OAMW6uj5qaRqISB/uPbE7x1+YgxOfgawHdR6hzOGiz5Fv86Zz1vBqdD39q3s5wnG4z4SsfWGFtb6Pc9I0d1vX2eMS7Fkh7QFfsItUW3vFx3kLeRFlauiPAeoqrP0TO7d7uI7OACITQB1wzq9XOazIcEemb5dr/HX5oF/V9h45EsBrXptqUPNu7efmJXRdkJElA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mBQ6stISBBlsgvhSasEaIcK7l6XQx5qLqHJlYFNw4lcXeHji5CkzJUQ6RUgB1PCdO2XEFAeXd+BscZ7xQ8vVVWq59aycFbMtNdOHrGdUF1GpPJW0xOmfUk9jSV8/FMDAVKRCov3N7X0TrGGMuUNcwKos0reCoySJc5PeWkT5w4DnAJlH1WAs8QBrEKegIsIwxYTcO1F20tZsjCmb7ewiOgriU2zUzao+UKUeffrTi4j0M63WRPMaVy7UWoVc959jncK24aKVMD7FDeV3Jvb3y2w3ohnDYgqyxK7ygctow/0EJGm31KhsA3SHWFdlavsYh31rExdDLB79lXsUJMvDAg==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: nd <nd@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>
- Delivery-date: Tue, 08 Nov 2022 02:15:08 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHY8DVmEdLqaRCRCUuW0jNzr25ema4yQiqAgAIMi/A=
- Thread-topic: [PATCH v6 02/11] xen/arm: add iounmap after initrd has been loaded in domain_build
Hi Julien,
> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
> Julien Grall
> Sent: 2022年11月7日 2:55
> To: Wei Chen <Wei.Chen@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: nd <nd@xxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>; Bertrand
> Marquis <Bertrand.Marquis@xxxxxxx>; Volodymyr Babchuk
> <Volodymyr_Babchuk@xxxxxxxx>; Henry Wang <Henry.Wang@xxxxxxx>
> Subject: Re: [PATCH v6 02/11] xen/arm: add iounmap after initrd has been
> loaded in domain_build
>
> (+ Henry)
>
> Hi,
>
> On 04/11/2022 10:07, Wei Chen wrote:
> > domain_build use ioremap_wc to map a new non-cacheable virtual
>
> s/use/uses/
>
> > address for initrd. After Xen copy initrd from this address to
> > guest, this new allocated virtual address has not been unmapped.
> >
> > So in this patch, we add an iounmap to the end of domain_build,
> > after Xen loaded initrd to guest memory.
> >
>
> Please a fixes tag. The issue was introduced by commit bb7e6d565d92.
>
> > Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
> > ---
> > xen/arch/arm/domain_build.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> > index 4fb5c20b13..bd30d3798c 100644
> > --- a/xen/arch/arm/domain_build.c
> > +++ b/xen/arch/arm/domain_build.c
> > @@ -3418,6 +3418,8 @@ static void __init initrd_load(struct kernel_info
> *kinfo)
> > initrd, len);
> > if ( res != 0 )
> > panic("Unable to copy the initrd in the hwdom memory\n");
> > +
> > + iounmap(initrd);
>
> This looks good to me. But I am wondering whether using ioremap_wc() is
> actually correct because we are reading the region. So it seems strang
> to map it with write-combine.
>
> So I would consider to use ioremap_cache(). That said, this would be a
> separate patch.
>
Ok, we will try to use ioremap_cache and test it. If everything works
well we will introduce a separate patch in next version.
Cheers,
Wei Chen
> I think this wants to be in 4.17. This will avoid Xen to have two
> mappings with different caching attribute (initrd is part of the RAM and
> therefore directmap).
>
> Cheers,
>
> --
> Julien Grall
|