Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0009EC433EF for ; Thu, 7 Oct 2021 10:51:21 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AEA94610C8 for ; Thu, 7 Oct 2021 10:51:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AEA94610C8 Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.203456.358583 (Exim 4.92) (envelope-from ) id 1mYQzB-0000ak-7j; Thu, 07 Oct 2021 10:50:49 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 203456.358583; Thu, 07 Oct 2021 10:50:49 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mYQzB-0000ad-4p; Thu, 07 Oct 2021 10:50:49 +0000 Received: by outflank-mailman (input) for mailman id 203456; Thu, 07 Oct 2021 10:50:47 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mYQz9-0000aX-Se for xen-devel@lists.xenproject.org; Thu, 07 Oct 2021 10:50:47 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mYQz9-00010g-QC for xen-devel@lists.xenproject.org; Thu, 07 Oct 2021 10:50:47 +0000 Received: from iwj (helo=mariner.uk.xensource.com) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1mYQz9-0003Qj-Oz for xen-devel@lists.xenproject.org; Thu, 07 Oct 2021 10:50:47 +0000 Received: from iwj by mariner.uk.xensource.com with local (Exim 4.89) (envelope-from ) id 1mYQz4-00068u-Lc; Thu, 07 Oct 2021 11:50:42 +0100 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xenproject.org; s=20200302mail; h=References:In-Reply-To:Subject:Cc:To:Date :Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:From; bh=tFXPgezor6tDmD5bxbcEDp//+SfGGKXicdAcPMZYa4Y=; b=OqhkEEVVImmzvC/vtReDaLZVt7 CtnQHX/zNnL5xF39MSddpxLb+9o3ixYYHJbPnQiE6pLJ9PIlhwax4ElRn9Ii0DGYYcyIQ7xVzcbjQ XdjalAQ50rum+tW/I/EozQRM6WIARTDvrWKTpncT80kWe1N9ls6al4mECCjXLtpzd4zM=; From: Ian Jackson MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-16 Content-Transfer-Encoding: 8bit Message-ID: <24926.53506.270924.8163@mariner.uk.xensource.com> Date: Thu, 7 Oct 2021 11:50:42 +0100 To: Rahul Singh Cc: Stefano Stabellini , xen-devel , Bertrand Marquis , Andre Przywara , Wei Liu , Anthony PERARD , Juergen Gross , Julien Grall , Volodymyr Babchuk Subject: Re: [PATCH v4 13/14] arm/libxl: Emulated PCI device tree node in libxl In-Reply-To: <5ADA6C46-A69D-459F-868C-DA579FEC36E2@arm.com> References: <3ad42008f534671ae7f5b25da91253ce7cd4a3e9.1633340795.git.rahul.singh@arm.com> <11F169C6-39A4-40F3-8E75-39B8C2CCF022@arm.com> <8B848F95-977F-4DF4-B315-CFEA610BC1C3@arm.com> <24925.33634.554859.2131@mariner.uk.xensource.com> <24925.35194.369692.94259@mariner.uk.xensource.com> <5ADA6C46-A69D-459F-868C-DA579FEC36E2@arm.com> X-Mailer: VM 8.2.0b under 24.5.1 (i686-pc-linux-gnu) Rahul Singh writes ("Re: [PATCH v4 13/14] arm/libxl: Emulated PCI device tree node in libxl"): > On 6 Oct 2021, at 12:33 pm, Ian Jackson wrote: > > We try > > to make the libxl API "do the right thing" by default. In this case I > > think that means to enable VPCI (i) on platforms where it's available > > (ii) if the guest has PCI passthrough devices. Is that right ? > > Yes you are right VPCI will be enabled for guest when guest has PCI passthrough device > assigned and VPCI support is available. > > > > Sorry to ask these question now, and please forgive my ignorance: > > > > Is VPCI inherently an ARM-specific ABI or protocol ? > > As of now VPCI for DOMU guests is only implemented for ARM. I'm sorry. It appears that the thrust of my questions wasn't sufficiently clear. Your replies about details are fine but they don't seem to address my underlying concerns. "as of now ... only implemented for ARM" suggests to me that it is VPCI *not* inherently ARM-specific. Ie, it is a thing that x86 (or riscv or whatever) might support in future. Is that right ? How does VPCI fit into the whole system architecture ? Is it *required* for PCI passthrough on ARM ? If not, what happens if it is not enabled ? If VPCI *is* ARM-specific, how do x86 systems (say) achieve the goals met on ARM by VPCI ? On the other hand if VPCI is not inherently ARM-specific it should not be in the ARM part of the libxl IDL. > > When might an > > admin want to turn it on explicitly ? > > It will be enabled dynamically when admin assign any PCI device to guest. What about hotplug ? > > How does this all relate to the (non-arch-specific) "passthrough" > > option ? > > VPCI will be enabled only when there is any PCI device assigned to > guest therefore I used "d_config->num_pcidevsµ to enable VPCI. The purpose of the "passthrough" option is to allow the guest admin to specify that a guest is expected to gain hotplugged PCI devices in future. That way, domain features that are required for PCI passthrough are automatically enabled. Perhaps this isn't explained clearly enough in the documentation, which talks about iommu mappings. Does PCI passthrugh work on ARM without VPCI ? I think it likely that VPCI should be controlled (or at least, its default set) from the "passthrough" option. But I don't understand enough of the relationship between the pieces. Ian.