File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -507,12 +507,13 @@ DEFINE_IDTENTRY_RAW(exc_nmi)
507
507
}
508
508
this_cpu_write (nmi_state , NMI_EXECUTING );
509
509
this_cpu_write (nmi_cr2 , read_cr2 ());
510
+
511
+ nmi_restart :
510
512
if (IS_ENABLED (CONFIG_NMI_CHECK_CPU )) {
511
513
WRITE_ONCE (nsp -> idt_seq , nsp -> idt_seq + 1 );
512
514
WARN_ON_ONCE (!(nsp -> idt_seq & 0x1 ));
513
515
WRITE_ONCE (nsp -> recv_jiffies , jiffies );
514
516
}
515
- nmi_restart :
516
517
517
518
/*
518
519
* Needs to happen before DR7 is accessed, because the hypervisor can
@@ -548,16 +549,16 @@ DEFINE_IDTENTRY_RAW(exc_nmi)
548
549
549
550
if (unlikely (this_cpu_read (nmi_cr2 ) != read_cr2 ()))
550
551
write_cr2 (this_cpu_read (nmi_cr2 ));
551
- if (this_cpu_dec_return (nmi_state ))
552
- goto nmi_restart ;
553
-
554
- if (user_mode (regs ))
555
- mds_user_clear_cpu_buffers ();
556
552
if (IS_ENABLED (CONFIG_NMI_CHECK_CPU )) {
557
553
WRITE_ONCE (nsp -> idt_seq , nsp -> idt_seq + 1 );
558
554
WARN_ON_ONCE (nsp -> idt_seq & 0x1 );
559
555
WRITE_ONCE (nsp -> recv_jiffies , jiffies );
560
556
}
557
+ if (this_cpu_dec_return (nmi_state ))
558
+ goto nmi_restart ;
559
+
560
+ if (user_mode (regs ))
561
+ mds_user_clear_cpu_buffers ();
561
562
}
562
563
563
564
#if IS_ENABLED (CONFIG_KVM_INTEL )
You can’t perform that action at this time.
0 commit comments