When in 3-level guest mode we help a guest to stay alive, we also shouldn't emit a trace entry to the contrary. Move the invocation up into the respective #ifdef, noting that while this moves it into the locked region, emitting trace records with the paging lock held is okay (as done elsewhere as well), just needlessly increasing lock holding time a little.
Signed-off-by: Jan Beulich <jbeul...@suse.com> --- v2: New. --- a/xen/arch/x86/mm/shadow/multi.c +++ b/xen/arch/x86/mm/shadow/multi.c @@ -2480,10 +2480,10 @@ static int cf_check sh_page_fault( sh_update_cr3(v, 0, false); #else ASSERT(d->is_shutting_down); + trace_shadow_gen(TRC_SHADOW_DOMF_DYING, va); #endif paging_unlock(d); put_gfn(d, gfn_x(gfn)); - trace_shadow_gen(TRC_SHADOW_DOMF_DYING, va); return 0; }