From patchwork Fri Jun 7 23:03:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 2691271 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 9013F3FC23 for ; Fri, 7 Jun 2013 23:09:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932202Ab3FGXIJ (ORCPT ); Fri, 7 Jun 2013 19:08:09 -0400 Received: from mail-ie0-f182.google.com ([209.85.223.182]:61836 "EHLO mail-ie0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757679Ab3FGXDw (ORCPT ); Fri, 7 Jun 2013 19:03:52 -0400 Received: by mail-ie0-f182.google.com with SMTP id 9so12059343iec.41 for ; Fri, 07 Jun 2013 16:03:52 -0700 (PDT) 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== X-Received: by 10.50.4.69 with SMTP id i5mr2100885igi.16.1370646232552; Fri, 07 Jun 2013 16:03:52 -0700 (PDT) Received: from dl.caveonetworks.com (64.2.3.195.ptr.us.xo.net. [64.2.3.195]) by mx.google.com with ESMTPSA id wn10sm215315igb.2.2013.06.07.16.03.50 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 07 Jun 2013 16:03:51 -0700 (PDT) Received: from dl.caveonetworks.com (localhost.localdomain [127.0.0.1]) by dl.caveonetworks.com (8.14.5/8.14.5) with ESMTP id r57N3nqI006686; Fri, 7 Jun 2013 16:03:49 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id r57N3njV006685; Fri, 7 Jun 2013 16:03:49 -0700 From: David Daney To: linux-mips@linux-mips.org, ralf@linux-mips.org, kvm@vger.kernel.org, Sanjay Lal Cc: linux-kernel@vger.kernel.org, David Daney Subject: [PATCH 19/31] mips/kvm: Add host definitions for MIPS VZ based host. Date: Fri, 7 Jun 2013 16:03:23 -0700 Message-Id: <1370646215-6543-20-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1370646215-6543-1-git-send-email-ddaney.cavm@gmail.com> References: <1370646215-6543-1-git-send-email-ddaney.cavm@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: David Daney Signed-off-by: David Daney Acked-by: Ralf Baechle --- 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 */