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

Re: [PATCH] tools/xl: Guard main_dt_overlay() with LIBXL_HAVE_DT_OVERLAY


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Wed, 6 Sep 2023 10:53:20 +0200
  • 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
  • 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=QY9RtrUjxZdgvr8IDgaiUK9SF7yQES3ZNUlQi7LV1Lk=; b=npcQCCyMbjM0IGc2BWF36CATt0aUJPPVXd30POQ/JpWhmSEeevUREWf9pv2GIsH6F3owD0/q41jcdCUJaT+YCy1L/d6ZpfX88eAaUyyVmuXk2mkUBdYpdH4MFN8bujQVM7kQQETjqoXd+0FY8VU3iqESWbz/LcnBAD6ukIya8vI9OUbqXkXgisjrHCGh/mQWaXvZQeBqMdszAlaCy1f5mxLb2iA3ZnypYaD8c6wSZr4fbJPhT2x9pg2JV5FU1QLv7CT2ETRPddk9TRTJT0uaWWe2p+BeiHozAAolhG+trEJp5AJWN2owtkejxVWn2f1u/zhPi2xtFDnCbbydmsQuMA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ag+RyM0wldVG18Xah7WlKhb6VNUqy0SY7UIhLE/FrLFEVXLd+aL5I1INEH3JPnEUFNfll3sf+lLPgsZ0Y7vSsqOomivkKkbuxPiZbEaUtn5lbuWhl6BMLKWdPphqldg47dglvl7v6uaLjIKrl4cOMm5q+9HhykX62zY/9AoCO6FRgtjVv4xOrMNG27V109ORtbisYNNjIIdQZKe0kkb645UQ0TCkDZqZIpgnjyRg5VrLhvpHKfjNsexT7fIcWKjd12kQ9QkYdMlkjn6xd+eNdX/yyv/Th3knEqRvi+mVPjmRirfsd8FSoy/6cGS3aZxkKXsdR7YX0R+taL55igo/LA==
  • Cc: Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, <stefano.stabellini@xxxxxxx>, <vikram.garhwal@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 06 Sep 2023 08:53:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 06/09/2023 10:42, Jan Beulich wrote:
> 
> 
> On 06.09.2023 10:36, Michal Orzel wrote:
>> main_dt_overlay() makes a call to libxl_dt_overlay() which is for now
>> only compiled for Arm. This causes the build failure as reported by
>> gitlab CI and OSSTEST. Fix it by guarding the function, prototype and
>> entry in cmd_table[] using LIBXL_HAVE_DT_OVERLAY. This has an advantage
>> over regular Arm guard so that the code will not need to be modified again
>> if other architecture gain support for this feature.
>>
>> Fixes: 61765a07e3d8 ("tools/xl: Add new xl command overlay for device tree 
>> overlay support")
>> Reported-by: Jan Beulich <jbeulich@xxxxxxxx>
>> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
>> ---
>> There are still other parts of dt overlay support in toolstack that would
>> want to be revisited in order to use guards suitable to be used by other
>> arches.
> 
> Since from all I can tell this will do
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> But I still wonder: We agreed to leave libxc alone for now, but was it
> really intentional that you didn't adjust libxl.h right here, but instead
> ...
> 
>> --- a/tools/xl/xl.h
>> +++ b/tools/xl/xl.h
>> @@ -138,7 +138,9 @@ int main_shutdown(int argc, char **argv);
>>  int main_reboot(int argc, char **argv);
>>  int main_list(int argc, char **argv);
>>  int main_vm_list(int argc, char **argv);
>> +#ifdef LIBXL_HAVE_DT_OVERLAY
>>  int main_dt_overlay(int argc, char **argv);
>> +#endif
>>  int main_create(int argc, char **argv);
>>  int main_config_update(int argc, char **argv);
>>  int main_button_press(int argc, char **argv);
> 
> ... made this adjustment, which imo isn't strictly necessary.
I'm not a toolstack expert but I decided to guard the prototype as well
given that quite a few of them are guarded either using LIBXL_HAVE or arch 
guard.

~Michal



 


Rackspace

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