Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/bouyer-xenpvh]: src/sys/arch/amd64/amd64 restore %eax before using it. T...



details:   https://anonhg.NetBSD.org/src/rev/0ff5322cc015
branches:  bouyer-xenpvh
changeset: 1024945:0ff5322cc015
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Apr 09 16:51:00 2020 +0000

description:
restore %eax before using it. This bug caused event handlers to be called
spuriously at high spl or in a reentrant manner.
Now a amd64 PVHVM domU can checkout pkgsrc and build packages without panic.

diffstat:

 sys/arch/amd64/amd64/spl.S |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (28 lines):

diff -r d16e9f33749f -r 0ff5322cc015 sys/arch/amd64/amd64/spl.S
--- a/sys/arch/amd64/amd64/spl.S        Thu Apr 09 16:12:50 2020 +0000
+++ b/sys/arch/amd64/amd64/spl.S        Thu Apr 09 16:51:00 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spl.S,v 1.43 2020/01/08 17:38:41 ad Exp $      */
+/*     $NetBSD: spl.S,v 1.43.4.1 2020/04/09 16:51:00 bouyer Exp $      */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -366,8 +366,9 @@
        popq    %rbx                    /* get previous priority */
        decl    CPUVAR(IDEPTH)
        leaq    1f(%rip),%r13
-1:     movl    %ebx,%eax
+1:
 #if !defined(XENPV)
+       movl    %ebx,%eax
        movl    CPUVAR(IUNMASK)(,%rax,4),%eax
        CLI(si)
        andl    CPUVAR(IPENDING),%eax
@@ -379,6 +380,7 @@
 #endif
 2:
 #if defined(XEN)
+       movl    %ebx,%eax
        movl    CPUVAR(XUNMASK)(,%rax,4),%eax
        CLI(si)
        andl    CPUVAR(XPENDING),%eax



Home | Main Index | Thread Index | Old Index