Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752069AbaK3KUn (ORCPT ); Sun, 30 Nov 2014 05:20:43 -0500 Received: from mail-la0-f46.google.com ([209.85.215.46]:33636 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142AbaK3KUl (ORCPT ); Sun, 30 Nov 2014 05:20:41 -0500 MIME-Version: 1.0 In-Reply-To: <20141130101056.GB484@cbox> References: <1416931805-23223-1-git-send-email-alex.bennee@linaro.org> <1416931805-23223-6-git-send-email-alex.bennee@linaro.org> <20141130101056.GB484@cbox> From: Peter Maydell Date: Sun, 30 Nov 2014 10:20:19 +0000 Message-ID: Subject: Re: [PATCH 5/7] KVM: arm64: guest debug, add support for single-step To: Christoffer Dall Cc: =?UTF-8?B?QWxleCBCZW5uw6ll?= , kvm-devel , arm-mail-list , "kvmarm@lists.cs.columbia.edu" , Marc Zyngier , Alexander Graf , "J. Kiszka" , David Hildenbrand , Bharat Bhushan , bp@suse.de, Paolo Bonzini , Gleb Natapov , Russell King , Catalin Marinas , Will Deacon , Lorenzo Pieralisi , open list , "open list:ABI/API" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30 November 2014 at 10:10, Christoffer Dall wrote: > In any case, I think it was related to how userspace observes the state > of the CPU, because when you do the MMIO operation emulation in > userspace, currently if you observe the PC though GET_ONE_REG, you'll > see a PC pointing to the next instruction, not the one you're emulating > which is strange. Also if we ever add support for userspace to say "this MMIO should fault" then we definitely need the PC-advance to happen afterwards, not before. > Not sure what the relation to a guest single-stepping itself was. I think it just came up in the course of that discussion, because single-step handling also needs to perform an action (clear PSTATE.SS) as part of the "advance over this insn" operation. But I think that you're right that doing the advance before dropping out to userspace is no worse for singlestep than it is for any other case. -- PMM -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/