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

Re: [PATCH 03/10] x86 setup: change bootstrap map to accept new boot module structures


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 28 Jul 2023 09:01:09 +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=PdZMmWLouFU5D07ZWjcSbQFjaJbJQ5zaxOljeopqhG4=; b=lPmrJH5AZ16uz1beSeI1XTT3rT0RanQbTBYBXJFPgU/2l+q7hCGUCd+Vx7maIUP8oCHdMNvWqbypm8Qzhr+HbGlUn/fbU6Rdax+3tsZGb0Zawj2kJ13c5WBUNv5KOV0r2fTZdsg+5kNgE9ReStO45KSlSKvap0Ul2iZMUDWLiH7SeacyAqb43CLYAl2oGSrgh8RCMO9Lou6SDYk42O3/vgAJ1BeTkYQH8Nlv2Y6oXYM1+fLbcPjsqKLF8Znjx56X2sFos0OkULsUcSj1eSL1FZIzMCDgUHlZZTAW8VEp7qUspEKpZcYgsmj0f8POpU92OkKBNtjBox2QIvOHoQlR3g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BGBAOlWOaaFecAJ5hkAuizRWWzcglMNCisf1LjFe1m7huTVtPNKY9rjFpTCgTxr3mONqUiQWGThZWNRVRwruyOaDnAFQbdzrbz1TMYPn0DNWm/GNfs+2/LNuKPSJzkt6Ybpd/6cHIQu+27fno+7uoCTyB94jsqBEWBMYCHjorH4DF9rjm0ta0IYg7zXYeeE739oLY9l5oGFyIUsQ2SQVavhhRigbBiXUXM9zFU7qfLYx8xHul33yBieTyi8rEgtab8uk5XBs5rFwR9UFFF6mSnDERq0NVjcmk4z51RzLXQsVpCocIqsWo47jNy2jaCq5D/QVjv84LD3dVlK0wNMdmg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, stefano.stabellini@xxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Rich Persaud <persaur@xxxxxxxxx>, Christopher Clark <christopher.w.clark@xxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxx>
  • Delivery-date: Fri, 28 Jul 2023 07:01:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 27.07.2023 20:36, Stefano Stabellini wrote:
> On Thu, 27 Jul 2023, George Dunlap wrote:
>> On Thu, Jul 27, 2023 at 3:42 PM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>       On 27.07.2023 15:26, Daniel P. Smith wrote:
>>       > Let's bring this back to the actual implementation instead of the
>>       > theoretical. Your position is that Xen's paddr_t is desired because 
>> it
>>       > can store larger values than that of size_t. Now if you look in Xen
>>       > proper (main 64bit code on x86), paddr_t is a typedef for a 64bit
>>       > unsigned integer. And if you look at size_t, it is also a typedef to 
>> a
>>       > 64bit unsigned integer, they are literally a couple of lines apart in
>>       > types.h. Thus they are the same size and can only represent the same
>>       > maximum size.
>>
>>       What about 32-bit Arm, or any other 32-bit architecture that we might
>>       see Xen ported to, with wider than 32-bit physical address space?
>>
>>
>> To be more concrete here:
>>
>> Suppose that you had a machine with 32-bit virtual address spaces (i.e., 
>> going up to 4GiB), and 36-bit physical address spaces (i.e., going
>> up to 64GiB).  And suppose you had a system with 16GiB of physical ram.  And 
>> you wanted to use Hyperlaunch to create VMs using some sort of
>> memory image that was 5GiB (presumably of some kind of static data, not, 
>> say, a kernel or initramfs).  You wouldn't be able to do it if the
>> "size" parameter of the boot modules was limited to 4GiB (without some kind 
>> of hack where you string multiple boot modules together).
> 
> Yes exactly.
> 
> I would like this code to be common across ARM and x86. On arm32 size_t
> wouldn't work, with size_t as it is defined today. One option is to use
> paddr_t on all arches, or at least on arm32. Another option is to change
> the definition of size_t on arm32.

How can changing size_t be an option? This is determined by the psABI,
and going out of sync with what the compiler assumes size_t is will
bring you all sorts of trouble.

Jan



 


Rackspace

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