[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 07/11] xen/domctl: Introduce XEN_DOMCTL_CDF_vpci flag


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 11 Oct 2021 15:17:09 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=n4IVm4e8aLEZT8pfyEP1KCLbduIfA272QU6Jxh4+OZk=; b=Z6IKhor3lG3RWtZ6lwsXIoJjm0VxOQ6o7KnjAhxQEZZDQTFi4E5jJncjNeONCBXIHoHGemfIJLMcbMEWMuk3MEjy39SgZmRgY8Tk5PHCLiOQ2HoNNPE1lj7aqtEiRLXOyp45MnpYc6wXJIeic2XDwrTclwY3bPwEnN2mXZPxEODd+BwvWtYTuKY04an+mNxk/AZwe5syw43Xgj5WFdO8uN58wmZRqtL+8l9WzraGq9/ODrYlEfjhlwLKIcD1UEfxbfErOlNJ9lb1guFVOBTwEA4J52XahU0O4ep77PGB4/ZZZiI2QJvmQmJijXt5tDIcmp2Tps0eVAiY7SZjKOdPjg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mn6G1J8AJEi3ixvxxfzbXjlh6nS7O6OAvjeymku4YXS8celTJu+0i2CZkfnDHOuOUjLhfj/rPEC04g4BxcNzhX2xj1DVodsMsrYNMNNzDK+JDLxsF6Wyi+vl4TuWDg7r9DfJL++VbKsazMHaT/U0JMEO2o63r8kpSYosYlYM46QgbDRY53TL3RQ4taixqn2Iis27DZv+0uY5U6NvPzvbYPzNbOX+Soccrqit4fpEcxrOUgdve4w2sCpjgPlcqDu49PAdSASJw4JcFeGsb3CDOAuM37GgOnJmkXDQoP8hkSJYJybWETb9pSMn8U87TiXAHXjrDRxk3w0YglgyYSD+jg==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Michal Orzel <michal.orzel@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Rahul Singh <rahul.singh@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Andre Przywara <Andre.Przywara@xxxxxxx>, Christian Lindig <christian.lindig@xxxxxxxxxx>, David Scott <dave@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Julien Grall <julien.grall.oss@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Mon, 11 Oct 2021 13:17:34 +0000
  • Ironport-data: A9a23:BqK/Va9yVhiXEGoRmbXvDrUDtXiTJUtcMsCJ2f8bNWPcYEJGY0x3m GRLDz3TOv+JZzH9f9EgO9yyoUNS68fdzoUwHQRlrC88E34SpcT7XtnIdU2Y0wF+jyHgoOCLy +1EN7Es+ehtFie0Si9AttENlFEkvU2ybuOU5NXsZ2YhGGeIdA970Ug6wrZg29Yx6TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPhx5 4hSlN+rFj0nHf3UiuEFYwUAOAZhaPguFL/veRBTsOSWxkzCNXDt3+9vHAc9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kTtAbRleyHU0c5Kv6xL57lYpQrpB R7fpogEYe2EaJH/DVocBAs5deDfh/sarSbfsKYuK0Lg6S4poLfeCRdOPwOBgTB2JaduNN932 v8ovcMbslTtihcjPtucoDpT8mCAci4JX6k978lIC473kAs7jFpFZMWEWCPx5ZiObfRKM1Urf WDI1PaT2ewEyxObIXQpFHXL0e5Mvrg0uUhHnA0YOlCEutvZnftrjhdfxis6E1ZOxRJd3uMtZ mUybx9pJb+D9itDjdRYWzz+ABlIARCU9xCjy1YNk2GFHUCkWnaUcT84MOeJuksY73hdbn5Q+ 7TBkDTpVjPjfcfQ2CouWBE696y/HIIprgCSytq6G8mlHoUhZWu3i6CjUmMEth/7DJ5jn0bAv +RroL59ZKCT2fT8eEHn5112DYgtdS0=
  • Ironport-hdrordr: A9a23:XodFUKpc1GrR5gPp7kD2rzoaV5oveYIsimQD101hICG9Ffbo8P xG/c5rsSMc7Qx7ZJhOo7y90cW7Lk80lqQU3WByB9mftWDd0QPDQb2KhrGC/xTQXwH46+5Bxe NBXsFFebjN5IFB/KXHCd+DYrQd/OU=
  • Ironport-sdr: QZViAazBXSKjy4f+DxiY6ZamcCNS4RiPB3sq5/3NejHpS6bQhDwxzQ7SuZJv6zF+RaXx/UC9ZG cLuvS/E/iCZPUX4jiAvpVpidTbwkx4GQjyL+U0Rn7rSsyjrhHInb14HvRK+D8l2ojPUqp5Wvni tvki9X5dgsfNd4I8rLO1cuksLzqY2Vt1y+yxgmwWPy3HWUJEcm4ZKBXbx4PuQuETu9gVz3bKNd OfrqcL9xPqFmCy777NYvHwPmS+WTYPk5wxmqL3ChDiQOEUMFj0ViYnTCFlcahgvo7bTzWrdSAj mlEVdgJKAp5QPdFRTGt/1ngl
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Mon, Oct 11, 2021 at 01:35:18PM +0200, Jan Beulich wrote:
> On 11.10.2021 13:29, Michal Orzel wrote:
> > On 08.10.2021 23:46, Stefano Stabellini wrote:
> >> On Fri, 8 Oct 2021, Julien Grall wrote:
> >>> On Fri, 8 Oct 2021, 20:07 Andrew Cooper, <andrew.cooper3@xxxxxxxxxx> 
> >>> 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 <rahul.singh@xxxxxxx>
> >>>       > Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> >>>       > Acked-by: Christian Lindig <christian.lindig@xxxxxxxxxx>
> >>>
> >>>       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.
> >>
> > As Rahul is on leave:
> > I'm ok to introduce XEN_SYSCTL_PHYSCAP_vpci. I did the same for vpmu so 
> > it's ok.
> > However the problem I have is about setting this cap.
> > On arm it is easy as we are not supporting vpci at the moment so the cap 
> > can be set to false.
> > But how to deal with this cap in x86 code? I'm not familiar with x86 so I'm 
> > asking for advice.
> 
> As the sysctl is mainly from tool stacks to drive guests (DomU-s), I'd
> set it to false for x86 as well. Roger - do you see any reason this
> could be needed to express anything Dom0-related?

I agree, I don't think we should set it to true unless we also support
vPCI for domUs on x86, or else it's just going to confuse the
toolstack.

Thanks, Roger.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.