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

Re: [PATCH v2 14/17] xen/arm: Enable the existing x86 virtual PCI support for ARM.


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 24 Sep 2021 09:37:26 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=kzFNDGGnURHa/AMypY4IXW+8W1K9iX4ncP8x+aBrxjs=; b=PfsbrPUqi0rfQ1Hbfxqyqzku+MNFqKaWKtoXLb1Ep1G0u/36Id8GcbRjGniQQLTemJs0IB5adu1HBTqgh/QVji985FIbAGg5n1fV2CjoMQzHG94BQFl3gVZrsqsWxPIX2RIs1eQU9yUQGhzCRrZjn3ATeTOOEMEf1HMqmEfpcD9SpIAL1GpwnGoxe/XZ80NWZfLUByGXl1pykQ5NN5khXMCm2hh9Pi9jBi+a1qPzigH53GXa9M2VNJATIKNXWrGM2feI6iLQnMSBZmMo3g0xQsLNYzlMA/mes1YpEIEvvOsic4bcCHtY+6YU6ammgxfUAvmf/h9PR2n4REEvHB5RrA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J9vor3GkLNun6PMy0wBOo4kMeDI9IdMe/gK55SN3ACJmdLOQ4yBVaLSfgv6+F0czbE7nW28UBMYMGWybEQ8KZfEv6G3zLHIbCbGQEIPBCWXc7tLoIJZCFGE2KIo13nY8h1T0EcwlyiLwhyMninEOMcbNlK8idaoSR9zb24VwNNQEdrddf3IjiMGxMLke9R0ZVbdCCWifsdHIaqhrrumYpauSAERRUFNSBskDNLyiMCTzFHPFVGQjujbfa9cW0yPKrUppxIEP5a3tWuIXAU+rd89sjEBs/vWEdhZeqYvpz1477qTsDSQjVrppO+N/MwNRHrMT5kDXgG/F2KeG2Cviuw==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, bertrand.marquis@xxxxxxx, andre.przywara@xxxxxxx, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Fri, 24 Sep 2021 07:37:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 23.09.2021 04:41, Stefano Stabellini wrote:
> On Wed, 22 Sep 2021, Rahul Singh wrote:
>> --- a/xen/drivers/passthrough/pci.c
>> +++ b/xen/drivers/passthrough/pci.c
>> @@ -767,6 +767,18 @@ int pci_add_device(u16 seg, u8 bus, u8 devfn,
>>      else
>>          iommu_enable_device(pdev);
>>  
>> +#ifdef CONFIG_ARM
>> +    /*
>> +     * On ARM PCI devices discovery will be done by Dom0. Add vpci handler 
>> when
>> +     * Dom0 inform XEN to add the PCI devices in XEN.
>> +     */
> 
> I take this is not needed on x86 because for vpci is only used by Dom0
> PVH?  It would be good to clarify either way.

I'd prefer if x86'es present vPCI restriction to Dom0 would not be
baked into any new code additions, if avoidable. Furthermore I'm
not convinced there's a connection here. Instead the question is
purely how Xen learns of PCI devices, which is information I surely
expect to never come from a DomU.

Just recently we've discussed the hotplug aspect on x86: While Xen
scans the bus during boot, it has to rely on Dom0 for hotplugged
devices. Hence Dom0 even there needs to notify Xen of new devices
(see "x86/PVH: permit more physdevop-s to be used by Dom0"). So
there will need to be a 2nd place to add handlers for x86 as well.
Which means preferably the change here would cover x86, too. Which
in turn means re-registration of handlers needs somehow dealing
with (either by making the call here conditional, or by making the
function itself spot the case, or by lower layer functions being
tolerant of finding a handler already in place).

Jan




 


Rackspace

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