The last piece to test VMs; disable interrupts before starting one
authorRonald G. Minnich <rminnich@google.com>
Fri, 21 Mar 2014 22:41:25 +0000 (15:41 -0700)
committerRonald G. Minnich <rminnich@google.com>
Fri, 21 Mar 2014 22:41:25 +0000 (15:41 -0700)
Can't test as IOAPIC is borked.

Signed-off-by: Ronald G. Minnich <rminnich@google.com>
kern/drivers/dev/vm.c

index 67fbe5f..3067594 100644 (file)
@@ -454,7 +454,9 @@ static long vmwrite(struct chan *c, void *ubuf, long n, int64_t unused)
                                vmr.vcpu = strtoul(cb->f[1], NULL, 0);
                                vmr.emulated = strtoul(cb->f[2], NULL, 0);
                                vmr.mmio_completed = strtoul(cb->f[3], NULL, 0);
+                               disable_irq();
                                ret = vm_run(litevm, &vmr);
+                               enable_irq();
                                printk("vm_run returns %d\n", ret);
                                //print_func_exit();
                                return ret;