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

RE: Proposal for Porting Xen to Armv8-R64 - DraftA


  • To: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Tue, 1 Mar 2022 06:29:36 +0000
  • Accept-language: 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=569+K7VJtERt2TIYl+OHCZ9vzeGA5TWw0XVMsfKP690=; b=eQUPs3Jw+uaaOtjrqGlcw8VjpbmtpPIcuXzKDzY1y/YoMbVkq9KJlFMZpQ+x/+/cJbnL5DFnshtd9d9YvBNu9VH4O99KFAV82AODrDSFCTLo7Z4MyTw3tzj7hVKD/51UK2hDI8unQfb8HeZSzTp2mcUCTWlyOAGobpxxph5fo4f2bYlERAyQYERM4i9F0JMvHT36NjbIOe+s5C820fR70oNRIfVwUlv9bQwNgqh6eXDskrFIkDoD2PlzTfvctinsIC5E+XIVEn+SB4fYrFhIqvIwLVXa8otfcHwRdEqA6WJjeQYb+zls8S0OQbo1IgBC2iN83GDoGkzBJkgKb5UCwg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fIcf+jGPgI4us+TiBWqTBxS2tFvAO4KkTAKgxhq8N1bo+6PIik9VdJNbatIWD7XgK00dF4ZqXaIokXRvODbSgWdJL/6SASGmERVwMwRJoQVxQXEOh7xO4KUV8w2micIBaQdur6WY3YjMgxATMExKLYVtugZL5haru3TOVNkUEMl0G19lvTyHfFMKi9L5cHpk8qTFM3mBgUioFLdDdglTq/6kEuByVFWe0ETd8Wd2YgdhBA+evwXT1bpfLVa9ufDTUqBu9TLz5s5iF90Z4ZEw26O5m8tB/55cemouKkCLn/ej6wF9tv4rZd33tbMv6ZGu+jEATjIMLlhGAmltDv7Vrw==
  • 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>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, nd <nd@xxxxxxx>
  • Delivery-date: Tue, 01 Mar 2022 06:30:01 +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: AdgpQxtXwh7LkfydTgiYk9bhMgU+ogAn0mUAABEK2UAAF1ylAACsO9Yw
  • Thread-topic: Proposal for Porting Xen to Armv8-R64 - DraftA

Hi Julien,

> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Sent: 2022年2月26日 4:12
> To: Wei Chen <Wei.Chen@xxxxxxx>; Stefano Stabellini
> <sstabellini@xxxxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; Bertrand Marquis
> <Bertrand.Marquis@xxxxxxx>; Penny Zheng <Penny.Zheng@xxxxxxx>; Henry Wang
> <Henry.Wang@xxxxxxx>; nd <nd@xxxxxxx>
> Subject: Re: Proposal for Porting Xen to Armv8-R64 - DraftA
> 
> Hi Wei,
> 
> On 25/02/2022 10:48, Wei Chen wrote:
> >> >     Armv8-R64 can support max to 256 MPU regions. But that's just
> >> theoretical.
> >> >     So we don't want to define `pr_t mpu_regions[256]`, this is a
> memory
> >> waste
> >> >     in most of time. So we decided to let the user specify through a
> >> Kconfig
> >> >     option. `CONFIG_ARM_MPU_EL1_PROTECTION_REGIONS` default value can
> be
> >> `32`,
> >> >     it's a typical implementation on Armv8-R64. Users will recompile
> Xen
> >> when
> >> >     their platform changes. So when the MPU changes, respecifying the
> >> MPU
> >> >     protection regions number will not cause additional problems.
> >>
> >> I wonder if we could probe the number of MPU regions at runtime and
> >> dynamically allocate the memory needed to store them in arch_vcpu.
> >>
> >
> > We have considered to used a pr_t mpu_regions[0] in arch_vcpu. But it
> seems
> > we will encounter some static allocated arch_vcpu problems and sizeof
> issue.
> 
> Does it need to be embedded in arch_vcpu? If not, then we could allocate
> memory outside and add a pointer in arch_vcpu.
> 

We had thought to use a pointer in arch_vcpu instead of embedding mpu_regions
into arch_vcpu. But we noticed that arch_vcpu has a __cacheline_aligned
attribute, this may be because of arch_vcpu will be used very frequently
in some critical path. So if we use the pointer for mpu_regions, may cause
some cache miss in these critical path, for example, in context_swtich.

> Cheers,
> 
> --
> Julien Grall

 


Rackspace

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