From 1bbfdc1636c272c48fa74afa69526911d3c2c3aa Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Fri, 24 Mar 2023 11:11:48 +0100 Subject: [PATCH] x86/PV: conditionalize arch_set_info_guest()'s call to update_cr3() sh_update_paging_modes() as its last action already invokes sh_update_cr3(). Therefore there is no reason to invoke update_cr3() another time immediately after calling paging_update_paging_modes(), especially as sh_update_cr3() does not short-circuit the "nothing changed" case. Signed-off-by: Jan Beulich Reviewed-by: Andrew Cooper --- xen/arch/x86/domain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index a42f03e8e5..6b2e32d244 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -1445,8 +1445,8 @@ int arch_set_info_guest( if ( paging_mode_enabled(d) ) paging_update_paging_modes(v); - - update_cr3(v); + else + update_cr3(v); #endif /* CONFIG_PV */ out: