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

Re: [PATCH v4 4/5] [FUTURE] xen/arm: enable vPCI for domUs


  • To: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 31 Oct 2023 17:17:28 +0100
  • 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bc/QMeuhl6E+g2BUjdQYMNPlwlIAtfBkyk7innooNDg=; b=jL+OkJQ2CeERsSXSGOk7HhMYcWhX7XwsR5G9gRGlsZOh2BdcgOYU8HyM+HwDzf2aaAI0IETCcZbJV83hMSELZRe2I638yHW4gP/CX+lp57rFz13JV4KQnuOWXu/nFN7sVqDnTySl4ctzAOpWx5aHx/8eIcD3Mbsx7LMTn6bNtpPwncLVpvRZ++jCntLXv77BOL35Kwvu6NVVO1tdegJQjsKIWVLII2P8hcTPiKT3bFKXyXTt/NusQIWEd6RfiUSldiaRd7icN0+kyMgiph2/Juahw1fF10xrNX4jPZMxTvo+03p6JDz9LziOLzMgHnH6cItlwv3jj1wnmeW9/9JXqg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CPgl5Lk2ewxoZCfeaWuhOrE8R68P2ZVlHQaB6yBRd+wUXbFJHYOu6EUBz6CyJUaivnPDZm3/umT2FYj8PhS3o08FnSXhI03zwoSBgt1Xy3/BVhCjo45ZmBmWZk3nLwXYoeimTPd1RRyUCG0iI7neZbtUrOo7mP4/BZ8jwz98wpYjnfO04eXwQRqnD/j6bzDg3htcd+iYXFPSOhh0vobbP+4ccTtc8VOTpvqP+HL6gx3IVd+ewZd2ORVWhFzXSQD1seoe1Zi0+ddJE631TY+B/a2Y7K9mu/S0408mNWBJcs7wCq+ImVCPk1cYSSMVtUHsr9Y9/IAzFylVWfetrjDVCw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Tue, 31 Oct 2023 16:17:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31.10.2023 15:15, Stewart Hildebrand wrote:
> On 10/31/23 09:17, Julien Grall wrote:
>> On 31/10/2023 11:03, Jan Beulich wrote:
>>> On 31.10.2023 00:52, Stewart Hildebrand wrote:
>>>> --- a/xen/drivers/passthrough/pci.c
>>>> +++ b/xen/drivers/passthrough/pci.c
>>>> @@ -1618,6 +1618,16 @@ int iommu_do_pci_domctl(
>>>>           bus = PCI_BUS(machine_sbdf);
>>>>           devfn = PCI_DEVFN(machine_sbdf);
>>>>   +        if ( IS_ENABLED(CONFIG_ARM) &&
>>>> +             !is_hardware_domain(d) &&
>>>> +             !is_system_domain(d) &&
>>>> +             (!IS_ENABLED(CONFIG_HAS_VPCI_GUEST_SUPPORT) || !has_vpci(d)) 
>>>> )
>>>
>>> I don't think you need the explicit ARM check; that's redundant with
>>> checking !HAS_VPCI_GUEST_SUPPORT.
> 
> Currently that is true. However, this is allowing for the possibility that we 
> eventually may want to enable PCI passthrough for PVH domU using vPCI (e.g. 
> hyperlaunch, or eliminating qemu backend), in which case we may want to 
> enable CONFIG_HAS_VPCI_GUEST_SUPPORT=y on x86.

That's precisely why I'd like to see the ARM check go away here.

>>> It's also not really clear why you
>>> need to check for the system domain here.
> 
> xl pci-assignable-add will assign the device to domIO, which doesn't have 
> vPCI, but it is still a valid assignment. Perhaps an in code comment would be 
> helpful for clarity?

And/or specifically check for DomIO, not any system domain.

Jan



 


Rackspace

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