[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: Jan Beulich <jbeulich@xxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Wed, 29 Sep 2021 08:24:03 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.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=4T6pSvEDVTQ1HJIa1MyHSz6tDGVwQKQ+pKNWCmHVUqc=; b=NwOITaERwHMa5xIwFsgpila6G9hvm9cRmzgGtDVybP5OOziirbPI4MFvRYOaukDxECEi7/MwX4T98fcObPG6b6RwW6y+mSizfaV0v6Ym/A+ATCH62QATXN1bgb/95XobbffvpJo9oKLAvx4Ux00GANAzbirEDXt28T7OUXqP7Ku3N1MI+QZa4+nCZZPqfDHHwbeAFZuIK62KI56uyJVEItYyeoN10oZQvuo6fybPuw5OyFL9G6PCzoh93nPM92lkIbyL4+yGC+ugyQhwCmHMTRZSlNEStoZzBlywU4FLgHsb3DANI25A52Np1pz2im9h7RH686JlCp8qIY0/+EIGkw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YBVpCuG66MRVuauC5xNxtX51wyl4CUTXc7JF0a7Xl6gR7teh6yMJm3MlvzWfBpnifPlKdsJjsj1U9XB1b/9FgsvCFxRX66S2wWxrTO4Z2iOdX45pQmPpATNvZDXysGftsVaIrjVA1UkiG1jAY5O9x3Uyw96yvmqE1hpyUJ5zOxJy11+7f+9KR3iKdV4yVgOZmd8Q2rEhAVU6EYlauDl2Ng7oGZKI5smmd+MCPXUhiK84g4KX36TR6KxbwcKorsP5NMAiU1/DFDLoNarivVu2UTUjasjuIqXWq+65JWrVKhPH5bE3UQCi5WFd9wI2pLLzzi8bV/Y2Smat2Yt0CZH8HA==
  • Authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=epam.com;
  • Cc: "julien@xxxxxxx" <julien@xxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>, Oleksandr Tyshchenko <Oleksandr_Tyshchenko@xxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Artem Mygaiev <Artem_Mygaiev@xxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 29 Sep 2021 08:24:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHXsHpCfe0n3k8oF0eTl7KOfxT3R6u6ssAAgAAA3gCAAAIlAA==
  • Thread-topic: [PATCH v2 07/11] vpci/header: program p2m with guest BAR view

On 29.09.21 11:16, Jan Beulich wrote:
> 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()).

I can do it as well:

data.start_gfn = _gfn(PFN_DOWN(is_hardware_domain(v->vpci.pdev->domain) ? 
bar->addr : bar->guest_addr))
But, help me please breaking it into multiline with 80 chars respected

>
> Jan
>
Thank you,

Oleksandr

 


Rackspace

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