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 B095FC433FE for ; Fri, 8 Oct 2021 21:46:31 +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 7C26860FE3 for ; Fri, 8 Oct 2021 21:46:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7C26860FE3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.204889.360079 (Exim 4.92) (envelope-from ) id 1mYxh9-0001UK-BG; Fri, 08 Oct 2021 21:46:23 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 204889.360079; Fri, 08 Oct 2021 21:46:23 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mYxh9-0001UD-88; Fri, 08 Oct 2021 21:46:23 +0000 Received: by outflank-mailman (input) for mailman id 204889; Fri, 08 Oct 2021 21:46:22 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mYxh8-0001U7-7q for xen-devel@lists.xenproject.org; Fri, 08 Oct 2021 21:46:22 +0000 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id ba2c7331-fc69-4a0f-82cb-31e9bdb17cf1; Fri, 08 Oct 2021 21:46:21 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 507B260FE3; Fri, 8 Oct 2021 21:46:20 +0000 (UTC) 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: ba2c7331-fc69-4a0f-82cb-31e9bdb17cf1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1633729580; bh=GdXDD10ZUr070vfQaw5xvKCe/blUKcPOEf3h8T0oBuo=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=eOCq8letN40zgYkImhSytRrgqcsyHkYv9bgjWahmQ1Ph6E+mqRATbcts06OfLo/z/ 5iIOTDZkMOpI1LfHoBirlCtqWdfFyEHdAZ1cyFjYJWIF0YFIW3/imq8epOvKn78dnH /6vC5fCphvNX/Sb+MBVbXudaJaqdHsu8F7OJbtalFim9YwtEkhzdwnwSIBtB0X6wec B6HZl4Zz0y3VBytZ8se/J7XoqtNhcxHVsv0CgVVl/zdbjHCnRgUp2AdClMhzdY48Aj SZ+I7uHq9ncd9hragPPSgxYbeHv0vKufQYhQLFlJr2kjeMe5NEvx3Le8Aa80gcvizi dC0MyaSYffQdQ== Date: Fri, 8 Oct 2021 14:46:14 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-T480s To: Julien Grall cc: Andrew Cooper , Rahul Singh , xen-devel , Bertrand Marquis , Andre Przywara , Christian Lindig , David Scott , Ian Jackson , Wei Liu , George Dunlap , Jan Beulich , Stefano Stabellini , Volodymyr Babchuk , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Subject: Re: [PATCH v5 07/11] xen/domctl: Introduce XEN_DOMCTL_CDF_vpci flag In-Reply-To: Message-ID: References: <20d5b9d6a0d01a7b90711d28cbefb5701a88b438.1633540842.git.rahul.singh@arm.com> <548fa153-b2e3-7f91-c7c9-a569e13b5809@citrix.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-2142132412-1633729349=:25528" Content-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-2142132412-1633729349=:25528 Content-Type: text/plain; CHARSET=UTF-8 Content-Transfer-Encoding: 8BIT Content-ID: On Fri, 8 Oct 2021, Julien Grall wrote: > Hi Andrew, > > On Fri, 8 Oct 2021, 20:07 Andrew Cooper, wrote: > On 06/10/2021 18:40, 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. > > > > Signed-off-by: Rahul Singh > > Reviewed-by: Stefano Stabellini > > Acked-by: Christian Lindig > > I'm afraid this logic is broken. > > There's no matching feature to indicate to the toolstack whether > XEN_DOMCTL_CDF_vpci will be accepted or not.  The usual way of doing > this is with a physinfo_cap field. > > > I am slightly puzzled by this. I am assuming you are referring to XENVER_get_features which AFAICT is a stable interface. So why should we > use it to describe the presence of an unstable interface? > > > This flag needs using in Patch 10 to reject attempts to create a VM with > devices when passthrough support is unavailable. > > > May I ask why we can't rely on the hypervisor to reject the flag when suitable? > > > Ian, for the 4.16 release, this series either needs completing with the > additional flag implemented, or this patch needs reverting to avoid us > shipping a broken interface. > > > I fail to see how the interface would be broken... Would you mind to describe a bit more what could go wrong with this interface? After chatting with Andrew on IRC, this is my understanding. Today if pci=[] is specified in the VM config file then XEN_DOMCTL_CDF_vpci is added. If Xen doesn't support it, Xen returns an error but libxl/xl won't be able to tell exactly why it fails. So xl will end up printing a generic VM creation failure. Andrew would like to see something like the following in libxl: if ( PCI_devices && !cap.vcpi ) error("Sorry - PCI not supported") So that the user gets a clear informative error back rather than a generic VM creation failure. Also, this is a requirement for the stable hypercall interface. I think that's fine and we can implement this request easily by adding XEN_SYSCTL_PHYSCAP_vpci. Rahul or Bertrand, are you guys happy with doing that? Otherwise I could take it on. As a side note, given that PCI passthrough support is actually not yet complete on ARM, we could even just do the following in xl/libxl: if ( PCI_devices ) error("Sorry - PCI not supported") or temporarily remove XEN_DOMCTL_CDF_vpci until PCI passthrough gets finalized. --8323329-2142132412-1633729349=:25528--