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

Re: [PATCH v2 07/11] vpci/header: program p2m with guest BAR view


  • To: Michal Orzel <michal.orzel@xxxxxxx>, Oleksandr Andrushchenko <andr2000@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 29 Sep 2021 10:16:22 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; 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; bh=kAJtOFAhDq6K0VGn51U2Rco8e5YgN526LGuD4cWCvlY=; b=gAY+YKyCGfSZCIqLhdPXekBMFpaBwm88ocQD0pN1DHCgj52QWclrlUEBV388MNc0dExMhYupNB7af3Agf8BvfkC0tckutEvud9vOXyF4n966KfUqc9fX0Typ6eiJVlzfwdvZ+WNj/mCFSnD9cf/yi1LZpYgiK9uHfIBc+V4nAh9/6dMn6DjM1On6PA0kaY+00BVGCK4pDM3vCPSFzeAs1lh7qtopTuoX0R9T24nU9q7AFvimC2TnEv7+JkzjlytrcqV9Yxs8RY1csoeFA/YySlBfBxPHzOuVj2alZ6UqMXegB1BdwXsbqq0DkHnjNdcSSMDhMMlhjNJP96DajX/53g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XR2ajgrY9HG3b4lc73KiABrSI3HjgBzoW3EZgj/ZK2nRVB6hKgyr8lxvbU8uFumaCl1fFuLaaQcSFjdjXKq2OlXLHvsKmCJ+6qHDQvgOPWqUX0CT8AepYwZz8JvyR5O6oxpWXUtnSULS8nyCDMM9JcH5D9hHTSatkndfgDb2k/hR7qaPxwXEAZ1GBmjTjIYjD0BWSAYIQTA6nKdfALcqZEOsEaR5w19NQTnOECueWSkwN99POMbFy/bIFaGYvaeM1++ujrUcK9VLuyqCR1Z4xqdE68MQWc+AJ5+ZZ7HEbNtTDrdDS/F9QiTulGdfXmK80DRpy2f/l//WMnaFSmbmbQ==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: julien@xxxxxxx, sstabellini@xxxxxxxxxx, oleksandr_tyshchenko@xxxxxxxx, volodymyr_babchuk@xxxxxxxx, Artem_Mygaiev@xxxxxxxx, roger.pau@xxxxxxxxxx, bertrand.marquis@xxxxxxx, rahul.singh@xxxxxxx, Oleksandr Andrushchenko <oleksandr_andrushchenko@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Wed, 29 Sep 2021 08:16:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29.09.2021 10:13, Michal Orzel wrote:
> On 23.09.2021 14:54, Oleksandr Andrushchenko wrote:
>> @@ -149,6 +172,10 @@ bool vpci_process_pending(struct vcpu *v)
>>              if ( !bar->mem )
>>                  continue;
>>  
>> +            data.start_gfn = is_hardware_domain(v->vpci.pdev->domain) ?
>> +                _gfn(PFN_DOWN(bar->addr)) :
>> +                _gfn(PFN_DOWN(bar->guest_addr));
> I believe this would look better with the following alignment:
> data.start_gfn = is_hardware_domain(v->vpci.pdev->domain)
>                  ? _gfn(PFN_DOWN(bar->addr))
>                  : _gfn(PFN_DOWN(bar->guest_addr));

FWIW I agree, yet personally I think the conditional operator here
even wants to move inside the _gfn(PFN_DOWN()).

Jan




 


Rackspace

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