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 C7D6CC433EF for ; Wed, 13 Oct 2021 07:11:56 +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 98C1360E78 for ; Wed, 13 Oct 2021 07:11:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 98C1360E78 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.207959.363958 (Exim 4.92) (envelope-from ) id 1maYQW-0002f3-C9; Wed, 13 Oct 2021 07:11:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 207959.363958; Wed, 13 Oct 2021 07:11:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1maYQW-0002ew-8p; Wed, 13 Oct 2021 07:11:48 +0000 Received: by outflank-mailman (input) for mailman id 207959; Wed, 13 Oct 2021 07:11:47 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1maYQV-0002dg-M9 for xen-devel@lists.xenproject.org; Wed, 13 Oct 2021 07:11:47 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-rack-iad1.inumbo.com (Halon) with ESMTP id 1f347d01-5b27-4c4a-85a5-76ba11e5a374; Wed, 13 Oct 2021 07:11:45 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 53F131FB; Wed, 13 Oct 2021 00:11:45 -0700 (PDT) Received: from [10.57.25.166] (unknown [10.57.25.166]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C8E173F66F; Wed, 13 Oct 2021 00:11:42 -0700 (PDT) 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" X-Inumbo-ID: 1f347d01-5b27-4c4a-85a5-76ba11e5a374 Subject: Re: [PATCH v5 07/11] xen/domctl: Introduce XEN_DOMCTL_CDF_vpci flag To: Jan Beulich , Stefano Stabellini Cc: Rahul Singh , xen-devel@lists.xenproject.org, bertrand.marquis@arm.com, Andre.Przywara@arm.com, Christian Lindig , David Scott , Ian Jackson , Wei Liu , Andrew Cooper , George Dunlap , Julien Grall , Volodymyr Babchuk , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= References: <20d5b9d6a0d01a7b90711d28cbefb5701a88b438.1633540842.git.rahul.singh@arm.com> <44eae5c0-28a0-590a-07c6-6b411b23ebc3@suse.com> From: Michal Orzel Message-ID: <70fa9c08-4a5d-323a-a629-6471aeb76797@arm.com> Date: Wed, 13 Oct 2021 09:11:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <44eae5c0-28a0-590a-07c6-6b411b23ebc3@suse.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 13.10.2021 08:18, Jan Beulich wrote: > On 12.10.2021 23:48, Stefano Stabellini wrote: >> On Mon, 11 Oct 2021, Roger Pau Monné wrote: >>> On Wed, Oct 06, 2021 at 06:40:33PM +0100, Rahul Singh wrote: >>>> Introduce XEN_DOMCTL_CDF_vpci flag to enable VPCI support in XEN. >>>> Reject the use of this new flag for x86 as VPCI is not supported for >>>> DOMU guests for x86. >>> >>> I don't like this approach, XEN_DOMCTL_CDF_vpci should be set for x86 >>> PVH dom0, like we do for any other CDF flags when Xen builds dom0. >>> >>> Things like PVH vs PV get translated into CDF flags by create_dom0, >>> and processed normally by the sanitise_domain_config logic, vPCI >>> should be handled that way. >>> >>> Do you think you could see about fixing this? >> >> Andrew suggested to use XEN_SYSCTL_PHYSCAP_vpci to check whether we can >> set XEN_DOMCTL_CDF_vpci in libxl and it looks like we have consensus on >> this approach. [1][2] >> >> So it makes sense that XEN_DOMCTL_CDF_vpci is only set when >> XEN_SYSCTL_PHYSCAP_vpci is also set, i.e. XEN_SYSCTL_PHYSCAP_vpci == >> XEN_DOMCTL_CDF_vpci. >> >> From [2], XEN_SYSCTL_PHYSCAP_vpci is not going to be set on x86, so then >> XEN_DOMCTL_CDF_vpci should also be left unset? >> >> If you think XEN_DOMCTL_CDF_vpci should be set for x86 PVH Dom0, then >> XEN_SYSCTL_PHYSCAP_vpci should also be set for x86 PVH Dom0. > > Except that XEN_SYSCTL_PHYSCAP_vpci is not a domain specific attribute, > but a host-wide one. > > Jan > > I already prepared a patch introducing XEN_SYSCTL_PHYSCAP_vpci. We agreed that the cap_vpci should not be set neither for x86 nor ARM. This means that the flag vpci_is_available, which tells us about vPCI platform support (and is used in condition to set cap_vpci) is set to false by default. Later on it should be set by vPCI driver. For me it does not make sense for XEN_SYSCTL_PHYSCAP_vpci saying that platform does not support vPCI but setting XEN_DOMCTL_CDF_vpci for dom0 pvh. I would prefer not setting XEN_DOMCTL_CDF_vpci for now at all. This way we have a chance to merge Rahul's series until friday. Cheers, Michal