[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: Michal Orzel <michal.orzel@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 11 Oct 2021 13:35:18 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=pCklJSUC56Ik8KCpGdECY9v5W0ppVbf9FfW0FeP/AQ4=; b=J8FquphSZg5L+ODVzJj1EFedUTIn5KS3bIUoZpUydan+bcGno0ZZlRtPgIVeXZm97yYSxLy8TQ5L0HKswBktZGrsIouelyAnZFrnrpQ4vIRzrHRpxuq59BgozBTNI7vQlYkkgHhOWWBgbd+bMrHha1nRp+wn9qajLPgZlMTec+6IlQMWB2+x1dRxw6rTJb3nX5socnLs61RH3emxVew4ol515ekcjLfzBtrV+HeGrkXJW9+iq//78OTo1O4tYhT7Aob9ZzRfrRRqWpjmjcSXJHfX0ELs3X2VAE429w1ohDfMnRrNa8bMqiamYbW8JHlrQ6b+2/XYBYdFyHh3aDkYEA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mb7Ro0R2F28bcKFKq9g+CeWrqWJB2nd8GCIZQiqRmfU9Tf/89abxrVg2scL97wSJv6Ypmh1b8MiFpG5/YkTYv7v9rxmLmhFVi42tcg3WtRhB8wR4ibZjBI+DQtvADVqNNz788+tB1hnlvSTmWntnHLb7yaOhxMX87SRxSJIP9+3hz+I7oSsEOkNc8gF9o/ZZSXphq4Fb2qJGF7rf7xq6Bz9JKNvjC0pOcCSiKccsoWFsapP1ikksZF6todYcZRX4hx0lAhirPIBdL/LlZxHePvEae8ocCYoiX94xpyQAY+Dkyb8TuxyRKUuPw8i7kR365u8aZsQ0cZhA0DkeGqtt2w==
  • Authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=suse.com;
  • Cc: 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 11:35:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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?

Jan




 


Rackspace

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