Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/nvmm/x86 Drop support for software interrupts. I had...



details:   https://anonhg.NetBSD.org/src/rev/0ec5433f4489
branches:  trunk
changeset: 448910:0ec5433f4489
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Feb 13 10:55:13 2019 +0000

description:
Drop support for software interrupts. I had initially added that to cover
the three event types available on AMD, but Intel has seven of them, all
with weird and twisted meanings, and they require extra parameters.

Software interrupts should not be used anyway.

diffstat:

 sys/dev/nvmm/x86/nvmm_x86_svm.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r 4fbd3d4512c6 -r 0ec5433f4489 sys/dev/nvmm/x86/nvmm_x86_svm.c
--- a/sys/dev/nvmm/x86/nvmm_x86_svm.c   Wed Feb 13 09:57:46 2019 +0000
+++ b/sys/dev/nvmm/x86/nvmm_x86_svm.c   Wed Feb 13 10:55:13 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nvmm_x86_svm.c,v 1.21 2019/02/13 07:04:12 maxv Exp $   */
+/*     $NetBSD: nvmm_x86_svm.c,v 1.22 2019/02/13 10:55:13 maxv Exp $   */
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.21 2019/02/13 07:04:12 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_svm.c,v 1.22 2019/02/13 10:55:13 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -688,13 +688,13 @@
                err = 0;
                break;
        case NVMM_EVENT_INTERRUPT_SW:
-               type = SVM_EVENT_TYPE_SW_INT;
-               err = 0;
-               break;
+               return EINVAL;
        case NVMM_EVENT_EXCEPTION:
                type = SVM_EVENT_TYPE_EXC;
                if (event->vector == 2 || event->vector >= 32)
                        return EINVAL;
+               if (event->vector == 3 || event->vector == 0)
+                       return EINVAL;
                err = svm_event_has_error(event->vector);
                break;
        default:



Home | Main Index | Thread Index | Old Index