1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * This file is subject to the terms and conditions of the GNU General Public 3*4882a593Smuzhiyun * License. See the file "COPYING" in the main directory of this archive 4*4882a593Smuzhiyun * for more details. 5*4882a593Smuzhiyun * 6*4882a593Smuzhiyun * commpage, currently used for Virtual COP0 registers. 7*4882a593Smuzhiyun * Mapped into the guest kernel @ KVM_GUEST_COMMPAGE_ADDR. 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved. 10*4882a593Smuzhiyun * Authors: Sanjay Lal <sanjayl@kymasys.com> 11*4882a593Smuzhiyun */ 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun #include <linux/errno.h> 14*4882a593Smuzhiyun #include <linux/err.h> 15*4882a593Smuzhiyun #include <linux/vmalloc.h> 16*4882a593Smuzhiyun #include <linux/fs.h> 17*4882a593Smuzhiyun #include <linux/memblock.h> 18*4882a593Smuzhiyun #include <asm/page.h> 19*4882a593Smuzhiyun #include <asm/cacheflush.h> 20*4882a593Smuzhiyun #include <asm/mmu_context.h> 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun #include <linux/kvm_host.h> 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun #include "commpage.h" 25*4882a593Smuzhiyun kvm_mips_commpage_init(struct kvm_vcpu * vcpu)26*4882a593Smuzhiyunvoid kvm_mips_commpage_init(struct kvm_vcpu *vcpu) 27*4882a593Smuzhiyun { 28*4882a593Smuzhiyun struct kvm_mips_commpage *page = vcpu->arch.kseg0_commpage; 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun /* Specific init values for fields */ 31*4882a593Smuzhiyun vcpu->arch.cop0 = &page->cop0; 32*4882a593Smuzhiyun } 33