[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/6] arm/mpu: Destroy an existing entry in Xen MPU memory mapping table
- To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- From: Ayan Kumar Halder <ayankuma@xxxxxxx>
- Date: Wed, 2 Jul 2025 14:52:08 +0100
- 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=L3X7V4uPt132YBZKzTZCgQ2Ywj+gUzxC0g11pC6lU3E=; b=Hl+sAWARiE/8NBwmrw9/3oNubSYR7AN6kH5+1Nij3jqYY+Hp6i+Gny+Od+1nuX2GPVo3exzZKsv872vMyFBMZUuEoo+IggF1ck2CcfqUgi7JiYVCnY084rnRQa5jwzCSab0BSSdpQOF15+VwtmXSL3Z9KlOqigiQXKEI9SIn25nYNaPU4MY9DqQm9T9+YHnx9GWJV6YSGZblTL1q53Ry9rp51JODgxnCb5ROtJ0J68HPjrfNTBSEIF1F2jtLCWp66hX5BednPdL5UVQG21fsl9EwAS7EWV5ISX3S85jp+xFhpmFqeu+tGPCaDTvRfNjtpOeBt7BpK5C5ueqZZngpnA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=W3ZRPZp7GcPrZ8k3kHFmjt6mk9TfVjcV31nTWa/u9XbYiRaHQZSKMe/cE55eSp6DgD876A4V9PrGCoCQdHwE11zJM/XZ/U9bp9TxSEHS+rniIaXlRU4aNPUJw70IRFM3izthmTGo5NDcsRscRpTLqJWbCRxZInPzGfjuS1y9e/TVlI91Eh31vC2nPJ1a0lEfHPBj0JZVEWqL/xFsYPz9tlbsjppFkeLXFgRK2GMyFxfvnI8PLCl8T0QdZAQxDInHHHhamZ2K8+P/m2C3ENxr680yDgVnlkwXGho9OaNJ0IOx6oOjEGwii87feALjyL01SaxnC0qBIpfu6lMmj52mLg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: Hari Limaye <Hari.Limaye@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>
- Delivery-date: Wed, 02 Jul 2025 13:52:24 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 02/07/2025 14:44, Luca Fancellu wrote:
Hi Ayan,
Hi Luca,
On 2 Jul 2025, at 14:11, Ayan Kumar Halder <ayankuma@xxxxxxx> wrote:
On 01/07/2025 15:56, Hari Limaye wrote:
Hi Ayan,
Hi Hari,
Thank you for the review. I have just a couple of clarifications before I
re-spin the series to address all the comments:
- if ( flags & _PAGE_PRESENT )
+ if ( (flags & _PAGE_PRESENT) && (MPUMAP_REGION_NOTFOUND == rc) )
Same question in this patch , why do we need to check for _PAGE_PRESENT.
Can't we just rely on MPUMAP_REGION_XXX ?
The _PAGE_PRESENTflag indicates intent - whether the caller intends to create
or remove a region.
If so, then I misunderstood the code. However, looking at xen_pt_check_entry(),
it seems _PAGE_PRESENTindicates if the page table entry exists. If so, using
_PAGE_PRESENTis not making sense to me atleast. May be others can chime in.
But it seems to me that _PAGE_PRESENT is used in the MPU code in the same way
as the MMU code, to check
if the caller has intention to add/modify a region if it’s set, otherwise to
delete it.
I had a discussion with Michal and yes, Hari is correct. Please
disregard my comments.
Sorry for the noise.
- Ayan
|