Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3398281imu; Wed, 7 Nov 2018 09:42:36 -0800 (PST) X-Google-Smtp-Source: AJdET5fODviJHUcucQz5T73Abx3NLhCppunf0iNUSOgtDANfoSrR3Yj7DWbfCvY1WBvNrRucs+tt X-Received: by 2002:a63:7541:: with SMTP id f1-v6mr858672pgn.231.1541612556832; Wed, 07 Nov 2018 09:42:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541612556; cv=none; d=google.com; s=arc-20160816; b=wnKxnMe2ZKwZMW7EYPuWE+CqJrUJlVfGgEcIqK5g8SZIK+WQJ0W/h5j0gGyP39jSSj XBg6Qt4q1gc41BS0doEvSJVaeKqOgwnX+Ip3SM6mOUvT/D7DuuLNDLajHk3HhPT/NCau Y0RGOROEzlmI9IUlGxc6o73apKNHhoyQUpD6wBRncUEXgjC5UsNJ8zyMT8/GpOjHWnG4 +gEHwn27YdRPjRWiyd2a5N+BmfuKAiKbG+psXs0bvclthj5eztOxCgkFynyeH4WmC9iO MLHE9cvZPi/CCczKzxlOB0LvWZV1Khf4RLqlZApyanvk2iK9mqotEp32fyUdc4E2DmUW 5WjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature; bh=rZiFRx9VrRsRXac2sOm4lzh12bTAfzn9VB1zquKY3fA=; b=iLJY6/27kfUsgWedMggFbLw1gnWCcTi13IOTarlzGJA5zAgi0T1mIjycXXwOBHutnU 9MTRopYm7GWbE1LYlf4VCIzyKHGB/S+RaL4juIR5uzkGzoApFX4SdTY4c6r1Lwrctc8C KdHxpvJYH4iP0U/9JNV5AtYUI+hX0waNaxvJeFt0KJRAArCm310HiPyHsOrOPNaz736q kI4fkc3FmYBerA+yiN1RiD+s9wLwihkEdAtakmqRx6edlomEHRuqrIqPsUePqHMnjXJl hjW7zYa+ts3HZ1zLel8SFNwk/eGk8ic4vN2Aww0ab+lQp4DeDCekDIJct6DBGbgzSX6x OfWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MKZDtJ6E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j20si1125143pgg.162.2018.11.07.09.42.22; Wed, 07 Nov 2018 09:42:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MKZDtJ6E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731607AbeKHDK7 (ORCPT + 99 others); Wed, 7 Nov 2018 22:10:59 -0500 Received: from mail-oi1-f195.google.com ([209.85.167.195]:40747 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728083AbeKHDK7 (ORCPT ); Wed, 7 Nov 2018 22:10:59 -0500 Received: by mail-oi1-f195.google.com with SMTP id u130-v6so14519616oie.7 for ; Wed, 07 Nov 2018 09:39:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=rZiFRx9VrRsRXac2sOm4lzh12bTAfzn9VB1zquKY3fA=; b=MKZDtJ6EMv3vOo/rEQsIPjw3sVU4PlMGJJjgmXFdinJ2v5kojsfqvVxTOJ8Iz2McBq 8EgYm1R/EjLL5KIYI9+eszcI27nFi+CO7oGGniql0fqvWkVAg8G/rlTuI2GVP9gKlcJN +m7jK95GD+yD8fQxh0DbbchGnhzSmKH+cLI7A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=rZiFRx9VrRsRXac2sOm4lzh12bTAfzn9VB1zquKY3fA=; b=HCCkn+iI4vhGk99bVHVUF8NaDG/glH3LgB9NqSekKmlDS2uSVYnErvwzlU9kJ+6Yv0 MFtSu1/ayBJpFwrHPFULfP81NEeZxo6+LkOABth6OWZ+wYkaQ62DD1U5nP29m4uE6zxK ZRBx5lPlwdYPRLykFEZGzohuQwZmBj5iqGCPmOMdpmIhq1a4pNWJY0JRXdnejaAIV3A5 LgOUUcAYaINOijBJ9GZ8xnW34C4nG8niqmrx97rmqpYSDeQuZxh/d4UOEGmrFsdh5cyB IftyhCvvGbDMHhoUWdM/Gqf9v7QrGlzUPr3MnjgEmIbw7zhYa0+Qbx/AALvHfZcQiMzI LROQ== X-Gm-Message-State: AGRZ1gIbDdHu++lw0DvB5VwYYGfrepsiBM987GKfPQg0/ePVZrwFaUgW EchnScW+/8cBvjuQxboDbODmQytFZTP77Z15FV5Jaw== X-Received: by 2002:aca:b68b:: with SMTP id g133-v6mr668680oif.25.1541612374957; Wed, 07 Nov 2018 09:39:34 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a9d:4b0e:0:0:0:0:0 with HTTP; Wed, 7 Nov 2018 09:39:14 -0800 (PST) In-Reply-To: <20181107171031.22573-1-alex.bennee@linaro.org> References: <20181107171031.22573-1-alex.bennee@linaro.org> From: Peter Maydell Date: Wed, 7 Nov 2018 17:39:14 +0000 Message-ID: Subject: Re: [RFC PATCH] KVM: arm64: don't single-step for non-emulated faults To: =?UTF-8?B?QWxleCBCZW5uw6ll?= Cc: kvm-devel , arm-mail-list , kvmarm@lists.cs.columbia.edu, Christoffer Dall , Marc Zyngier , Catalin Marinas , Will Deacon , open list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7 November 2018 at 17:10, Alex Benn=C3=A9e wrot= e: > Not all faults handled by handle_exit are instruction emulations. For > example a ESR_ELx_EC_IABT will result in the page tables being updated > but the instruction that triggered the fault hasn't actually executed > yet. We use the simple heuristic of checking for a changed PC before > seeing if kvm_arm_handle_step_debug wants to claim we stepped an > instruction. > > Signed-off-by: Alex Benn=C3=A9e What's the rationale for this change? Presumably it's fixing something, but the commit message doesn't really say what... This feels to me like it's working around the fact that we've separated two things ("advance pc (or set it if we're going to make the guest take an exception)" and "notice that we have completed a single step") that should be handled at one point in the code. thanks -- PMM