summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2016-03-09 08:07:00 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2016-03-09 08:07:00 +0000
commit9ad03e5b90a4ea7a18058e0c49ef4d11ecddcce5 (patch)
tree5bfbaa69d66e4598e255bb0869d5ffbbc52d7867 /sys
parentb49f26e5e2d126c1e74ce57816297bbc2b2baa65 (diff)
Add a comment to the vcpu state enum to remind people there is a matching
conversion function in vmm.c Increase the size of the pending interrupt field from uint8_t to uint16_t.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/include/vmmvar.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/arch/amd64/include/vmmvar.h b/sys/arch/amd64/include/vmmvar.h
index 9baef59bc25..3b863df0580 100644
--- a/sys/arch/amd64/include/vmmvar.h
+++ b/sys/arch/amd64/include/vmmvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmmvar.h,v 1.9 2016/02/20 20:49:08 mlarkin Exp $ */
+/* $OpenBSD: vmmvar.h,v 1.10 2016/03/09 08:06:59 mlarkin Exp $ */
/*
* Copyright (c) 2014 Mike Larkin <mlarkin@openbsd.org>
*
@@ -100,6 +100,11 @@
#define VM_EXIT_TERMINATED 0xFFFE
#define VM_EXIT_NONE 0xFFFF
+/*
+ * VCPU state values. Note that there is a conversion function in vmm.c
+ * (vcpu_state_decode) that converts these to human readable strings,
+ * so this enum and vcpu_state_decode should be kept in sync.
+ */
enum {
VCPU_STATE_STOPPED,
VCPU_STATE_RUNNING,
@@ -251,7 +256,7 @@ struct vm_intr_params {
/* Input parameters to VMM_IOC_INTR */
uint32_t vip_vm_id;
uint32_t vip_vcpu_id;
- uint8_t vip_intr;
+ uint16_t vip_intr;
};
/* IOCTL definitions */
@@ -376,7 +381,7 @@ struct vcpu {
struct cpu_info *vc_last_pcpu;
union vm_exit vc_exit;
- uint8_t vc_intr;
+ uint16_t vc_intr;
/* VMX only */
uint64_t vc_vmx_basic;