From patchwork Fri Jun 7 23:03:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 2691251 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 38FFE40232 for ; Fri, 7 Jun 2013 23:09:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932230Ab3FGXIK (ORCPT ); Fri, 7 Jun 2013 19:08:10 -0400 Received: from mail-ie0-f176.google.com ([209.85.223.176]:61585 "EHLO mail-ie0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757675Ab3FGXDw (ORCPT ); Fri, 7 Jun 2013 19:03:52 -0400 Received: by mail-ie0-f176.google.com with SMTP id ar20so9180609iec.7 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=bqbios0qAPVIJFNg+qjSdx1UGzUEs/W9K2uF+KtLf9s=; b=eQkx0lSBkrUR/YCzTtE18Np8SJKx8yQmSXXVGfErFbpRp8Q9rvB97lBysHoFgwnOL8 F/rHz6tuhaVaM9Or7KF7exSBCN1hQUIgHX3g2rAy5h4vmMdqdzTYlgF7dyI5bJop3/wB NTKBSkde7F2j2+VFHCfEseGFxmgxPTktnnciDqeOAExS9xW8F+WOnAdr4ygoutSf+sto 1I+wItRdT/lfkeQHMir1MZfPK/8UvKTVuGra481aSS7ynqUhqjdxqq8gG9qIKF1T4Yh6 f743C0r5MJ9P5VkG6L9IjFZ/v30MwqQ7E4pA9tQLSSBMVZm5yZLahUmTDG/BbKgfWEKc DreA== X-Received: by 10.50.87.4 with SMTP id t4mr399521igz.76.1370646232254; 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 h3sm1221753igv.1.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 r57N3nNd006682; Fri, 7 Jun 2013 16:03:49 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id r57N3n33006681; 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 18/31] mips/kvm: Add pt_regs slots for BadInstr and BadInstrP Date: Fri, 7 Jun 2013 16:03:22 -0700 Message-Id: <1370646215-6543-19-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 These save the instruction word to be used by MIPSVZ code for instruction emulation. Signed-off-by: David Daney Acked-by: Ralf Baechle --- arch/mips/include/asm/ptrace.h | 4 ++++ arch/mips/kernel/asm-offsets.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h index 5e6cd09..d080716 100644 --- a/arch/mips/include/asm/ptrace.h +++ b/arch/mips/include/asm/ptrace.h @@ -46,6 +46,10 @@ struct pt_regs { unsigned long long mpl[3]; /* MTM{0,1,2} */ unsigned long long mtp[3]; /* MTP{0,1,2} */ #endif +#ifdef CONFIG_KVM_MIPSVZ + unsigned int cp0_badinstr; /* Only populated on do_page_fault_{0,1} */ + unsigned int cp0_badinstrp; /* Only populated on do_page_fault_{0,1} */ +#endif } __aligned(8); struct task_struct; diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c index 03bf363..c5cc28f 100644 --- a/arch/mips/kernel/asm-offsets.c +++ b/arch/mips/kernel/asm-offsets.c @@ -71,6 +71,10 @@ void output_ptreg_defines(void) OFFSET(PT_MPL, pt_regs, mpl); OFFSET(PT_MTP, pt_regs, mtp); #endif /* CONFIG_CPU_CAVIUM_OCTEON */ +#ifdef CONFIG_KVM_MIPSVZ + OFFSET(PT_BADINSTR, pt_regs, cp0_badinstr); + OFFSET(PT_BADINSTRP, pt_regs, cp0_badinstrp); +#endif DEFINE(PT_SIZE, sizeof(struct pt_regs)); BLANK(); }