shithub: riscv

Download patch

ref: 3844090f3997aab26cb3d54c4cb837e278a04933
parent: dae0f4d28d3ffa312cab5d751045b1bbab1d897d
author: aiju <devnull@localhost>
date: Mon Jun 12 15:46:25 EDT 2017

pc/pc64: reset DR7 in mmurelease

--- a/sys/src/9/pc/mmu.c
+++ b/sys/src/9/pc/mmu.c
@@ -387,6 +387,8 @@
 		proc->ldt = nil;
 		proc->nldt = 0;
 	}
+	if(proc->dr[7] != 0)
+		putdr7(0);
 }
 
 /*
--- a/sys/src/9/pc64/mmu.c
+++ b/sys/src/9/pc64/mmu.c
@@ -425,6 +425,8 @@
 		proc->kmapcount = proc->kmapindex = 0;
 	}
 	mmufree(proc);
+	if(proc->dr[7] != 0)
+		putdr7(0);
 	taskswitch((uintptr)m+MACHSIZE);
 }