VMM: Add the GUEST_INTR_STATUS to the VM TF (XCC)
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 21 Jun 2016 16:50:08 +0000 (12:50 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 24 Jun 2016 18:24:06 +0000 (14:24 -0400)
We need this to halt properly.  I squeezed the u16 into the existing
padding both to save space as well as to keep people from needing to do
full rebuilds.

Reinstall your kernel headers.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
kern/arch/x86/ros/trapframe64.h
kern/arch/x86/trap.c
kern/arch/x86/trap64.c
user/parlib/x86/vcore.c

index 7848e29..fcbc97b 100644 (file)
@@ -94,7 +94,8 @@ struct vm_trapframe {
        uint32_t tf_guest_pcoreid;
        uint32_t tf_flags;
        uint32_t tf_trap_inject;
-       uint32_t tf_padding0;
+       uint16_t tf_guest_intr_status;
+       uint16_t tf_padding0;
        uint32_t tf_exit_reason;
        uint32_t tf_exit_qual;
        uint32_t tf_intrinfo1;
index 9ebe5a6..e23b9b0 100644 (file)
@@ -894,6 +894,7 @@ void handle_vmexit(struct vm_trapframe *tf)
        tf->tf_cr3 = vmcs_read(GUEST_CR3);
        tf->tf_guest_pcoreid = pcpui->guest_pcoreid;
        tf->tf_flags |= VMCTX_FL_PARTIAL;
+       tf->tf_guest_intr_status = vmcs_read(GUEST_INTR_STATUS);
        tf->tf_exit_reason = vmcs_read(VM_EXIT_REASON);
        tf->tf_exit_qual = vmcs_read(EXIT_QUALIFICATION);
        tf->tf_intrinfo1 = vmcs_read(GUEST_INTERRUPTIBILITY_INFO);
index 9d51285..5370788 100644 (file)
@@ -138,6 +138,7 @@ void print_vmtrapframe(struct vm_trapframe *vm_tf)
        printk("ExitQl 0x%08x\n",             vm_tf->tf_exit_qual);
        printk("Intr1  0x%016lx\n",           vm_tf->tf_intrinfo1);
        printk("Intr2  0x%016lx\n",           vm_tf->tf_intrinfo2);
+       printk("GIntr  0x----%04x\n",         vm_tf->tf_guest_intr_status);
        printk("GVA    0x%016lx\n",           vm_tf->tf_guest_va);
        printk("GPA    0x%016lx\n",           vm_tf->tf_guest_pa);
        spin_unlock_irqsave(&ptf_lock);
index 3f7b6c8..3be41ae 100644 (file)
@@ -377,6 +377,7 @@ void print_vm_tf(struct vm_trapframe *vm_tf)
        printf("ExitQl 0x%08x\n",             vm_tf->tf_exit_qual);
        printf("Intr1  0x%016lx\n",           vm_tf->tf_intrinfo1);
        printf("Intr2  0x%016lx\n",           vm_tf->tf_intrinfo2);
+       printf("GIntr  0x----%04x\n",         vm_tf->tf_guest_intr_status);
        printf("GVA    0x%016lx\n",           vm_tf->tf_guest_va);
        printf("GPA    0x%016lx\n",           vm_tf->tf_guest_pa);
 }