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

Re: [PATCH 2/3] xen/arm, tools: Add a new HVM_PARAM_MAGIC_BASE_PFN key in HVMOP


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Henry Wang <xin.wang2@xxxxxxx>
  • Date: Fri, 26 Apr 2024 15:02:05 +0800
  • 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=arcselector9901; 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=E391/ayyWUSlsp4QtaYTlN5MV1Nw+UTVTLOMKm4cHsg=; b=GPw/qu+rAoinyG06WX3lDs4rMkor1eWTyoxuK7wUQjFaI2ClBAKvejD4Gw+gy7ityjaHLgq1oRelHeY6c9+OBE56Pd5sjqIQTZJvvT1deTRgIgEoZAoSpeJ3O5+MW6G/D8X1aTRY3RJsoTwwfwgGC2zvEm4v3/mD2tPptzio1lIoMtW5oFLHq4CTFDwTA4HbEP8/QSlW5/muT5rBkdl6mOuboubypAowROgyAz7qYDtEcPSraY5bcB/96ST6cofgQuvHAuJaXmzCSg7i8M0A+T9o/kbWEGEUC9mNEAiPvEDvTciXJThj/9lqYDFuMMf5J5y9tGvI1+kDuHK7Zxo04Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cX9HKp7+nmlNy0q9lunXXgsfLcWwh9p9pzvZYUynotvXS4zw6y3Q4IYtn7Q/YbqUme114ilthXeGP8oNSAdGbGTyRqoR2vh6Udu+fPF6c0+JDqyYTEljruaxTSOjWxt6yoDkMq43m+uNAP8XUo6jSZZcZtx5MGyfa6/8AononameVJN2zHDsr+f9k1RbTNdpht61Nt9mfMa2vT0Dza6Ldku09xrupbFQj3ERdJjN0FaHsVnc2506Z8NhJG0OI1eVkd2wtWKn7TvX5ybhPIbF58YHMq0LJTYFjnkN617AY4jog5bYA+HFADbB0jt0KHRg3znb9Mz9zjCwHggre/vjQw==
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Michal Orzel" <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Alec Kwapis <alec.kwapis@xxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 26 Apr 2024 07:02:34 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Jan,

On 4/26/2024 2:50 PM, Jan Beulich wrote:
On 26.04.2024 08:30, Henry Wang wrote:
On 4/26/2024 2:21 PM, Jan Beulich wrote:
On 26.04.2024 05:14, Henry Wang wrote:
--- a/xen/include/public/hvm/params.h
+++ b/xen/include/public/hvm/params.h
@@ -76,6 +76,7 @@
    */
   #define HVM_PARAM_STORE_PFN    1
   #define HVM_PARAM_STORE_EVTCHN 2
+#define HVM_PARAM_MAGIC_BASE_PFN    3
#define HVM_PARAM_IOREQ_PFN 5
Considering all adjacent values are used, it is overwhelmingly likely that
3 was once used, too. Such re-use needs to be done carefully. Since you
need this for Arm only, that's likely okay, but doesn't go without (a)
saying and (b) considering the possible future case of dom0less becoming
arch-agnostic, or hyperlaunch wanting to extend the scope. Plus (c) imo
this also needs at least a comment, maybe even an #ifdef, seeing how x86-
focused most of the rest of this header is.
Thanks for the feedback. These make sense. I think probably
dom0less/hyperlaunch will have similar use cases so the number 3 can be
reused at that time. Therefore, in v2, I will add more description in
commit message, a comment on top of this macro and protect it with
#ifdef. Hope this will address your concern. Thanks.
FTAOD: If you foresee re-use by hyperlaunch, re-using a previously used
number may need re-considering. Which isn't to say that number re-use is
excluded here, but it would need at least figuring out (and then stating)
what exactly the number was used for and until when.

I just did a bit search and noticed that the number 3 was used to be
#define HVM_PARAM_APIC_ENABLED 3

and it was removed 18 years ago in commit: 6bc01e4efd50e1986a9391f75980d45691f42b74

So I think we are likely to be ok if reuse 3 on Arm with proper #ifdef.

Kind regards,
Henry

Jan




 


Rackspace

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