Author: kib
Date: Sun Nov  3 11:52:50 2019
New Revision: 354281
URL: https://svnweb.freebsd.org/changeset/base/354281

Log:
  amd64: Store %cr3 into pcpu saved_ucr3 on double fault.
  
  Tested by:    pho
  Sponsored by: The FreeBSD Foundation
  MFC after:    1 week

Modified:
  head/sys/amd64/amd64/exception.S

Modified: head/sys/amd64/amd64/exception.S
==============================================================================
--- head/sys/amd64/amd64/exception.S    Sun Nov  3 11:51:53 2019        
(r354280)
+++ head/sys/amd64/amd64/exception.S    Sun Nov  3 11:52:50 2019        
(r354281)
@@ -349,6 +349,8 @@ IDTVEC(dblfault)
        jz      1f                      /* already running with kernel GS.base 
*/
        swapgs
 1:     lfence
+       movq    %cr3,%rax
+       movq    %rax,PCPU(SAVED_UCR3)
        movq    PCPU(KCR3),%rax
        cmpq    $~0,%rax
        je      2f
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to