amd64: Store %cr3 into pcpu saved_ucr3 on double fault.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2019-11-03 11:52:50 +00:00
parent 7ccd639deb
commit 83ba1468ab
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354281

View File

@ -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