[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 01/13] xen/pci: arm: add stub for is_memory_hole
- To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
- Date: Fri, 4 Feb 2022 10:35:52 +0000
- Accept-language: en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SF09O8UfeTOzQNVYbgCroZZsXaWMbZHA4mqoWfu9hsY=; b=nhcmZMFXZmmMKmLGK2+WdWofcb3CoamrmaHlqnpBaE/yuH8KjLcfCCC9x0YCw0gBhgKyMGd+vSN1uk8guXhnzjRwZble7XIBxyIarEQ7L3dXZa04gDbB57DZHpLPrE7bfk5mKuipAxIub4KxGX80+S59VgP4jgVUAcsGvEtxTFMJkpZ25iBLhk++uKkMgpVz/IPhwX6I4Pg7LjR3v7dqPUsJGaO/Lr6N1G0NIQLb9SIANzlYk1IyisY9XuLqohIQsO4ZU+3Vxwp9vYVzou2c37h0WIMx5vVRSM1WKm6DkYR7R2eqXkp9H9pf+0u2Nlm31EUCCAD/gYqjHQKBJE1V3w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n2NvkHqx1wVvUvtsPev5bafIqT2ErVhc/tvXpfrzJfUx8xXwVupAZmSt5ErI9rJWhVlSayra91zFm3mFO5x4eXEanBdTq0kXpvafKb1H2TzSR9EzQGQ2YYHmzTHPOR1HXpsD8ILyMFdrJCkHA0ZK2Zo++Qsj5vJ6Pe+ID8sfUkXr0JrA7Lzn+3ApHSvHXH9OvdKALnuhNarTyqmbP1iIzjW/6fbIGApnD3uEJLs2DLNS+6NIBwrvt5rm8hd55dxe8h0eekjq3CSKJMSrlpN6LaknI6Yhxsmi9YNe0ep9Ne5o+midVRAX9mkQe8zT9QTYGb6oUba7IAyvGGNjS+uNMQ==
- 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>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, "paul@xxxxxxx" <paul@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
- Delivery-date: Fri, 04 Feb 2022 10:36:13 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYGZFbEg6Erttt1UCNei+XrySHEqyDFYiAgAAC4gCAAAsigIAAAbyAgAAC0oCAAAq4gA==
- Thread-topic: [PATCH v6 01/13] xen/pci: arm: add stub for is_memory_hole
On 04.02.22 11:57, Julien Grall wrote:
> Hi,
>
> On 04/02/2022 09:47, Oleksandr Andrushchenko wrote:
>>>> Could you please help me with the exact message you would like to see?
>>>
>>> Here a summary of the discussion (+ some my follow-up thoughts):
>>>
>>> is_memory_hole() was recently introduced on x86 (see commit 75cc460a1b8c
>>> "xen/pci: detect when BARs are not suitably positioned") to check whether
>>> the BAR are positioned outside of a valid memory range. This was introduced
>>> to work-around quirky firmware.
>>>
>>> In theory, this could also happen on Arm. In practice, this may not happen
>>> but it sounds better to sanity check that the BAR contains "valid" I/O
>>> range.
>>>
>>> On x86, this is implemented by checking the region is not described is in
>>> the e820. IIUC, on Arm, the BARs have to be positioned in pre-defined
>>> ranges. So I think it would be possible to implement is_memory_hole() by
>>> going through the list of hostbridges and check the ranges.
>>>
>>> But first, I'd like to confirm my understanding with Rahul, and others.
>>>
>>> If we were going to go this route, I would also rename the function to be
>>> better match what it is doing (i.e. it checks the BAR is correctly placed).
>>> As a potentially optimization/hardening for Arm, we could pass the
>>> hostbridge so we don't have to walk all of them.
>> It seems this needs to live in the commit message then? So, it is easy to
>> find
>> as everything after "---" is going to be dropped on commit
> I expect the function to be fully implemented before this is will be merged.
>
> So if it is fully implemented, then a fair chunk of what I wrote would not be
> necessary to carry in the commit message.
Well, we started from that we want *something* with TODO and now
you request it to be fully implemented before it is merged.
What do I miss here?
>
> Cheers,
>
Thank you,
Oleksandr
|