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

Re: [Xen-devel] [PATCH-for-4.13] libxl: choose an appropriate default for passthrough...


  • To: Ian Jackson <Ian.Jackson@xxxxxxxxxx>
  • From: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
  • Date: Tue, 1 Oct 2019 10:46:30 +0000
  • Accept-language: en-GB, en-US
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=Paul.Durrant@xxxxxxxxxx; spf=Pass smtp.mailfrom=Paul.Durrant@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 01 Oct 2019 10:46:40 +0000
  • Ironport-sdr: k90wuUzJWHuZVj8QoPcyviSebjsygF0FgtoyiFN0VAYgQP3yVsbQdjZg8PYcwqRh0emoLa3GeC YqeJ+ELOZXNRCRRvuljfhHr0uebpOMBIYJAEidlp/JjB8M1a+LQgorcE/jp2lhOHBca66XVERr qdFUYpdnxZtBde7pUCfDDOSKDhUXrSkfr5sVClG31OR6lcT1dDL0gJuGBvPwfG3eMRQapz0u0I XzjEGc1nN74UOPUriFQz4xYGQ/BZ2pXrwoU/n9+/D05yMHcqxGheF1MQ9Y+G5VaVU149cainp1 C8I=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVeDhTgL3pyHrnK0i7HT0UlmCZiKdFdvSAgAAiG/A=
  • Thread-topic: [PATCH-for-4.13] libxl: choose an appropriate default for passthrough...

> -----Original Message-----
> From: Ian Jackson <ian.jackson@xxxxxxxxxx>
> Sent: 01 October 2019 11:39
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; Wei Liu <wl@xxxxxxx>; Anthony Perard 
> <anthony.perard@xxxxxxxxxx>;
> Juergen Gross <jgross@xxxxxxxx>
> Subject: Re: [PATCH-for-4.13] libxl: choose an appropriate default for 
> passthrough...
> 
> Paul Durrant writes ("[PATCH-for-4.13] libxl: choose an appropriate default 
> for passthrough..."):
> > ...if there is no IOMMU or it is globally disabled.
> >
> > Without this patch, the following assertion may be hit:
> >
> > xl: libxl_create.c:589: libxl__domain_make: Assertion `info->passthrough !=
> LIBXL_PASSTHROUGH_ENABLED' failed.
> >
> > This is because libxl__domain_create_info_setdefault() currently only sets
> > an appropriate value for 'passthrough' in the case that 'cap_hvm_directio'
> > is true, which is not the case unless an IOMMU is present and enabled in
> > the system. This is normally masked by xl choosing a default value, but
> > that will not happen if xl is not used (e.g. when using libvirt) or when
> > a stub domain is being created.
> 
> It's weird that after this patch "enabled" can mean DISABLED. Surely
> if you say `passthrough="enabled"' and the host has no PT support (eg
> it's disabled in the bios) it should fail ?

Indeed, and xl will do exactly that. 

> 
> Normally libxl config options have an "unknown" or "default" option.
> 
> Also it is anomalous that xl is doing the complex work of choosing a
> default.  I think all the complex code
> 
> +    switch (c_info->passthrough) {
> +    case LIBXL_PASSTHROUGH_ENABLED:
> 
> in xl_parse.c should be in libxl.  (Some of it is there already.)
> 
> I'm sorry that I wasn't didn't review babde47a3fed...
> 

So, would you advocate an 'unknown' value then? That's essentially just a 
rename operation on 'enabled'.

The code in xl_parse.c is there for a reason though; the appropriate amount of 
extra memory for the IOMMU page tables has to be determined there because the 
'build' parts of libxl seem to be largely firewalled from the 'create' parts 
and thus the relevant information is not available to decide the appropriate 
overhead.

  Paul

> Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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