Download raw body.
[PATCH 4/6] vmd: reset i8253 input latch on new counter writes
[PATCH 5/6] vmd: only assert IRQ0 for i8253 channel 0
Only PIT channel 0 is connected to IRQ0.
i8253_fire() currently asserts IRQ0 for callbacks from all three
channels, generating spurious timer interrupts on channels 1 and 2.
---
usr.sbin/vmd/i8253.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/usr.sbin/vmd/i8253.c b/usr.sbin/vmd/i8253.c
index 3723bcde639..d769b6d8e69 100644
--- a/usr.sbin/vmd/i8253.c
+++ b/usr.sbin/vmd/i8253.c
@@ -374,7 +374,8 @@ i8253_fire(int fd, short type, void *arg)
struct timeval tv;
struct i8253_channel *ctr = (struct i8253_channel *)arg;
- vcpu_assert_irq(ctr->vm_id, 0, 0);
+ if (ctr == &i8253_channel[0])
+ vcpu_assert_irq(ctr->vm_id, 0, 0);
if (ctr->mode != TIMER_INTTC) {
timerclear(&tv);
--
2.51.0
[PATCH 4/6] vmd: reset i8253 input latch on new counter writes
[PATCH 5/6] vmd: only assert IRQ0 for i8253 channel 0