[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 3/8] xen/arm: Fold mmu_init_secondary_cpu() to head.S


  • To: Julien Grall <julien@xxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Fri, 13 Oct 2023 23:40:08 +0000
  • Accept-language: zh-CN, en-US
  • 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=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=CeQmVI7g8tA3Doi6Kibv3I+5Bzbp6bxk1WH5UTaHLpU=; b=F8ePAbp063eWXpsUd/E6sotG42IXpHdAi6tZaEIMgfvR6TplOiGFytc+k/ZJque7Cq+Svtx9gpgZnNmY++xxI81PwKSQJavKMcEkOV+PiP/tkHPvP/BXlOkplycAV1ojYXuZwg/OX2B+DL12n7ekaJWrsUM4tkuDTfQSBdAFkOHIzbHyK0oCf/kRvSsveJR7Xe/0OgsecuZSZFI3pDzdGAsGPcdrx/lWTs1ZvLqUxSFuiVLrqrY5PiPYC2f+xrdKqsoyUk21neGLGPFct6lm8lei3AN37/b/tqUi1uBwywZO6b2qG8Nz9HRMBxTQw5RFfKkTfKleYLDA7MmcxjD7Vw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HVGVR9qEzmhTCGPQu6YcaComUrab/wiWRJGzrzHi5vT/aoQqzH0TvFpvdPQ29DNUwBdLMl92O8U4y9OeIa/lynYh6wuLhD+EdBZ1UwP8bF8w0CjTafgmFCfPTfvRbukiBqVfCuSGhlTDpooLOt3t07CcYv900Z4uT51SFa/nYvPiIWd5kq+GnUnG2xiMJTMAzDaAt7ajCzUEW4+5ExSSdXOMo84TQkWgGaTWbuxxHc0MJ0wIQQIenFoPWy1yUO6h6NjkEPwnNObKTYhfhmqw5uHiPS2jqH6dsQ1bhYxVleAP4P52DwhFTd6K+OWHC96jWdSovp6q19MmX46+rZfcaw==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Fri, 13 Oct 2023 23:40:32 +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: AQHZ+kx2mzsa+jXwb0W90nWA0Ca0ALBIADMAgABoWAA=
  • Thread-topic: [PATCH v7 3/8] xen/arm: Fold mmu_init_secondary_cpu() to head.S

Hi Julien,

> On Oct 14, 2023, at 01:26, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Henry,
> 
> On 09/10/2023 02:03, Henry Wang wrote:
>> Currently mmu_init_secondary_cpu() only enforces the page table
>> should not contain mapping that are both Writable and eXecutables
>> after boot. To ease the arch/arm/mm.c split work, fold this function
>> to head.S.
>> Introduce assembly macro pt_enforce_wxn for both arm32 and arm64.
>> For arm64, the macro is called at the end of enable_secondary_cpu_mm().
>> For arm32, the macro is called before secondary CPUs jumping into
>> the C world.
>> Signed-off-by: Henry Wang <Henry.Wang@xxxxxxx>
>> ---
>> v7:
>> - No change.
> 
> Given the discusion on v6, I was expecting some changes here at least on 
> arm64 side.

Oh I am so sorry, I completely misunderstood the “leave the code as is”
discussion and now I revisit that discussion and noticed that you did say the
“leave the code as is” is for arm32 only ^^'

I will fix the arm64 side in v8 following [1]. 

> 
> For arm32, my proposal would not yet work because sadly the temporary 
> page-tables for secondary bring-up will contain writable and executable 
> mappings.

[1] 
https://lore.kernel.org/xen-devel/4d7a9849-8990-8ddd-3531-93f4e2e262b1@xxxxxxx/

Kind regards,
Henry

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.