[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: Ayan Kumar Halder <ayankuma@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 2 Jul 2025 13:44:08 +0000
  • Accept-language: en-GB, 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=wfT7havhKbX3u7kqEH0BZzDIjt0L6wZmTMTYtyK9qp4=; b=KRSqCInwyK+i32kjshhDqVE3qzb+BIREeuj0SN3RreB0HIvhP+0FEqeSUS45FGnc4jYN5RaKmhu+ZjRvQGNCPHJ5GVK7wsOyApckOhVHJzxkVUA77bV1yhLwLf3hJrh8stDNc+x8q2KB6eJdi3Z+lKn+4LATY/w38O9kBxDK/GKpjPMYbnJBvqWIPBYz+CzX7Z3uL6welSEtd2tHjI1KRshf/GCgRXsO+8otX4uhn3MqwsJC5ZcyXo/LAAHqofnIdbY9oAqsUyZHH53yPgbnUnQ2+tOjxCWvxNmDyE95TloOuPDL4+ZPLkt9ZZscxW1z35XzKszLSHH1hSqZZZFU5A==
  • 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=wfT7havhKbX3u7kqEH0BZzDIjt0L6wZmTMTYtyK9qp4=; b=NTLvvUZ3UL/KeJuQA6JIXOQl09qzzKp+HuopvBs/yhrOhaFidVFT07KZpW58GTFxpOHWSxqCXR/eZfxZtHCnVrC9kCLHE+UCrJUd/n4a78wF7sLfD+PC2pkjwBOqIp2DqeDLTRQT1Gq1dJSDbxOh0NEQdyMRFdS05fHpA9E/reQNcSov33gGeKAIL4WRye+DzKBdZEtGsCoP9EnZxmQfKFdbatCoR6GyRfZnzIfMs61UQhHYSLDO7f+EiUM5U79vKn1Fwz5ofX6oKQwaYui5sOEYPUZN4obULDcCMLYZR4FHWhmXGxSJDPaWRbA2ZVGXQpNGgKbqdwXfYnL+DvukNA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=XWlKyca4mFtvhjSshxANpUqgKFhKtoPfN8fswSWPjaJgrprBmDEaArUlLH059fGinjAGlAn4SObK7dbMZ4SuinQ7SbW2CTvFyCdR5jrHx8IAnvBu7SpTU7fjiyUlLvbWYpSXRMeMouLHdkniBjC3dg1ryPmyDnc7DTNEyOVUq4s8p7C9d2KWZm8meWim6/2OD1cd7J10NpjA5cW9s2CLxd/d1Ad/flJA+qTuAiInYIoSE44tR+KPWySmJBtX+H5vFLWOqH1TfZdLgniSAuZguhLfYWrCf63Q4C7PmwziZmyO0BmrrJlSy6ePDISLIvrGGxjXJo2MnptvAqK3EbJ4dg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=M/4hnPqlL3ghDB4FB7/AdKfsbKuDUPkRP3fHd7yB3ZUTHqZdDxKPz/j7Oar4HelK15nEDGhfQmkpwgZF6/Vn7UJ+YgArVWfnsCekacl6Pc/RC0C39Ygfyy1XlXtWQrhmegtloUDEb5ym+qTd7YBS4mAa0kY0FzQ1G5yS8Kofr3udcr5hqZLp0rrrNRotKd84gsYoZrsfFCmGFY9hKi2WI9Y/bAukRFLHGimINYFwW302zf5efAVhPvrlSHrec6WXoVpYRycsXciQbtwIq0SGBM5py4dLHNxt6Ywm7uIRe2+0c76H+KuKNJaJriKLMkbZ3q2PZPj21uei9DOOctz89w==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.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:44:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHb4cpciV/6CvSAB0CHD6KSA8R6qrQUHtAAgAlF/ZmAAX0kgIAACRmA
  • Thread-topic: [PATCH 4/6] arm/mpu: Destroy an existing entry in Xen MPU memory mapping table

Hi Ayan,

> 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’m not sure why you say it’s different, can you point out which line in case, 
because I’ve had a look on xen_pt_check_entry
but I didn’t get your point.

Cheers,
Luca



 


Rackspace

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