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

Re: [PATCH 1/6] arm/mpu: Find MPU region by range


  • To: "Orzel, Michal" <michal.orzel@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Hari Limaye <Hari.Limaye@xxxxxxx>
  • Date: Mon, 30 Jun 2025 11:45:07 +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=Xn2ZK+VqFiaGG5mPNYYMsu2lmvc7VsqR/hcsBw+qkpQ=; b=H/eIu8RDRwMYTpsqNQ/AmN++xzu/sG55eZxMoZqo97ouOIjkmN7+V6GhEFzvX2URxXUpq7o3ujDkr2DOxuYewmXEUh/sOoTyK6e6UQEiqc5OUBCh8wL0NXEG6PJI13UVtpAWmmW3VuSxfstviH0+7DTDrx0h8dAuNc8dOH6X+wxIbYeOcQTabpPLd3fk4/JWLTonYt2tm+K5bXUPufAqQOmunJcGPnIXzFX2sgtkZwzNtQMr8uPOF+dOl19Z/UpWLFTO6SahC/PIgwXiypV5/bdO1tXdsVInSjc91yTp+sZzGcEDI8fQmE+g7cVrW2Q3EhNnvtzgdqWwWWSFFmCS7g==
  • 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=Xn2ZK+VqFiaGG5mPNYYMsu2lmvc7VsqR/hcsBw+qkpQ=; b=VP9yfUyjT6WubT/vB4109cn2iiDSEeTmyvsiMFkTyorMGYtQdYNZ4TfeEfLbDz2C8rj9yj45fXKUz+cmaiaR42JUohzZ7I58/jYsEsMVebOkmCA0yTKYX3B3gLdX/EaLhUde/J56UmGApmV3S36WJrP2XYY4xx6AsN/zcaK3vq01Zm5pasf2rr16j144YCqUVZprETLrYoDBCBCh8MhMFyg1vAxGBdExCOUWLxnioSliuTlFxuz5Ob7paA4adnY57aiQW7jZFCKPa7pWvZ9bJwRkkmN/s5FuKRl9I460bRaqt0E/sL5R8gmL5mUPqJBw74t+Szz+AdvqX9h4cS5ntA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=FmP8akNDuz6bZDwOqNVmlx3pyPz5u4/Kb3mEiW/7fETw/CqY71XL9JlnnmGcE/P9DZ3b7g9T4o5WCpnjE9AIh3V6b1oalsfFSDswxojDR05wBLZvhp+tt6P4xwZbxV3bByPlM0DSzYg3q8te+9RTfHKryHjp5SdCNb8Cj357IjN1dsmaW//1LMYZwocD5gi9ESAOk2oA0aUw3Fel9PAr2DvSqFgA4+fL8eJbZUjd9QLtY/gbdQzgzG6IGvvAOgzY5UJUc/TRODsN10/uUj7uhVlVVbSrkR8K4qQizIejpg55MUBH2bAna6K4EL/fCFRJ1VWs8f3xPz/2HrPcxElveA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PL/lUDKxqlZ0EqrEBjhF8IuQzEMMkbP+JMYCZwfo393EXYbp9BjcjD1vh+xu/unqjcwZF1YCFXJ3WHSjyEaH5ptm2SsiZZu94M10ddwSEj9dyljBq8t/wmIrKbzzJgi54ksPHH48/b4AAR9DiV5EenIikD0KfdnTxjNWfoBB/w9tcWRQtNV6rQR4we0rEWeECFulXiiEOXI4z7wbN/Bk221QnvstXK0GaljD2zDAfWMUvCGyyLCqyyQnFF91QQwU95HPYlGB1t5Ht0nBOv19awCIb9YNAlzN6OAJPgMCVHKSlC3YMNEcJy9VyVy8JZ3y5G8DbF6eNItmdCifk1ilXQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: 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: Mon, 30 Jun 2025 11:53:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHb4cjCVnITZP0lYkm5xkhDeTI89bQW6EcAgAS2Gww=
  • Thread-topic: [PATCH 1/6] arm/mpu: Find MPU region by range

Hi Michal,

 

Thank you very much for the review.

 

I just had a small clarification regarding the following comment:

>> +

> +    /* Allow index to be NULL */

> +    index = index ? index : &_index;

>If index argument is NULL, why bother setting this internal variable _index?

 

This assignment is intended to support `index` as an optional output parameter: callers can pass NULL if they only care about the return value. This approach avoids repeated `if (index)` checks by aliasing to a local dummy variable upfront.

Would you be happy for me to retain this pattern, renaming the dummy variable to make it clearer, e.g.:

```

uint8_t dummy_index;

index = index ? index : &dummy_index;

```

I would also update the documentation to clarify that index is optional.

 

Alternatively, if you’d prefer to disallow NULL for index and require the caller to always provide a valid pointer, I’m happy to change it accordingly.

 

Many thanks,

Hari


 


Rackspace

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