Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Nov 2019 11:52:51 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r354281 - head/sys/amd64/amd64
Message-ID:  <201911031152.xA3Bqpxd026635@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911031152.xA3Bqpxd026635>