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

Re: [PATCH v4 03/25] xen: arm: update p2m_set_allocation() prototype


  • To: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Mon, 29 Jun 2026 09:14:29 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com 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=VirHLVq2OxKm+YfJ8qObxrOMTaALuOArnw1BSPsC+lg=; b=ayDn9SHtmYTE3W8CaJPqBIF5in9P0FV24PL1XgCtDW2X6yUS/AJxtvC8vjP524JLzHNbiINKAByBeek4904Ew2NAV9PvAVgqvN12Pgk6ZVmOPdA/JlGz/lEI/xeF9435l+7tS9irCAW1tEetmIWNdEsHJsxgN9FJhGM8Pz+GktniZY45HMS/NGb7eVWFpLYhd3yGloBEYIeder5EbZqQyDrTYhKVprzxAVMG/U4fDT08YGok4YhrCrSU38HgiE0P38aExl+7Zn3M3QcCP069Rh5hK9qgKtZnjfgUwiYXKaIU3mal2T17Sm+kTUgKOlvUG60xdlLIctPwn/n43gT4+g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nW0shJwYPjx8ei0uTzylYKbKEXK61D17c993gaR60r5G5AYH5AXjaE0MVHIn2GOiM4ww1l3L/OSbPG6oaCK2G5naOH2ag5NGLwO2Tn5xcupPgCE257DkewbPcllv5bxh+UNBBvsk1SYsvQLiokaTB03ckSThiUlqh54qjzFkHd3X34w1n6QR2On5TiKVHxHK0NiUq+0viAIRnn0bi2THH6KmJ34wr0YWfXY9CP8G/wmZYvDq+6g1KBM3mv3GoKYtDy4Rk4cfnGKFKxa7YVB5dggGr5NHU+8p4i5+jH2wQCTBMfQ9h6SlfayIfJGYOdRxKqML/4iyKodQ8OIldvDoOQ==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Romain Caritey <Romain.Caritey@xxxxxxxxxxxxx>, Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Alistair Francis <alistair.francis@xxxxxxx>, Connor Davis <connojdavis@xxxxxxxxx>
  • Delivery-date: Mon, 29 Jun 2026 07:14:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 26-Jun-26 17:46, Oleksii Kurochko wrote:
> p2m_set_allocation() uses a bool *preempted out-argument that overloads two
> meanings. When non-NULL, the value written back (true) duplicates information
> already carried by the -ERESTART return code — pure redundancy, which the
> caller-side ASSERT(preempted == (rc == -ERESTART)) only documents. Separately,
> a NULL pointer is an implicit calling convention meaning "preemption is not
> permitted in this context".
> 
> Replace the pointer with a plain bool can_preempt that explicitly controls
> whether the preemption check runs, making the NULL-to-suppress convention
> type-safe and self-documenting, and rely on the -ERESTART return code alone to
> report that preemption occurred.
> 
> Since p2m_set_allocation() is called by the common dom0less build code,
> move its declaration from the ARM-specific asm/p2m.h to xen/p2m-common.h.
> 
> Reported-by: Jan Beulich <jbeulich@xxxxxxxx>
> Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

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