All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/MTRR: hook mtrr_bp_restore() back up
@ 2025-03-27 11:20 Jan Beulich
  2025-03-27 11:38 ` Roger Pau Monné
  0 siblings, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2025-03-27 11:20 UTC (permalink / raw)
  To: xen-devel@lists.xenproject.org
  Cc: Andrew Cooper, Roger Pau Monné, Marek Marczykowski

Unlike stated in the offending commit's description,
load_system_tables() wasn't the only thing left to retain from the
earlier restore_rest_processor_state().

While there also do Misra-related tidying for the function itself: The
function being used from assembly only means it doesn't need to have a
declaration, but wants to be asmlinkage.

Fixes: 4304ff420e51 ("x86/S3: Drop {save,restore}_rest_processor_state() completely")
Reported-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
Contextually assumed to go on top of "x86/MTRR: constrain AP sync and
BSP restore". Functionally there's no dependency.

--- a/xen/arch/x86/acpi/wakeup_prot.S
+++ b/xen/arch/x86/acpi/wakeup_prot.S
@@ -124,6 +124,8 @@ LABEL(s3_resume)
         mov     STACK_CPUINFO_FIELD(cr4)(%rbx), %rax
         mov     %rax, %cr4
 
+        call    mtrr_bp_restore
+
 .Lsuspend_err:
         pop     %r15
         pop     %r14
--- a/xen/arch/x86/cpu/mtrr/main.c
+++ b/xen/arch/x86/cpu/mtrr/main.c
@@ -610,7 +610,7 @@ void mtrr_aps_sync_end(void)
 	hold_mtrr_updates_on_aps = 0;
 }
 
-void mtrr_bp_restore(void)
+void asmlinkage mtrr_bp_restore(void)
 {
 	if (mtrr_if)
 		mtrr_set_all();
--- a/xen/arch/x86/include/asm/mtrr.h
+++ b/xen/arch/x86/include/asm/mtrr.h
@@ -66,7 +66,6 @@ extern uint8_t pat_type_2_pte_flags(uint
 extern int hold_mtrr_updates_on_aps;
 extern void mtrr_aps_sync_begin(void);
 extern void mtrr_aps_sync_end(void);
-extern void mtrr_bp_restore(void);
 
 extern bool mtrr_var_range_msr_set(struct domain *d, struct mtrr_state *m,
                                    uint32_t msr, uint64_t msr_content);


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-03-27 16:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-27 11:20 [PATCH] x86/MTRR: hook mtrr_bp_restore() back up Jan Beulich
2025-03-27 11:38 ` Roger Pau Monné
2025-03-27 12:30   ` Jan Beulich
2025-03-27 12:48     ` Roger Pau Monné
2025-03-27 13:28       ` Jan Beulich
2025-03-27 14:10         ` Roger Pau Monné
2025-03-27 14:20           ` Jan Beulich
2025-03-27 15:23             ` Andrew Cooper
2025-03-27 16:12               ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.