[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 3/6] arm/mpu: Populate a new region in Xen MPU mapping table
- To: Hari Limaye <Hari.Limaye@xxxxxxx>
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Mon, 14 Jul 2025 09:28:26 +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=/ruDFhsPulm5nFfYNF3UUrm4Yw2mA+sUFH+XoZaOin0=; b=yi26IE4+awYXZHSc5a7k/nUJY4kTH5+33u7/CiLgc27H34LcL/cj07Jf581hMVHP7x9IIUh5J6+DVm5GkiVmcl5RTEhELguaZzuDhM+EeXyKQRGyaWfbAtZTqlglUB51EzgEMhXhvZJrwZ54WWbaKhX0czXMOyAYfrYotQLjNGg/FM10aoHQ1XI4OESLe4ilxY60HXlgbGgKnDx0lK4rXrkS3S8+Db2n+1L4uwHs5QkwyTdAoq4YVDCQEZZdQxK2Gp8YgPAzyFIDxEWipjF9Rw6zX7Qg3tkqyHAijMMUO5R+HqmJ1drcktSEo9dd2c3UkoJ8uLu3MSnwP3dnh9o0Cw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Tm1taA4flOUFZPLF0DEvSSa3r7lOtkp9k2zPc0O3ImhDJaJDYQaRcYbKLndByWxV91VLa7p76SH1tRXxTNRn1hf/xymQH/BHK5460gXoidLaZIjo6I7LD9G1dEIhARcY9onIhXFP/A0j7GXRoYPS0oGpC4ZMyGATrscRDO73wM6h9cgJ7i3/mAx8IVz4BWoQF0UHB9ri9SFJ/VeOkM5MS7gEyRMWzEyxJtjEg5jX/9Uk5j01HyVqRMdSh4mRymd+1+0AUOGCFmcOwmaUepRh/WdEhgX7Td8cVqZEHGASvn4UAG55bPldThXGwFKK7cBaqJO532z6Sk1YEu2wnBJMvw==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, 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:28:38 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 11/07/2025 17:10, Hari Limaye wrote:
> Hi Michal,
>
>>> +int map_pages_to_xen(unsigned long virt, mfn_t mfn, unsigned long nr_mfns,
>>> + unsigned int flags)
>>> +{
>>> + int rc = xen_mpumap_update(mfn_to_maddr(mfn),
>> What do you expect to be passed as virt? I would expect maddr which could
>> save
>> you the conversion here.
>
> I think you should be correct here and it should be fine to use virt
> directly. However, the one place in common code that I can see
> xen_mpumap_update is called is in `xen/common/vmap.c`; and here the virtual
> address is not the same as the machine address, but it looks like this is
> only used for LIVEPATCH and we perhaps don’t care about this on MPU systems?
AFAICT you will not enable VMAP on MPU.
~Michal
|