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

Re: [PATCH v5 1/4] xen/riscv: add VM space layout


  • To: Oleksii <oleksii.kurochko@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 24 Apr 2023 11:33:53 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=RVXAoWc6NXaImP3vs70L3HwSuIwZM40S5vdIuobS4Vo=; b=GervMZK2mHwniiYr0asNTgA98YR6WjKRmSiYxaSlXkPhQKSg04DWbnMvPUvfXJS2XiWfH/P3UaKlgZFIFJ+aQBM9ILtoxNd/+bJ5G9iodtw9cFEmPFL8mgX/lthl9xovLV7Q+G82BZAsIHjy4mEL6BwnJBRSt5L1dAt4Y8h/RHCmTd1iqRWBOJhacHt5be3gTCYLSVg3i+Y+vA8ddU+hthvCY7ScPl5SQe+NPIZ1amatRzGOciFfUvPziy3M2xouw2v/HHKCDk/ODjh5K0lrO4e5HQ3Jdy8VN+PEdk8+ZX12Asybv42l3DSOJVic2RiJfdjAgEsEbP7eTBYykg3Jgg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J7B37BzNNMsWBFAfPawM8O2zIx2AbQ0iu0P5bYHXWP/so8yQDcXXprqgcLcUO3qf0XeWPryNKi7plVrxQvJ3Ag2tx3cTiIHUFkcd3aFqBC7kAPH9vDVq9uQkN0ugyQslJH6eT+Ln8PadylCUSs4f457UvbZgEWoFw6pImeKedUFYatxgIEx6KgfFmU1AdS0qCI59Xtb+jM/wX/uMVYWbe+o0p75lZpGmDcMm6qRwXZMBMHYO4FGJ7Ad6Tq8E2s+vwz0gBh24e3O4l5o5kb+dHG014GADrOP925/ooXNz4FHInPF+jlmaEKP7dkOtUGdSHS30bl+xgph0SZI6W0goeg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Gianluca Guida <gianluca@xxxxxxxxxxxx>, Bob Eshleman <bobbyeshleman@xxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 24 Apr 2023 09:34:23 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 21.04.2023 16:41, Oleksii wrote:
> On Thu, 2023-04-20 at 14:58 +0200, Jan Beulich wrote:
>> On 19.04.2023 17:42, Oleksii Kurochko wrote:
>>> + *
>>> ===================================================================
>>> =========
>>> + *    Start addr    |   End addr        |  Size  | VM area
>>> description
>>> + *
>>> ===================================================================
>>> =========
>>> + * FFFFFFFFC0000000 |  FFFFFFFFC0200000 |  2 MB  | Xen
>>> + * FFFFFFFFC0200000 |  FFFFFFFFC0600000 |  4 MB  | FDT
>>> + * FFFFFFFFC0600000 |  FFFFFFFFC0800000 |  2 MB  | Fixmap
>>
>> These are all L2 slot 511 aiui, which may be worth mentioning
>> especially since
>> the top bits don't match the top bits further down in the table
>> (because of the
>> aliasing).
> 
> Than I'll add one more column where I'll put slot number
> 
>>
>>> + *     .................. unused ..................
>>
>> This is covering slot 510, which again may be worth mentioning.
>>
>>> + * 0000003200000000 |  0000007f40000000 | 331 GB | Direct map(L2
>>> slot: 200-509)
>>> + * 0000003100000000 |  0000003140000000 |  1 GB  | Frametable(L2
>>> slot: 196-197)
>>
>> 1Gb is, if I'm not mistaken, a single L2 slot.
> Yeah, it can be misunderstood. I meant [196, 197), so 197 isn't
> included. I'll update the table.
> 
>>
>> Also assuming a 32-byte struct page_info (I don't think you'll get
>> away with
>> less than that, when even Arm32 requires this much), there's a
>> mismatch
>> between direct map and frame table size: With 4k pages, the scaling
>> factor
>> would be 128 if I'm not mistaken. So perhaps you really mean 3Gb here
>> to
>> cover for (slightly more than) the 331Gb of memory you mean to be
>> able to
>> map?
> For RV64 page_info size will be 56-byte and 32-byte for RV32 but you
> are right it should 3 Gb in that case what will be enough ( taking into
> account both available sizes of page_info structure ).

As to the plan to it being 56 bytes (i.e. like on Arm): Arm forever has
had a 64-bit padding field at the end. My best guess is that the field
was introduced to have a 32-byte struct on Arm32. But then why
artificially increase the struct from 48 to 56 bytes on Arm64? And hence
why have the same oddity on RV64?

Jan



 


Rackspace

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