1 /* 2 * asid.h: handling ASIDs in SVM. 3 * Copyright (c) 2007, Advanced Micro Devices, Inc. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms and conditions of the GNU General Public License, 7 * version 2, as published by the Free Software Foundation. 8 * 9 * This program is distributed in the hope it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * more details. 13 * 14 * You should have received a copy of the GNU General Public License along with 15 * this program; If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef __ASM_X86_HVM_SVM_ASID_H__ 19 #define __ASM_X86_HVM_SVM_ASID_H__ 20 21 #include <xen/types.h> 22 #include <asm/hvm/asid.h> 23 #include <asm/processor.h> 24 25 void svm_asid_init(const struct cpuinfo_x86 *c); 26 svm_asid_g_invlpg(struct vcpu * v,unsigned long g_vaddr)27static inline void svm_asid_g_invlpg(struct vcpu *v, unsigned long g_vaddr) 28 { 29 #if 0 30 /* Optimization? */ 31 svm_invlpga(g_vaddr, v->arch.hvm_svm.vmcb->guest_asid); 32 #endif 33 34 /* Safe fallback. Take a new ASID. */ 35 hvm_asid_flush_vcpu(v); 36 } 37 38 #endif /* __ASM_X86_HVM_SVM_ASID_H__ */ 39 40 /* 41 * Local variables: 42 * mode: C 43 * c-file-style: "BSD" 44 * c-basic-offset: 4 45 * tab-width: 4 46 * indent-tabs-mode: nil 47 * End: 48 */ 49