diff mbox series

x86/EFI: also fill boot_tsc_stamp on the xen.efi boot path

Message ID 7ed6f7cc-c540-88fb-6073-10ef1a2da6e7@suse.com (mailing list archive)
State New, archived
Headers show
Series x86/EFI: also fill boot_tsc_stamp on the xen.efi boot path | expand

Commit Message

Jan Beulich April 8, 2020, 8 a.m. UTC
Commit e3a379c35eff ("x86/time: always count s_time from Xen boot")
introducing this missed adjusting this path as well.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Wei Liu April 9, 2020, 3:26 p.m. UTC | #1
On Wed, Apr 08, 2020 at 10:00:48AM +0200, Jan Beulich wrote:
> Commit e3a379c35eff ("x86/time: always count s_time from Xen boot")
> introducing this missed adjusting this path as well.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Wei Liu <wl@xen.org>
diff mbox series

Patch

--- a/xen/arch/x86/efi/efi-boot.h
+++ b/xen/arch/x86/efi/efi-boot.h
@@ -8,6 +8,7 @@ 
 #include <asm/edd.h>
 #include <asm/microcode.h>
 #include <asm/msr.h>
+#include <asm/setup.h>
 
 static struct file __initdata ucode;
 static multiboot_info_t __initdata mbi = {
@@ -673,6 +674,8 @@  static void __init efi_arch_cpu(void)
     uint32_t eax = cpuid_eax(0x80000000);
     uint32_t *caps = boot_cpu_data.x86_capability;
 
+    boot_tsc_stamp = rdtsc();
+
     caps[cpufeat_word(X86_FEATURE_HYPERVISOR)] = cpuid_ecx(1);
 
     if ( (eax >> 16) == 0x8000 && eax > 0x80000000 )
--- a/xen/include/asm-x86/setup.h
+++ b/xen/include/asm-x86/setup.h
@@ -10,6 +10,7 @@  extern char __2M_init_start[], __2M_init
 extern char __2M_rwdata_start[], __2M_rwdata_end[];
 
 extern unsigned long xenheap_initial_phys_start;
+extern uint64_t boot_tsc_stamp;
 
 void early_cpu_init(void);
 void early_time_init(void);