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

Re: [Xen-devel] [XEN PATCH for-4.13 v3 05/10] libxl: Move shadow_memkb and iommu_memkb defaulting into libxl



On Fri, Oct 11, 2019 at 05:55:44PM +0100, Ian Jackson wrote:
> For callers which call libxl_domain_need_memory, and request an old
> pre-4.13 libxl API, and which leave one of these memkb settings unset,
> we take special measures to preserve the old behaviour.
> 
> This means that they don't get the additional iommu memory and are at
> risk of the domain running out of memory as a result of f89f555827a6
> "remove late (on-demand) construction of IOMMU page tables".  But this
> is no worse than the state just after f89f555827a6, which already
> broke such callers in that way.  This is perhaps justifiable because
> of the API stability warning next to libxl_domain_need_memory.

There's probably something else that is needed to be done for user of
the pre-4.13 API. If they call libxl_domain_need_memory_0x041200, there
is nothing that set iommu_memkb, so the default value stays at -1 and
libxl_domain_need_memory_0x041200 returns a value that is lower that
"target_memkb + shadow_memkb". Then, when libxl create the domain, it
still keep iommu_memkb==-1, because the old API as been used.

I tried to have xl call the 4.12 API and create a guest without
passthrough, and QEMU crashed (assert() failure).

So maybe libxl__domain_build_info_setdefault() should also set a value
to iommu_memkb as it does for shadow_memkb? At least, set iommu_memkb=0
if still the default.

iommu_memkb is new in 4.13, user of the pre-4.13 API will not set it.

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