diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-23 22:57:13 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-11-23 22:57:13 +0000 |
commit | 29e3e2171efab34d58295ebde8c714976f68cbd3 (patch) | |
tree | 954414448b3200b2b5c33f951ac0934c0fe6a23a /sys | |
parent | 14aa47eb4c003db2eb48d88d7258d4cbd598cda7 (diff) |
No longer need 'option VMM', declaring the vmm0 device is sufficient.
ok mlarkin
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/cpu.c | 14 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/identcpu.c | 14 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/ipifuncs.c | 18 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/mainbus.c | 6 | ||||
-rw-r--r-- | sys/arch/amd64/conf/GENERIC | 3 | ||||
-rw-r--r-- | sys/arch/amd64/conf/files.amd64 | 6 | ||||
-rw-r--r-- | sys/arch/amd64/include/cpu.h | 6 |
7 files changed, 31 insertions, 36 deletions
diff --git a/sys/arch/amd64/amd64/cpu.c b/sys/arch/amd64/amd64/cpu.c index e64cae0b4c6..b4fee53307d 100644 --- a/sys/arch/amd64/amd64/cpu.c +++ b/sys/arch/amd64/amd64/cpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.c,v 1.90 2015/11/16 10:08:41 mpi Exp $ */ +/* $OpenBSD: cpu.c,v 1.91 2015/11/23 22:57:12 deraadt Exp $ */ /* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */ /*- @@ -115,9 +115,9 @@ int cpu_match(struct device *, void *, void *); void cpu_attach(struct device *, struct device *, void *); int cpu_activate(struct device *, int); void patinit(struct cpu_info *ci); -#ifdef VMM +#if NVMM > 0 void cpu_init_vmm(struct cpu_info *ci); -#endif /* VMM */ +#endif /* NVMM > 0 */ struct cpu_softc { struct device sc_dev; /* device tree glue */ @@ -467,9 +467,9 @@ cpu_attach(struct device *parent, struct device *self, void *aux) sc->sc_dev.dv_xname, pcb, pcb->pcb_rsp); } #endif -#ifdef VMM +#if NVMM > 0 cpu_init_vmm(ci); -#endif /* VMM */ +#endif /* NVMM > 0 */ } /* @@ -522,7 +522,7 @@ cpu_init(struct cpu_info *ci) #endif } -#ifdef VMM +#if NVMM > 0 /* * cpu_init_vmm * @@ -545,7 +545,7 @@ cpu_init_vmm(struct cpu_info *ci) panic("Can't locate VMXON region in phys mem\n"); } } -#endif /* VMM */ +#endif /* NVMM > 0 */ #ifdef MULTIPROCESSOR void diff --git a/sys/arch/amd64/amd64/identcpu.c b/sys/arch/amd64/amd64/identcpu.c index 6183e7743b0..aa2437ea504 100644 --- a/sys/arch/amd64/amd64/identcpu.c +++ b/sys/arch/amd64/amd64/identcpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: identcpu.c,v 1.66 2015/11/13 07:52:20 mlarkin Exp $ */ +/* $OpenBSD: identcpu.c,v 1.67 2015/11/23 22:57:12 deraadt Exp $ */ /* $NetBSD: identcpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */ /* @@ -48,9 +48,9 @@ void replacesmap(void); u_int64_t cpu_tsc_freq(struct cpu_info *); u_int64_t cpu_tsc_freq_ctr(struct cpu_info *); -#ifdef VMM +#if NVMM > 0 void cpu_check_vmm_cap(struct cpu_info *); -#endif /* VMM */ +#endif /* NVMM > 0 */ /* sysctl wants this. */ char cpu_model[48]; @@ -628,9 +628,9 @@ identifycpu(struct cpu_info *ci) } cpu_topology(ci); -#ifdef VMM +#if NVMM > 0 cpu_check_vmm_cap(ci); -#endif /* VMM */ +#endif /* NVMM > 0 */ } #ifndef SMALL_KERNEL @@ -754,7 +754,7 @@ no_topology: ci->ci_pkg_id = 0; } -#ifdef VMM +#if NVMM > 0 /* * cpu_check_vmm_cap * @@ -845,4 +845,4 @@ cpu_check_vmm_cap(struct cpu_info *ci) ci->ci_vmm_flags |= CI_VMM_RVI; } } -#endif /* VMM */ +#endif /* NVMM > 0 */ diff --git a/sys/arch/amd64/amd64/ipifuncs.c b/sys/arch/amd64/amd64/ipifuncs.c index 03f4fa827b6..84a625a0e03 100644 --- a/sys/arch/amd64/amd64/ipifuncs.c +++ b/sys/arch/amd64/amd64/ipifuncs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipifuncs.c,v 1.27 2015/11/13 07:52:20 mlarkin Exp $ */ +/* $OpenBSD: ipifuncs.c,v 1.28 2015/11/23 22:57:12 deraadt Exp $ */ /* $NetBSD: ipifuncs.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */ /*- @@ -55,9 +55,9 @@ #include <machine/db_machdep.h> #include "vmm.h" -#ifdef VMM +#if NVMM > 0 #include <machine/vmmvar.h> -#endif /* VMM */ +#endif /* NVMM > 0 */ void x86_64_ipi_nop(struct cpu_info *); void x86_64_ipi_halt(struct cpu_info *); @@ -65,10 +65,10 @@ void x86_64_ipi_halt(struct cpu_info *); void x86_64_ipi_synch_fpu(struct cpu_info *); void x86_64_ipi_flush_fpu(struct cpu_info *); -#ifdef VMM +#if NVMM > 0 void x86_64_ipi_start_vmm(struct cpu_info *); void x86_64_ipi_stop_vmm(struct cpu_info *); -#endif /* VMM */ +#endif /* NVMM > 0 */ #ifdef HIBERNATE void x86_64_ipi_halt_realmode(struct cpu_info *); @@ -95,13 +95,13 @@ void (*ipifunc[X86_NIPI])(struct cpu_info *) = #else NULL, #endif -#ifdef VMM +#if NVMM > 0 x86_64_ipi_start_vmm, x86_64_ipi_stop_vmm, #else NULL, NULL, -#endif /* VMM */ +#endif }; void @@ -150,7 +150,7 @@ x86_64_ipi_reload_mtrr(struct cpu_info *ci) } #endif -#ifdef VMM +#if NVMM > 0 void x86_64_ipi_start_vmm(struct cpu_info *ci) { @@ -162,4 +162,4 @@ x86_64_ipi_stop_vmm(struct cpu_info *ci) { stop_vmm_on_cpu(ci); } -#endif /* VMM */ +#endif /* NVMM > 0 */ diff --git a/sys/arch/amd64/amd64/mainbus.c b/sys/arch/amd64/amd64/mainbus.c index 8baf89862fa..c4c6322ff1b 100644 --- a/sys/arch/amd64/amd64/mainbus.c +++ b/sys/arch/amd64/amd64/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.34 2015/11/13 07:52:20 mlarkin Exp $ */ +/* $OpenBSD: mainbus.c,v 1.35 2015/11/23 22:57:12 deraadt Exp $ */ /* $NetBSD: mainbus.c,v 1.1 2003/04/26 18:39:29 fvdl Exp $ */ /* @@ -240,10 +240,10 @@ mainbus_attach(struct device *parent, struct device *self, void *aux) config_found(self, &mba_iba, mainbus_print); #endif -#ifdef VMM +#if NVMM > 0 mba.mba_busname = "vmm"; config_found(self, &mba.mba_busname, mainbus_print); -#endif /* VMM */ +#endif /* NVMM > 0 */ #if NEFIFB > 0 if (bios_efiinfo != NULL) { diff --git a/sys/arch/amd64/conf/GENERIC b/sys/arch/amd64/conf/GENERIC index a77f7dae17b..2e4f9797307 100644 --- a/sys/arch/amd64/conf/GENERIC +++ b/sys/arch/amd64/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.400 2015/11/13 07:52:20 mlarkin Exp $ +# $OpenBSD: GENERIC,v 1.401 2015/11/23 22:57:12 deraadt Exp $ # # For further information on compiling OpenBSD kernels, see the config(8) # man page. @@ -24,7 +24,6 @@ option MTRR # CPU memory range attributes control option NTFS # NTFS support option HIBERNATE # Hibernate support -#option VMM # VMM support config bsd swap generic diff --git a/sys/arch/amd64/conf/files.amd64 b/sys/arch/amd64/conf/files.amd64 index cca555c839b..4792548fd9c 100644 --- a/sys/arch/amd64/conf/files.amd64 +++ b/sys/arch/amd64/conf/files.amd64 @@ -1,4 +1,4 @@ -# $OpenBSD: files.amd64,v 1.83 2015/11/13 07:52:20 mlarkin Exp $ +# $OpenBSD: files.amd64,v 1.84 2015/11/23 22:57:12 deraadt Exp $ maxpartitions 16 maxusers 2 16 128 @@ -231,8 +231,8 @@ file arch/amd64/amd64/acpi_wakecode.S acpi & !small_kernel # device vmm {} attach vmm at mainbus -file arch/amd64/amd64/vmm.c vmm & !small_kernel needs-flag -file arch/amd64/amd64/vmm_support.S vmm & !small_kernel +file arch/amd64/amd64/vmm.c vmm needs-flag +file arch/amd64/amd64/vmm_support.S vmm # # Machine-independent SD/MMC drivers diff --git a/sys/arch/amd64/include/cpu.h b/sys/arch/amd64/include/cpu.h index e772200f8d4..2b8854ca3db 100644 --- a/sys/arch/amd64/include/cpu.h +++ b/sys/arch/amd64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.98 2015/11/13 07:52:20 mlarkin Exp $ */ +/* $OpenBSD: cpu.h,v 1.99 2015/11/23 22:57:12 deraadt Exp $ */ /* $NetBSD: cpu.h,v 1.1 2003/04/26 18:39:39 fvdl Exp $ */ /*- @@ -54,7 +54,6 @@ #ifdef _KERNEL -#ifdef VMM /* VMXON region (Intel) */ struct vmxon_region { uint32_t vr_revision; @@ -82,7 +81,6 @@ union vmm_cpu_cap { struct vmx vcc_vmx; struct svm vcc_svm; }; -#endif /* VMM */ struct x86_64_tss; struct cpu_info { @@ -177,7 +175,6 @@ struct cpu_info { #ifdef GPROF struct gmonparam *ci_gmon; #endif -#ifdef VMM u_int32_t ci_vmm_flags; #define CI_VMM_VMX (1 << 0) #define CI_VMM_SVM (1 << 1) @@ -186,7 +183,6 @@ struct cpu_info { union vmm_cpu_cap ci_vmm_cap; paddr_t ci_vmxon_region_pa; struct vmxon_region *ci_vmxon_region; -#endif /* VMM */ }; #define CPUF_BSP 0x0001 /* CPU is the original BSP */ |