summaryrefslogtreecommitdiff
path: root/arch/mips/kvm/commpage.c
diff options
context:
space:
mode:
authorDeng-Cheng Zhu <dengcheng.zhu@imgtec.com>2014-06-26 23:11:38 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2014-06-30 18:52:03 +0400
commitd7d5b05faf1679849c5220627c7263b4041e15ef (patch)
tree2dd48d8c3557d36c4b211f9d91fc253fde64c48b /arch/mips/kvm/commpage.c
parentb045c40620eb51fb10b19a14f9ebc118925bc0f8 (diff)
downloadlinux-d7d5b05faf1679849c5220627c7263b4041e15ef.tar.xz
MIPS: KVM: Rename files to remove the prefix "kvm_" and "kvm_mips_"
Since all the files are in arch/mips/kvm/, there's no need of the prefixes "kvm_" and "kvm_mips_". Reviewed-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@imgtec.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/mips/kvm/commpage.c')
-rw-r--r--arch/mips/kvm/commpage.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/mips/kvm/commpage.c b/arch/mips/kvm/commpage.c
new file mode 100644
index 000000000000..61b9c043ea09
--- /dev/null
+++ b/arch/mips/kvm/commpage.c
@@ -0,0 +1,36 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * commpage, currently used for Virtual COP0 registers.
+ * Mapped into the guest kernel @ 0x0.
+ *
+ * Copyright (C) 2012 MIPS Technologies, Inc. All rights reserved.
+ * Authors: Sanjay Lal <sanjayl@kymasys.com>
+ */
+
+#include <linux/errno.h>
+#include <linux/err.h>
+#include <linux/module.h>
+#include <linux/vmalloc.h>
+#include <linux/fs.h>
+#include <linux/bootmem.h>
+#include <asm/page.h>
+#include <asm/cacheflush.h>
+#include <asm/mmu_context.h>
+
+#include <linux/kvm_host.h>
+
+#include "commpage.h"
+
+void kvm_mips_commpage_init(struct kvm_vcpu *vcpu)
+{
+ struct kvm_mips_commpage *page = vcpu->arch.kseg0_commpage;
+
+ memset(page, 0, sizeof(struct kvm_mips_commpage));
+
+ /* Specific init values for fields */
+ vcpu->arch.cop0 = &page->cop0;
+ memset(vcpu->arch.cop0, 0, sizeof(struct mips_coproc));
+}