[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v8 4/6] remove late (on-demand) construction of IOMMU page tables
Hi, On 9/2/19 3:50 PM, Paul Durrant wrote: diff --git a/tools/libxl/libxl_mem.c b/tools/libxl/libxl_mem.c index 448a2af8fd..fd6f33312e 100644 --- a/tools/libxl/libxl_mem.c +++ b/tools/libxl/libxl_mem.c @@ -461,15 +461,17 @@ int libxl_domain_need_memory(libxl_ctx *ctx, if (rc) goto out;*need_memkb = b_info->target_memkb;+ *need_memkb += b_info->shadow_memkb + b_info->iommu_memkb; AFAICT, iommu_memkb will be non-0 even when the IOMMU share the page-table with the CPUs. If so, why is this required for that case? + switch (b_info->type) { case LIBXL_DOMAIN_TYPE_PVH: case LIBXL_DOMAIN_TYPE_HVM: - *need_memkb += b_info->shadow_memkb + LIBXL_HVM_EXTRA_MEMORY; + *need_memkb += LIBXL_HVM_EXTRA_MEMORY; if (libxl_defbool_val(b_info->device_model_stubdomain)) *need_memkb += 32 * 1024; break; case LIBXL_DOMAIN_TYPE_PV: - *need_memkb += b_info->shadow_memkb + LIBXL_PV_EXTRA_MEMORY; + *need_memkb += LIBXL_PV_EXTRA_MEMORY; break; default: rc = ERROR_INVAL; diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index b61399ce36..d94b7453cb 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -486,6 +486,7 @@ libxl_domain_build_info = Struct("domain_build_info",[ ("target_memkb", MemKB), ("video_memkb", MemKB), ("shadow_memkb", MemKB), + ("iommu_memkb", MemKB), I think you want a corresponding LIBXL_HAVE in libxl.h to tell external toolstack whether the field exist. ("rtc_timeoffset", uint32), ("exec_ssidref", uint32), ("exec_ssid_label", string), Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |