[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 2/7] xen/arm: add pci-domain for disabled devices
- To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
- Date: Tue, 23 Nov 2021 06:31:21 +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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9QZKKAAuuYqgyE0bopJIBTWg8TVr7KugEh4CsCa8GNM=; b=gb/MsEYJiNV/Hti1QqkZxhchSe9AOhpNWolk5mY5ojhyI35de6/f0Umkfp+ScJo4BeLi4qtGKtn8Y+Ozxb9U07F7lh1D1jS8UWgoFDGx7Updsex1fJXTCk9+HVPfxkJ9+4JdNxhoFri6cSAfzcOEITgfQtNw+/Ygu4t+FwVUZevQ/ZKKKt2z/l3gCugvLFvexgLbeiloataGlQ+m16QLDyt9XII+vLthAhhr/PSF2xvi8fIsIA5G0PMWwRz7ROLheB9KqNloE6OAuVR4GJxc75h/l90jyXaLJVInsXkuRFuqgEegMl7peojOaYJPiJ8HaCIHolUVqLvYD0tbaWnMVg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fTAmGdUUQztJCWnz8MKQNqzA5fdXliYnJDidnbL+y62wWBg9D6+AumncKfb7j5t0emqFzH/GqLE/s+YgT6LsuEYrdtQ+8U4WUBILODbrs2CR4KkP9Bpv3IXcaLogP1gLlOHN+Ez86+KvKM0vpG6SiGSIFrGy6X8Q8fj4iNANIQYPjm9vdZDFIpA8L8zH1QCsU1ckAx/Wv4w68mQAoRygAjL9zH3NbGJ82oq7/b5UQ5+C7An82ICZh+0z6oikiweKP/0dQPjJG9PAMf6MC79suPyiEE8BI+PfIDFMszpZF9Hp4c2sFr1+DyIx26YGqCAyCtzTPnFhBd/NFMmiaM3Tug==
- 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: Tue, 23 Nov 2021 06:31:52 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHX0g8QVTbfP59mVU+LM2unTUGOtawGkRQAgADLYgCAAPUEgIAAofWAgAbUDQCAAA7WAIAADxaAgADd7IA=
- Thread-topic: [PATCH v6 2/7] xen/arm: add pci-domain for disabled devices
On 22.11.21 19:17, Julien Grall wrote:
> Hi,
>
> On 22/11/2021 16:23, Oleksandr Andrushchenko wrote:
>> On 22.11.21 17:29, Julien Grall wrote:
>>> I would prefer to go with my way. This can be refined in the future if we
>>> find Device-Tree that matches what you wrote.
>> Ok, so just to make it clear:
>> >a PCI device would always be described as a child of the hostbridges. So
>> I would rework the 'if' to also check if the parent type is not "pci"
>
> That's correct. Thank you!
Ok, so how about
if ( is_pci_passthrough_enabled() && dt_device_type_is_equal(node, "pci") )
{
bool skip = false;
/*
* If the parent is also a "pci" device, then "linux,pci-domain"
* should already be there, so nothing to do then.
*/
if ( node->parent && dt_device_type_is_equal(node->parent, "pci") )
skip = true;
if ( !skip && !dt_find_property(node, "linux,pci-domain", NULL) )
{
I played with a single if and it looks scary...
>
> Cheers,
>
Thank you,
Oleksandr
|