Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/x86 When we have pending events in stipending()...



details:   https://anonhg.NetBSD.org/src/rev/ef973ea977b1
branches:  trunk
changeset: 366592:ef973ea977b1
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Tue May 31 18:01:22 2022 +0000

description:
When we have pending events in stipending(), evt_set_pending() has to set
the ih_pending flag for each handler too. Xen/i386 should be stable again.

diffstat:

 sys/arch/xen/x86/hypervisor_machdep.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r fb1ecc28ce6d -r ef973ea977b1 sys/arch/xen/x86/hypervisor_machdep.c
--- a/sys/arch/xen/x86/hypervisor_machdep.c     Tue May 31 17:52:35 2022 +0000
+++ b/sys/arch/xen/x86/hypervisor_machdep.c     Tue May 31 18:01:22 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hypervisor_machdep.c,v 1.42 2022/05/31 14:21:44 bouyer Exp $   */
+/*     $NetBSD: hypervisor_machdep.c,v 1.43 2022/05/31 18:01:22 bouyer Exp $   */
 
 /*
  *
@@ -54,7 +54,7 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.42 2022/05/31 14:21:44 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hypervisor_machdep.c,v 1.43 2022/05/31 18:01:22 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -159,10 +159,17 @@
        KASSERT(args != NULL);
 
        int *ret = args;
+       struct intrhand *ih;
 
        if (evtsource[port]) {
                hypervisor_set_ipending(evtsource[port]->ev_imask, l1i, l2i);
                evtsource[port]->ev_evcnt.ev_count++;
+               ih = evtsource[port]->ev_handlers;
+               while (ih != NULL) {
+                       ih->ih_pending++;
+                       ih = ih->ih_evt_next;
+               }
+
                if (*ret == 0 && curcpu()->ci_ilevel <
                    evtsource[port]->ev_maxlevel)
                        *ret = 1;



Home | Main Index | Thread Index | Old Index