diff options
author | Dave Voutila <dv@cvs.openbsd.org> | 2022-11-10 23:39:52 +0000 |
---|---|---|
committer | Dave Voutila <dv@cvs.openbsd.org> | 2022-11-10 23:39:52 +0000 |
commit | e5969e3a198d666e4da163356adfaa07873e130e (patch) | |
tree | e590b61919836319bbc0a583708ca55a50920171 /usr.sbin/vmd | |
parent | 8398797f1378b80c7ce19a031800e5a9babcf7c9 (diff) |
vmd(8): remove toggling interrupt line on vcpu in vcpu run loop
We toggle the interrupt "line" on the vcpu when we assert or deassert
irq on the pic in either the vcpu thread (emulating some devices)
or on the device event thread (mostly handling reading available
data). Having it in the vcpu run loop here just results in another
ioctl(2) call before the one for re-entering the guest cpu.
Removing it shows no noticeable behavioral change in existing guests.
ok mlarkin@
Diffstat (limited to 'usr.sbin/vmd')
-rw-r--r-- | usr.sbin/vmd/vm.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/usr.sbin/vmd/vm.c b/usr.sbin/vmd/vm.c index 763e7be8331..458071fe9c3 100644 --- a/usr.sbin/vmd/vm.c +++ b/usr.sbin/vmd/vm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm.c,v 1.74 2022/11/10 11:46:39 dv Exp $ */ +/* $OpenBSD: vm.c,v 1.75 2022/11/10 23:39:51 dv Exp $ */ /* * Copyright (c) 2015 Mike Larkin <mlarkin@openbsd.org> @@ -1512,23 +1512,6 @@ 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; |