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

Re: [PATCH v2] tools/arm: Fix nr_spis handling v2


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Wed, 26 Mar 2025 18:21:59 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.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=wJhDCHhPRS8X+2A4FBEb2pc9AoPmmYM36i3y9UETB8A=; b=o4IbYZWwcUKql/1qOzMblALneuvJLY4uDOysr+oEjTjBJHq4NnjvpUQUbPHsmynATM86ozxYoWBVNPK5eM5Mo1CX3mXwLYzKo9HoA5wuOPOnCWNfPivVVqQAGSYIDT0O1CpkqUYPVrUSB2ODKd+BwTerc0AnblnckV/hEmiM0d891SYmu3CU3dO4wM0Zrg7W+ccYTOiLrqSS5G1FldiKDpr8ERC86iFvVURULABThjsqRAgfFvasqBw+cA+JjhSTDa8YV9Hk48qV84YXwA4LVHB4fsOoJ84eGKGVPwS2dSdVQRciVOSX3ddjvN6IGgy1cdYZPVnx+6lEjScjtEpgWQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NKB+oLhJsxP9YfqO1l/rI26cHgd9eZJXukVRis1xcaN8l6UJwIrcnj4xikl/1j33xCQtbfIoQJunTAi0fgHrthtMG/atWARsqUYQm/oBZhiKYMhEyeO9aXGvh0fSBwnGDP2MhCSnRhXdGfL9pieGWVCe18wn2byPS6RLVmlx/hWZPrMWTWu/JkLVW3hjyp7yxcKhy8v8Hp9p+Bp0j8qlmp/vZ/Mbhtj/iZyJJ2Xi5rqwpH6ILNTOC4+z56pPoELSjSfcLaKoEOQaqwpPToVI782g3Dp+GVYI5zKFmpcdstHWOGv/PyUPVEN9YMEGDN+MuIOX4Mx/NQAT/2fTRS2yUg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>
  • Delivery-date: Wed, 26 Mar 2025 17:22:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 26/03/2025 15:47, Anthony PERARD wrote:
> 
> 
> On Tue, Mar 25, 2025 at 12:00:29PM +0100, Michal Orzel wrote:
>> diff --git a/tools/libs/light/libxl_arm.c b/tools/libs/light/libxl_arm.c
>> index 2d895408cac3..0adcaa373b54 100644
>> --- a/tools/libs/light/libxl_arm.c
>> +++ b/tools/libs/light/libxl_arm.c
>> @@ -181,13 +181,18 @@ int libxl__arch_domain_prepare_config(libxl__gc *gc,
>>
>>      LOG(DEBUG, "Configure the domain");
>>
>> -    if (nr_spis > d_config->b_info.arch_arm.nr_spis) {
>> -        LOG(ERROR, "Provided nr_spis value is too small (minimum required 
>> %u)\n",
>> -            nr_spis);
>> -        return ERROR_FAIL;
>> +    /* Check if a user provided a value or not */
>> +    if (cfg_nr_spis != LIBXL_NR_SPIS_DEFAULT) {
>> +        if (nr_spis > cfg_nr_spis) {
>> +            LOG(ERROR, "Provided nr_spis value is too small (minimum 
>> required %u)\n",
>> +                nr_spis);
>> +            return ERROR_FAIL;
>> +        }
>> +        config->arch.nr_spis = cfg_nr_spis;
>>      }
>> +    else
>> +        config->arch.nr_spis = nr_spis;
> 
> Just one small coding style issue: to avoid confusion, whenever one side
> a of an if..else is using a block, both side should use a block. But
Oh, I should have checked with tools/libs/light/CODING_STYLE.

> that can be fixed on commit:
> Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
Fixing on commit would be great.

~Michal




 


Rackspace

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