From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 3/4] KVM: SVM: hide TF/RF flags used by NMI singlestep Date: Thu, 15 Jun 2017 14:09:05 +0200 Message-ID: <496f378a-406e-3c49-cd5d-aa08765f4fce@redhat.com> References: <20170615112032.15812-1-lprosek@redhat.com> <20170615112032.15812-4-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-lf0-f42.google.com ([209.85.215.42]:33019 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752397AbdFOMJI (ORCPT ); Thu, 15 Jun 2017 08:09:08 -0400 Received: by mail-lf0-f42.google.com with SMTP id m77so7880683lfe.0 for ; Thu, 15 Jun 2017 05:09:08 -0700 (PDT) In-Reply-To: <20170615112032.15812-4-lprosek@redhat.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 15/06/2017 13:20, Ladi Prosek wrote: > Example: NMI singlestepping is enabled while running L1 guest. The > instruction to step over is VMRUN and nested vmrun emulation stashes > rflags to hsave->save.rflags. Then if singlestepping is disabled > while still in L2, TF/RF will be cleared from the nested VMCB but the > next nested VM exit will restore them from hsave->save.rflags and > cause an unexpected DB exception. Stupid question ahead, why is NMI singlestepping even using RF? I should fire up my AMD box and see whether changing it breaks eventinj.flat... Paolo