amdv.c revision 276403
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/amd/amdv.c 276403 2014-12-30 08:24:14Z neel $ 27 */ 28 29#include <sys/cdefs.h> 30__FBSDID("$FreeBSD: stable/10/sys/amd64/vmm/amd/amdv.c 276403 2014-12-30 08:24:14Z neel $"); 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/errno.h> 35#include <sys/smp.h> 36 37#include <machine/vmm.h> 38#include "io/iommu.h" 39 40static int 41amd_iommu_init(void) 42{ 43 44 printf("amd_iommu_init: not implemented\n"); 45 return (ENXIO); 46} 47 48static void 49amd_iommu_cleanup(void) 50{ 51 52 printf("amd_iommu_cleanup: not implemented\n"); 53} 54 55static void 56amd_iommu_enable(void) 57{ 58 59 printf("amd_iommu_enable: not implemented\n"); 60} 61 62static void 63amd_iommu_disable(void) 64{ 65 66 printf("amd_iommu_disable: not implemented\n"); 67} 68 69static void * 70amd_iommu_create_domain(vm_paddr_t maxaddr) 71{ 72 73 printf("amd_iommu_create_domain: not implemented\n"); 74 return (NULL); 75} 76 77static void 78amd_iommu_destroy_domain(void *domain) 79{ 80 81 printf("amd_iommu_destroy_domain: not implemented\n"); 82} 83 84static uint64_t 85amd_iommu_create_mapping(void *domain, vm_paddr_t gpa, vm_paddr_t hpa, 86 uint64_t len) 87{ 88 89 printf("amd_iommu_create_mapping: not implemented\n"); 90 return (0); 91} 92 93static uint64_t 94amd_iommu_remove_mapping(void *domain, vm_paddr_t gpa, uint64_t len) 95{ 96 97 printf("amd_iommu_remove_mapping: not implemented\n"); 98 return (0); 99} 100 101static void 102amd_iommu_add_device(void *domain, int bus, int slot, int func) 103{ 104 105 printf("amd_iommu_add_device: not implemented\n"); 106} 107 108static void 109amd_iommu_remove_device(void *domain, int bus, int slot, int func) 110{ 111 112 printf("amd_iommu_remove_device: not implemented\n"); 113} 114 115static void 116amd_iommu_invalidate_tlb(void *domain) 117{ 118 119 printf("amd_iommu_invalidate_tlb: not implemented\n"); 120} 121 122struct iommu_ops iommu_ops_amd = { 123 amd_iommu_init, 124 amd_iommu_cleanup, 125 amd_iommu_enable, 126 amd_iommu_disable, 127 amd_iommu_create_domain, 128 amd_iommu_destroy_domain, 129 amd_iommu_create_mapping, 130 amd_iommu_remove_mapping, 131 amd_iommu_add_device, 132 amd_iommu_remove_device, 133 amd_iommu_invalidate_tlb, 134}; 135