From patchwork Mon Aug 10 13:26:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhichao Huang X-Patchwork-Id: 52264 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id BA41D22919 for ; Mon, 10 Aug 2015 13:44:58 +0000 (UTC) Received: by lbsm2 with SMTP id m2sf25929261lbs.1 for ; Mon, 10 Aug 2015 06:44:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:cc:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=hS50zMxd85TupAib7dtiDie/kiXTqhHWFsI4+lZshLY=; b=iwG+Bq5AzW+o2wkQuDc4YDuPGaib2EsKjSNFgW9AWstfxpOwBd+theCV3VCWxsdv4I 0AxYajS6r18pAtfYdzorXcLQ/uhv5ZOuTQ4+ZXyXFJ2Q9qYO3lVc+9OfaaSVNb9leMSI CX5QocbR7mSCio0tjeoZAK/8NfvAO6KR22b3Wty0yFMR0cLhILIJRyi2cEb++/JbWW9b XgSx16TRruHo4ZtBZn9JiqlaraeilDoKrDrkdQsOb/pD1Zkplg+CxbjRbWCijXoR4bL8 eP9efhouI0KuStdSNbv0EyOm4K7CCrR0oj2szABl3V62gvZVxCLLCy9qxJ53qTClhj+1 cBmA== X-Gm-Message-State: ALoCoQnfAYhnqm5HlTgM25MGyxvS8auhzO5pSik2G+TySxOSxVoT9+cwov2e+lEIvBdMorZaAhBh X-Received: by 10.194.173.3 with SMTP id bg3mr6377918wjc.5.1439213867900; Mon, 10 Aug 2015 06:37:47 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.234 with SMTP id w10ls731858lag.41.gmail; Mon, 10 Aug 2015 06:37:47 -0700 (PDT) X-Received: by 10.112.209.35 with SMTP id mj3mr20559783lbc.77.1439213867736; Mon, 10 Aug 2015 06:37:47 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id le2si563467lbc.154.2015.08.10.06.37.47 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Aug 2015 06:37:47 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbbpu9 with SMTP id pu9so67755960lbb.3 for ; Mon, 10 Aug 2015 06:37:47 -0700 (PDT) X-Received: by 10.152.203.134 with SMTP id kq6mr20173702lac.106.1439213867514; Mon, 10 Aug 2015 06:37:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp1939916lba; Mon, 10 Aug 2015 06:37:45 -0700 (PDT) X-Received: by 10.68.117.11 with SMTP id ka11mr45113080pbb.77.1439213865053; Mon, 10 Aug 2015 06:37:45 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id ei1si33090058pbd.173.2015.08.10.06.37.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Aug 2015 06:37:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZOnFN-0000XI-38; Mon, 10 Aug 2015 13:36:13 +0000 Received: from mail-pd0-f170.google.com ([209.85.192.170]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZOn96-0008Ov-GP for linux-arm-kernel@lists.infradead.org; Mon, 10 Aug 2015 13:29:47 +0000 Received: by pdco4 with SMTP id o4so71717564pdc.3 for ; Mon, 10 Aug 2015 06:29:23 -0700 (PDT) X-Received: by 10.70.135.67 with SMTP id pq3mr44919574pdb.8.1439213363579; Mon, 10 Aug 2015 06:29:23 -0700 (PDT) Received: from localhost ([199.168.112.128]) by smtp.gmail.com with ESMTPSA id ea4sm19971868pbc.48.2015.08.10.06.29.21 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 10 Aug 2015 06:29:22 -0700 (PDT) From: Zhichao Huang To: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com, alex.bennee@linaro.org, will.deacon@arm.com Subject: [PATCH v4 15/15] KVM: arm: enable trapping of all debug registers Date: Mon, 10 Aug 2015 21:26:07 +0800 Message-Id: <1439213167-8988-16-git-send-email-zhichao.huang@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1439213167-8988-1-git-send-email-zhichao.huang@linaro.org> References: <1439213167-8988-1-git-send-email-zhichao.huang@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150810_062944_970414_2C00CFE1 X-CRM114-Status: UNSURE ( 8.58 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.192.170 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.192.170 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Cc: huangzhichao@huawei.com, Zhichao Huang MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zhichao.huang@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Enable trapping of the debug registers unconditionally, allowing guests to use the debug infrastructure. Signed-off-by: Zhichao Huang Reviewed-by: Christoffer Dall --- arch/arm/kvm/interrupts_head.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/kvm/interrupts_head.S b/arch/arm/kvm/interrupts_head.S index 7ad0adf..494991d 100644 --- a/arch/arm/kvm/interrupts_head.S +++ b/arch/arm/kvm/interrupts_head.S @@ -792,7 +792,7 @@ ARM_BE8(rev r6, r6 ) * (hardware reset value is 0) */ .macro set_hdcr operation mrc p15, 4, r2, c1, c1, 1 - ldr r3, =(HDCR_TPM|HDCR_TPMCR) + ldr r3, =(HDCR_TPM|HDCR_TPMCR|HDCR_TDRA|HDCR_TDOSA|HDCR_TDA) .if \operation == vmentry orr r2, r2, r3 @ Trap some perfmon accesses .else