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

Re: [PATCH v7 8/8] xen/arm: mmu: move MMU specific P2M code to mmu/p2m.{c,h}


  • To: Julien Grall <julien@xxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Tue, 17 Oct 2023 05:55:48 +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=UGlFlyPhBSk+mEKeA6Qqh/qZxQrBEuDjqmQUvjFIPrg=; b=mKX1/hgnhMHpCNcIIdFTZ39jTHqlQs4ZZI5Z5V6uUHyRZJ6bYCb3RqdNZyqu/kMuqW9b6RjqpMsndnzSEzNkHG5r8aJBqRtG5Kg/DDxmuGa5m3rHDZ3OC0+iHTHIilUST+uEaa7x5ickeNuHz+tv6r++3YnM3pg30jsVxShunDC4k+PtGW7qSWheza3EblxQxEbdfWRcq4hQe1vSkBx9uplfV3C/sZ2pp3ZzNTKHc3GyxatECLybGnMQXEsydCEoHbLD29n3Oo+7STB2TGSvyNfSWR5DgUzjoBX+SUXCK3GvBHlTiccVzl7IvxUB5gh3okSZRdZax5PDT4fpn8Om6A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gbnj77DURGSTpkV6C4JjOBj/iYmLh23RKy70HJFomn7jyz5y+FdlbEy0hIU2LZVwEbEvDk6jdUZvChU9SGuZgHecm6f5ogdidZQzbMZe6NrF6KNoN7GzbPq1kVjr/FDQi9U7vIXgAWy4/IU+SxqVjNbzFMCgLbdcFWy84QQ/omFEgz0yAardjiYo1nkh7FNymFFTP8JyYU5IalZZSPjVxJcCfDvPVy6aIqrDBKvmgY9SXBF/enWhs3YAxdhSfxCh/TO3TFNSXq7pi9Qym9JAQNlwxm1V2ky/IiC+wBcYzJf4br4Xb7Q2E/NWrOyHRzlLDBvGsMkccKPsPvKUjmfVMg==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>
  • Delivery-date: Tue, 17 Oct 2023 05:56:34 +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+kyDxYKGSy7Hi0WFFm+WJG77tLBID9YAgAV4qIA=
  • Thread-topic: [PATCH v7 8/8] xen/arm: mmu: move MMU specific P2M code to mmu/p2m.{c,h}

Hi Julien,

> On Oct 14, 2023, at 02:22, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Henry,
> 
> On 09/10/2023 02:03, Henry Wang wrote:
>> 
>> diff --git a/xen/arch/arm/include/asm/p2m.h b/xen/arch/arm/include/asm/p2m.h
>> index 940495d42b..a9622dac9a 100644
>> --- a/xen/arch/arm/include/asm/p2m.h
>> +++ b/xen/arch/arm/include/asm/p2m.h
>> @@ -19,6 +19,22 @@ extern unsigned int p2m_root_level;
>>  #define P2M_ROOT_ORDER    p2m_root_order
> 
> You seem to use P2M_ROOT_ORDER to allocate p2m->root in arm/p2m.c. However, 
> as I mentioned before, I don't think the defintion of p2m->root is suitable 
> for the MPU. I think the two functions using p2m->root should be moved in 
> mmu/p2m.c and P2M_ROOT_ORDER should be moved in mmu/p2m.h.

While working on this, I noticed that if we move p2m_final_teardown() (one of 
the two
functions you mentioned that consuming p2m->root), we also need to move the 
static
function p2m_free_vmid(). This seems reasonable as on MPU we only have dom0less
domUs so we don’t really need to free vmid. However, if p2m_free_vmid() is 
moved to
mmu/p2m.c, we have two consumers of "static spinlock_t vmid_alloc_lock” and
"static unsigned long *vmid_mask".

So I am writing this email just to confirm that are you fine with exposing 
these two
global variables? Thanks!

The other comments seem fine and I’ve fixed all of them.

Kind regards,
Henry

 


Rackspace

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