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 1872FC433F5 for ; Wed, 6 Oct 2021 11:33:36 +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 D003561151 for ; Wed, 6 Oct 2021 11:33:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D003561151 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.202851.357877 (Exim 4.92) (envelope-from ) id 1mY5Am-00058j-IN; Wed, 06 Oct 2021 11:33:20 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 202851.357877; Wed, 06 Oct 2021 11:33:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mY5Am-00058c-DY; Wed, 06 Oct 2021 11:33:20 +0000 Received: by outflank-mailman (input) for mailman id 202851; Wed, 06 Oct 2021 11:33:19 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mY5Al-00058W-Gs for xen-devel@lists.xenproject.org; Wed, 06 Oct 2021 11:33:19 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mY5Al-0002AJ-FP for xen-devel@lists.xenproject.org; Wed, 06 Oct 2021 11:33:19 +0000 Received: from iwj (helo=mariner.uk.xensource.com) by xenbits.xenproject.org with local-bsmtp (Exim 4.92) (envelope-from ) id 1mY5Al-0001eQ-EY for xen-devel@lists.xenproject.org; Wed, 06 Oct 2021 11:33:19 +0000 Received: from iwj by mariner.uk.xensource.com with local (Exim 4.89) (envelope-from ) id 1mY5Ag-0003Gx-MT; Wed, 06 Oct 2021 12:33:14 +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=VpVaj3h60dMQC3FdBiyqTjlopXEX9ICvPgSoVwczmxM=; b=4MgZAkPRoFsmvCH2h/f1DBGySo pHuLkLO7NHyfUrNPuf/DAyyAXAUJ3R+9div5xNuzBT2q1D06l3SdfrwIH6H3wFzNCnnUtNA12/tvq /q4gGwAVZMQ8j904H6uEFl0ejZwwXvBexQKpYm/JzaWJQIT1iDVELlo/fQPY2NhlesiY=; From: Ian Jackson MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-16 Content-Transfer-Encoding: 8bit Message-ID: <24925.35194.369692.94259@mariner.uk.xensource.com> Date: Wed, 6 Oct 2021 12:33:14 +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: 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> 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"): > Hi Ian > > What is wrong with putting it in > > libxl__arch_domain_build_info_setdefault > > which I think exists precisely for this kind of thing ? > > As we have to set the arch_arm.vpci to false for x86 and ARM I > thought it is right to move the code to common code to avoid > duplication. > > Are you suggesting to put " > libxl_defbool_setdefault(&b_info->arch_arm.vpci, false)µin > libxl__arch_domain_build_info_setdefault() for x86 and ARM > differently. I've gone back and reread the whole thread, which I probably should have done to start with.... So: > >> #if defined(__arm__) || defined(__aarch64__) > >> /* > >> * Enable VPCI support for ARM. VPCI support for DOMU guests is not > >> * supported for x86. > >> */ > >> if (d_config->num_pcidevs) > >> libxl_defbool_set(&b_info->arch_arm.vpci, true); > >> #endif I think this logic probably ought to be in libxl, not in xl. 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 ? Sorry to ask these question now, and please forgive my ignorance: Is VPCI inherently an ARM-specific ABI or protocol ? When might an admin want to turn it on explicitly ? How does this all relate to the (non-arch-specific) "passthrough" option ? Ian.