diff options
author | Dave Voutila <dv@cvs.openbsd.org> | 2022-11-11 10:52:45 +0000 |
---|---|---|
committer | Dave Voutila <dv@cvs.openbsd.org> | 2022-11-11 10:52:45 +0000 |
commit | 24e38937349b4f2a56c43fbfa638f9a18751b81d (patch) | |
tree | ac64c1a039cb7b650ef4e15ebc4a132b509c4819 /usr.sbin | |
parent | 1d0a41bd3d638efa81ba179302bf6c7437ae0647 (diff) |
Revert removal of toggling interrupt line in vmd vcpu run loop.
phessler reports a performance regression. Needs more testing.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/vmd/vm.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/usr.sbin/vmd/vm.c b/usr.sbin/vmd/vm.c index 458071fe9c3..f1d9b97741c 100644 --- a/usr.sbin/vmd/vm.c +++ b/usr.sbin/vmd/vm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm.c,v 1.75 2022/11/10 23:39:51 dv Exp $ */ +/* $OpenBSD: vm.c,v 1.76 2022/11/11 10:52:44 dv Exp $ */ /* * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org> @@ -1512,6 +1512,23 @@ vcpu_run_loop(void *arg) } else vrp->vrp_irq = 0xFFFF; + /* Still more pending? */ + if (i8259_is_pending()) { + /* + * XXX can probably avoid ioctls here by providing intr + * in vrp + */ + if (vcpu_pic_intr(vrp->vrp_vm_id, + vrp->vrp_vcpu_id, 1)) { + fatal("can't set INTR"); + } + } else { + if (vcpu_pic_intr(vrp->vrp_vm_id, + vrp->vrp_vcpu_id, 0)) { + fatal("can't clear INTR"); + } + } + if (ioctl(env->vmd_fd, VMM_IOC_RUN, vrp) == -1) { /* If run ioctl failed, exit */ ret = errno; |