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

Re: [PATCH v1 2/3] arm/mpu: Provide and populate MPU C data structures


  • To: Julien Grall <julien@xxxxxxx>, Ayan Kumar Halder <ayan.kumar.halder@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Thu, 5 Jun 2025 12:55:11 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=mR+gbydvo4UmGyC7Ee6+sqhj2cAhLvN0uoaPYZy6+j8=; b=UATO9tBoZlsY+NcMPG0CzvNC21a6IktXQmNkIpUM76iGAdDaIOOasyYabvQ+MshvKULciXQFYoFGM1bc5GOCBGCTGf9I7NvQoUIBY4LxMvuBY513DJpZ4GCjw5KVMJP3UQ6yX+324BKbwGmPP+AJfv3xj0FdMSScGOYa5oZ3epmBtjmbgp0E34RV+xqbHAb50QrttpYGX1obqY4VmMWHjWysFP8r+6kTSqyVFusvGXNPZKmBGmx0GGk41w8/wvvoXwn8aVv2rhAmwNS+dTJRPO+AJs10DNLLHb4E4PycN8W13pm0D2FgCzFwxM7W5GeZAGeLht0zooC42fOLHq5s6Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WM24YmbHCrCWxHjRnxdqd6OcXGz6T1pEQYccEd1w7iUf2I/Zb0iuVIh2+f8NT72xrEbxMoofZbB2ZM8+ehB4VfQ45iq+EAEqR4/oln9el+xhjtug9WbXZoDLoT7OdMOOPYcsmXCDKrrGMQDsRbKxLK+dZyMd7aVmm9zfHXzy+d+H9vis58WGJBZdour2TiltDIpDRDwvGby9pQUuKcqVdlHsvBmLLjvRdjOh0ZyiJFVrjWJLGiQgFSEYI/6CrWhtog29vxPZdTwGz14AlCKC7rK0oaTKaFlFndz5nFt+KX8RhlWjbmjGl17Jw8h0W3tvGHHdrfZMUOweN4tKe9bMgQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 05 Jun 2025 10:55:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 05/06/2025 10:58, Julien Grall wrote:
> Hi Michal,
> 
> On 05/06/2025 08:44, Orzel, Michal wrote:
>>
>>
>> On 04/06/2025 19:43, Ayan Kumar Halder wrote:
>>> Do the arm32 equivalent initialization for commit id ca5df936c4.
>> This is not a good commit msg.
>> Also, we somewhat require passing 12 char long IDs.
> 
> We are following the same convention as Linux. IIRC this was updated 
> because there was some collision with 10 characters in Linux (not sure 
> if we have seen it in Xen yet).
> 
> [...]
> 
>>> diff --git a/xen/arch/arm/include/asm/mpu/regions.inc 
>>> b/xen/arch/arm/include/asm/mpu/regions.inc
>>> index 6b8c233e6c..943bcda346 100644
>>> --- a/xen/arch/arm/include/asm/mpu/regions.inc
>>> +++ b/xen/arch/arm/include/asm/mpu/regions.inc
>>> @@ -24,7 +24,13 @@
>>>   #define XEN_MPUMAP_ENTRY_SHIFT  0x3     /* 8 byte structure */
>>>   
>>>   .macro store_pair reg1, reg2, dst
>>> -    .word 0xe7f000f0                    /* unimplemented */
>>> +    str \reg1, [\dst]
>>> +    add \dst, \dst, #4
>>> +    str \reg2, [\dst]
>> AFAIR there is STM instruction to do the same
> 
> AFAICT, one issue with stm is the ordering is forced by the instruction 
> rather than the user. So \reg1 could be stored first.
Yes, I think it stores based on register number. So if you do {r2, r1} it will
still store r1 first.

> 
> I think it would be better to use "strd". It still has restriction
> (the two registers need to have contiguous index). But I think that 
> would be better if we want to reduce the number of instructions.
Ok

~Michal




 


Rackspace

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