[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: "Orzel, Michal" <michal.orzel@xxxxxxx>
- From: Hari Limaye <Hari.Limaye@xxxxxxx>
- Date: Fri, 11 Jul 2025 15:10:14 +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=hlTiRJQ8mZ5wi2sckV11pmO+dZ1BAlzX1ovRpXCAuMI=; b=mUgrWzqYgrPigRGAoNR35PV+rCFPLYJGJb7q6yUzWVGreVsGR1WqHPbSZpB6+WNlIOUW+AYtWrbSBO3/ptlQHhguVBfWK0rl9tLG6lWmJhOezEsWFip9T+tCxJcRnFJQ0PLHw5M2tAjNe0IHTG8l3ffuHBqrf5yttbWWOiKKreyXOw21xkWdAIZWflWlW2Iuq90HitSuMfFZ3WbtarGLn+8SG+OIU7+jOkCgY0pk9RvVvSgCFq8WN+WSnK4Xeymi116VsjWVVFHtVWL3GwVzbKxhcDP6DORh1D0YTJiDCtKouVTqvFgoqjrB9pEmI3xYUVaZrh968rrVXqCvZpPirw==
- 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=hlTiRJQ8mZ5wi2sckV11pmO+dZ1BAlzX1ovRpXCAuMI=; b=haq30ZtLTiDkn2h+Dooyr2fswURvJYZzI8kDROvNzH9VY/Q4tGtiAEjwygYbj8NetFvzUw4HumSWro9qsEO/TPYDZ/KVAY9tFnyIO+9W4iTCxsp2jCJfVEQ31X+tUNB4nwDegGFZn+wMZaOVw4MZonPHvmG86d/jJ/0VuiyYc1qV/JhPPwsobpJ5aHfyIWteFPde8Pke0tnHVll6t1pfarUEQjotv8hpoo8Otiq3GvCm+gQnRljvEvGvng6laYcseY1oIgct6/xWujr7AGKLktmbwZS28NGiNgUSOVDjx5ZOSpHV8GbD2RO5M7qlyiS/HcJxmNte9yh4dWRUG8VhpQ==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=nW1tTNAc9wyqFOBXbJf/NxCTwPnRpUwbOraXVUNWbWiLPtASE5MW+/piichF4f4Vt3IxwoRWGKU5QEbgOZ6BDgDL0Kdy5oT7Yh06s400iMmm41SlBzlxaWFIHpSq+KxfTMRJrrkObm7d5lXIBvmbEiQzfiQzzmv6kE/U4fXpZzsYME/fAPuhq4HRLRXrU/cfmtQDJzftIPb957SYRlo8Q7H7rT6nsocXfGClZUoPwDZhqf2JLHeoCH+6TQ7rubVSeN7K9/ncaG+GV4NC1mgM4jnUxe7tQhveZ1DTdQRwl/27mhRJuKPS2LYKEkSanor2eQ/vpwJVIwiNIE949qSfdA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=d4kJPQjRBWsj4LQMciFAEl5x+il2/O8hLlcJOClHtMHf6oIvoJah6jFzq1b99ImwW1BUgDhoFIfb1thDOX21oWoCiKTVMLGRKhgquxuJiP4DR9FdJ+XLFLo/znBXVF/ML/hgtJrSdoeFBCW82ur6ziJoXPYSxhh4jmhifJ1og+4cdV1ihmXNbV5WcDWD0eMbS/Pzdy0ZaAKtZFug4rL+TW8588cxkAwFuu2U07F+vpOdB26TOEilABJ/AVS+I0OBBLuZdS7ka7YHlXQ6W2MrTe5sIvJpIwbQCqBY+wWPcQXl9OajEMpkQj6yaI+A+LPeP4C94D7awT3jTzsX3/N9zw==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.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: Fri, 11 Jul 2025 15:11:10 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Thread-index: AQHb7xapMqVBDEQHDEWQJpPnvrkhn7QtDZOA
- Thread-topic: [PATCH v2 3/6] arm/mpu: Populate a new region in Xen MPU mapping table
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?
Cheers,
Hari
|