summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2020-09-10 11:29:50 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2020-09-10 11:29:50 +0000
commitcbc0b53bb075eb69233b2065b459d59c318f3649 (patch)
treeee2cfdf56e9a4290740c740246ce3d2b010ac091 /usr/src
parentefa5e27328448ba1dbdae9ee2e3885ee2f6f7659 (diff)
parent9dc804b9db4598936de071708cbc40525f06eb5d (diff)
downloadillumos-joyent-cbc0b53bb075eb69233b2065b459d59c318f3649.tar.gz
[illumos-gate merge]
commit 9dc804b9db4598936de071708cbc40525f06eb5d 13077 bhyve kernel should be -Wformat clean commit 5d2ed7273d684a5ddeb0970c96ef9cf3ddd4e044 13115 libc: variable 'readers' set but not used
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/libc/port/threads/rwlock.c5
-rw-r--r--usr/src/uts/i86pc/io/vmm/amd/svm.c62
-rw-r--r--usr/src/uts/i86pc/io/vmm/intel/vmcs.c8
-rw-r--r--usr/src/uts/i86pc/io/vmm/intel/vmx.c44
-rw-r--r--usr/src/uts/i86pc/io/vmm/intel/vtd.c6
-rw-r--r--usr/src/uts/i86pc/io/vmm/io/vpmtmr.c2
-rw-r--r--usr/src/uts/i86pc/io/vmm/io/vrtc.c97
-rw-r--r--usr/src/uts/i86pc/io/vmm/vmm.c41
-rw-r--r--usr/src/uts/i86pc/io/vmm/vmm_sol_glue.c2
-rw-r--r--usr/src/uts/i86pc/os/gipt.c6
-rw-r--r--usr/src/uts/i86pc/vmm/Makefile2
11 files changed, 114 insertions, 161 deletions
diff --git a/usr/src/lib/libc/port/threads/rwlock.c b/usr/src/lib/libc/port/threads/rwlock.c
index 9654b7daaf..faff5da953 100644
--- a/usr/src/lib/libc/port/threads/rwlock.c
+++ b/usr/src/lib/libc/port/threads/rwlock.c
@@ -505,7 +505,6 @@ shared_rwlock_lock(rwlock_t *rwlp, timespec_t *tsp, int rd_wr)
{
volatile uint32_t *rwstate = (volatile uint32_t *)&rwlp->rwlock_readers;
mutex_t *mp = &rwlp->mutex;
- uint32_t readers;
int try_flag;
int error;
@@ -536,8 +535,12 @@ shared_rwlock_lock(rwlock_t *rwlp, timespec_t *tsp, int rd_wr)
}
}
atomic_or_32(rwstate, URW_HAS_WAITERS);
+
+#ifdef THREAD_DEBUG
+ uint32_t readers;
readers = *rwstate;
ASSERT_CONSISTENT_STATE(readers);
+#endif
/*
* The calls to __lwp_rwlock_*() below will release the mutex,
* so we need a dtrace probe here. The owner field of the
diff --git a/usr/src/uts/i86pc/io/vmm/amd/svm.c b/usr/src/uts/i86pc/io/vmm/amd/svm.c
index 431a3d6d8e..46106e9094 100644
--- a/usr/src/uts/i86pc/io/vmm/amd/svm.c
+++ b/usr/src/uts/i86pc/io/vmm/amd/svm.c
@@ -203,7 +203,7 @@ check_svm_features(void)
*/
if (nasid == 0 || nasid > regs[1])
nasid = regs[1];
- KASSERT(nasid > 1, ("Insufficient ASIDs for guests: %#x", nasid));
+ KASSERT(nasid > 1, ("Insufficient ASIDs for guests: %x", nasid));
/* bhyve requires the Nested Paging feature */
if (!(svm_feature & AMD_CPUID_SVM_NP)) {
@@ -386,11 +386,11 @@ svm_msr_perm(uint8_t *perm_bitmap, uint64_t msr, bool read, bool write)
int index, bit, error;
error = svm_msr_index(msr, &index, &bit);
- KASSERT(error == 0, ("%s: invalid msr %#lx", __func__, msr));
+ KASSERT(error == 0, ("%s: invalid msr %lx", __func__, msr));
KASSERT(index >= 0 && index < SVM_MSR_BITMAP_SIZE,
- ("%s: invalid index %d for msr %#lx", __func__, index, msr));
+ ("%s: invalid index %d for msr %lx", __func__, index, msr));
KASSERT(bit >= 0 && bit <= 6, ("%s: invalid bit position %d "
- "msr %#lx", __func__, bit, msr));
+ "msr %lx", __func__, bit, msr));
if (read)
perm_bitmap[index] &= ~(1UL << bit);
@@ -444,7 +444,7 @@ svm_set_intercept(struct svm_softc *sc, int vcpu, int idx, uint32_t bitmask,
if (ctrl->intercept[idx] != oldval) {
svm_set_dirty(sc, vcpu, VMCB_CACHE_I);
VCPU_CTR3(sc->vm, vcpu, "intercept[%d] modified "
- "from %#x to %#x", idx, oldval, ctrl->intercept[idx]);
+ "from %x to %x", idx, oldval, ctrl->intercept[idx]);
}
}
@@ -922,7 +922,7 @@ svm_eventinject(struct svm_softc *sc, int vcpu, int intr_type, int vector,
ctrl = svm_get_vmcb_ctrl(sc, vcpu);
KASSERT((ctrl->eventinj & VMCB_EVENTINJ_VALID) == 0,
- ("%s: event already pending %#lx", __func__, ctrl->eventinj));
+ ("%s: event already pending %lx", __func__, ctrl->eventinj));
KASSERT(vector >=0 && vector <= 255, ("%s: invalid vector %d",
__func__, vector));
@@ -944,7 +944,7 @@ svm_eventinject(struct svm_softc *sc, int vcpu, int intr_type, int vector,
if (ec_valid) {
ctrl->eventinj |= VMCB_EVENTINJ_EC_VALID;
ctrl->eventinj |= (uint64_t)error << 32;
- VCPU_CTR3(sc->vm, vcpu, "Injecting %s at vector %d errcode %#x",
+ VCPU_CTR3(sc->vm, vcpu, "Injecting %s at vector %d errcode %x",
intrtype_to_str(intr_type), vector, error);
} else {
VCPU_CTR2(sc->vm, vcpu, "Injecting %s at vector %d",
@@ -1110,7 +1110,7 @@ svm_write_efer(struct svm_softc *sc, int vcpu, uint64_t newval, bool *retu)
state = svm_get_vmcb_state(sc, vcpu);
oldval = state->efer;
- VCPU_CTR2(sc->vm, vcpu, "wrmsr(efer) %#lx/%#lx", oldval, newval);
+ VCPU_CTR2(sc->vm, vcpu, "wrmsr(efer) %lx/%lx", oldval, newval);
newval &= ~0xFE; /* clear the Read-As-Zero (RAZ) bits */
changed = oldval ^ newval;
@@ -1244,7 +1244,7 @@ exit_reason_to_str(uint64_t reason)
case VMCB_EXIT_MWAIT:
return ("mwait");
default:
- snprintf(reasonbuf, sizeof(reasonbuf), "%#lx", reason);
+ snprintf(reasonbuf, sizeof(reasonbuf), "%lx", reason);
return (reasonbuf);
}
}
@@ -1319,10 +1319,10 @@ svm_vmexit(struct svm_softc *svm_sc, int vcpu, struct vm_exit *vmexit)
}
KASSERT((ctrl->eventinj & VMCB_EVENTINJ_VALID) == 0, ("%s: event "
- "injection valid bit is set %#lx", __func__, ctrl->eventinj));
+ "injection valid bit is set %lx", __func__, ctrl->eventinj));
KASSERT(vmexit->inst_length >= 0 && vmexit->inst_length <= 15,
- ("invalid inst_length %d: code (%#lx), info1 (%#lx), info2 (%#lx)",
+ ("invalid inst_length %d: code (%lx), info1 (%lx), info2 (%lx)",
vmexit->inst_length, code, info1, info2));
svm_update_virqinfo(svm_sc, vcpu);
@@ -1414,7 +1414,7 @@ svm_vmexit(struct svm_softc *svm_sc, int vcpu, struct vm_exit *vmexit)
if (reflect) {
/* Reflect the exception back into the guest */
VCPU_CTR2(svm_sc->vm, vcpu, "Reflecting exception "
- "%d/%#x into the guest", idtvec, (int)info1);
+ "%d/%x into the guest", idtvec, (int)info1);
error = vm_inject_exception(svm_sc->vm, vcpu, idtvec,
errcode_valid, info1, 0);
KASSERT(error == 0, ("%s: vm_inject_exception error %d",
@@ -1431,7 +1431,7 @@ svm_vmexit(struct svm_softc *svm_sc, int vcpu, struct vm_exit *vmexit)
if (info1) {
vmm_stat_incr(svm_sc->vm, vcpu, VMEXIT_WRMSR, 1);
val = (uint64_t)edx << 32 | eax;
- VCPU_CTR2(svm_sc->vm, vcpu, "wrmsr %#x val %#lx",
+ VCPU_CTR2(svm_sc->vm, vcpu, "wrmsr %x val %lx",
ecx, val);
if (emulate_wrmsr(svm_sc, vcpu, ecx, val, &retu)) {
vmexit->exitcode = VM_EXITCODE_WRMSR;
@@ -1444,7 +1444,7 @@ svm_vmexit(struct svm_softc *svm_sc, int vcpu, struct vm_exit *vmexit)
("emulate_wrmsr retu with bogus exitcode"));
}
} else {
- VCPU_CTR1(svm_sc->vm, vcpu, "rdmsr %#x", ecx);
+ VCPU_CTR1(svm_sc->vm, vcpu, "rdmsr %x", ecx);
vmm_stat_incr(svm_sc->vm, vcpu, VMEXIT_RDMSR, 1);
if (emulate_rdmsr(svm_sc, vcpu, ecx, &retu)) {
vmexit->exitcode = VM_EXITCODE_RDMSR;
@@ -1479,7 +1479,7 @@ svm_vmexit(struct svm_softc *svm_sc, int vcpu, struct vm_exit *vmexit)
/* EXITINFO2 contains the faulting guest physical address */
if (info1 & VMCB_NPF_INFO1_RSV) {
VCPU_CTR2(svm_sc->vm, vcpu, "nested page fault with "
- "reserved bits set: info1(%#lx) info2(%#lx)",
+ "reserved bits set: info1(%lx) info2(%lx)",
info1, info2);
} else if (vm_mem_allocated(svm_sc->vm, vcpu, info2)) {
vmexit->exitcode = VM_EXITCODE_PAGING;
@@ -1487,13 +1487,13 @@ svm_vmexit(struct svm_softc *svm_sc, int vcpu, struct vm_exit *vmexit)
vmexit->u.paging.fault_type = npf_fault_type(info1);
vmm_stat_incr(svm_sc->vm, vcpu, VMEXIT_NESTED_FAULT, 1);
VCPU_CTR3(svm_sc->vm, vcpu, "nested page fault "
- "on gpa %#lx/%#lx at rip %#lx",
+ "on gpa %lx/%lx at rip %lx",
info2, info1, state->rip);
} else if (svm_npf_emul_fault(info1)) {
svm_handle_mmio_emul(svm_sc, vcpu, vmexit, info2);
vmm_stat_incr(svm_sc->vm, vcpu, VMEXIT_MMIO_EMUL, 1);
VCPU_CTR3(svm_sc->vm, vcpu, "mmio_emul fault "
- "for gpa %#lx/%#lx at rip %#lx",
+ "for gpa %lx/%lx at rip %lx",
info2, info1, state->rip);
}
break;
@@ -1508,7 +1508,7 @@ svm_vmexit(struct svm_softc *svm_sc, int vcpu, struct vm_exit *vmexit)
break;
}
- VCPU_CTR4(svm_sc->vm, vcpu, "%s %s vmexit at %#lx/%d",
+ VCPU_CTR4(svm_sc->vm, vcpu, "%s %s vmexit at %lx/%d",
handled ? "handled" : "unhandled", exit_reason_to_str(code),
vmexit->rip, vmexit->inst_length);
@@ -1545,14 +1545,14 @@ svm_inj_intinfo(struct svm_softc *svm_sc, int vcpu)
return;
KASSERT(VMCB_EXITINTINFO_VALID(intinfo), ("%s: entry intinfo is not "
- "valid: %#lx", __func__, intinfo));
+ "valid: %lx", __func__, intinfo));
svm_eventinject(svm_sc, vcpu, VMCB_EXITINTINFO_TYPE(intinfo),
VMCB_EXITINTINFO_VECTOR(intinfo),
VMCB_EXITINTINFO_EC(intinfo),
VMCB_EXITINTINFO_EC_VALID(intinfo));
vmm_stat_incr(svm_sc->vm, vcpu, VCPU_INTINFO_INJECTED, 1);
- VCPU_CTR1(svm_sc->vm, vcpu, "Injected entry intinfo: %#lx", intinfo);
+ VCPU_CTR1(svm_sc->vm, vcpu, "Injected entry intinfo: %lx", intinfo);
}
/*
@@ -1579,7 +1579,7 @@ svm_inj_interrupts(struct svm_softc *sc, int vcpu, struct vlapic *vlapic)
if (vcpustate->nextrip != state->rip) {
ctrl->intr_shadow = 0;
VCPU_CTR2(sc->vm, vcpu, "Guest interrupt blocking "
- "cleared due to rip change: %#lx/%#lx",
+ "cleared due to rip change: %lx/%lx",
vcpustate->nextrip, state->rip);
}
@@ -1617,7 +1617,7 @@ svm_inj_interrupts(struct svm_softc *sc, int vcpu, struct vlapic *vlapic)
* then defer the NMI until after that.
*/
VCPU_CTR1(sc->vm, vcpu, "Cannot inject NMI due to "
- "eventinj %#lx", ctrl->eventinj);
+ "eventinj %lx", ctrl->eventinj);
/*
* Use self-IPI to trigger a VM-exit as soon as
@@ -1663,7 +1663,7 @@ svm_inj_interrupts(struct svm_softc *sc, int vcpu, struct vlapic *vlapic)
*/
if ((state->rflags & PSL_I) == 0) {
VCPU_CTR2(sc->vm, vcpu, "Cannot inject vector %d due to "
- "rflags %#lx", vector, state->rflags);
+ "rflags %lx", vector, state->rflags);
need_intr_window = 1;
goto done;
}
@@ -1677,7 +1677,7 @@ svm_inj_interrupts(struct svm_softc *sc, int vcpu, struct vlapic *vlapic)
if (ctrl->eventinj & VMCB_EVENTINJ_VALID) {
VCPU_CTR2(sc->vm, vcpu, "Cannot inject vector %d due to "
- "eventinj %#lx", vector, ctrl->eventinj);
+ "eventinj %lx", vector, ctrl->eventinj);
need_intr_window = 1;
goto done;
}
@@ -1711,9 +1711,9 @@ done:
* VMRUN.
*/
v_tpr = vlapic_get_cr8(vlapic);
- KASSERT(v_tpr <= 15, ("invalid v_tpr %#x", v_tpr));
+ KASSERT(v_tpr <= 15, ("invalid v_tpr %x", v_tpr));
if (ctrl->v_tpr != v_tpr) {
- VCPU_CTR2(sc->vm, vcpu, "VMCB V_TPR changed from %#x to %#x",
+ VCPU_CTR2(sc->vm, vcpu, "VMCB V_TPR changed from %x to %x",
ctrl->v_tpr, v_tpr);
ctrl->v_tpr = v_tpr;
svm_set_dirty(sc, vcpu, VMCB_CACHE_TPR);
@@ -1731,8 +1731,8 @@ done:
*/
KASSERT((ctrl->eventinj & VMCB_EVENTINJ_VALID) != 0 ||
(state->rflags & PSL_I) == 0 || ctrl->intr_shadow,
- ("Bogus intr_window_exiting: eventinj (%#lx), "
- "intr_shadow (%u), rflags (%#lx)",
+ ("Bogus intr_window_exiting: eventinj (%lx), "
+ "intr_shadow (%lu), rflags (%lx)",
ctrl->eventinj, ctrl->intr_shadow, state->rflags));
enable_intr_window_exiting(sc, vcpu);
} else {
@@ -1807,7 +1807,7 @@ check_asid(struct svm_softc *sc, int vcpuid, pmap_t pmap, u_int thiscpu)
*/
KASSERT(!alloc_asid, ("ASID allocation not necessary"));
KASSERT(ctrl->tlb_ctrl == VMCB_TLB_FLUSH_NOTHING,
- ("Invalid VMCB tlb_ctrl: %#x", ctrl->tlb_ctrl));
+ ("Invalid VMCB tlb_ctrl: %x", ctrl->tlb_ctrl));
}
if (alloc_asid) {
@@ -2078,10 +2078,10 @@ svm_vmrun(void *arg, int vcpu, register_t rip, pmap_t pmap,
ctrl->vmcb_clean = vmcb_clean & ~vcpustate->dirty;
vcpustate->dirty = 0;
- VCPU_CTR1(vm, vcpu, "vmcb clean %#x", ctrl->vmcb_clean);
+ VCPU_CTR1(vm, vcpu, "vmcb clean %x", ctrl->vmcb_clean);
/* Launch Virtual Machine. */
- VCPU_CTR1(vm, vcpu, "Resume execution at %#lx", state->rip);
+ VCPU_CTR1(vm, vcpu, "Resume execution at %lx", state->rip);
svm_dr_enter_guest(gctx);
svm_launch(vmcb_pa, gctx, get_pcpu());
svm_dr_leave_guest(gctx);
diff --git a/usr/src/uts/i86pc/io/vmm/intel/vmcs.c b/usr/src/uts/i86pc/io/vmm/intel/vmcs.c
index 51ae5fbd0c..36318b1b49 100644
--- a/usr/src/uts/i86pc/io/vmm/intel/vmcs.c
+++ b/usr/src/uts/i86pc/io/vmm/intel/vmcs.c
@@ -178,7 +178,7 @@ vmcs_clear(uintptr_t vmcs_pa)
: "memory");
if (err != 0) {
- panic("vmclear(%p) error %d", vmcs_pa, err);
+ panic("vmclear(%p) error %d", (void *)vmcs_pa, err);
}
/*
@@ -208,7 +208,7 @@ vmcs_initialize(struct vmcs *vmcs, uintptr_t vmcs_pa)
: "memory");
if (err != 0) {
- panic("vmclear(%p) error %d", vmcs_pa, err);
+ panic("vmclear(%p) error %d", (void *)vmcs_pa, err);
}
}
@@ -232,7 +232,7 @@ vmcs_load(uintptr_t vmcs_pa)
: "memory");
if (err != 0) {
- panic("vmptrld(%p) error %d", vmcs_pa, err);
+ panic("vmptrld(%p) error %d", (void *)vmcs_pa, err);
}
}
@@ -267,6 +267,6 @@ vmcs_write(uint32_t encoding, uint64_t val)
: "memory");
if (error != 0) {
- panic("vmwrite(%x, %x) error %d", encoding, val, error);
+ panic("vmwrite(%x, %lx) error %d", encoding, val, error);
}
}
diff --git a/usr/src/uts/i86pc/io/vmm/intel/vmx.c b/usr/src/uts/i86pc/io/vmm/intel/vmx.c
index 50001c0735..cb8409f5df 100644
--- a/usr/src/uts/i86pc/io/vmm/intel/vmx.c
+++ b/usr/src/uts/i86pc/io/vmm/intel/vmx.c
@@ -1089,7 +1089,7 @@ static __inline void
vmx_run_trace(struct vmx *vmx, int vcpu)
{
#ifdef KTR
- VCPU_CTR1(vmx->vm, vcpu, "Resume execution at %#lx", vmcs_guest_rip());
+ VCPU_CTR1(vmx->vm, vcpu, "Resume execution at %lx", vmcs_guest_rip());
#endif
}
@@ -1262,7 +1262,7 @@ vmx_clear_int_window_exiting(struct vmx *vmx, int vcpu)
{
KASSERT((vmx->cap[vcpu].proc_ctls & PROCBASED_INT_WINDOW_EXITING) != 0,
- ("intr_window_exiting not set: %#x", vmx->cap[vcpu].proc_ctls));
+ ("intr_window_exiting not set: %x", vmx->cap[vcpu].proc_ctls));
vmx->cap[vcpu].proc_ctls &= ~PROCBASED_INT_WINDOW_EXITING;
vmcs_write(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls);
VCPU_CTR0(vmx->vm, vcpu, "Disabling interrupt window exiting");
@@ -1284,7 +1284,7 @@ vmx_clear_nmi_window_exiting(struct vmx *vmx, int vcpu)
{
KASSERT((vmx->cap[vcpu].proc_ctls & PROCBASED_NMI_WINDOW_EXITING) != 0,
- ("nmi_window_exiting not set %#x", vmx->cap[vcpu].proc_ctls));
+ ("nmi_window_exiting not set %x", vmx->cap[vcpu].proc_ctls));
vmx->cap[vcpu].proc_ctls &= ~PROCBASED_NMI_WINDOW_EXITING;
vmcs_write(VMCS_PRI_PROC_BASED_CTLS, vmx->cap[vcpu].proc_ctls);
VCPU_CTR0(vmx->vm, vcpu, "Disabling NMI window exiting");
@@ -1329,11 +1329,11 @@ vmx_inject_nmi(struct vmx *vmx, int vcpu)
gi = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY);
KASSERT((gi & NMI_BLOCKING) == 0, ("vmx_inject_nmi: invalid guest "
- "interruptibility-state %#x", gi));
+ "interruptibility-state %x", gi));
info = vmcs_read(VMCS_ENTRY_INTR_INFO);
KASSERT((info & VMCS_INTR_VALID) == 0, ("vmx_inject_nmi: invalid "
- "VM-entry interruption information %#x", info));
+ "VM-entry interruption information %x", info));
/*
* Inject the virtual NMI. The vector must be the NMI IDT entry
@@ -1369,7 +1369,7 @@ vmx_inject_interrupts(struct vmx *vmx, int vcpu, struct vlapic *vlapic,
if (vmx->state[vcpu].nextrip != guestrip &&
(gi & HWINTR_BLOCKING) != 0) {
VCPU_CTR2(vmx->vm, vcpu, "Guest interrupt blocking "
- "cleared due to rip change: %#lx/%#lx",
+ "cleared due to rip change: %lx/%lx",
vmx->state[vcpu].nextrip, guestrip);
gi &= ~HWINTR_BLOCKING;
vmcs_write(VMCS_GUEST_INTERRUPTIBILITY, gi);
@@ -1386,10 +1386,10 @@ vmx_inject_interrupts(struct vmx *vmx, int vcpu, struct vlapic *vlapic,
if (vm_entry_intinfo(vmx->vm, vcpu, &entryinfo)) {
KASSERT((entryinfo & VMCS_INTR_VALID) != 0, ("%s: entry "
- "intinfo is not valid: %#lx", __func__, entryinfo));
+ "intinfo is not valid: %lx", __func__, entryinfo));
KASSERT((info & VMCS_INTR_VALID) == 0, ("%s: cannot inject "
- "pending exception: %#lx/%#x", __func__, entryinfo, info));
+ "pending exception: %lx/%x", __func__, entryinfo, info));
info = entryinfo;
vector = info & 0xff;
@@ -1428,11 +1428,11 @@ vmx_inject_interrupts(struct vmx *vmx, int vcpu, struct vlapic *vlapic,
need_nmi_exiting = 0;
} else {
VCPU_CTR1(vmx->vm, vcpu, "Cannot inject NMI "
- "due to VM-entry intr info %#x", info);
+ "due to VM-entry intr info %x", info);
}
} else {
VCPU_CTR1(vmx->vm, vcpu, "Cannot inject NMI due to "
- "Guest Interruptibility-state %#x", gi);
+ "Guest Interruptibility-state %x", gi);
}
if (need_nmi_exiting) {
@@ -1479,18 +1479,18 @@ vmx_inject_interrupts(struct vmx *vmx, int vcpu, struct vlapic *vlapic,
*/
if ((gi & HWINTR_BLOCKING) != 0) {
VCPU_CTR2(vmx->vm, vcpu, "Cannot inject vector %d due to "
- "Guest Interruptibility-state %#x", vector, gi);
+ "Guest Interruptibility-state %x", vector, gi);
goto cantinject;
}
if ((info & VMCS_INTR_VALID) != 0) {
VCPU_CTR2(vmx->vm, vcpu, "Cannot inject vector %d due to "
- "VM-entry intr info %#x", vector, info);
+ "VM-entry intr info %x", vector, info);
goto cantinject;
}
rflags = vmcs_read(VMCS_GUEST_RFLAGS);
if ((rflags & PSL_I) == 0) {
VCPU_CTR2(vmx->vm, vcpu, "Cannot inject vector %d due to "
- "rflags %#lx", vector, rflags);
+ "rflags %lx", vector, rflags);
goto cantinject;
}
@@ -1569,7 +1569,7 @@ vmx_assert_nmi_blocking(struct vmx *vmx, int vcpuid)
gi = vmcs_read(VMCS_GUEST_INTERRUPTIBILITY);
KASSERT(gi & VMCS_INTERRUPTIBILITY_NMI_BLOCKING,
- ("NMI blocking is not in effect %#x", gi));
+ ("NMI blocking is not in effect %x", gi));
}
static int
@@ -2355,7 +2355,7 @@ vmx_exit_process(struct vmx *vmx, int vcpu, struct vm_exit *vmexit)
*/
if (ts->reason == TSR_IDT_GATE) {
KASSERT(idtvec_info & VMCS_IDT_VEC_VALID,
- ("invalid idtvec_info %#x for IDT task switch",
+ ("invalid idtvec_info %x for IDT task switch",
idtvec_info));
intr_type = idtvec_info & VMCS_INTR_T_MASK;
if (intr_type != VMCS_INTR_T_SWINTR &&
@@ -2484,7 +2484,7 @@ vmx_exit_process(struct vmx *vmx, int vcpu, struct vm_exit *vmexit)
return (1);
KASSERT((intr_info & VMCS_INTR_VALID) != 0 &&
(intr_info & VMCS_INTR_T_MASK) == VMCS_INTR_T_HWINTR,
- ("VM exit interruption info invalid: %#x", intr_info));
+ ("VM exit interruption info invalid: %x", intr_info));
vmx_trigger_hostintr(intr_info & 0xff);
/*
@@ -2516,7 +2516,7 @@ vmx_exit_process(struct vmx *vmx, int vcpu, struct vm_exit *vmexit)
vmm_stat_incr(vmx->vm, vcpu, VMEXIT_EXCEPTION, 1);
intr_info = vmcs_read(VMCS_EXIT_INTR_INFO);
KASSERT((intr_info & VMCS_INTR_VALID) != 0,
- ("VM exit interruption info invalid: %#x", intr_info));
+ ("VM exit interruption info invalid: %x", intr_info));
intr_vec = intr_info & 0xff;
intr_type = intr_info & VMCS_INTR_T_MASK;
@@ -2586,7 +2586,7 @@ vmx_exit_process(struct vmx *vmx, int vcpu, struct vm_exit *vmexit)
errcode_valid = 1;
errcode = vmcs_read(VMCS_EXIT_INTR_ERRCODE);
}
- VCPU_CTR2(vmx->vm, vcpu, "Reflecting exception %d/%#x into "
+ VCPU_CTR2(vmx->vm, vcpu, "Reflecting exception %d/%x into "
"the guest", intr_vec, errcode);
SDT_PROBE5(vmm, vmx, exit, exception,
vmx, vcpu, vmexit, intr_vec, errcode);
@@ -2776,11 +2776,11 @@ vmx_exit_handle_nmi(struct vmx *vmx, int vcpuid, struct vm_exit *vmexit)
intr_info = vmcs_read(VMCS_EXIT_INTR_INFO);
KASSERT((intr_info & VMCS_INTR_VALID) != 0,
- ("VM exit interruption info invalid: %#x", intr_info));
+ ("VM exit interruption info invalid: %x", intr_info));
if ((intr_info & VMCS_INTR_T_MASK) == VMCS_INTR_T_NMI) {
KASSERT((intr_info & 0xff) == IDT_NMI, ("VM exit due "
- "to NMI has invalid vector: %#x", intr_info));
+ "to NMI has invalid vector: %x", intr_info));
VCPU_CTR0(vmx->vm, vcpuid, "Vectoring to NMI handler");
#ifdef __FreeBSD__
__asm __volatile("int $2");
@@ -2908,7 +2908,7 @@ vmx_run(void *arg, int vcpu, register_t rip, pmap_t pmap,
vmx_set_pcpu_defaults(vmx, vcpu, pmap);
do {
KASSERT(vmcs_guest_rip() == rip, ("%s: vmcs guest rip mismatch "
- "%#lx/%#lx", __func__, vmcs_guest_rip(), rip));
+ "%lx/%lx", __func__, vmcs_guest_rip(), rip));
handled = UNHANDLED;
/*
@@ -3737,7 +3737,7 @@ vmx_enable_x2apic_mode_vid(struct vlapic *vlapic)
proc_ctls2 = vmx->cap[vcpuid].proc_ctls2;
KASSERT((proc_ctls2 & PROCBASED2_VIRTUALIZE_APIC_ACCESSES) != 0,
- ("%s: invalid proc_ctls2 %#x", __func__, proc_ctls2));
+ ("%s: invalid proc_ctls2 %x", __func__, proc_ctls2));
proc_ctls2 &= ~PROCBASED2_VIRTUALIZE_APIC_ACCESSES;
proc_ctls2 |= PROCBASED2_VIRTUALIZE_X2APIC_MODE;
diff --git a/usr/src/uts/i86pc/io/vmm/intel/vtd.c b/usr/src/uts/i86pc/io/vmm/intel/vtd.c
index 50c0934ace..79524220b5 100644
--- a/usr/src/uts/i86pc/io/vmm/intel/vtd.c
+++ b/usr/src/uts/i86pc/io/vmm/intel/vtd.c
@@ -611,10 +611,10 @@ vtd_update_mapping(void *arg, vm_paddr_t gpa, vm_paddr_t hpa, uint64_t len,
ptpindex = 0;
ptpshift = 0;
- KASSERT(gpa + len > gpa, ("%s: invalid gpa range %#lx/%#lx", __func__,
+ KASSERT(gpa + len > gpa, ("%s: invalid gpa range %lx/%lx", __func__,
gpa, len));
- KASSERT(gpa + len <= dom->maxaddr, ("%s: gpa range %#lx/%#lx beyond "
- "domain maxaddr %#lx", __func__, gpa, len, dom->maxaddr));
+ KASSERT(gpa + len <= dom->maxaddr, ("%s: gpa range %lx/%lx beyond "
+ "domain maxaddr %lx", __func__, gpa, len, dom->maxaddr));
if (gpa & PAGE_MASK)
panic("vtd_create_mapping: unaligned gpa 0x%0lx", gpa);
diff --git a/usr/src/uts/i86pc/io/vmm/io/vpmtmr.c b/usr/src/uts/i86pc/io/vmm/io/vpmtmr.c
index 0dce2b0a1f..6664cb06e7 100644
--- a/usr/src/uts/i86pc/io/vmm/io/vpmtmr.c
+++ b/usr/src/uts/i86pc/io/vmm/io/vpmtmr.c
@@ -98,7 +98,7 @@ vpmtmr_handler(struct vm *vm, int vcpuid, bool in, uint16_t port, uint8_t bytes,
now = sbinuptime();
delta = now - vpmtmr->baseuptime;
KASSERT(delta >= 0, ("vpmtmr_handler: uptime went backwards: "
- "%#lx to %#lx", vpmtmr->baseuptime, now));
+ "%lx to %lx", vpmtmr->baseuptime, now));
*val = vpmtmr->baseval + delta / vpmtmr->freq_sbt;
return (0);
diff --git a/usr/src/uts/i86pc/io/vmm/io/vrtc.c b/usr/src/uts/i86pc/io/vmm/io/vrtc.c
index 343ad9c37a..e560ce9b7f 100644
--- a/usr/src/uts/i86pc/io/vmm/io/vrtc.c
+++ b/usr/src/uts/i86pc/io/vmm/io/vrtc.c
@@ -161,7 +161,7 @@ vrtc_curtime(struct vrtc *vrtc, sbintime_t *basetime)
now = sbinuptime();
delta = now - vrtc->base_uptime;
KASSERT(delta >= 0, ("vrtc_curtime: uptime went backwards: "
- "%#lx to %#lx", vrtc->base_uptime, now));
+ "%lx to %lx", vrtc->base_uptime, now));
secs = delta / SBT_1S;
t += secs;
*basetime += secs * SBT_1S;
@@ -191,7 +191,7 @@ secs_to_rtc(time_t rtctime, struct vrtc *vrtc, int force_update)
if (rtctime < 0) {
KASSERT(rtctime == VRTC_BROKEN_TIME,
- ("%s: invalid vrtc time %#lx", __func__, rtctime));
+ ("%s: invalid vrtc time %lx", __func__, rtctime));
return;
}
@@ -286,33 +286,23 @@ rtc_to_secs(struct vrtc *vrtc)
struct clocktime ct;
struct timespec ts;
struct rtcdev *rtc;
-#ifdef __FreeBSD__
- struct vm *vm;
-#endif
int century, error, hour, pm, year;
KASSERT(VRTC_LOCKED(vrtc), ("%s: vrtc not locked", __func__));
-#ifdef __FreeBSD__
- vm = vrtc->vm;
-#endif
rtc = &vrtc->rtcdev;
bzero(&ct, sizeof(struct clocktime));
error = rtcget(rtc, rtc->sec, &ct.sec);
if (error || ct.sec < 0 || ct.sec > 59) {
-#ifdef __FreeBSD__
- VM_CTR2(vm, "Invalid RTC sec %#x/%d", rtc->sec, ct.sec);
-#endif
+ /* invalid RTC seconds */
goto fail;
}
error = rtcget(rtc, rtc->min, &ct.min);
if (error || ct.min < 0 || ct.min > 59) {
-#ifdef __FreeBSD__
- VM_CTR2(vm, "Invalid RTC min %#x/%d", rtc->min, ct.min);
-#endif
+ /* invalid RTC minutes */
goto fail;
}
@@ -342,18 +332,13 @@ rtc_to_secs(struct vrtc *vrtc)
if (pm)
ct.hour += 12;
} else {
-#ifdef __FreeBSD__
- VM_CTR2(vm, "Invalid RTC 12-hour format %#x/%d",
- rtc->hour, ct.hour);
-#endif
+ /* invalid RTC 12-hour format */
goto fail;
}
}
if (error || ct.hour < 0 || ct.hour > 23) {
-#ifdef __FreeBSD__
- VM_CTR2(vm, "Invalid RTC hour %#x/%d", rtc->hour, ct.hour);
-#endif
+ /* invalid RTC hour */
goto fail;
}
@@ -367,47 +352,32 @@ rtc_to_secs(struct vrtc *vrtc)
error = rtcget(rtc, rtc->day_of_month, &ct.day);
if (error || ct.day < 1 || ct.day > 31) {
-#ifdef __FreeBSD__
- VM_CTR2(vm, "Invalid RTC mday %#x/%d", rtc->day_of_month,
- ct.day);
-#endif
+ /* invalid RTC mday */
goto fail;
}
error = rtcget(rtc, rtc->month, &ct.mon);
if (error || ct.mon < 1 || ct.mon > 12) {
-#ifdef __FreeBSD__
- VM_CTR2(vm, "Invalid RTC month %#x/%d", rtc->month, ct.mon);
-#endif
+ /* invalid RTC month */
goto fail;
}
error = rtcget(rtc, rtc->year, &year);
if (error || year < 0 || year > 99) {
-#ifdef __FreeBSD__
- VM_CTR2(vm, "Invalid RTC year %#x/%d", rtc->year, year);
-#endif
+ /* invalid RTC year */
goto fail;
}
error = rtcget(rtc, rtc->century, &century);
ct.year = century * 100 + year;
if (error || ct.year < POSIX_BASE_YEAR) {
-#ifdef __FreeBSD__
- VM_CTR2(vm, "Invalid RTC century %#x/%d", rtc->century,
- ct.year);
-#endif
+ /* invalid RTC century */
goto fail;
}
error = clock_ct_to_ts(&ct, &ts);
if (error || ts.tv_sec < 0) {
-#ifdef __FreeBSD__
- VM_CTR3(vm, "Invalid RTC clocktime.date %04d-%02d-%02d",
- ct.year, ct.mon, ct.day);
- VM_CTR3(vm, "Invalid RTC clocktime.time %02d:%02d:%02d",
- ct.hour, ct.min, ct.sec);
-#endif
+ /* invalid RTC clocktime */
goto fail;
}
return (ts.tv_sec); /* success */
@@ -416,9 +386,6 @@ fail:
* Stop updating the RTC if the date/time fields programmed by
* the guest are invalid.
*/
-#ifdef __FreeBSD__
- VM_CTR0(vrtc->vm, "Invalid RTC date/time programming detected");
-#endif
return (VRTC_BROKEN_TIME);
}
@@ -426,9 +393,6 @@ static int
vrtc_time_update(struct vrtc *vrtc, time_t newtime, sbintime_t newbase)
{
struct rtcdev *rtc;
-#ifdef __FreeBSD__
- sbintime_t oldbase;
-#endif
time_t oldtime;
uint8_t alarm_sec, alarm_min, alarm_hour;
@@ -440,14 +404,9 @@ vrtc_time_update(struct vrtc *vrtc, time_t newtime, sbintime_t newbase)
alarm_hour = rtc->alarm_hour;
oldtime = vrtc->base_rtctime;
- VM_CTR2(vrtc->vm, "Updating RTC secs from %#lx to %#lx",
+ VM_CTR2(vrtc->vm, "Updating RTC secs from %lx to %lx",
oldtime, newtime);
-#ifdef __FreeBSD__
- oldbase = vrtc->base_uptime;
- VM_CTR2(vrtc->vm, "Updating RTC base uptime from %#lx to %#lx",
- oldbase, newbase);
-#endif
vrtc->base_uptime = newbase;
if (newtime == oldtime)
@@ -614,7 +573,7 @@ vrtc_callout_check(struct vrtc *vrtc, sbintime_t freq)
active = callout_active(&vrtc->callout) ? 1 : 0;
KASSERT((freq == 0 && !active) || (freq != 0 && active),
- ("vrtc callout %s with frequency %#lx",
+ ("vrtc callout %s with frequency %lx",
active ? "active" : "inactive", freq));
}
@@ -643,7 +602,7 @@ vrtc_set_reg_c(struct vrtc *vrtc, uint8_t newval)
rtc->reg_c = newirqf | newval;
changed = oldval ^ rtc->reg_c;
if (changed) {
- VM_CTR2(vrtc->vm, "RTC reg_c changed from %#x to %#x",
+ VM_CTR2(vrtc->vm, "RTC reg_c changed from %x to %x",
oldval, rtc->reg_c);
}
@@ -674,7 +633,7 @@ vrtc_set_reg_b(struct vrtc *vrtc, uint8_t newval)
rtc->reg_b = newval;
changed = oldval ^ newval;
if (changed) {
- VM_CTR2(vrtc->vm, "RTC reg_b changed from %#x to %#x",
+ VM_CTR2(vrtc->vm, "RTC reg_b changed from %x to %x",
oldval, newval);
}
@@ -689,7 +648,7 @@ vrtc_set_reg_b(struct vrtc *vrtc, uint8_t newval)
} else {
curtime = vrtc_curtime(vrtc, &basetime);
KASSERT(curtime == vrtc->base_rtctime, ("%s: mismatch "
- "between vrtc basetime (%#lx) and curtime (%#lx)",
+ "between vrtc basetime (%lx) and curtime (%lx)",
__func__, vrtc->base_rtctime, curtime));
/*
@@ -745,7 +704,7 @@ vrtc_set_reg_a(struct vrtc *vrtc, uint8_t newval)
oldfreq = vrtc_freq(vrtc);
if (divider_enabled(oldval) && !divider_enabled(newval)) {
- VM_CTR2(vrtc->vm, "RTC divider held in reset at %#lx/%#lx",
+ VM_CTR2(vrtc->vm, "RTC divider held in reset at %lx/%lx",
vrtc->base_rtctime, vrtc->base_uptime);
} else if (!divider_enabled(oldval) && divider_enabled(newval)) {
/*
@@ -755,7 +714,7 @@ vrtc_set_reg_a(struct vrtc *vrtc, uint8_t newval)
* while the dividers were disabled.
*/
vrtc->base_uptime = sbinuptime();
- VM_CTR2(vrtc->vm, "RTC divider out of reset at %#lx/%#lx",
+ VM_CTR2(vrtc->vm, "RTC divider out of reset at %lx/%lx",
vrtc->base_rtctime, vrtc->base_uptime);
} else {
/* NOTHING */
@@ -764,7 +723,7 @@ vrtc_set_reg_a(struct vrtc *vrtc, uint8_t newval)
vrtc->rtcdev.reg_a = newval;
changed = oldval ^ newval;
if (changed) {
- VM_CTR2(vrtc->vm, "RTC reg_a changed from %#x to %#x",
+ VM_CTR2(vrtc->vm, "RTC reg_a changed from %x to %x",
oldval, newval);
}
@@ -790,10 +749,10 @@ vrtc_set_time(struct vm *vm, time_t secs)
VRTC_UNLOCK(vrtc);
if (error) {
- VM_CTR2(vrtc->vm, "Error %d setting RTC time to %#lx", error,
+ VM_CTR2(vrtc->vm, "Error %d setting RTC time to %lx", error,
secs);
} else {
- VM_CTR1(vrtc->vm, "RTC time set to %#lx", secs);
+ VM_CTR1(vrtc->vm, "RTC time set to %lx", secs);
}
return (error);
@@ -835,7 +794,7 @@ vrtc_nvram_write(struct vm *vm, int offset, uint8_t value)
VRTC_LOCK(vrtc);
ptr = (uint8_t *)(&vrtc->rtcdev);
ptr[offset] = value;
- VM_CTR2(vrtc->vm, "RTC nvram write %#x to offset %#x", value, offset);
+ VM_CTR2(vrtc->vm, "RTC nvram write %x to offset %x", value, offset);
VRTC_UNLOCK(vrtc);
return (0);
@@ -945,24 +904,24 @@ vrtc_data_handler(struct vm *vm, int vcpuid, bool in, uint16_t port,
} else {
*val = *((uint8_t *)rtc + offset);
}
- VCPU_CTR2(vm, vcpuid, "Read value %#x from RTC offset %#x",
+ VCPU_CTR2(vm, vcpuid, "Read value %x from RTC offset %x",
*val, offset);
} else {
switch (offset) {
case 10:
- VCPU_CTR1(vm, vcpuid, "RTC reg_a set to %#x", *val);
+ VCPU_CTR1(vm, vcpuid, "RTC reg_a set to %x", *val);
vrtc_set_reg_a(vrtc, *val);
break;
case 11:
- VCPU_CTR1(vm, vcpuid, "RTC reg_b set to %#x", *val);
+ VCPU_CTR1(vm, vcpuid, "RTC reg_b set to %x", *val);
error = vrtc_set_reg_b(vrtc, *val);
break;
case 12:
- VCPU_CTR1(vm, vcpuid, "RTC reg_c set to %#x (ignored)",
+ VCPU_CTR1(vm, vcpuid, "RTC reg_c set to %x (ignored)",
*val);
break;
case 13:
- VCPU_CTR1(vm, vcpuid, "RTC reg_d set to %#x (ignored)",
+ VCPU_CTR1(vm, vcpuid, "RTC reg_d set to %x (ignored)",
*val);
break;
case 0:
@@ -972,7 +931,7 @@ vrtc_data_handler(struct vm *vm, int vcpuid, bool in, uint16_t port,
*val &= 0x7f;
/* FALLTHRU */
default:
- VCPU_CTR2(vm, vcpuid, "RTC offset %#x set to %#x",
+ VCPU_CTR2(vm, vcpuid, "RTC offset %x set to %x",
offset, *val);
*((uint8_t *)rtc + offset) = *val;
break;
diff --git a/usr/src/uts/i86pc/io/vmm/vmm.c b/usr/src/uts/i86pc/io/vmm/vmm.c
index 7a47cd0cd1..302af0670e 100644
--- a/usr/src/uts/i86pc/io/vmm/vmm.c
+++ b/usr/src/uts/i86pc/io/vmm/vmm.c
@@ -1014,7 +1014,7 @@ vm_iommu_modify(struct vm *vm, bool map)
if (map) {
KASSERT((mm->flags & VM_MEMMAP_F_IOMMU) == 0,
- ("iommu map found invalid memmap %#lx/%#lx/%#x",
+ ("iommu map found invalid memmap %lx/%lx/%x",
mm->gpa, mm->len, mm->flags));
if ((mm->flags & VM_MEMMAP_F_WIRED) == 0)
continue;
@@ -1024,7 +1024,7 @@ vm_iommu_modify(struct vm *vm, bool map)
continue;
mm->flags &= ~VM_MEMMAP_F_IOMMU;
KASSERT((mm->flags & VM_MEMMAP_F_WIRED) != 0,
- ("iommu unmap found invalid memmap %#lx/%#lx/%#x",
+ ("iommu unmap found invalid memmap %lx/%lx/%x",
mm->gpa, mm->len, mm->flags));
}
@@ -1032,7 +1032,7 @@ vm_iommu_modify(struct vm *vm, bool map)
while (gpa < mm->gpa + mm->len) {
vp = vm_gpa_hold(vm, -1, gpa, PAGE_SIZE, VM_PROT_WRITE,
&cookie);
- KASSERT(vp != NULL, ("vm(%s) could not map gpa %#lx",
+ KASSERT(vp != NULL, ("vm(%s) could not map gpa %lx",
vm_name(vm), gpa));
vm_gpa_release(cookie);
@@ -1213,7 +1213,7 @@ vm_set_register(struct vm *vm, int vcpuid, int reg, uint64_t val)
return (error);
/* Set 'nextrip' to match the value of %rip */
- VCPU_CTR1(vm, vcpuid, "Setting nextrip to %#lx", val);
+ VCPU_CTR1(vm, vcpuid, "Setting nextrip to %lx", val);
vcpu = &vm->vcpu[vcpuid];
vcpu->nextrip = val;
return (0);
@@ -1561,7 +1561,7 @@ vm_handle_paging(struct vm *vm, int vcpuid, bool *retu)
rv = pmap_emulate_accessed_dirty(vmspace_pmap(vm->vmspace),
vme->u.paging.gpa, ftype);
if (rv == 0) {
- VCPU_CTR2(vm, vcpuid, "%s bit emulation for gpa %#lx",
+ VCPU_CTR2(vm, vcpuid, "%s bit emulation for gpa %lx",
ftype == VM_PROT_READ ? "accessed" : "dirty",
vme->u.paging.gpa);
goto done;
@@ -1571,7 +1571,7 @@ vm_handle_paging(struct vm *vm, int vcpuid, bool *retu)
map = &vm->vmspace->vm_map;
rv = vm_fault(map, vme->u.paging.gpa, ftype, VM_FAULT_NORMAL);
- VCPU_CTR3(vm, vcpuid, "vm_handle_paging rv = %d, gpa = %#lx, "
+ VCPU_CTR3(vm, vcpuid, "vm_handle_paging rv = %d, gpa = %lx, "
"ftype = %d", rv, vme->u.paging.gpa, ftype);
if (rv != KERN_SUCCESS)
@@ -1635,7 +1635,7 @@ vm_handle_mmio_emul(struct vm *vm, int vcpuid, bool *retu)
inst_addr = vme->rip + vme->u.mmio_emul.cs_base;
cs_d = vme->u.mmio_emul.cs_d;
- VCPU_CTR1(vm, vcpuid, "inst_emul fault accessing gpa %#lx",
+ VCPU_CTR1(vm, vcpuid, "inst_emul fault accessing gpa %lx",
vme->u.mmio_emul.gpa);
/* Fetch the faulting instruction */
@@ -1655,7 +1655,7 @@ vm_handle_mmio_emul(struct vm *vm, int vcpuid, bool *retu)
}
if (vie_decode_instruction(vie, vm, vcpuid, cs_d) != 0) {
- VCPU_CTR1(vm, vcpuid, "Error decoding instruction at %#lx",
+ VCPU_CTR1(vm, vcpuid, "Error decoding instruction at %lx",
inst_addr);
/* Dump (unrecognized) instruction bytes in userspace */
vie_fallback_exitinfo(vie, vme);
@@ -2406,7 +2406,7 @@ vm_restart_instruction(void *arg, int vcpuid)
* instruction to be restarted.
*/
vcpu->exitinfo.inst_length = 0;
- VCPU_CTR1(vm, vcpuid, "restarting instruction at %#lx by "
+ VCPU_CTR1(vm, vcpuid, "restarting instruction at %lx by "
"setting inst_length to zero", vcpu->exitinfo.rip);
} else if (state == VCPU_FROZEN) {
/*
@@ -2418,7 +2418,7 @@ vm_restart_instruction(void *arg, int vcpuid)
error = vm_get_register(vm, vcpuid, VM_REG_GUEST_RIP, &rip);
KASSERT(!error, ("%s: error %d getting rip", __func__, error));
VCPU_CTR2(vm, vcpuid, "restarting instruction by updating "
- "nextrip from %#lx to %#lx", vcpu->nextrip, rip);
+ "nextrip from %lx to %lx", vcpu->nextrip, rip);
vcpu->nextrip = rip;
} else {
panic("%s: invalid state %d", __func__, state);
@@ -2449,7 +2449,7 @@ vm_exit_intinfo(struct vm *vm, int vcpuid, uint64_t info)
} else {
info = 0;
}
- VCPU_CTR2(vm, vcpuid, "%s: info1(%#lx)", __func__, info);
+ VCPU_CTR2(vm, vcpuid, "%s: info1(%lx)", __func__, info);
vcpu->exitintinfo = info;
return (0);
}
@@ -2467,11 +2467,7 @@ exception_class(uint64_t info)
{
int type, vector;
-#ifdef __FreeBSD__
- KASSERT(info & VM_INTINFO_VALID, ("intinfo must be valid: %#lx", info));
-#else
KASSERT(info & VM_INTINFO_VALID, ("intinfo must be valid: %lx", info));
-#endif
type = info & VM_INTINFO_TYPE;
vector = info & 0xff;
@@ -2519,13 +2515,8 @@ nested_fault(struct vm *vm, int vcpuid, uint64_t info1, uint64_t info2,
enum exc_class exc1, exc2;
int type1, vector1;
-#ifdef __FreeBSD__
- KASSERT(info1 & VM_INTINFO_VALID, ("info1 %#lx is not valid", info1));
- KASSERT(info2 & VM_INTINFO_VALID, ("info2 %#lx is not valid", info2));
-#else
KASSERT(info1 & VM_INTINFO_VALID, ("info1 %lx is not valid", info1));
KASSERT(info2 & VM_INTINFO_VALID, ("info2 %lx is not valid", info2));
-#endif
/*
* If an exception occurs while attempting to call the double-fault
@@ -2534,7 +2525,7 @@ nested_fault(struct vm *vm, int vcpuid, uint64_t info1, uint64_t info2,
type1 = info1 & VM_INTINFO_TYPE;
vector1 = info1 & 0xff;
if (type1 == VM_INTINFO_HWEXCEPTION && vector1 == IDT_DF) {
- VCPU_CTR2(vm, vcpuid, "triple fault: info1(%#lx), info2(%#lx)",
+ VCPU_CTR2(vm, vcpuid, "triple fault: info1(%lx), info2(%lx)",
info1, info2);
vm_suspend(vm, VM_SUSPEND_TRIPLEFAULT);
*retinfo = 0;
@@ -2594,7 +2585,7 @@ vm_entry_intinfo(struct vm *vm, int vcpuid, uint64_t *retinfo)
if (vcpu->exception_pending) {
info2 = vcpu_exception_intinfo(vcpu);
vcpu->exception_pending = 0;
- VCPU_CTR2(vm, vcpuid, "Exception %d delivered: %#lx",
+ VCPU_CTR2(vm, vcpuid, "Exception %d delivered: %lx",
vcpu->exc_vector, info2);
}
@@ -2611,8 +2602,8 @@ vm_entry_intinfo(struct vm *vm, int vcpuid, uint64_t *retinfo)
}
if (valid) {
- VCPU_CTR4(vm, vcpuid, "%s: info1(%#lx), info2(%#lx), "
- "retinfo(%#lx)", __func__, info1, info2, *retinfo);
+ VCPU_CTR4(vm, vcpuid, "%s: info1(%lx), info2(%lx), "
+ "retinfo(%lx)", __func__, info1, info2, *retinfo);
}
return (valid);
@@ -2735,7 +2726,7 @@ vm_inject_pf(void *vmarg, int vcpuid, int error_code, uint64_t cr2)
int error;
vm = vmarg;
- VCPU_CTR2(vm, vcpuid, "Injecting page fault: error_code %#x, cr2 %#lx",
+ VCPU_CTR2(vm, vcpuid, "Injecting page fault: error_code %x, cr2 %lx",
error_code, cr2);
error = vm_set_register(vm, vcpuid, VM_REG_GUEST_CR2, cr2);
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 4dcaba8a82..696052d7d6 100644
--- a/usr/src/uts/i86pc/io/vmm/vmm_sol_glue.c
+++ b/usr/src/uts/i86pc/io/vmm/vmm_sol_glue.c
@@ -181,7 +181,7 @@ vmm_alloc_check(mod_hash_key_t key, mod_hash_val_t *val, void *unused)
{
struct kmem_item *i = (struct kmem_item *)val;
- cmn_err(CE_PANIC, "!vmm_alloc_check: hash not empty: %p, %d", i->addr,
+ cmn_err(CE_PANIC, "!vmm_alloc_check: hash not empty: %p, %lu", i->addr,
i->size);
return (MH_WALK_TERMINATE);
diff --git a/usr/src/uts/i86pc/os/gipt.c b/usr/src/uts/i86pc/os/gipt.c
index ace7e03438..7bff5c3897 100644
--- a/usr/src/uts/i86pc/os/gipt.c
+++ b/usr/src/uts/i86pc/os/gipt.c
@@ -355,7 +355,8 @@ gipt_map_next_page(gipt_map_t *map, uint64_t va, uint64_t max_va, gipt_t **ptp)
ASSERT3P(pt, !=, NULL);
break;
} else {
- panic("unexpected PTE type %x @ va %p", ptet, cur_va);
+ panic("unexpected PTE type %x @ va %p", ptet,
+ (void *)cur_va);
}
}
@@ -387,7 +388,8 @@ gipt_map_next_page(gipt_map_t *map, uint64_t va, uint64_t max_va, gipt_t **ptp)
pt = gipt_map_lookup(map, cur_va, pt->gipt_level - 1);
ASSERT3P(pt, !=, NULL);
} else {
- panic("unexpected PTE type %x @ va %p", ptet, cur_va);
+ panic("unexpected PTE type %x @ va %p", ptet,
+ (void *)cur_va);
}
}
diff --git a/usr/src/uts/i86pc/vmm/Makefile b/usr/src/uts/i86pc/vmm/Makefile
index e7f07c4c4e..4b426361ae 100644
--- a/usr/src/uts/i86pc/vmm/Makefile
+++ b/usr/src/uts/i86pc/vmm/Makefile
@@ -62,8 +62,6 @@ INC_PATH += -I$(UTSBASE)/i86pc/io/vmm -I$(UTSBASE)/i86pc/io/vmm/io
AS_INC_PATH += -I$(UTSBASE)/i86pc/io/vmm -I$(OBJS_DIR)
CFLAGS += -_gcc=-Wimplicit-function-declaration
-# The FreeBSD %# notation makes gcc gripe
-CFLAGS += -_gcc=-Wno-format
# enable collection of VMM statistics
CFLAGS += -DVMM_KEEP_STATS