[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/6] xen/arm: dom0less seed xenstore grant table entry
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Jason Andryuk <jason.andryuk@xxxxxxx>
- Date: Tue, 1 Apr 2025 11:34:56 -0400
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=suse.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=nYv5beCDUcMPfKuKRp8fAjK/10MpX+8ppWciSJUjTnE=; b=je2z/BuJ/b0qGH4R8VlB9XsT99F45H4wYXKcgSFxM88Vug1R933apaMkbkNXXVTALezEFjyermmggS8nmnbFmf4RqvW4rfKPP8/+OYzhR97PTpobMQ9gK/MnaZWX9rzfy2MxExUGMhc/VL8xtDR8oStU1imv+Sl9RnZ3l7R4Toa+yyxg01qtB7nrge5c5JV7dtJlRA/s//EqFimPOLyGJUfGI6Ph8dYZSvzO0E8jJtGd90/0Cm3j845T3Zd6guVYRtafG2BHLSJJsb9HG3+vAdOv+QjCkqjyZfqezKGo0Oi9BuxijLQ7IUauJQTYfGofFHGQDOrX73J1M3XmzdmsrQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ViD9SvXjABuJxiSbApd5LWmkEqiVZiepGgQuEp7xD6GychxWUNDcgrsG1iekMuFiQLRz2q/pdabYDs7nYZ8lNdrW9arR8/J51AVwbqFfexIwJ449pzz6/QheuU6Wpz8BHtktK/kbhS77Uk7Wn3SpZAVxEMbsAuXFy5Qq24DCHsVQoS4GcgB8Fe1UMmitC4dSTu3tDihnkiyb86F3rMo6ujbBjlZEM20Y42Z3OmKtEnQLA22nTyMRsYwnM0Ih32jubpwx/euddGhZ3A7yfyhNaBWp6REntF7zj3u3dvfQ6tReHj4HRS1A9FDesQIMGkhnNiJXPTBRkRqG2tgPy6d68w==
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Tue, 01 Apr 2025 15:35:12 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 2025-04-01 08:16, Jan Beulich wrote:
On 31.03.2025 23:43, Jason Andryuk wrote:
--- a/xen/arch/arm/dom0less-build.c
+++ b/xen/arch/arm/dom0less-build.c
@@ -865,6 +865,10 @@ static void __init initialize_domU_xenstore(void)
rc = alloc_xenstore_evtchn(d);
if ( rc < 0 )
panic("%pd: Failed to allocate xenstore_evtchn\n", d);
+
+ if ( gfn != ~0ULL )
Is this an odd open-coding of INVALID_GFN? And even if not - why ULL when
"gfn" is unsigned long? The way you have it the condition will always be
false on Arm32, if I'm not mistaken.
The gfn is pulled out of the HVM_PARAMS, which is a uint64_t. It is set
like:
d->arch.hvm.params[HVM_PARAM_STORE_PFN] = ~0ULL;
But pulled out by:
unsigned long gfn = d->arch.hvm.params[HVM_PARAM_STORE_PFN];
So your comment highlights that unsigned long is incorrect for ARM32.
While I realize fixed types are discouraged, I'd prefer to use uint64_t
for the replacement. That is the type of HVM_PARAMS, and uint64_t is
used on the init-dom0less side as well. Using unsigned long long to get
a 64bit value on ARM32 seems less clear to me.
Thanks,
Jason
|