The branch stable/12 has been updated by kib:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=bd19553cb5d26a4100e3f6cc90e65647ded36b97

commit bd19553cb5d26a4100e3f6cc90e65647ded36b97
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2021-04-09 23:22:48 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2021-05-01 00:38:29 +0000

    amd64 linux64: use x86_clear_dbregs()
    
    (cherry picked from commit 2f1588474768f61f3a983af207e753bd0340a9e7)
---
 sys/amd64/linux/linux_sysvec.c | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c
index b14b4014a87a..03240acaae1c 100644
--- a/sys/amd64/linux/linux_sysvec.c
+++ b/sys/amd64/linux/linux_sysvec.c
@@ -424,27 +424,7 @@ linux_exec_setregs(struct thread *td, struct image_params 
*imgp, u_long stack)
        regs->tf_gs = _ugssel;
        regs->tf_flags = TF_HASSEGS;
 
-       /*
-        * Reset the hardware debug registers if they were in use.
-        * They won't have any meaning for the newly exec'd process.
-        */
-       if (pcb->pcb_flags & PCB_DBREGS) {
-               pcb->pcb_dr0 = 0;
-               pcb->pcb_dr1 = 0;
-               pcb->pcb_dr2 = 0;
-               pcb->pcb_dr3 = 0;
-               pcb->pcb_dr6 = 0;
-               pcb->pcb_dr7 = 0;
-               if (pcb == curpcb) {
-                       /*
-                        * Clear the debug registers on the running
-                        * CPU, otherwise they will end up affecting
-                        * the next process we switch to.
-                        */
-                       reset_dbregs();
-               }
-               clear_pcb_flags(pcb, PCB_DBREGS);
-       }
+       x86_clear_dbregs(pcb);
 
        /*
         * Drop the FP state if we hold it, so that the process gets a
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to