summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2014-08-17 00:52:07 +0000
committergrehan <grehan@FreeBSD.org>2014-08-17 00:52:07 +0000
commite83027edbbda961289c2ed185571fb6272b4f756 (patch)
tree3b7195b83b06e50b75be8a3b3f33487a98019aa8 /sys/amd64/include
parentc64921fe8da3adcc50639ba2f5a0a66c6978c44e (diff)
downloadFreeBSD-src-e83027edbbda961289c2ed185571fb6272b4f756.zip
FreeBSD-src-e83027edbbda961289c2ed185571fb6272b4f756.tar.gz
MFC r266933
Activate vcpus from bhyve(8) using the ioctl VM_ACTIVATE_CPU instead of doing it implicitly in vmm.ko.
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/vmm.h3
-rw-r--r--sys/amd64/include/vmm_dev.h20
2 files changed, 22 insertions, 1 deletions
diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h
index f1902d2..05df325 100644
--- a/sys/amd64/include/vmm.h
+++ b/sys/amd64/include/vmm.h
@@ -140,8 +140,9 @@ int vm_set_capability(struct vm *vm, int vcpu, int type, int val);
int vm_get_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state *state);
int vm_set_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state state);
int vm_apicid2vcpuid(struct vm *vm, int apicid);
-void vm_activate_cpu(struct vm *vm, int vcpu);
+int vm_activate_cpu(struct vm *vm, int vcpu);
cpuset_t vm_active_cpus(struct vm *vm);
+cpuset_t vm_suspended_cpus(struct vm *vm);
struct vm_exit *vm_exitinfo(struct vm *vm, int vcpuid);
void vm_exit_suspended(struct vm *vm, int vcpuid, uint64_t rip);
diff --git a/sys/amd64/include/vmm_dev.h b/sys/amd64/include/vmm_dev.h
index f094d51..a6568dc 100644
--- a/sys/amd64/include/vmm_dev.h
+++ b/sys/amd64/include/vmm_dev.h
@@ -177,6 +177,18 @@ struct vm_gla2gpa {
uint64_t gpa;
};
+struct vm_activate_cpu {
+ int vcpuid;
+};
+
+struct vm_cpuset {
+ int which;
+ int cpusetsize;
+ cpuset_t *cpus;
+};
+#define VM_ACTIVE_CPUS 0
+#define VM_SUSPENDED_CPUS 1
+
enum {
/* general routines */
IOCNUM_ABIVERS = 0,
@@ -229,6 +241,10 @@ enum {
IOCNUM_ISA_DEASSERT_IRQ = 81,
IOCNUM_ISA_PULSE_IRQ = 82,
IOCNUM_ISA_SET_IRQ_TRIGGER = 83,
+
+ /* vm_cpuset */
+ IOCNUM_ACTIVATE_CPU = 90,
+ IOCNUM_GET_CPUSET = 91,
};
#define VM_RUN \
@@ -301,4 +317,8 @@ enum {
_IOWR('v', IOCNUM_GET_GPA_PMAP, struct vm_gpa_pte)
#define VM_GLA2GPA \
_IOWR('v', IOCNUM_GLA2GPA, struct vm_gla2gpa)
+#define VM_ACTIVATE_CPU \
+ _IOW('v', IOCNUM_ACTIVATE_CPU, struct vm_activate_cpu)
+#define VM_GET_CPUS \
+ _IOW('v', IOCNUM_GET_CPUSET, struct vm_cpuset)
#endif
OpenPOWER on IntegriCloud