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

Re: [PATCH v2 2/4] xen/pci: Introduce new CONFIG_PCI_ATS flag for PCI ATS functionality.


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Rahul Singh <Rahul.Singh@xxxxxxx>
  • Date: Fri, 6 Nov 2020 11:43:25 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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:X-MS-Exchange-SenderADCheck; bh=GJId46Y3T+sH6uEXxNLxlE0u6JQeSseFyzKydePrehA=; b=eP4HHnGZtl8r0nIRFjcrQdje2vSLyrbL+MBlpjeNauu8dnOi4hHtROvDzLbGC7HRIu5jBJyeQLTs4cj59UqyC0Vkz8RavbSPiLaphc2ysaA5avVRV0Q2raxcqdTievync+od0hd6t3iD0ChHoaN+0xVEY3KjKgoIWi6YStITJyeenq8DWxJ3YQ1WvuPbciOYT+wbn5oizSCViU76HnYLJGXc2NPeqF1fTKiQSCA2EMX4PbZydjQE89A97FMbL6b/1HFhlxJ6PW1/lrAoLrAWcLZuOC2eKSxX6umwj+/vUtzMxRWDLK8nzqcg7TPUI/KR/g70ulaICorSKgNqGc4yEw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ROydsg4X2tjIodwb9R4DZYugOEt9gR/JGaWAIvO1v8mgW0+DMAdsg7+129Vh3Qoy0LL4omn6jyJ5zDUMGwQRxXzX1S73Sv63l5XIXVy61OJ+FzJzDWiGdPjrWfTzSRxOfThXuxO/8C/AWzJjNhtp7r8XhzaR42/uyoPlrJgoyBsK7WRHrjSG+k/oeWM4uvat0S5KGx28sJaTLoxTAZ2srK9jh19tv1uNjEspBvan7cTVqzRlNh5VLkqaWqJsXN4u59LzZzdGYLjE5hxPy2+EasVp9inJhaFA08cRx56MyToKKDfjYTSRt3aDqe/DHUsD1RSKl+7A+XBYAtgMsxxMLw==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Paul Durrant <paul@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 06 Nov 2020 11:43:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHWsfqLVPZUjJyJak+hwdAAN0KToam4HooAgAABtgCAAt/dgA==
  • Thread-topic: [PATCH v2 2/4] xen/pci: Introduce new CONFIG_PCI_ATS flag for PCI ATS functionality.

Hello Jan,

> On 4 Nov 2020, at 3:49 pm, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 04.11.2020 16:43, Jan Beulich wrote:
>> On 03.11.2020 16:59, Rahul Singh wrote:
>>> --- a/xen/drivers/pci/Kconfig
>>> +++ b/xen/drivers/pci/Kconfig
>>> @@ -1,3 +1,12 @@
>>> 
>>> config HAS_PCI
>>>     bool
>>> +
>>> +config PCI_ATS
>>> +   bool "PCI ATS support"
>>> +   default y
>>> +   depends on X86 && HAS_PCI
>>> +   ---help---
>>> +    Enable PCI Address Translation Services.
>>> +
>>> +    If unsure, say Y.
>> 
>> Support for "---help---" having gone away in Linux, I think we'd
>> better not add new instances. Also indentation of help content
>> typically is by a tab and two spaces. With these two adjusted
>> 
>> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> Initially I wanted to merely reply indicating I'd be fine making
> these changes while committing, but there are two more things
> (and I withdraw my R-b): For one, isn't strict pci_dev's ats
> field now unused when !PCI_ATS? If so, if should get an #ifdef
> added.

Yes, I tried to #ifdef ats field in struct pci_dev but after doing that I found 
that I have to modify the 
code related to x86  iotlb flush, as I have limited knowledge about how iotlb 
flush works for 
x86 so I decided not to modify that part of the code. 

I already compiled the x86 with !PCI_ATS and is having same behaviour as 
command line options "ats=false” with unused struct pci_dev ats field.

> And then, what exactly is it in ats.c that's x86-specific?
> Shouldn't the whole file instead be moved one level up, and be
> usable by Arm right away?

Yes, you are right ats.c file is not x86 specific, but not tested for ARM so I 
thought we will move the ats.c file to common code once ATS code is 
tested/implemented for ARM.

disable_ats_device() is referenced in common "passthrough/pci.c" file  and 
defined in "x86/ats.c" therefore I decided to introduce the PCI_ATS option for 
X86. 
As I am not sure on ARM how the ATS functionality is going to be implemented. 

There are three ways to fix the compilation error for ARM related to 
disable_ats_device() function.

1. Introduce the PCI_ATS config option for x86 and enabled it by default for 
X86 and having same behaviour as  command line options for !PCi_ATS  as 
"ats=false”

2. disable_ats_device() is called by iommu_dev_iotlb_flush_timeout () that is 
as per my understanding is x86 specific ( not sure please confirm).
Move iommu_dev_iotlb_flush_timeout () to "passthrough/x86/iommu.c” now and move 
the ats.c file to common code once ATS code is tested for ARM.

3. Move x86/ats.c file one level up , fixed compilation error now and if on ARM 
platforms going to implement the ATS functionality different from
x86 we have to move ats.c file back to x86 directory 

Please suggest us how we can proceed further on this.

> 
> Jan

Regards,
Rahul


 


Rackspace

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