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

Re: [PATCH] x86/altp2m: altp2m_get_effective_entry() should honor ap2m->default_access


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Petr Beneš <w1benny@xxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Mon, 12 Jan 2026 11:18:30 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=tD9iY4rSE7EyT600PIX6S3WDj8tSiSxjNJoP/AQQt14=; b=Sic8I8A2M3iVvACiKja8iuRYBGAEiSCLZYKF5kbplr5oP75uH5b88cD5j+o8+EXR9eGbs+rSgSxjVQgwN6UZR1szqze4vFKVvEPB3oDCYiY6gFOtvaeZTbJS62U0JhQy5XgwbGqEOTPZf9FAMYKOiBbqom8+vUbgsC0WcRp/E3BabiVSssLETL4L3HnUc2BHEvAXfVI1cf4mbfhoaDLaialMXaHuI/yViJat/JcIoWHSMvoCFD5sP2MGZ8yJZqygiLdYlHUqpVoWL7Fd0eQqTEFGoxm9sByHG9/3k7HM0kqIXfv3bOD1Eef6uoLfNQr8/TROeQhXUG43MidtbkrFXw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OaM6qaGFDXu6WRuE7hbY03NU1HrmQm7QlnQIe5qKKE9H90Lj5MG1oSRwtrGqMr0mY8/eZcCdIRJjpQxBSHVn7ptkX7+gECmm/NoqLnGzDyeLKb/0+YI8VkR5tGNBdTPayMTaUvslECrjOaVwj0m5lb1nBTbyQFTnBDMmITk/scOXoS5mRcPkV1kZAZOTCW8DjmVczDrDm+bUGmzwO0c4d45QwK5u11B2S62DwXUTpBtzYi7huNfhj6fHAKJhI5O+kkI2RAhZbQmVWPreBRkiLn2coicDEJ6+eisph+ml0r0cdoctdYPpaMyTN0CIKpx05x9weF/3NFmKTNQmbq8aZg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
  • Delivery-date: Mon, 12 Jan 2026 11:18:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12/01/2026 11:09 am, Jan Beulich wrote:
> On 09.01.2026 19:28, Petr Beneš wrote:
>> From: Petr Beneš <w1benny@xxxxxxxxx>
>>
>> Commit 7e5b662 fixed p2m_altp2m_get_or_propagate() to use the altp2m's
>> default_access when propagating entries from the host p2m. However, the same
>> fix was not applied to altp2m_get_effective_entry(), which has the same 
>> issue.
>>
>> When altp2m_get_effective_entry() prepopulates a superpage from the host
>> p2m, it incorrectly uses the host p2m's access permissions instead of
>> the altp2m's default_access. This causes problems when the superpage is
>> later split (e.g., when setting mem_access on a specific 4K page): all
>> 512 entries inherit the host p2m's access rights instead of the altp2m's
>> default_access.
>>
>> This issue became apparent after commit 50baf2d, which causes the host p2m
>> to use superpages more frequently. Before that commit, the host p2m
>> typically had 4K entries after VM restore, so the prepopulate branch was
>> rarely taken.
>>
>> Symptoms include memory-access events firing for unexpected pages when
>> using VMI tools with altp2m, particularly after VM resume.
>> The issue can be worked around by booting with "hap_1gb=0 hap_2mb=0".
>>
>> Fixes: 7e5b662 ("x86/altp2m: p2m_altp2m_get_or_propagate() should honor 
>> ap2m->default_access")
> You didn't even Cc Tamas, who I think once again will need to ack this.
> Already with the referenced change I didn't quite understand the
> reasoning.
>
> However, two formal points: Please use 12-digit hashes, as demanded by
> sending-patches.pandoc. Plus I don't think Fixes: is quite right here.
> That earlier change of yours didn't mean to do more than it did, by its
> title and description. We relatively recently introduced Amends:, which
> may be a suitable fit here.

I beg your pardon?  Fixes are and Amends are synonyms.  You cannot use
them like this, and you absolutely cannot expect contributors to know
your personal interpretation of the words.

~Andrew



 


Rackspace

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