From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 2/4] KVM: nSVM: do not forward NMI window singlestep VM exits to L1 Date: Thu, 15 Jun 2017 14:08:13 +0200 Message-ID: <98b929b4-c74b-2612-c4bd-3a2a9399b6cd@redhat.com> References: <20170615112032.15812-1-lprosek@redhat.com> <20170615112032.15812-3-lprosek@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: rkrcmar@redhat.com To: Ladi Prosek , kvm@vger.kernel.org Return-path: Received: from mail-wr0-f195.google.com ([209.85.128.195]:35450 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752486AbdFOMIR (ORCPT ); Thu, 15 Jun 2017 08:08:17 -0400 Received: by mail-wr0-f195.google.com with SMTP id z45so3219928wrb.2 for ; Thu, 15 Jun 2017 05:08:16 -0700 (PDT) In-Reply-To: <20170615112032.15812-3-lprosek@redhat.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 15/06/2017 13:20, Ladi Prosek wrote: > @@ -4635,6 +4669,7 @@ static void enable_nmi_window(struct kvm_vcpu *vcpu) > * Something prevents NMI from been injected. Single step over possible > * problem (IRET or exception injection or interrupt shadow) > */ > + svm->nmi_singlestep_guest_rflags = svm_get_rflags(vcpu); > svm->nmi_singlestep = true; I like this, and I think it should be extended (not by you necessarily :)) to KVM_GUESTDBG_SINGLESTEP. The current way of dropping TF from the guest altogether kinda works, because you're not going to run nested gdb, but is conceptually broken. Paolo