Message ID | 20191028152948.11900-4-ian.jackson@eu.citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Fix stub dm since pci pt overhaul | expand |
On 28/10/2019 15:29, Ian Jackson wrote: > Previously we did not do this. Indeed we have never done so. Stub > domains have had no memory allowance for shadow memory. This seems to > be an existing bug which we fix. > > x86 maintainers: please comment. PV guests need a shadow allocation to migrate, or if they trip over the PV L1TF safety checks. The former is not applicable to stubdoms, and the latter is arguably better left with a shadow allocation of 0. These are infrastructure VMs rather than customer VMs, and there is no excuse really to be running an L1TF-vulnerable stubdom which is taking the 20% perf hit. ~Andrew
Andrew Cooper writes ("Re: [XEN PATCH for-4.13 3/3] libxl: Set shadow_memkb for stub device model domains"): > On 28/10/2019 15:29, Ian Jackson wrote: > > Previously we did not do this. Indeed we have never done so. Stub > > domains have had no memory allowance for shadow memory. This seems to > > be an existing bug which we fix. > > > > x86 maintainers: please comment. > > PV guests need a shadow allocation to migrate, or if they trip over the > PV L1TF safety checks. > > The former is not applicable to stubdoms, and the latter is arguably > better left with a shadow allocation of 0. > > These are infrastructure VMs rather than customer VMs, and there is no > excuse really to be running an L1TF-vulnerable stubdom which is taking > the 20% perf hit. Thanks for the review. I think this means I should drop this patch. The other two were reviewed and release-acked (thanks Jürgen and Anthony) so I have just pushed them to staging. Ian.
diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 7e52f09731..ff746a890a 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -2141,7 +2141,6 @@ void libxl__spawn_stub_dm(libxl__egc *egc, libxl__stub_dm_spawn_state *sdss) libxl_domain_build_info_init(&dm_config->b_info); libxl_domain_build_info_init_type(&dm_config->b_info, LIBXL_DOMAIN_TYPE_PV); - dm_config->b_info.shadow_memkb = 0; dm_config->b_info.max_vcpus = 1; dm_config->b_info.max_memkb = 28 * 1024 + guest_config->b_info.video_memkb;
Previously we did not do this. Indeed we have never done so. Stub domains have had no memory allowance for shadow memory. This seems to be an existing bug which we fix. x86 maintainers: please comment. I am not sure of the interaction between this change and dom0 autoballooning. The memory requirement disclosed to libxl's caller (eg, xl) by libxl_domain_need_memory do not include this additional memory. If they should do, then libxl_get_required_shadow_memory and/or libxl_domain_need_memory may need adjusting to pay attention to whether a stub dm is going to be required. Currently libxl__domain_need_memory simply adds 32Kby for guests with a stub dm. Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> CC: Juergen Gross <jgross@suse.com> CC: Jan Beulich <jbeulich@suse.com> CC: Andrew Cooper <andrew.cooper3@citrix.com> CC: Wei Liu <wl@xen.org> CC: Roger Pau Monné <roger.pau@citrix.com> --- tools/libxl/libxl_dm.c | 1 - 1 file changed, 1 deletion(-)