svn commit: r282287 - in head/sys/amd64: include vmm vmm/amd vmm/intel vmm/io
Neel Natu
neel at FreeBSD.org
Thu Apr 30 22:23:27 UTC 2015
Author: neel
Date: Thu Apr 30 22:23:22 2015
New Revision: 282287
URL: https://svnweb.freebsd.org/changeset/base/282287
Log:
Don't require <sys/cpuset.h> to be always included before <machine/vmm.h>.
Only a subset of source files that include <machine/vmm.h> need to use the
APIs that require the inclusion of <sys/cpuset.h>.
MFC after: 1 week
Modified:
head/sys/amd64/include/vmm.h
head/sys/amd64/vmm/amd/amdv.c
head/sys/amd64/vmm/amd/svm_msr.c
head/sys/amd64/vmm/amd/vmcb.c
head/sys/amd64/vmm/intel/vmx_msr.c
head/sys/amd64/vmm/io/vatpic.c
head/sys/amd64/vmm/io/vatpit.c
head/sys/amd64/vmm/io/vhpet.c
head/sys/amd64/vmm/io/vioapic.c
head/sys/amd64/vmm/io/vpmtmr.c
head/sys/amd64/vmm/io/vrtc.c
head/sys/amd64/vmm/vmm_ioport.c
head/sys/amd64/vmm/vmm_stat.c
head/sys/amd64/vmm/x86.c
Modified: head/sys/amd64/include/vmm.h
==============================================================================
--- head/sys/amd64/include/vmm.h Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/include/vmm.h Thu Apr 30 22:23:22 2015 (r282287)
@@ -204,13 +204,12 @@ int vm_get_x2apic_state(struct vm *vm, i
int vm_set_x2apic_state(struct vm *vm, int vcpu, enum x2apic_state state);
int vm_apicid2vcpuid(struct vm *vm, int apicid);
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);
void vm_exit_rendezvous(struct vm *vm, int vcpuid, uint64_t rip);
void vm_exit_astpending(struct vm *vm, int vcpuid, uint64_t rip);
+#ifdef _SYS__CPUSET_H_
/*
* Rendezvous all vcpus specified in 'dest' and execute 'func(arg)'.
* The rendezvous 'func(arg)' is not allowed to do anything that will
@@ -228,6 +227,9 @@ void vm_exit_astpending(struct vm *vm, i
typedef void (*vm_rendezvous_func_t)(struct vm *vm, int vcpuid, void *arg);
void vm_smp_rendezvous(struct vm *vm, int vcpuid, cpuset_t dest,
vm_rendezvous_func_t func, void *arg);
+cpuset_t vm_active_cpus(struct vm *vm);
+cpuset_t vm_suspended_cpus(struct vm *vm);
+#endif /* _SYS__CPUSET_H_ */
static __inline int
vcpu_rendezvous_pending(void *rendezvous_cookie)
Modified: head/sys/amd64/vmm/amd/amdv.c
==============================================================================
--- head/sys/amd64/vmm/amd/amdv.c Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/vmm/amd/amdv.c Thu Apr 30 22:23:22 2015 (r282287)
@@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/errno.h>
-#include <sys/smp.h>
#include <machine/vmm.h>
#include "io/iommu.h"
Modified: head/sys/amd64/vmm/amd/svm_msr.c
==============================================================================
--- head/sys/amd64/vmm/amd/svm_msr.c Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/vmm/amd/svm_msr.c Thu Apr 30 22:23:22 2015 (r282287)
@@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/systm.h>
-#include <sys/cpuset.h>
#include <machine/cpufunc.h>
#include <machine/specialreg.h>
Modified: head/sys/amd64/vmm/amd/vmcb.c
==============================================================================
--- head/sys/amd64/vmm/amd/vmcb.c Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/vmm/amd/vmcb.c Thu Apr 30 22:23:22 2015 (r282287)
@@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/cpuset.h>
#include <machine/segments.h>
#include <machine/specialreg.h>
Modified: head/sys/amd64/vmm/intel/vmx_msr.c
==============================================================================
--- head/sys/amd64/vmm/intel/vmx_msr.c Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/vmm/intel/vmx_msr.c Thu Apr 30 22:23:22 2015 (r282287)
@@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
-#include <sys/cpuset.h>
#include <machine/clock.h>
#include <machine/cpufunc.h>
Modified: head/sys/amd64/vmm/io/vatpic.c
==============================================================================
--- head/sys/amd64/vmm/io/vatpic.c Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/vmm/io/vatpic.c Thu Apr 30 22:23:22 2015 (r282287)
@@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/types.h>
#include <sys/queue.h>
-#include <sys/cpuset.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
Modified: head/sys/amd64/vmm/io/vatpit.c
==============================================================================
--- head/sys/amd64/vmm/io/vatpit.c Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/vmm/io/vatpit.c Thu Apr 30 22:23:22 2015 (r282287)
@@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/types.h>
#include <sys/queue.h>
-#include <sys/cpuset.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
Modified: head/sys/amd64/vmm/io/vhpet.c
==============================================================================
--- head/sys/amd64/vmm/io/vhpet.c Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/vmm/io/vhpet.c Thu Apr 30 22:23:22 2015 (r282287)
@@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/systm.h>
-#include <sys/cpuset.h>
#include <dev/acpica/acpi_hpet.h>
Modified: head/sys/amd64/vmm/io/vioapic.c
==============================================================================
--- head/sys/amd64/vmm/io/vioapic.c Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/vmm/io/vioapic.c Thu Apr 30 22:23:22 2015 (r282287)
@@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/queue.h>
-#include <sys/cpuset.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/systm.h>
Modified: head/sys/amd64/vmm/io/vpmtmr.c
==============================================================================
--- head/sys/amd64/vmm/io/vpmtmr.c Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/vmm/io/vpmtmr.c Thu Apr 30 22:23:22 2015 (r282287)
@@ -29,7 +29,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/queue.h>
-#include <sys/cpuset.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/systm.h>
Modified: head/sys/amd64/vmm/io/vrtc.c
==============================================================================
--- head/sys/amd64/vmm/io/vrtc.c Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/vmm/io/vrtc.c Thu Apr 30 22:23:22 2015 (r282287)
@@ -30,7 +30,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/queue.h>
-#include <sys/cpuset.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/lock.h>
Modified: head/sys/amd64/vmm/vmm_ioport.c
==============================================================================
--- head/sys/amd64/vmm/vmm_ioport.c Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/vmm/vmm_ioport.c Thu Apr 30 22:23:22 2015 (r282287)
@@ -28,16 +28,10 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/queue.h>
-#include <sys/cpuset.h>
#include <sys/systm.h>
-#include <vm/vm.h>
-
#include <machine/vmm.h>
#include <machine/vmm_instruction_emul.h>
-#include <x86/psl.h>
#include "vatpic.h"
#include "vatpit.h"
Modified: head/sys/amd64/vmm/vmm_stat.c
==============================================================================
--- head/sys/amd64/vmm/vmm_stat.c Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/vmm/vmm_stat.c Thu Apr 30 22:23:22 2015 (r282287)
@@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/malloc.h>
-#include <sys/smp.h>
#include <machine/vmm.h>
#include "vmm_util.h"
Modified: head/sys/amd64/vmm/x86.c
==============================================================================
--- head/sys/amd64/vmm/x86.c Thu Apr 30 21:51:12 2015 (r282286)
+++ head/sys/amd64/vmm/x86.c Thu Apr 30 22:23:22 2015 (r282287)
@@ -32,7 +32,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/pcpu.h>
#include <sys/systm.h>
-#include <sys/cpuset.h>
#include <sys/sysctl.h>
#include <machine/clock.h>
More information about the svn-src-head
mailing list