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

Re: [PATCH 10/11] xen/arm: Do not map PCI ECAM space to Domain-0's p2m


  • To: Julien Grall <julien@xxxxxxx>, Oleksandr Andrushchenko <andr2000@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Fri, 10 Sep 2021 15:01:20 +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=UsBQJVE9lvsH/VOk2QeEH2QTh48KUIp1w73HLPSBwT8=; b=HTN4oLr2RpTOQDHCPo+0B4RvaqmS/y7PfuAUiKI72Zo1whgm9U3Q4fLWwfK14T99rsD+gFRwYr2DqG+ITk1RwTbmxwP+g+DLTMdTLdmH9x1Y3TKzGj5OO8fCnHN09xwBeU4lPwIEHtwz4/6oGQ2IRPjvdYNQ/M2/VtV2cnB+D9TrklGkt1XDZnHpn/exzVhaCTsRmDYcccRzamaqJoKFmXhP9e7QLTfj92k/fnt3QMRQC3VbJhMhl2IqUj+4u/aDLItBqHUbufnamyXyn6j+Fb7E1Zqsuj274tf4CtCGPg/dMYfNg0ZOunFqqPmJE9IRlqKUrOgYGiwpgkwj4DSCrw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Kbb7fdK0k5JOMPjhSLtIRUdhGOAsT33+roZ2I0NqlE5CjX/Z8hrN9bJOzk12vGdgmUYZ0f0KdACUBXm+w4b1LxKchNaiDQVy0iD4Pusa8mJE1GAfzHziwK0NUYS+liu5Aq9FZHJFuzstE81hnIDdhDeYDgorEnzhCuhVRyknSsQBqXehLYkM1jECGXjtYlF/9W0VHt0USc14z77PFxdVs4EKN0smeHke36uCabuolywubWXC8XTIg6ekuDsKGyZplsqDjiNwdGMnbfa2LHRjgwiLnikNTGg/ZlOpBdcC8zd2nY+7BC5OystSueIZFvpf8PwK550juBX7JvAp/DGLsA==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=epam.com;
  • Cc: "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>
  • Delivery-date: Fri, 10 Sep 2021 15:01:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHXoJ50hf+zXQhc2ka7YfmmERKX+aucB06AgAE4wYCAAAtRgIAADDiAgAAEjQCAAAWagIAAA+KAgAACjwA=
  • Thread-topic: [PATCH 10/11] xen/arm: Do not map PCI ECAM space to Domain-0's p2m

On 10.09.21 17:52, Julien Grall wrote:
>
>
> On 10/09/2021 15:38, Oleksandr Andrushchenko wrote:
>> [snip]
>>
>>
>>>>> What do you mean by "used by Domain-0 completely"? The hostbridge is 
>>>>> owned by Xen so I don't think we can let dom0 access any MMIO regions by
>>>>> default.
>>>>
>>>> Now it's my time to ask why do you think Xen owns the bridge?
>>>
>>> Because nothing in this series indicates either way. So I assumed this 
>>> should be owned by Xen because it will drive it.
>>>
>>>  From what you wrote below, it sounds like this is not the case. I think 
>>> you want to have a design document sent along the series so we can easily 
>>> know what's the expected design and validate that the code match the 
>>> agreement.
>>>
>>> There was already a design document sent a few months ago. So you may want 
>>> to refresh it (if needed) and send it again with this series.
>>>
>> Please see [1] which is the design document we use to implement PCI 
>> passthrough on Arm.
>
> Thank. Can you make sure to include at least in a link in your cover letter 
> next time?
I will update the commit message to have more description on the design aspects
>
>>
>> For your convenience:
>>
>> "
>>
>> # Problem statement:
>> [snip]
>>
>> Only Dom0 and Xen will have access to the real PCI bus,​ guest will have a
>> direct access to the assigned device itself​. IOMEM memory will be mapped to
>> the guest ​and interrupt will be redirected to the guest. SMMU has to be
>> configured correctly to have DMA transaction."
>>
>> "
>>
>> # Discovering PCI Host Bridge in XEN:
>>
>> In order to support the PCI passthrough XEN should be aware of all the PCI 
>> host
>> bridges available on the system and should be able to access the PCI
>> configuration space. ECAM configuration access is supported as of now. XEN
>> during boot will read the PCI device tree node “reg” property and will map 
>> the
>> ECAM space to the XEN memory using the “ioremap_nocache ()” function.
>>
>> [snip]
>>
>> When Dom0 tries to access the PCI config space of the device, XEN will find 
>> the
>> corresponding host bridge based on segment number and access the 
>> corresponding
>> config space assigned to that bridge.
>>
>> Limitation:
>> * Only PCI ECAM configuration space access is supported.
>> * Device tree binding is supported as of now, ACPI is not supported.
>> * Need to port the PCI host bridge access code to XEN to access the
>> configuration space (generic one works but lots of platforms will required
>> some specific code or quirks).
>>
>> "
>>
>> Unfortunately the document had not been updated since then, but the question
>>
>> being discussed has not changed in the design: Domain-0 has full access to 
>> the bridge,
>>
>> Xen traps ECAM. (I am taking dom0less aside as that was not the target for 
>> the first phase)
>
> Having an update design document is quite important. This will allow reviewer 
> to comment easily on overall approach and speed up the review as we can match 
> to the agreed approach.
>
> So can this please be updated and sent along the work?
>
> In addition to that, it feels to me that the commit message should contain a 
> summary of what you just pasted as this helps understanding the goal and 
> approach of this patch.
>
If we are on the same page now will you be able to review the patch

with respect to the design from RFC?

> Cheers,
>
Thank you,

Oleksandr

 


Rackspace

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