From mboxrd@z Thu Jan 1 00:00:00 1970 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 06402C433F5 for ; Fri, 15 Oct 2021 12:11:03 +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 B7D186044F for ; Fri, 15 Oct 2021 12:11:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B7D186044F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.210409.367264 (Exim 4.92) (envelope-from ) id 1mbM32-0001BL-GQ; Fri, 15 Oct 2021 12:10:52 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 210409.367264; Fri, 15 Oct 2021 12:10:52 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mbM32-0001BB-DH; Fri, 15 Oct 2021 12:10:52 +0000 Received: by outflank-mailman (input) for mailman id 210409; Fri, 15 Oct 2021 12:10:51 +0000 Received: from mail.xenproject.org ([104.130.215.37]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mbM31-0001B5-Mz for xen-devel@lists.xenproject.org; Fri, 15 Oct 2021 12:10:51 +0000 Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mbM30-0003WH-LQ; Fri, 15 Oct 2021 12:10:50 +0000 Received: from [54.239.6.185] (helo=[192.168.0.140]) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mbM30-00066f-Dq; Fri, 15 Oct 2021 12:10:50 +0000 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=xen.org; s=20200302mail; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID; bh=0PzjHvVT+CyGzsKALkPCHgKjzCUIXN2rCoEKeF27DOQ=; b=zOdJLxESdJYn9Q0Heq3AEeJ0ie pC76lk6lbtGD/g1+AfQFBn80tZ6WsKNzoTMHBKXtQc84iUNfL8d/huRoOHScC8fcZPJ6zyDmupDxn c/XkQ9QKinjAouZQiEV3SDvuNy8tn5dld5fDryG80X3SU4jVb7v2oCZ8heUtRZIsVlIA=; Message-ID: <76897e97-8f44-d1c5-f108-045ea48442e5@xen.org> Date: Fri, 15 Oct 2021 13:10:47 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages] To: Michal Orzel , Ian Jackson Cc: Bertrand Marquis , xen-devel@lists.xenproject.org, Rahul Singh , Wei Liu , Anthony PERARD , Juergen Gross , Stefano Stabellini , Volodymyr Babchuk , Andre Przywara References: <7bdac405-a889-15e1-be19-5876f7253855@xen.org> <24926.53690.621007.507249@mariner.uk.xensource.com> <294BE20A-7E45-405C-BC19-C292295E85E3@arm.com> <24927.7235.736221.270358@mariner.uk.xensource.com> <8A04B9B2-E816-425E-BF1B-5A8B89F8836C@arm.com> <24936.28385.679884.535704@mariner.uk.xensource.com> <6f82141c-8a0b-1e30-a996-223f7c0c508d@xen.org> <24937.20922.73382.850023@mariner.uk.xensource.com> <56490119-6040-9ab1-aab7-e43975cbb80d@arm.com> <24937.27149.222087.933297@mariner.uk.xensource.com> <6e29d836-918c-3b15-7608-342b2e4f8475@arm.com> From: Julien Grall In-Reply-To: <6e29d836-918c-3b15-7608-342b2e4f8475@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Michal, On 15/10/2021 12:53, Michal Orzel wrote: > > > On 15.10.2021 13:46, Ian Jackson wrote: >> Michal Orzel writes ("Re: [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages]"): >>> On 15.10.2021 12:02, Ian Jackson wrote: >>>> Can you leave a comment somewhere (near where c_info.passthrough is >>>> set) pointing to this use of num_pcidevs ? That might save someone >>>> some future confusion. >>> >>> Here, c_info->passthrough is set to enabled if either d_config->num_pcidevs or >>> d_config->num_dtdevs is set. Do you think we need to add there additional comment? >>> If so can you please help with what should I write there? >>> >>> BTW. None of the patch I'm preparing with regards to this discussion modifies libxl_create >>> where c_info.passthrough i set. Do you still want me to add some comment there? >> >> Yes, I think so. I won't insisting on it if you feel it doesn't make >> sense. >> >> Maybe something like >> >> // NB, on ARM, libxl__arch_blah directly examines num_pcidevs to >> // decide whether to enable vpci, rather than using c_info->passthrough. >> // This will be insufficient if and when ARM does PCI hotplug. >> > Well we are not enabling vpci. We are creating a DT node for it. > So either I will write: > /* > * Note: libxl_arm directly examines num_pcidevs to decide whether > * to create a vPCI DT node, rather than using c_info->passthrough. > * This will be insufficient if and when ARM does PCI hotplug. > */ > > or I will not add any comment (it can be add in the future when "enabling" vpci). > @Julien? I would prefer if we had a comment. Your proposal makes more sense as we only create the DT. Long term, I would expect a similar check to be necessary to set the vCPI flag at the domain creation. So it would be best to introduce an internal field 'vpci' to avoid duplicating that check. (Note I am not requesting this change for Xen 4.16). Cheers, -- Julien Grall