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

Re: [Xen-devel] [XEN PATCH for-4.13 2/3] libxl: libxl__spawn_stub_dm: Call domain_config_setdefault



On Mon, Oct 28, 2019 at 03:29:47PM +0000, Ian Jackson wrote:
> Previously, defaulting and checking of some aspects of the domain
> config was skipped for stub dms.  This has been the case forever.
> 
> In ad011ad08843 "libxl/xl: Overhaul passthrough setting logic" some
> defaulting that was needed for stub dms was moved from
> libxl__domain_create_info_setdefault to .._config_setdefault with the
> result that for stub dms, libxl__domain_make fails with this
> assertion:
>   xl: libxl_create.c:582: libxl__domain_make: Assertion
>   `info->passthrough != LIBXL_PASSTHROUGH_DEFAULT' failed.
> 
> Fix this by properly doing all defaulting and all checking for stub
> dms.  This is more correct, but (especially at this stage of the
> release) it is necessary to more closely evaluate the effects by
> reviewing the body of _config_setdefault.  The changes are as follows:
> 
> One actual functional change:
> 
> * The new passthrough defaulting is properly done.  This is what we
>   are trying to actually fix here.
> 
> And a lot of things that make no difference:
> 
> * shadow_memkb would now be set.  Whether this would be correct is not
>   entirely clear.  It seems better to make this patch (whose purpose
>   is to fix the passthrough defaulting) *not* include that semantic
>   change, so here I have included a hunk to explicitly override this.
> 
> * FLASK ssid_label is processed.  But the actual ssidref is copied
>   from the guest domain by spawn_stub_dm, and ssid_label is set to
>   NULL.  So no change.
> 
> * We set iommu_memkb.  But to 0 since passthrough is disabled.
> 
> * cpuid pool_name is processed.  But this is not set by
>   spawn_stub_dm.  (Arguably this is a bug: stub dms should inherit the
>   parent cpupool.)  The effect is to leave poolid set to 0 and call
>   libxl_cpupoolid_is_valid but that always succeeds for 0.  So no
>   change.
> 
> * Various extra checks are done: reject PCI passthrough for HVM with
>   POD (stub dm is PV); reject pod + vnuma, or PV + vnuma (stub dm has
>   no vnuma); reject nested HVM or pod, with alt2pm-hvm (again, stub dm
>   is PV).  So these checks will always pass.
> 
> Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> CC: Juergen Gross <jgross@xxxxxxxx>

Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Thanks,

-- 
Anthony PERARD

_______________________________________________
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®.