[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/5] arm/mpu: Implement ioremap_attr for MPU
- To: "Orzel, Michal" <michal.orzel@xxxxxxx>
- From: Hari Limaye <Hari.Limaye@xxxxxxx>
- Date: Thu, 28 Aug 2025 09:37:12 +0000
- Accept-language: en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=amd.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; 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=prWRnuWXjw4uKYXEOoFp+eEuHp91/jO9Azj03WRAcBs=; b=tPcI09R1UO+UXDEcvnEZHSj9joh0bfsR3eryi1LGtSIUJwlXisCu78QrUDmqpzDosB4uKdDp8VK6iBW+7gVOVGswtMAM7ghYoXqh/JTdPiAGR+BktuSlAh3rJbTFN4YbrkUQkNODTuBZxtu7v1GPxco6ZrZ/zD4UPgbM7P/vw8wGJglcsxofq8DdxRxoO2XaV8JrzB86uK/RziktEt86bVqoJyTnNX7R8tk/BkUX7XP5jWDNL8a43uxpbAx33guTNj7/2mUNlgq77AVVy0VjeAd7hpX/W4rAbbnGw6X9fiqkhSEKLNxnY9NWrAkE5lteJvC7krg5Gm6a20rVUOmHYQ==
- 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=prWRnuWXjw4uKYXEOoFp+eEuHp91/jO9Azj03WRAcBs=; b=e+sCGDiFB9yOGg9DqfkS3afk851LeQXaNqsCel0pgvCrt1bTa4gQ87YnloPNEO5raMWn4cWR8viVbM8TtmogSncX3ODJEeAFfnA88Dhnum3T07quyWNKvm0Gthb5Hcip9KNrGkJrX1TVgx8n9Gem9zjqN0fY/cykt4dWUCz2eODICzhiHl38MHbvJ5Ovp1VS6Sv9n3nhMGtxRcIF9VrkV/oVWemRKKN01WLyxDIcaDM1wbbyNjxENmD0Kxqlklr0PG5WBhQyJ45iv7V6DLgfkKGJcbjam9H1MaXSbygzh+uftfXnkoXighuow/ZY548u1I3/AOfAG10J3baw8FR1ZA==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=eGmKPxkIUgI2sr19E8ncF7m4KistwoHn8yETAhLq9wWUdZpMGx/C1BFThPH9U9881tFIgzC9+cBkaq4zHhure9wof2ZrH5oDePLDy39xVuc9uzJ4j98r/xbMJG7nGnNxeCX/3cKTxfV7UOv56tvjDXLDuuGrspb2Phq4T4YY37hXAQkpV5JHFsrkmIOMxYrJ376NspYuDXum7peLw6rt20D1ZeBczR72GrF776/spY+qytHeIbthR/cuPhfmCtOg2JcMVIjn1xaN65LWG4ko2b97nuESbU7Mv1Yg034UY9EDxoHYKCx62BLy8vj87G6IOW7lZxMpymIL5KSlsQ+uZw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=bFA1vZnG8CpI9iISRXetuI1vFvj5IHP6dVPuBbfxlT/DtrVwRL5DJHTExcXr6ordUAt42QllhFarpc8mxJRdEJQL6JA3QDc2Tp44EUTPtKicsi1R1MD08fETSoprX1qdvRTrjNzNV4kKi11N2w87DjuVG/cFFriX2svFUaNPXVHDtLzZBZFVtV5kafydZmXfOUS3rrzL1QoEROq0Bu0QuxIzLNfqsY0yQ1GnzRqZOKOVWOnkzDMMQq8USDJ//wmunQE6nmgMsscT3b4S4Y6yKDmVwEALpo2uYS0DUM+7lNncRFZFBFa4Du+F8Pol9W7Gg6MmcWPUufHrXfnpaLzFdg==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Luca Fancellu <Luca.Fancellu@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- Delivery-date: Thu, 28 Aug 2025 09:37:58 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Thread-index: AQHcF/ycst5ZxM1WdEyQIzD/TwjB3bR3zqQA
- Thread-topic: [PATCH v2 4/5] arm/mpu: Implement ioremap_attr for MPU
Hi Michal,
>>
>> + rc = mpumap_contains_region(xen_mpumap, max_mpu_regions, start, end,
>> &idx);
>> + if ( rc < 0 )
>> + panic("Cannot handle overlapping MPU memory protection regions\n");
> Why panic? This function is not used only at boot time and should propagate
> error to the caller, it's also within a spin lock.
Good point - I will update this to propagate the error in the next version of
the series.
>> + /* This API is only meant to unmap transient regions */
>> + if ( !region_is_transient(&xen_mpumap[idx]) )
> So is this the only purpose of the transient flag? To check that
> unmap_mm_range
> is used on the range that was mapped with map_mm_range? What would happen
> without introducing this flag? You already check for the matching attributes.
>
> ~Michal
>
Yes this is the purpose of the transient flag - we want to ensure that a call
to unmap_mm_range only destroys a mapping that was created by a matching call
to map_mm_range. Due to the fact that map_mm_range may not create a mapping in
the instance that one already exists - `/* Already mapped with same attributes
*/` - we need this check to ensure that unmap_mm_range will not destroy a
pre-existing mapping.
Many thanks,
Hari
|