From patchwork Thu Nov 8 16:33:23 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: 150533 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp1038160ljp; Thu, 8 Nov 2018 08:37:17 -0800 (PST) X-Google-Smtp-Source: AJdET5duBEsiQJ+cvaBIDIy5EdZwgf4f+OUex686yD9BnvZBg/vjXXBo9HjvDsCLA48w6GNMYaZj X-Received: by 2002:ac8:39c2:: with SMTP id v60mr5004106qte.142.1541695037510; Thu, 08 Nov 2018 08:37:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541695037; cv=none; d=google.com; s=arc-20160816; b=m6p0zr/ujo7E/rNpOKi7yVEjaB2cSDSn+6Y3u3U/o50dbMGLWyLlmfIbzROR12ilXQ k7kcDC2QUMIA60hjT6zhnJ+/2ztbt9wsrMOf3u1So7DFwwEcsceqY8D4c/8KdnXRw9Q7 o8wqTYVvwIB69E8sFNWKILeTYrIjzvjEQwwr+TdgoNUMbpuA4SVrCJ2VxyDr8I2/+Skj B0WyD+wjQjDerqW8FZRGdzfcObp0JkAVRnbd0IBdBlOqCJmjZ8gGumSPaFKAQPjBXyQ+ kBF96NPcmIAPBnQzcTT0NyVC9501Hoc8OW3XsXmVpWU4FB9rq+uesB+yu1vOarDnGZ2K nYeQ== 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=9YbrmTUcc9D8Q+mSnPom21bFHAItTFTAS481d74Ny1o=; b=E8Z1uf+eTr0jz47T78f59e1Eu4IAIoKvu1q8Vgf1OOhAhC8U+eVJPbQiEZ26+SPvAH d7nvo6OTB13BBduSmBR5j1NezjdLsCY0Y54aSkhkinwKeM2OX5BBzuQnMNlQV5kLri26 U/sYLIFLFgBmvNqyRR/A/XGmAjwcVjp625HVd/iKkO4ivcG3gmzz3bEt8g6ddEVMGUJU L24h+3NpIatLeWBkO1kYcvSLEjyyuAFaqlioxUIiB9c5V01W8r4ktxbVDBCMYQFqaJdo +RT21uV7syeZKPxKwbln2w/V9ZFQZRWl6C11ZfhRmAbF4A8G0Bg1r93L4pfAAJyUwNzV w/sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=MFTbfAag; 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 z1si3134211qtd.368.2018.11.08.08.37.17 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 08 Nov 2018 08:37:17 -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=MFTbfAag; 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]:57840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKnIz-0003mN-10 for patch@linaro.org; Thu, 08 Nov 2018 11:37:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40740) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKnFf-00083F-CP for qemu-devel@nongnu.org; Thu, 08 Nov 2018 11:33:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKnFd-0004tQ-7U for qemu-devel@nongnu.org; Thu, 08 Nov 2018 11:33:51 -0500 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:55148) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gKnFc-0004an-S8 for qemu-devel@nongnu.org; Thu, 08 Nov 2018 11:33:49 -0500 Received: by mail-wm1-x342.google.com with SMTP id r63-v6so1906058wma.4 for ; Thu, 08 Nov 2018 08:33:32 -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=9YbrmTUcc9D8Q+mSnPom21bFHAItTFTAS481d74Ny1o=; b=MFTbfAagXy6ZORhmscQu8WVAXo663D8oSTTqpF8ZFSSwfJ4sSMVOEdopD5HVcHuIgM /F0JNIyunrEejaJ+2nG0E6ApFz9ASfvN52U+1dkUOVZcAp8b3vOxlVdzb+gmcgc8CQUc rPFBTzuB1HUvHmSAlef2UiYpeTPNEY+S9rJrk= 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=9YbrmTUcc9D8Q+mSnPom21bFHAItTFTAS481d74Ny1o=; b=UB3Q7Q/vFYDSCEFW0LjM/HWm3cBZGxvu+wQ9KqeKh6Z5Gsw76547vvroBclqkADjMD Bg2e+wmDSVIp4EAOBrQ9rfaTGLo5zHaJhNtaV34iQnQnSWXxrmYjYd/bta0HYkpIjwCs aoUkj6t2LJXxM9QMJTtrQXCWjz09y6J78hhJ6PmMg8fokFQo4UwYOC6HlFIf7rMQaavF bufdXd4g9JcQ6lU+ZZKx7bv1Z/8fd/sFDMuRl1q8EKJiCNfNl2LsTuJo/3KJnsZhs1Bq DnNCA0/9HwKUu82nHHILLA0vfwFh8L9OvG+pEO3C7H0JPFWn6yI2sSUTpUAZ3dNcnSNe rlIA== X-Gm-Message-State: AGRZ1gJewRzjPak6GWml9RL5YGNscSb5F0sUCKeaOAqC3ha/grGW0sUs ddYA16LNBsIwsBLOIPaoDBzO3Q== X-Received: by 2002:a1c:1d12:: with SMTP id d18-v6mr1746274wmd.31.1541694811437; Thu, 08 Nov 2018 08:33:31 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id q11-v6sm3566287wrj.7.2018.11.08.08.33.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 08 Nov 2018 08:33:30 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id DE94F3E03FE; Thu, 8 Nov 2018 16:33:29 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Thu, 8 Nov 2018 16:33:23 +0000 Message-Id: <20181108163329.19940-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::342 Subject: [Qemu-devel] [PATCH v2 0/6] 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, 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 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> 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. Alex Bennée (6): 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 arm: use symbolic MDCR_TDE in arm_debug_target_el arm: fix aa64_generate_debug_exceptions to work with EL2 target/arm/cpu.h | 29 ++++++++++++++++++----------- target/arm/kvm64.c | 20 ++++++++++++++++++-- tests/guest-debug/test-gdbstub.py | 1 + 3 files changed, 37 insertions(+), 13 deletions(-) -- 2.17.1