x86/shadow: call sh_update_cr3() directly from sh_page_fault()

There's no need for an indirect call here, as the mode is invariant
throughout the entire paging-locked region. All it takes to avoid it is
to have a forward declaration of sh_update_cr3() in place.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Jan Beulich committed 2026-02-23 08:37:49 +01:00
1 parent ff78502db0
commit 5d45c8202d
1 file changed
+3 -1
+3 -1
View File
@@ -79,6 +79,8 @@ const char *const fetch_type_names[] = {
# define for_each_shadow_table(v, i) for ( (i) = 0; (i) < 1; ++(i) )
#endif
static pagetable_t cf_check sh_update_cr3(struct vcpu *v, bool noflush);
/* Helper to perform a local TLB flush. */
static void sh_flush_local(const struct domain *d)
{
@@ -2478,7 +2480,7 @@ static int cf_check sh_page_fault(
* In any case, in the PAE case, the ASSERT is not true; it can
* happen because of actions the guest is taking. */
#if GUEST_PAGING_LEVELS == 3
v->arch.paging.mode->update_cr3(v, false);
sh_update_cr3(v, false);
#else
ASSERT(d->is_shutting_down);
#endif
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.