linux-mips
[Top] [All Lists]

[PATCH 19/31] mips/kvm: Add host definitions for MIPS VZ based host.

To: linux-mips@linux-mips.org, ralf@linux-mips.org, kvm@vger.kernel.org, Sanjay Lal <sanjayl@kymasys.com>
Subject: [PATCH 19/31] mips/kvm: Add host definitions for MIPS VZ based host.
From: David Daney <ddaney.cavm@gmail.com>
Date: Fri, 7 Jun 2013 16:03:23 -0700
Cc: linux-kernel@vger.kernel.org, David Daney <david.daney@cavium.com>
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=AjazvHu+yz1tQmetb5r/jjtuylzR9sTq2HLSlYtsyhM=; b=iM8sz/8/7fDpl/f0YiyUvpig6/Qg+YVIB7zduu7qxgeYSiqArvcDJsK3DSdV9zbIGQ Oe+JTdAWXv/u3WWBLy3YENa2ud59CcWuVmJulv/836r/ubKTcU1RpYjwOrkbsBCmxPbz eBVtKK3Mj6JQYPN5AYJUQ8gfBxC+BTPqd8euxUuly1VGVUqHybJUy4fzVpM2IBvN5yjE 1reb74twgQNqaYOQRdz8wjSWiqu7vAInO5O4vsZiG2J9wlWW3Sqx0/DTqwHawbEhVLhP i9UxnyeypM39NZuRvLuoLgr0574mFFXY8yDbUBgo36KVY9r2CosRntVDzkYVBR5dNIR+ upOA==
In-reply-to: <1370646215-6543-1-git-send-email-ddaney.cavm@gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1370646215-6543-1-git-send-email-ddaney.cavm@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
From: David Daney <david.daney@cavium.com>

Signed-off-by: David Daney <david.daney@cavium.com>
---
 arch/mips/include/asm/kvm_mips_vz.h | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 arch/mips/include/asm/kvm_mips_vz.h

diff --git a/arch/mips/include/asm/kvm_mips_vz.h 
b/arch/mips/include/asm/kvm_mips_vz.h
new file mode 100644
index 0000000..dfc6951
--- /dev/null
+++ b/arch/mips/include/asm/kvm_mips_vz.h
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ *
+ * Copyright (C) 2013 Cavium, Inc.
+ */
+#ifndef _ASM_KVM_MIPS_VZ_H
+#define _ASM_KVM_MIPS_VZ_H
+
+struct kvm;
+
+struct kvm_mips_vz {
+       struct mutex guest_mm_lock;
+       pgd_t *pgd;                     /* Translations for this host. */
+       spinlock_t irq_chip_lock;
+       struct page *irq_chip;
+       unsigned int asid[NR_CPUS];     /* Per CPU ASIDs for pgd. */
+};
+
+bool mipsvz_page_fault(struct pt_regs *regs, unsigned long write,
+                      unsigned long address);
+
+bool mipsvz_cp_unusable(struct pt_regs *regs);
+int mipsvz_arch_init(void *opaque);
+int mipsvz_arch_hardware_enable(void *garbage);
+int mipsvz_init_vm(struct kvm *kvm, unsigned long type);
+
+#endif /* _ASM_KVM_MIPS_VZ_H */
-- 
1.7.11.7


<Prev in Thread] Current Thread [Next in Thread>