svn commit: r354281 - head/sys/amd64/amd64

Konstantin Belousov kib at FreeBSD.org
Sun Nov 3 11:52:51 UTC 2019


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


More information about the svn-src-all mailing list