[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Arm: tighten translate_get_page()
- To: Julien Grall <julien@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- From: "Orzel, Michal" <michal.orzel@xxxxxxx>
- Date: Mon, 23 Feb 2026 09:53:17 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- 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=dWedpK6BFANGgNTE3ogKCtlwM+2RdWk/+oJ5O2aiYEY=; b=vxhww8E3PpQuIXsOQA4qFGRFIsuZbt6nvEmVS6hbOjslAp2ukq8f72+tpMfFRVx3iih++BLG4jLk5QxsKndFRBDJ9e1rymLr70pEPrn9QIHY1UjUZdfVyCSHbfftXuGyFZEPhAIyjf6IPnkGO1VN7VCztS8WbQQq54Vlf6In1Q95BCG3DWTM6CLFwnr67Y10ACGzanazHi0PqMMsiv7lDXzUmfHg+HYZIdqTM2IGAB6sIXgnt3aa2dUAdqmaKN/XygVsz2N4cqJHBseu3jOLWf8rnXN/QUbSlt3ujUcyCve2zgX5qqHH84z/Vg5XVwxn04kN0oRGauSKPcB6Y6QwwA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xM4rAWjyzg/hYiWhpqQawn6uElunWJGWWM8X1b3pVM74lmIxqe4hLIFbIbL6mn+5AuWP/EZcpzmDocRlQ7DHx3fkGp7ZCbWEMFQuaTDLAEJtnL3algf+HKuoof/T0HJClBkH9hstSSt8XBGOPzv/3heV2BfRMVQXVlDCczaN5Oo+WmMwCJHXIxxbkhYDW9gmumpe1EgZa+ZvyZw6UO+JqThzjtxXrmpQBCuGrnb13c7Z1oOMM52RbdBBi8fz0u5QP9+WwxnXXMEbM2sAYVni9ciyeKgd6oSlvYFKL8MQsqhpZotiHQqRC1F+yyiUy7dKw40zpbdrGd0UkUT0cmDawg==
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 23 Feb 2026 08:53:48 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Hi Julien,
On 21/02/2026 12:26, Julien Grall wrote:
> Hi Michal,
>
> On 18/02/2026 08:36, Orzel, Michal wrote:
>>> But that's not correct for cases where
>>> share_xen_page_with_privileged_guest()
>>> is passed SHARE_ro. XENMAPSPACE_gmfn_foreign requests have to result in r/o
>>> mappings in that case.
>> Yes. Therefore, on Arm:
>> - p2m_ram_ro is never stored in P2M tables for normal domains
>
> p2m_set_permission() is able to deal with p2m_ram_ro. So this could in
> theory happen.
Only in theory. As of today, this is the unreachable code. In fact I checked our
coverage reports for safety and indeed it shows up as an unreachable code. There
is no path in Xen that can lead to that point.
>
>> - it's only used by get_page_from_gfn() for DOMID_XEN pages
>> - it's used as a signal to install p2m_map_foreign_ro mappings
>>
>> The code should stay as is then and we could modify the comment to say:
> > /* Read-only RAM; only used for DOMID_XEN */
>
> With what I wrote above, I don't think we should add such comment.
I think the goal here is to make the comment reflect the current situation (and
as of now it's only used for DOMID_XEN). Taking what I wrote above, do you still
think we should not update it? Once we have a use for RO for normal domains, we
could then update the comment to reflect a new reality.
~Michal
|