[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/6] arm/mpu: Destroy an existing entry in Xen MPU memory mapping table
- To: Hari Limaye <Hari.Limaye@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Mon, 14 Jul 2025 09:25:24 +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=wE+VtMJXEwNlpmWTJJd4ELSY4+awdCWU1MrcgI4q/4A=; b=v65vGR3Qs+dcZRdGwTTKcZfi/saCW9bxxz0NIk0h1G7Dq1rTc7Gs6l0SH3LtIbQpvWVp5tER3WrzM6v05rzdfyrxQeD0j5unDUYwYJLdFPWX1YFli52I2STMBBpPDM71Viqekqod68sta3/a5eQuWN6Rr5DkkH083GsYoEWb0wEbQF0GrfixJxDwbdlUVEaIflkk7qqeelHxJ1AxVaaKHJXjb5+5fkkzJrcCV6lQF7RAoQsLOwHUJAgSpxTJDilNrsQmvGIhMMhP/GrzDRgnjP0nh894pZjWuhrIE9Ablk6RUwzWUMhOGmllfT7aX7RzrF6suzOIorMuoYefPF+V+g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=n71OyKs0T2BmYgNGIzy3B6dOoGLbiFbz3jJQhaaAIHkiD7smi7Ltj8I8BnubGRRss0/wi+KDOiCVsZm4lFwxcByVD+tiYX+CHFGB02khybNixUzK8SgYGKiahKTZF4PykkSmRmLUlpeDRge+mnDSsxE/lskxIXft3SZrJXN71/jr4spUZkox9S1qo6KNLiPYdFLDxZmONjIsO11WTsNUSMOPQ6gEcn9OCCdOKaZRkENyGj3ydni2tIZbLXe8rDbnwWdKEJQdaomwN90UF98Z5y1je5OSuT/hgxNLZc1oIAxdb5gn1qpHavjqfuhbM0BY8SivxuBuuGVqX3U6ZFA2gw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: Luca Fancellu <Luca.Fancellu@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>
- Delivery-date: Mon, 14 Jul 2025 07:25:44 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 11/07/2025 08:04, Hari Limaye wrote:
> Hi Michal,
>
> Thank you for reviewing the patch.
>
>
>
>> > + /* Zeroing the region will also zero the region enable */
>
>> > + memset(&xen_mpumap[index], 0, sizeof(pr_t));
>
>> Is it ok that for a fast case (i.e. 0-31) our representation of prbar/prlar
>> will
>
>> be different from the HW i.e. xen_mpumap[index] is 0 vs only .en bit of prlar
>
>> being 0 in HW?
>
>
>
> I think this should not matter - there is nothing reading registers directly
> and
>
> all the decisions are taken looking into xen_mpumap.
>
>
>
> However, if you would prefer, we could alter the logic here to only clear the
> .en
>
> bit in xen_mpumap[index] in the fast case, so that things remain consistent?
> Alternatively we could always directly zero the entirety of the registers, but
> then we would remove the use of the fast case entirely.
I don't have a strong preference here. I think we can keep your current
solution.
~Michal
|