1*3ccb0233SMark Johnston /*- 2*3ccb0233SMark Johnston * SPDX-License-Identifier: BSD-2-Clause 3*3ccb0233SMark Johnston * 4*3ccb0233SMark Johnston * Copyright (c) 2011 NetApp, Inc. 5*3ccb0233SMark Johnston * All rights reserved. 6*3ccb0233SMark Johnston * 7*3ccb0233SMark Johnston * Redistribution and use in source and binary forms, with or without 8*3ccb0233SMark Johnston * modification, are permitted provided that the following conditions 9*3ccb0233SMark Johnston * are met: 10*3ccb0233SMark Johnston * 1. Redistributions of source code must retain the above copyright 11*3ccb0233SMark Johnston * notice, this list of conditions and the following disclaimer. 12*3ccb0233SMark Johnston * 2. Redistributions in binary form must reproduce the above copyright 13*3ccb0233SMark Johnston * notice, this list of conditions and the following disclaimer in the 14*3ccb0233SMark Johnston * documentation and/or other materials provided with the distribution. 15*3ccb0233SMark Johnston * 16*3ccb0233SMark Johnston * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND 17*3ccb0233SMark Johnston * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18*3ccb0233SMark Johnston * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19*3ccb0233SMark Johnston * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE 20*3ccb0233SMark Johnston * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21*3ccb0233SMark Johnston * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22*3ccb0233SMark Johnston * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23*3ccb0233SMark Johnston * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24*3ccb0233SMark Johnston * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25*3ccb0233SMark Johnston * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26*3ccb0233SMark Johnston * SUCH DAMAGE. 27*3ccb0233SMark Johnston */ 28*3ccb0233SMark Johnston 29*3ccb0233SMark Johnston #ifndef _VMM_KTR_H_ 30*3ccb0233SMark Johnston #define _VMM_KTR_H_ 31*3ccb0233SMark Johnston 32*3ccb0233SMark Johnston #include <sys/ktr.h> 33*3ccb0233SMark Johnston #include <sys/pcpu.h> 34*3ccb0233SMark Johnston 35*3ccb0233SMark Johnston #ifndef KTR_VMM 36*3ccb0233SMark Johnston #define KTR_VMM KTR_GEN 37*3ccb0233SMark Johnston #endif 38*3ccb0233SMark Johnston 39*3ccb0233SMark Johnston #define VCPU_CTR0(vm, vcpuid, format) \ 40*3ccb0233SMark Johnston CTR2(KTR_VMM, "vm %s[%d]: " format, vm_name((vm)), (vcpuid)) 41*3ccb0233SMark Johnston 42*3ccb0233SMark Johnston #define VCPU_CTR1(vm, vcpuid, format, p1) \ 43*3ccb0233SMark Johnston CTR3(KTR_VMM, "vm %s[%d]: " format, vm_name((vm)), (vcpuid), (p1)) 44*3ccb0233SMark Johnston 45*3ccb0233SMark Johnston #define VCPU_CTR2(vm, vcpuid, format, p1, p2) \ 46*3ccb0233SMark Johnston CTR4(KTR_VMM, "vm %s[%d]: " format, vm_name((vm)), (vcpuid), (p1), (p2)) 47*3ccb0233SMark Johnston 48*3ccb0233SMark Johnston #define VCPU_CTR3(vm, vcpuid, format, p1, p2, p3) \ 49*3ccb0233SMark Johnston CTR5(KTR_VMM, "vm %s[%d]: " format, vm_name((vm)), (vcpuid), (p1), (p2), (p3)) 50*3ccb0233SMark Johnston 51*3ccb0233SMark Johnston #define VCPU_CTR4(vm, vcpuid, format, p1, p2, p3, p4) \ 52*3ccb0233SMark Johnston CTR6(KTR_VMM, "vm %s[%d]: " format, vm_name((vm)), (vcpuid), \ 53*3ccb0233SMark Johnston (p1), (p2), (p3), (p4)) 54*3ccb0233SMark Johnston 55*3ccb0233SMark Johnston #define VM_CTR0(vm, format) \ 56*3ccb0233SMark Johnston CTR1(KTR_VMM, "vm %s: " format, vm_name((vm))) 57*3ccb0233SMark Johnston 58*3ccb0233SMark Johnston #define VM_CTR1(vm, format, p1) \ 59*3ccb0233SMark Johnston CTR2(KTR_VMM, "vm %s: " format, vm_name((vm)), (p1)) 60*3ccb0233SMark Johnston 61*3ccb0233SMark Johnston #define VM_CTR2(vm, format, p1, p2) \ 62*3ccb0233SMark Johnston CTR3(KTR_VMM, "vm %s: " format, vm_name((vm)), (p1), (p2)) 63*3ccb0233SMark Johnston 64*3ccb0233SMark Johnston #define VM_CTR3(vm, format, p1, p2, p3) \ 65*3ccb0233SMark Johnston CTR4(KTR_VMM, "vm %s: " format, vm_name((vm)), (p1), (p2), (p3)) 66*3ccb0233SMark Johnston 67*3ccb0233SMark Johnston #define VM_CTR4(vm, format, p1, p2, p3, p4) \ 68*3ccb0233SMark Johnston CTR5(KTR_VMM, "vm %s: " format, vm_name((vm)), (p1), (p2), (p3), (p4)) 69*3ccb0233SMark Johnston #endif 70