[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




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

 


Rackspace

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