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

Re: [XEN v2 09/11] xen/arm: Introduce ARM_PA_32 to support 32 bit physical address


  • To: Ayan Kumar Halder <ayankuma@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 18 Jan 2023 14:19:38 +0100
  • 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=DoPqFuxgEBpoGbs8h5qrQBBjM/5l5iN5ReL6J3W81MQ=; b=SzbGWnUURp3VFXUbifT8XfYdbJxNPCjvnkOfr8tAscBMmW/0iHBAal1hbB1+vTDGPKIN8vLMa8841i7ZlfRSZqfGWRKCQeGkuxtHGgZxtTrJj2h7N+eUFbsRuGTCxcLh716Fu0pvALDz+8+iqKF+KKu2zMsrtR32RmO4deqQXU6jcC3hGa8z8rhW6xp1WHKT7nb20N5cM+Wav+d1XQWS6NhcJI5datGJcgciUraHlxB4qXAJvIUG1aaAJq/Z0V56/OWEoFTH0A010UZurn7mB77wl0tTvWFNtjQfYOTbKJexvQ7v8PTsU7G7LTYhDUZkQqW3CY60Zh2NBNoob5ZSvA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V5KgBgdJgveG0rtT3H/sfHJ06Lsn20ui7tnbz8b1KkeAqeQav0DLe3ipe5uXbMyZHfYj3itGWZzfNAFEN+W59ebuZdAOD1Vqj//imqyUEXT0Bx6DHEkGN1XiUIXswu3OkHfDxPlrmM3X8XhBTRyAu5L/AlyE+/qRiPmNz68W/Giu1EJM8hw5J/OgSJpFnuBAQCnw2ktnGM8lDyjqu594YAdSFnuAgIJ87W0eyRY/lFxR5aMXvyrxcnPKm/fMHDlKr23U+jjR3wJs1+uM+Cf8wx9prorvwd8CtdAHoLycxyhqYl71bj5C4H7yD5kAWUKDs2t0ftj5ZMjFr2JxOgZo6w==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: sstabellini@xxxxxxxxxx, stefano.stabellini@xxxxxxx, julien@xxxxxxx, Volodymyr_Babchuk@xxxxxxxx, bertrand.marquis@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>
  • Delivery-date: Wed, 18 Jan 2023 13:20:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 18.01.2023 12:57, Ayan Kumar Halder wrote:
> Hi Jan,
> 
> On 18/01/2023 08:50, Jan Beulich wrote:
>> On 17.01.2023 18:43, Ayan Kumar Halder wrote:
>>> --- a/xen/arch/arm/include/asm/types.h
>>> +++ b/xen/arch/arm/include/asm/types.h
>>> @@ -37,9 +37,16 @@ typedef signed long long s64;
>>>   typedef unsigned long long u64;
>>>   typedef u32 vaddr_t;
>>>   #define PRIvaddr PRIx32
>>> +#if defined(CONFIG_ARM_PA_32)
>>> +typedef u32 paddr_t;
>>> +#define INVALID_PADDR (~0UL)
>>> +#define PADDR_SHIFT BITS_PER_LONG
>>> +#define PRIpaddr PRIx32
>>> +#else
>> With our plan to consolidate basic type definitions into xen/types.h
>> the use of ARM_PA_32 is problematic: Preferably we'd have an arch-
>> independent Kconfig setting, much like Linux'es PHYS_ADDR_T_64BIT
>> (I don't think we should re-use the name directly, as we have no
>> phys_addr_t type), which each arch selects (or not) accordingly.
>> Perhaps architectures already selecting 64BIT wouldn't need to do
>> this explicitly, and instead 64BIT could select the new setting
>> (or the new setting could default to Y when 64BIT=y).
> 
> Looking at some of the instances where 64BIT is currently used 
> (xen/drivers/passthrough/arm/smmu.c), I understand that it is used to 
> define the width of **virtual** address.
> 
> Thus, it would not conflict with ARM_PA_32 (which is for physical address).
> 
> Later on if we wish to introduce something similar to Linux's 
> PHYS_ADDR_T_64BIT (which is arch agnostic), then ARM_PA_32 can be 
> selected by "!PHYS_ADDR_T_64BIT" && "CONFIG_ARM_32". (We may decide to 
> drop ARM_PA_32 config option, but we can still reuse ARM_PA_32 specific 
> changes).
> 
> Also, then we will need to support 32 bit physical address (ie 
> !PHYS_ADDR_T_64BIT) with 32 bit virtual address (ie !64BIT) and 64 bit 
> virtual address (ie 64BIT).
> 
> Let's confine the current changes to Arm architecture only (as I don't 
> have knowledge about x86 or RISCV). When similar changes will be done 
> for other architectures, then we can think about introducing an 
> architecture agnostic option.

I disagree, not the least with the present goal of reworking xen/types.h
vs asm/types.h. By having an arch-independent Kconfig symbol, paddr_t
could also be manufactured uniformly in xen/types.h.

Jan



 


Rackspace

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