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

Re: [PATCH v2 3/8] vpci: Use pervcpu ranges for BAR mapping


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Mykyta Poturai <Mykyta_Poturai@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Tue, 31 Mar 2026 13:56:33 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=UfGjFthC/K00Gy1hqVzQCHMfTBwwcc9Qc2chCxNKKXs=; b=zJ5GdxikHlSrOrZFRM2YS+gF7ALwwKY8uT9XZb9r7BkeDUj9p8NAEwkpPTal7Qa6Pqe4Wr+/f52QaJETR27LC02vFoNDyaj/QwWRQAStTk+0vqEh2qgEEjpcp92038zhh69Y7uLIteBtW3kGhmNVgsHYRMI0ktYH2iQvICShnopnOxJew9m2JgULEYWTOVIvfbc6YvIjpHhIs/svZR8CMcc3rLwrYCze37kzlAhlLZv1MYekX0HKDhM9IPl8xrAoCz1Gt5yN/A13uoHxM43VfjHBXgit6rNTQNfuEkN6Njcy+ASKlXnBrAGtqBnXk3n+pXEi/PNStjAYK9Wdeodq6Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Aq2zfdgm8D7Ym4A1ltscvh6lfarNS7v21+XrwLbPGIx9zBuFFF5EtXVrR9u1zDyaWASw22YR2ybTZbfu63BLt9RHan46//2Msg9zqT+MVmmDFC+CRHWuMj9IWu2Pnnlvp0WzNolDP5yWtaIlLV0aO4G0ri7rLz+p9HP/VwnGyaN901ehUuHVcZ0ruwj4hDNqnWurdD/YESoGjUAWJ/YfIrZ6pLtSquzaGqxr+cVe17mpHk/pjEMKEEXWwlGKuGfxyt2QP61Cf23m8g2dUqP8D5NCSaDJlkn1NwipPY0yMEPYhmNlPkrAH1FSNT5l7y8pLnmrjlAVmcdvws8URHapFg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 31 Mar 2026 11:57:00 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31/03/2026 10:59 am, Jan Beulich wrote:
> On 09.03.2026 12:08, Mykyta Poturai wrote:
>> --- a/xen/common/domain.c
>> +++ b/xen/common/domain.c
>> @@ -454,6 +454,14 @@ static int vcpu_teardown(struct vcpu *v)
>>   */
>>  static void vcpu_destroy(struct vcpu *v)
>>  {
>> +#ifdef CONFIG_HAS_VPCI
>> +    int i;
> Nit: No plain int please when ...
>
>> +    for ( i = 0; i < ARRAY_SIZE(v->vpci.bar_mem); i++ )
> ... its values are only ever non-negative. (Applies elsewhere as well.)

Furthermore, please use `for ( unsigned int i = ...`

That avoids needing to play weird scope games for i.

~Andrew



 


Rackspace

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