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

Re: [PATCH] xen/arm: p2m: fix pa_range_info for 52-bit pa range


  • To: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Tue, 18 Oct 2022 11:02:19 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.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=LAhAc+OIAwUW2yecFHQOqlRgNQVA19hhoZ1LlxWHUxI=; b=Gaz0RsW6gbCsRIaIyuuHGAuXHCf4YXgxH+K8pqlAC/PfIqmtlbZODWWhIzZufR9+KZV57tAjuQ+aEG6EH3SrR/1ejyJ1TdllGhGGL0uCzz8TiwsHk5dielFwpIsrVFuiMTSWvSxau8/MlyxufH6Tf1teqN39NGmg37ojFsAut0g1bcxbZ1fxeQ9pagMY2uGbHt9IRigWPBDKOVXx8ogFIH637Tz9VTMCL+44RnbFdTwzKmEp0CbMHIe/t2yRNG84e8YAzniYiqw6ZMsICZ5ft2+2RKA9+zcon1e/3/twCs+Ej9SYVwNk2LgspoSj1cONr66AOuASTP6dMeU7K8wyfw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SeS5ntB3Yqx4Gi3mTpCBFnn3Qu35kZcuY/3WHVfyl4VUTkl9wNsnY3KvLxY1KvZg7/t1lzKMwQdAy77Q5LcwD5/6RTtdMRMJOf8Rw/6l2teviLvr+adS86DBHDk0a7MtkZrFhkH27oWinaanQHnom63fBHNOaS0rQmK955uq790k7MLlTlNAVh1FJkUSHTju8BWoGqQPvDEFjbPFJ6WKRDeT1ceRp9s9aZprEjXd6Ia18/tJrCdplhrCXxoHCv2O3Nj5j2ZJ4n++VxvgUEy0mimcmVY/drDSqRY2zbdk0M1ABqjFY1OI9enBK1XTRjXqVKqSyHfQVzSvEtnKYIU+Rw==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 18 Oct 2022 09:02:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Xenia,

On 17/10/2022 19:32, Xenia Ragiadakou wrote:
> 
> 
> Currently the pa_range_info for the 52-bit pa range advertizes that the
> p2m root table consists of 8 concatenated tables at level 3, which does
> not make much sense.
I think the current code advertises 8 concatenated tables at level -1 (sl0=3 -> 
root_level=-1)
which is obviously incorrect, but the commit msg should be updated.
Funnily enough p2m_root_level is unsigned so it would lead to overflow
(p2m_root_level would end up with (1 << 32) - 1 instead of -1).

> In order to support the 52-bit pa size with 4KB granule, the p2m root
> table needs to be configured either as a single table at level -1 or
> as 16 concatenated tables at level 0.
> Since, currently there is not support for level -1, set the
> root_order and sl0 fields of the corresponding pa_range_info according
> to the second approach.
> 
> Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>

Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

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