From patchwork Fri Nov 9 15:21:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 150661 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp79595ljp; Fri, 9 Nov 2018 07:27:16 -0800 (PST) X-Google-Smtp-Source: AJdET5dKph9JK3EDPhtUfPN4WLcMstKddbo+7i2HDjeECUo00ahjqrn6qPK4FWqItesTiP3K1984 X-Received: by 2002:a37:474b:: with SMTP id u72mr8560681qka.106.1541777236033; Fri, 09 Nov 2018 07:27:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541777236; cv=none; d=google.com; s=arc-20160816; b=ugbCO+YLNP7lxxgxAtQBdpQaSVmCorwX3u9kgtLqrEKg1zlbIjc+HyP/hb3fmuIpn7 BdDLX2muSt+dsv47Zl9H7YIuDBpCcAG/oOBXx5Pp4p9BIXByHAbni2CLMjZX1hPO5Lc/ 32zH+TVmSUZy18pdDzmZcH4h8j7atGGIYcXztG1GAq0UxxaNcKSdRh3srcczffU+1/q1 vkpQmPDy1vl/4e4hVRCwE2wP2UgevPaZY1YG9Z+Xs0ocO+Ljq+jkb7sjYnKkHj2kWmyd QPJxiPWPkbUOpFKtmnTjEdYo2QFX5eSC+HXh3EY/+ZT5zu+RfDlzXXlFIREyY1DU5yRV MIog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:message-id:date:to:from :dkim-signature; bh=LEqVR+2Dn+2gRc5tRGkuC6m983O+wuQlM0LMn6wVfnk=; b=xTN8VdHrkS+nQz4YbCXunDHRuFUbLiSpyqTQaC4hgeLPApBHKoC4RRk9Pkuv6ERcrg KdtSJ6v7mO18SsaTZBjsGOSsYdHNKxpJ0FelNLyijAmqO7Q3SJAwSZxb3NH92IUHlB/g HCdbE6gfH7vtYuLJrxiZ8HgjHqBFH8BS023x6WRY//0ge0zCn8jDhOCE8tnRm1UrXIpK 0BtYVvZG32kLpe73I6uqJBLB0Bfn9gGU8rIvrNH60FItwGfZOfHcfoql7I1vsPCfaSrj 9Y8qXxFSDZVFsfT9zHQ4u3OFZJcCdqnwsysR2FACCCj1IcdK8rK52fPyFUGcYPGsBxnO v23Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UPz4UgRj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id c3si320307qvc.73.2018.11.09.07.27.15 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 09 Nov 2018 07:27:16 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UPz4UgRj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:34741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gL8gl-0007dX-CU for patch@linaro.org; Fri, 09 Nov 2018 10:27:15 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gL8bC-0001CG-39 for qemu-devel@nongnu.org; Fri, 09 Nov 2018 10:21:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gL8b8-0002xu-PG for qemu-devel@nongnu.org; Fri, 09 Nov 2018 10:21:29 -0500 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:43175) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gL8b6-0002eD-VI for qemu-devel@nongnu.org; Fri, 09 Nov 2018 10:21:25 -0500 Received: by mail-wr1-x441.google.com with SMTP id y3-v6so2274575wrh.10 for ; Fri, 09 Nov 2018 07:21:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LEqVR+2Dn+2gRc5tRGkuC6m983O+wuQlM0LMn6wVfnk=; b=UPz4UgRjFyh7MCRjO/bvSEagWUdMv9y29Lic2XX6KY2SvRvkrO09Rc6ZTrkXKsl6yk T7HOhf1HtQFtPSmjHsI1Apj04nVzMQTVLsk4l8wsNl+XEcRJbfNGWfotiaPWPZ4KcSfL HEHknIw2EplH/6sF6kcOmBMpjNJK5r2+1xLu4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=LEqVR+2Dn+2gRc5tRGkuC6m983O+wuQlM0LMn6wVfnk=; b=t5dnuyFpmiCu0zetD1zDrn/QZqz5ZChYcoxtmxKGTXIkaQemk2ZY59wT0WDC8taUIn hof0QLu677q/dCDnR9gngd/zSarbm9OG7Q44MsR2wltuKAeHdarCOxv9bI2rCBOoze2P nX2PvQJ3WgaB3zZJVwYo6EzPb5cVfzexJ9ABt9BSQK6bgOqjW21yCPf6DPRraq8HdjjH 6QLhBbSN50I3KTFkXsRVOvMllMRVj2ZebdqTqd6GhyCbiKR65XrXHyk9r+TPmsXrmybI 2plgw9WTjgViVtXImNRH9Z+GZ4ubndrI1GD2p1Au33Z2uI8MjFwrwEvG8On08F8di6Nl z6JQ== X-Gm-Message-State: AGRZ1gIoipTRrCVP4Bq/M1Xk2casWbPHy5Ol5ANCkmDIaicGltyJAyfO zonPL0bKiLcLHrw4RXDHyc35Mg== X-Received: by 2002:a05:6000:151:: with SMTP id r17mr7995352wrx.53.1541776881284; Fri, 09 Nov 2018 07:21:21 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id m16-v6sm2103953wmd.35.2018.11.09.07.21.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Nov 2018 07:21:19 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 198203E043F; Fri, 9 Nov 2018 15:21:19 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Fri, 9 Nov 2018 15:21:12 +0000 Message-Id: <20181109152119.9242-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH v3 0/7] KVM Guest Debug fixes (plus TCG EL2 debug tweaks) X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hi, I missed a fix I'd applied locally from v2 so this is a resend with some additional tags, some changes suggested by rth and one more fix for the test case. So these are fixes for guest debug when running under KVM. While re-spinning these I came across an anomaly which pointed to a kernel bug that caused the 1st single-step to fail. This is being discussed at on the kvm-arm list: Subject: [RFC PATCH] KVM: arm64: don't single-step for non-emulated faults Date: Wed, 7 Nov 2018 17:10:31 +0000 Message-Id: <20181107171031.22573-1-alex.bennee@linaro.org> It looks like there will be another patch series on its way to address this. As debugging HYP mode code is next to impossible on real hardware I tried re-creating the single-step bug under TCG. As a result I ran into some debug and EL2 cases that failed. The final two patches are some fixes but I'm still seeing some weird behaviour although it is currently obscured by timer interrupts constantly firing as I enter the to be single-stepped guest EL1 instruction so they can probably be skipped for 3.1. The following patches still need review: 0001/target arm64 properly handle DBGVR RESS bits.patch 0005/tests guest debug don t use symbol resolution for.patch 0007/arm fix aa64_generate_debug_exceptions to work wi.patch Alex Bennée (7): target/arm64: properly handle DBGVR RESS bits target/arm64: hold BQL when calling do_interrupt() target/arm64: kvm debug set target_el when passing exception to guest tests/guest-debug: fix scoping of failcount tests/guest-debug: don't use symbol resolution for PC checks arm: use symbolic MDCR_TDE in arm_debug_target_el arm: fix aa64_generate_debug_exceptions to work with EL2 target/arm/cpu.h | 41 +++++++++++++++++++------------ target/arm/kvm64.c | 20 +++++++++++++-- tests/guest-debug/test-gdbstub.py | 24 +++++++++++------- 3 files changed, 58 insertions(+), 27 deletions(-) -- 2.17.1