vmx_genassym.c revision 264619
1/*- 2 * Copyright (c) 2011 NetApp, Inc. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 14 * THIS SOFTWARE IS PROVIDED BY NETAPP, INC ``AS IS'' AND 15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 * ARE DISCLAIMED. IN NO EVENT SHALL NETAPP, INC OR CONTRIBUTORS BE LIABLE 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 * $FreeBSD: stable/10/sys/amd64/vmm/intel/vmx_genassym.c 264619 2014-04-17 18:00:07Z jhb $ 27 */ 28 29#include <sys/cdefs.h> 30__FBSDID("$FreeBSD: stable/10/sys/amd64/vmm/intel/vmx_genassym.c 264619 2014-04-17 18:00:07Z jhb $"); 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/proc.h> 35#include <sys/assym.h> 36 37#include <vm/vm.h> 38#include <vm/pmap.h> 39 40#include <machine/vmm.h> 41#include "vmx_cpufunc.h" 42#include "vmx.h" 43 44ASSYM(VMXCTX_GUEST_RDI, offsetof(struct vmxctx, guest_rdi)); 45ASSYM(VMXCTX_GUEST_RSI, offsetof(struct vmxctx, guest_rsi)); 46ASSYM(VMXCTX_GUEST_RDX, offsetof(struct vmxctx, guest_rdx)); 47ASSYM(VMXCTX_GUEST_RCX, offsetof(struct vmxctx, guest_rcx)); 48ASSYM(VMXCTX_GUEST_R8, offsetof(struct vmxctx, guest_r8)); 49ASSYM(VMXCTX_GUEST_R9, offsetof(struct vmxctx, guest_r9)); 50ASSYM(VMXCTX_GUEST_RAX, offsetof(struct vmxctx, guest_rax)); 51ASSYM(VMXCTX_GUEST_RBX, offsetof(struct vmxctx, guest_rbx)); 52ASSYM(VMXCTX_GUEST_RBP, offsetof(struct vmxctx, guest_rbp)); 53ASSYM(VMXCTX_GUEST_R10, offsetof(struct vmxctx, guest_r10)); 54ASSYM(VMXCTX_GUEST_R11, offsetof(struct vmxctx, guest_r11)); 55ASSYM(VMXCTX_GUEST_R12, offsetof(struct vmxctx, guest_r12)); 56ASSYM(VMXCTX_GUEST_R13, offsetof(struct vmxctx, guest_r13)); 57ASSYM(VMXCTX_GUEST_R14, offsetof(struct vmxctx, guest_r14)); 58ASSYM(VMXCTX_GUEST_R15, offsetof(struct vmxctx, guest_r15)); 59ASSYM(VMXCTX_GUEST_CR2, offsetof(struct vmxctx, guest_cr2)); 60 61ASSYM(VMXCTX_HOST_R15, offsetof(struct vmxctx, host_r15)); 62ASSYM(VMXCTX_HOST_R14, offsetof(struct vmxctx, host_r14)); 63ASSYM(VMXCTX_HOST_R13, offsetof(struct vmxctx, host_r13)); 64ASSYM(VMXCTX_HOST_R12, offsetof(struct vmxctx, host_r12)); 65ASSYM(VMXCTX_HOST_RBP, offsetof(struct vmxctx, host_rbp)); 66ASSYM(VMXCTX_HOST_RSP, offsetof(struct vmxctx, host_rsp)); 67ASSYM(VMXCTX_HOST_RBX, offsetof(struct vmxctx, host_rbx)); 68ASSYM(VMXCTX_HOST_RIP, offsetof(struct vmxctx, host_rip)); 69 70ASSYM(VMXCTX_INST_FAIL_STATUS, offsetof(struct vmxctx, inst_fail_status)); 71ASSYM(VMXCTX_EPTGEN, offsetof(struct vmxctx, eptgen)); 72 73ASSYM(VMXCTX_PMAP, offsetof(struct vmxctx, pmap)); 74ASSYM(VMXCTX_EPTP, offsetof(struct vmxctx, eptp)); 75 76ASSYM(VM_FAIL_INVALID, VM_FAIL_INVALID); 77ASSYM(VM_FAIL_VALID, VM_FAIL_VALID); 78ASSYM(VMX_GUEST_VMEXIT, VMX_GUEST_VMEXIT); 79ASSYM(VMX_VMRESUME_ERROR, VMX_VMRESUME_ERROR); 80ASSYM(VMX_VMLAUNCH_ERROR, VMX_VMLAUNCH_ERROR); 81ASSYM(VMX_INVEPT_ERROR, VMX_INVEPT_ERROR); 82 83ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); 84 85ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active)); 86ASSYM(PM_EPTGEN, offsetof(struct pmap, pm_eptgen)); 87