diff options
author | John Levon <john.levon@joyent.com> | 2020-05-26 13:57:13 +0000 |
---|---|---|
committer | John Levon <john.levon@joyent.com> | 2020-05-26 13:57:13 +0000 |
commit | 5b2acc0949194447bba6e45a0fa44d0b5f42f208 (patch) | |
tree | 7ea9eb87bc68fee386dd39035ce715e87a0e673c /usr/src/uts/i86pc | |
parent | 8ca018083101bf1cb175869679bc123187fb1bab (diff) | |
parent | 2a1277d3064386cd5c4e372301007aa330bf1d5e (diff) | |
download | illumos-joyent-gcc9.tar.gz |
mergegcc9
Diffstat (limited to 'usr/src/uts/i86pc')
-rw-r--r-- | usr/src/uts/i86pc/Makefile.files | 1 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c | 4 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/vmm/amd/svm.c | 8 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/vmm/amd/svm_support.s | 14 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/vmm/intel/vmx.c | 9 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/vmm/intel/vmx_support.s | 29 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/vmm/vm/vm_page.h | 2 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/vmm/vmm_sol_glue.c | 39 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/vmm/x86.c | 75 | ||||
-rw-r--r-- | usr/src/uts/i86pc/io/vmm/x86.h | 4 | ||||
-rw-r--r-- | usr/src/uts/i86pc/ppt/Makefile | 8 | ||||
-rw-r--r-- | usr/src/uts/i86pc/viona/Makefile | 13 | ||||
-rw-r--r-- | usr/src/uts/i86pc/vm/seg_vmm.c | 7 | ||||
-rw-r--r-- | usr/src/uts/i86pc/vmm/Makefile | 47 |
14 files changed, 82 insertions, 178 deletions
diff --git a/usr/src/uts/i86pc/Makefile.files b/usr/src/uts/i86pc/Makefile.files index d9d6605a63..50b429dfe6 100644 --- a/usr/src/uts/i86pc/Makefile.files +++ b/usr/src/uts/i86pc/Makefile.files @@ -25,6 +25,7 @@ # Copyright (c) 2010, Intel Corporation. # Copyright 2019 Joyent, Inc. # Copyright 2019 OmniOS Community Edition (OmniOSce) Association. +# Copyright 2019 Joyent, Inc. # # This Makefile defines file modules in the directory uts/i86pc # and its children. These are the source files which are i86pc diff --git a/usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c b/usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c index 2fed9f162c..1a11d7ff0f 100644 --- a/usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c +++ b/usr/src/uts/i86pc/io/gfx_private/gfxp_bitmap.c @@ -450,10 +450,10 @@ bitmap_cons_clear(struct gfxp_fb_softc *softc, struct vis_consclear *ca) for (i = 0; i < console->fb.screen.y; i++) { if (softc->mode == KD_TEXT) { fb = console->fb.fb + i * pitch; - (void) memset(fb, ca->bg_color, pitch); + (void) memset(fb, data, pitch); } fb = console->fb.shadow_fb + i * pitch; - (void) memset(fb, ca->bg_color, pitch); + (void) memset(fb, data, pitch); } break; case 15: diff --git a/usr/src/uts/i86pc/io/vmm/amd/svm.c b/usr/src/uts/i86pc/io/vmm/amd/svm.c index 292f2d071d..dabe94b7ea 100644 --- a/usr/src/uts/i86pc/io/vmm/amd/svm.c +++ b/usr/src/uts/i86pc/io/vmm/amd/svm.c @@ -28,6 +28,7 @@ /* * Copyright 2018 Joyent, Inc. + * Copyright 2020 Oxide Computer Company */ #include <sys/cdefs.h> @@ -1517,11 +1518,8 @@ svm_vmexit(struct svm_softc *svm_sc, int vcpu, struct vm_exit *vmexit) #if __GNUC__ > 7 #pragma GCC diagnostic ignored "-Waddress-of-packed-member" #endif - handled = x86_emulate_cpuid(svm_sc->vm, vcpu, - (uint32_t *)&state->rax, - (uint32_t *)&ctx->sctx_rbx, - (uint32_t *)&ctx->sctx_rcx, - (uint32_t *)&ctx->sctx_rdx); + handled = x86_emulate_cpuid(svm_sc->vm, vcpu, &state->rax, + &ctx->sctx_rbx, &ctx->sctx_rcx, &ctx->sctx_rdx); #pragma GCC diagnostic pop break; case VMCB_EXIT_HLT: diff --git a/usr/src/uts/i86pc/io/vmm/amd/svm_support.s b/usr/src/uts/i86pc/io/vmm/amd/svm_support.s index fad994b09c..27ef1a04af 100644 --- a/usr/src/uts/i86pc/io/vmm/amd/svm_support.s +++ b/usr/src/uts/i86pc/io/vmm/amd/svm_support.s @@ -36,18 +36,6 @@ /* Porting note: This is named 'svm_support.S' upstream. */ -#if defined(lint) - -struct svm_regctx; -struct cpu; - -/*ARGSUSED*/ -void -svm_launch(uint64_t pa, struct svm_regctx *gctx, struct cpu *cpu) -{} - -#else /* lint */ - #define VMLOAD .byte 0x0f, 0x01, 0xda #define VMRUN .byte 0x0f, 0x01, 0xd8 #define VMSAVE .byte 0x0f, 0x01, 0xdb @@ -160,5 +148,3 @@ ENTRY_NP(svm_launch) popq %rbp ret SET_SIZE(svm_launch) - -#endif /* lint */ diff --git a/usr/src/uts/i86pc/io/vmm/intel/vmx.c b/usr/src/uts/i86pc/io/vmm/intel/vmx.c index 83e137973e..754795c2e9 100644 --- a/usr/src/uts/i86pc/io/vmm/intel/vmx.c +++ b/usr/src/uts/i86pc/io/vmm/intel/vmx.c @@ -40,6 +40,7 @@ * * Copyright 2015 Pluribus Networks Inc. * Copyright 2018 Joyent, Inc. + * Copyright 2020 Oxide Computer Company */ #include <sys/cdefs.h> @@ -1242,11 +1243,9 @@ vmx_handle_cpuid(struct vm *vm, int vcpu, struct vmxctx *vmxctx) int handled; #endif - handled = x86_emulate_cpuid(vm, vcpu, - (uint32_t*)(&vmxctx->guest_rax), - (uint32_t*)(&vmxctx->guest_rbx), - (uint32_t*)(&vmxctx->guest_rcx), - (uint32_t*)(&vmxctx->guest_rdx)); + handled = x86_emulate_cpuid(vm, vcpu, (uint64_t *)&vmxctx->guest_rax, + (uint64_t *)&vmxctx->guest_rbx, (uint64_t *)&vmxctx->guest_rcx, + (uint64_t *)&vmxctx->guest_rdx); return (handled); } diff --git a/usr/src/uts/i86pc/io/vmm/intel/vmx_support.s b/usr/src/uts/i86pc/io/vmm/intel/vmx_support.s index 0130f88dd6..f719e31e30 100644 --- a/usr/src/uts/i86pc/io/vmm/intel/vmx_support.s +++ b/usr/src/uts/i86pc/io/vmm/intel/vmx_support.s @@ -45,31 +45,6 @@ /* Porting note: This is named 'vmx_support.S' upstream. */ - - -#if defined(lint) - -struct vmxctx; -struct vmx; - -/*ARGSUSED*/ -void -vmx_launch(struct vmxctx *ctx) -{} - -void -vmx_exit_guest() -{} - -/*ARGSUSED*/ -int -vmx_enter_guest(struct vmxctx *ctx, struct vmx *vmx, int launched) -{ - return (0); -} - -#else /* lint */ - #include "vmx_assym.h" #include "vmcs.h" @@ -155,7 +130,7 @@ vmx_enter_guest(struct vmxctx *ctx, struct vmx *vmx, int launched) #define VMXSTKSIZE VMXSTK_FP /* - * vmx_enter_guest(struct vmxctx *vmxctx, int launched) + * vmx_enter_guest(struct vmxctx *ctx, struct vmx *vmx, int launched) * Interrupts must be disabled on entry. */ ENTRY_NP(vmx_enter_guest) @@ -380,5 +355,3 @@ ENTRY_NP(vmx_call_isr) popq %rbp ret SET_SIZE(vmx_call_isr) - -#endif /* lint */ diff --git a/usr/src/uts/i86pc/io/vmm/vm/vm_page.h b/usr/src/uts/i86pc/io/vmm/vm/vm_page.h index 65f3319c97..deb25a6cc0 100644 --- a/usr/src/uts/i86pc/io/vmm/vm/vm_page.h +++ b/usr/src/uts/i86pc/io/vmm/vm/vm_page.h @@ -21,7 +21,7 @@ #define PQ_ACTIVE 1 -void vm_page_unwire(vm_page_t , uint8_t); +void vm_page_unwire(vm_page_t, uint8_t); #define VM_PAGE_TO_PHYS(page) (mmu_ptob((uintptr_t)((page)->vmp_pfn))) diff --git a/usr/src/uts/i86pc/io/vmm/vmm_sol_glue.c b/usr/src/uts/i86pc/io/vmm/vmm_sol_glue.c index c8d5aa24e9..2401774ab7 100644 --- a/usr/src/uts/i86pc/io/vmm/vmm_sol_glue.c +++ b/usr/src/uts/i86pc/io/vmm/vmm_sol_glue.c @@ -37,6 +37,7 @@ * * Copyright 2014 Pluribus Networks Inc. * Copyright 2019 Joyent, Inc. + * Copyright 2020 Oxide Computer Company */ #include <sys/types.h> @@ -320,8 +321,13 @@ vmm_glue_callout_handler(void *arg) { struct callout *c = arg; - c->c_flags &= ~CALLOUT_PENDING; - if (c->c_flags & CALLOUT_ACTIVE) { + if (callout_active(c)) { + /* + * Record the handler fire time so that callout_pending() is + * able to detect if the callout becomes rescheduled during the + * course of the handler. + */ + c->c_fired = gethrtime(); (c->c_func)(c->c_arg); } } @@ -337,17 +343,9 @@ vmm_glue_callout_init(struct callout *c, int mpsafe) hdlr.cyh_arg = c; when.cyt_when = CY_INFINITY; when.cyt_interval = CY_INFINITY; + bzero(c, sizeof (*c)); mutex_enter(&cpu_lock); -#if 0 - /* - * XXXJOY: according to the freebsd sources, callouts do not begin - * their life in the ACTIVE state. - */ - c->c_flags |= CALLOUT_ACTIVE; -#else - bzero(c, sizeof (*c)); -#endif c->c_cyc_id = cyclic_add(&hdlr, &when); mutex_exit(&cpu_lock); } @@ -367,15 +365,14 @@ vmm_glue_callout_reset_sbt(struct callout *c, sbintime_t sbt, sbintime_t pr, ASSERT(c->c_cyc_id != CYCLIC_NONE); + if ((flags & C_ABSOLUTE) == 0) { + target += gethrtime(); + } + c->c_func = func; c->c_arg = arg; - c->c_flags |= (CALLOUT_ACTIVE | CALLOUT_PENDING); - - if (flags & C_ABSOLUTE) { - cyclic_reprogram(c->c_cyc_id, target); - } else { - cyclic_reprogram(c->c_cyc_id, target + gethrtime()); - } + c->c_target = target; + cyclic_reprogram(c->c_cyc_id, target); return (0); } @@ -384,8 +381,9 @@ int vmm_glue_callout_stop(struct callout *c) { ASSERT(c->c_cyc_id != CYCLIC_NONE); + + c->c_target = 0; cyclic_reprogram(c->c_cyc_id, CY_INFINITY); - c->c_flags &= ~(CALLOUT_ACTIVE | CALLOUT_PENDING); return (0); } @@ -394,10 +392,11 @@ int vmm_glue_callout_drain(struct callout *c) { ASSERT(c->c_cyc_id != CYCLIC_NONE); + + c->c_target = 0; mutex_enter(&cpu_lock); cyclic_remove(c->c_cyc_id); c->c_cyc_id = CYCLIC_NONE; - c->c_flags &= ~(CALLOUT_ACTIVE | CALLOUT_PENDING); mutex_exit(&cpu_lock); return (0); diff --git a/usr/src/uts/i86pc/io/vmm/x86.c b/usr/src/uts/i86pc/io/vmm/x86.c index d74f866013..6213173587 100644 --- a/usr/src/uts/i86pc/io/vmm/x86.c +++ b/usr/src/uts/i86pc/io/vmm/x86.c @@ -39,6 +39,7 @@ * * Copyright 2014 Pluribus Networks Inc. * Copyright 2018 Joyent, Inc. + * Copyright 2020 Oxide Computer Company */ #include <sys/cdefs.h> @@ -90,34 +91,39 @@ log2(u_int x) } int -x86_emulate_cpuid(struct vm *vm, int vcpu_id, - uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx) +x86_emulate_cpuid(struct vm *vm, int vcpu_id, uint64_t *rax, uint64_t *rbx, + uint64_t *rcx, uint64_t *rdx) { const struct xsave_limits *limits; uint64_t cr4; int error, enable_invpcid, level, width = 0, x2apic_id = 0; - unsigned int func, regs[4], logical_cpus = 0; + unsigned int func, regs[4], logical_cpus = 0, param; enum x2apic_state x2apic_state; uint16_t cores, maxcpus, sockets, threads; - VCPU_CTR2(vm, vcpu_id, "cpuid %#x,%#x", *eax, *ecx); + /* + * The function of CPUID is controlled through the provided value of + * %eax (and secondarily %ecx, for certain leaf data). + */ + func = (uint32_t)*rax; + param = (uint32_t)*rcx; + + VCPU_CTR2(vm, vcpu_id, "cpuid %#x,%#x", func, param); /* * Requests for invalid CPUID levels should map to the highest * available level instead. */ - if (cpu_exthigh != 0 && *eax >= 0x80000000) { - if (*eax > cpu_exthigh) - *eax = cpu_exthigh; - } else if (*eax >= 0x40000000) { - if (*eax > CPUID_VM_HIGH) - *eax = CPUID_VM_HIGH; - } else if (*eax > cpu_high) { - *eax = cpu_high; + if (cpu_exthigh != 0 && func >= 0x80000000) { + if (func > cpu_exthigh) + func = cpu_exthigh; + } else if (func >= 0x40000000) { + if (func > CPUID_VM_HIGH) + func = CPUID_VM_HIGH; + } else if (func > cpu_high) { + func = cpu_high; } - func = *eax; - /* * In general the approach used for CPU topology is to * advertise a flat topology where all CPUs are packages with @@ -135,10 +141,10 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, case CPUID_8000_0003: case CPUID_8000_0004: case CPUID_8000_0006: - cpuid_count(*eax, *ecx, regs); + cpuid_count(func, param, regs); break; case CPUID_8000_0008: - cpuid_count(*eax, *ecx, regs); + cpuid_count(func, param, regs); if (vmm_is_amd()) { /* * As on Intel (0000_0007:0, EDX), mask out @@ -169,7 +175,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, break; case CPUID_8000_0001: - cpuid_count(*eax, *ecx, regs); + cpuid_count(func, param, regs); /* * Hide SVM from guest. @@ -263,7 +269,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, */ vm_get_topology(vm, &sockets, &cores, &threads, &maxcpus); - switch (*ecx) { + switch (param) { case 0: logical_cpus = threads; level = 1; @@ -408,7 +414,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, break; case CPUID_0000_0004: - cpuid_count(*eax, *ecx, regs); + cpuid_count(func, param, regs); if (regs[0] || regs[1] || regs[2] || regs[3]) { vm_get_topology(vm, &sockets, &cores, &threads, @@ -437,8 +443,8 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, regs[3] = 0; /* leaf 0 */ - if (*ecx == 0) { - cpuid_count(*eax, *ecx, regs); + if (param == 0) { + cpuid_count(func, param, regs); /* Only leaf 0 is supported */ regs[0] = 0; @@ -491,21 +497,21 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, if (vmm_is_intel()) { vm_get_topology(vm, &sockets, &cores, &threads, &maxcpus); - if (*ecx == 0) { + if (param == 0) { logical_cpus = threads; width = log2(logical_cpus); level = CPUID_TYPE_SMT; x2apic_id = vcpu_id; } - if (*ecx == 1) { + if (param == 1) { logical_cpus = threads * cores; width = log2(logical_cpus); level = CPUID_TYPE_CORE; x2apic_id = vcpu_id; } - if (!cpuid_leaf_b || *ecx >= 2) { + if (!cpuid_leaf_b || param >= 2) { width = 0; logical_cpus = 0; level = 0; @@ -514,7 +520,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, regs[0] = width & 0x1f; regs[1] = logical_cpus & 0xffff; - regs[2] = (level << 8) | (*ecx & 0xff); + regs[2] = (level << 8) | (param & 0xff); regs[3] = x2apic_id; } else { regs[0] = 0; @@ -534,8 +540,8 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, break; } - cpuid_count(*eax, *ecx, regs); - switch (*ecx) { + cpuid_count(func, param, regs); + switch (param) { case 0: /* * Only permit the guest to use bits @@ -565,7 +571,7 @@ x86_emulate_cpuid(struct vm *vm, int vcpu_id, * pass through as-is, otherwise return * all zeroes. */ - if (!(limits->xcr0_allowed & (1ul << *ecx))) { + if (!(limits->xcr0_allowed & (1ul << param))) { regs[0] = 0; regs[1] = 0; regs[2] = 0; @@ -590,14 +596,17 @@ default_leaf: * how many unhandled leaf values have been seen. */ atomic_add_long(&bhyve_xcpuids, 1); - cpuid_count(*eax, *ecx, regs); + cpuid_count(func, param, regs); break; } - *eax = regs[0]; - *ebx = regs[1]; - *ecx = regs[2]; - *edx = regs[3]; + /* + * CPUID clears the upper 32-bits of the long-mode registers. + */ + *rax = regs[0]; + *rbx = regs[1]; + *rcx = regs[2]; + *rdx = regs[3]; return (1); } diff --git a/usr/src/uts/i86pc/io/vmm/x86.h b/usr/src/uts/i86pc/io/vmm/x86.h index 0d70c04fd8..cb8e12fcd2 100644 --- a/usr/src/uts/i86pc/io/vmm/x86.h +++ b/usr/src/uts/i86pc/io/vmm/x86.h @@ -63,8 +63,8 @@ */ #define CPUID_0000_0001_FEAT0_VMX (1<<5) -int x86_emulate_cpuid(struct vm *vm, int vcpu_id, uint32_t *eax, uint32_t *ebx, - uint32_t *ecx, uint32_t *edx); +int x86_emulate_cpuid(struct vm *vm, int vcpu_id, uint64_t *rax, uint64_t *rbx, + uint64_t *rcx, uint64_t *rdx); enum vm_cpuid_capability { VCC_NONE, diff --git a/usr/src/uts/i86pc/ppt/Makefile b/usr/src/uts/i86pc/ppt/Makefile index f231dfddf6..7c41368efd 100644 --- a/usr/src/uts/i86pc/ppt/Makefile +++ b/usr/src/uts/i86pc/ppt/Makefile @@ -24,7 +24,6 @@ UTSBASE = ../.. # MODULE = ppt OBJECTS = $(PPT_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(PPT_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(USR_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/i86pc/io/vmm/io MAPFILE = $(UTSBASE)/i86pc/io/vmm/io/ppt.mapfile @@ -38,7 +37,6 @@ include $(UTSBASE)/i86pc/Makefile.i86pc # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # @@ -72,12 +70,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/i86pc/viona/Makefile b/usr/src/uts/i86pc/viona/Makefile index dac59c9a45..b7f0fd6f53 100644 --- a/usr/src/uts/i86pc/viona/Makefile +++ b/usr/src/uts/i86pc/viona/Makefile @@ -24,7 +24,6 @@ UTSBASE = ../.. # MODULE = viona OBJECTS = $(VIONA_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(VIONA_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(USR_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/i86pc/io/viona MAPFILE = $(UTSBASE)/i86pc/io/viona/viona.mapfile @@ -38,17 +37,11 @@ include $(UTSBASE)/i86pc/Makefile.i86pc # Define targets # ALL_TARGET = $(BINARY) $(SRC_CONFILE) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # # Overrides # -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV -LINTTAGS += -erroff=E_FUNC_ARG_UNUSED -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_FUNC_RET_MAYBE_IGNORED2 -LINTTAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2 # needs work SMOFF += all_func_returns @@ -74,12 +67,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # diff --git a/usr/src/uts/i86pc/vm/seg_vmm.c b/usr/src/uts/i86pc/vm/seg_vmm.c index faebf9ac36..beb5e81d53 100644 --- a/usr/src/uts/i86pc/vm/seg_vmm.c +++ b/usr/src/uts/i86pc/vm/seg_vmm.c @@ -14,12 +14,15 @@ */ /* - * VM - Virtual-Machine-Memory segment + * segvmm - Virtual-Machine-Memory segment * * The vmm segment driver was designed for mapping regions of kernel memory * allocated to an HVM instance into userspace for manipulation there. It * draws direct lineage from the umap segment driver, but meant for larger * mappings with fewer restrictions. + * + * seg*k*vmm, in contrast, has mappings for every VMM into kas. We use its + * mappings here only to find the relevant PFNs in segvmm_fault_in(). */ @@ -93,7 +96,7 @@ static struct seg_ops segvmm_ops = { /* - * Create a kernel/user-mapped segment. + * Create a kernel/user-mapped segment. ->kaddr is the segkvmm mapping. */ int segvmm_create(struct seg **segpp, void *argsp) diff --git a/usr/src/uts/i86pc/vmm/Makefile b/usr/src/uts/i86pc/vmm/Makefile index 018a05ab92..c55abf6090 100644 --- a/usr/src/uts/i86pc/vmm/Makefile +++ b/usr/src/uts/i86pc/vmm/Makefile @@ -24,7 +24,6 @@ UTSBASE = ../.. # MODULE = vmm OBJECTS = $(VMM_OBJS:%=$(OBJS_DIR)/%) -LINTS = $(VMM_OBJS:%.o=$(LINTS_DIR)/%.ln) ROOTMODULE = $(USR_DRV_DIR)/$(MODULE) CONF_SRCDIR = $(UTSBASE)/i86pc/io/vmm MAPFILE = $(UTSBASE)/i86pc/io/vmm/vmm.mapfile @@ -38,42 +37,11 @@ include $(UTSBASE)/i86pc/Makefile.i86pc # Define targets # ALL_TARGET = $(BINARY) -LINT_TARGET = $(MODULE).lint INSTALL_TARGET = $(BINARY) $(ROOTMODULE) $(ROOT_CONFFILE) # # Overrides and additions # -LINTTAGS += -erroff=E_EMPTY_DECLARATION -LINTTAGS += -erroff=E_OPERANDS_INCOMPATIBLE_TYPES -LINTTAGS += -erroff=E_VOID_CANT_RETURN_VALUE -LINTTAGS += -erroff=E_YACC_ERROR -LINTTAGS += -erroff=E_STATIC_UNUSED -LINTTAGS += -erroff=E_FUNC_RET_MAYBE_IGNORED2 -LINTTAGS += -erroff=E_FUNC_RET_ALWAYS_IGNOR2 -LINTTAGS += -erroff=E_BAD_FORMAT_ARG_TYPE2 -LINTTAGS += -erroff=E_FUNC_ARG_UNUSED -LINTTAGS += -erroff=E_FUNC_SET_NOT_USED -LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV -LINTTAGS += -erroff=E_BAD_PTR_CAST_ALIGN -LINTTAGS += -erroff=E_CONSTANT_CONDITION -LINTTAGS += -erroff=E_PTR_TO_VOID_IN_ARITHMETIC -LINTTAGS += -erroff=E_CONST_TRUNCATED_BY_ASSIGN -LINTTAGS += -erroff=E_NOP_ELSE_STMT -LINTTAGS += -erroff=E_FUNC_NO_RET_VAL -LINTTAGS += -erroff=E_OLD_STYLE_DECL_OR_BAD_TYPE -LINTTAGS += -erroff=E_VAR_USED_BEFORE_SET -LINTTAGS += -erroff=E_INTEGER_OVERFLOW_DETECTED -LINTTAGS += -erroff=E_STMT_NOT_REACHED -LINTTAGS += -erroff=E_FUNC_NO_RET_VAL -LINTTAGS += -erroff=E_USELESS_DECLARATION -LINTTAGS += -erroff=E_EXPR_NULL_EFFECT -LINTTAGS += -erroff=E_CASE_FALLTHRU -LINTTAGS += -erroff=E_FUNC_DECL_VAR_ARG2 -LINTTAGS += -erroff=E_ASM_IMPOSSIBLE_CONSTRAINT -LINTTAGS += -erroff=E_ASM_UNUSED_PARAM -LINTTAGS += -erroff=E_NOP_IF_STMT -LINTTAGS += -erroff=E_ZERO_OR_NEGATIVE_SUBSCRIPT CERRWARN += -_gcc=-Wno-empty-body @@ -86,11 +54,6 @@ $(OBJS_DIR)/vmm_sol_dev.o := SMOFF += signed_integer_overflow_check # a can't happen: vmx_setcap() warn: variable dereferenced before check 'pptr' $(OBJS_DIR)/vmx.o := SMOFF += deref_check -# These sources only compile with gcc. Workaround a confluence of cruft -# regarding dmake and shadow compilation by neutering the sun compiler. -#amd64_CC = $(ONBLD_TOOLS)/bin/$(MACH)/cw -_gcc -#CFLAGS += -_cc=-xdryrun - ALL_BUILDS = $(ALL_BUILDSONLY64) DEF_BUILDS = $(DEF_BUILDSONLY64) PRE_INC_PATH = -I$(COMPAT)/freebsd -I$(COMPAT)/freebsd/amd64 \ @@ -109,8 +72,8 @@ $(OBJS_DIR)/svm.o := CERRWARN += -_gcc=-Wno-pointer-sign -_gcc=-Wno-type-limits $(OBJS_DIR)/vmx.o := CERRWARN += -_gcc=-Wno-unused-variable $(OBJS_DIR)/iommu.o := CERRWARN += -_gcc=-Wno-unused-variable -LDFLAGS += -N misc/acpica -N misc/pcie -N fs/dev -z type=kmod -LDFLAGS += -M $(MAPFILE) +LDFLAGS += -N misc/acpica -N misc/pcie -N fs/dev +LDFLAGS += -z type=kmod -M $(MAPFILE) OFFSETS_VMX = $(CONF_SRCDIR)/intel/offsets.in OFFSETS_SVM = $(CONF_SRCDIR)/amd/offsets.in @@ -133,12 +96,6 @@ clean: $(CLEAN_DEPS) clobber: $(CLOBBER_DEPS) -lint: $(LINT_DEPS) - -modlintlib: $(MODLINTLIB_DEPS) - -clean.lint: $(CLEAN_LINT_DEPS) - install: $(INSTALL_DEPS) # |