From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752704AbdKTSdi (ORCPT ); Mon, 20 Nov 2017 13:33:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58432 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751938AbdKTSde (ORCPT ); Mon, 20 Nov 2017 13:33:34 -0500 Subject: Re: [PATCH for 4.4-stable] KVM: x86: fix singlestepping over syscall To: David Hildenbrand , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: stable@vger.kernel.org, =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= References: <1510855675-48470-1-git-send-email-pbonzini@redhat.com> <1ce1faac-b580-2fc3-bebe-60e6f76d925a@redhat.com> From: Paolo Bonzini Message-ID: Date: Mon, 20 Nov 2017 19:33:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1ce1faac-b580-2fc3-bebe-60e6f76d925a@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 20 Nov 2017 18:33:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/11/2017 10:55, David Hildenbrand wrote: > This looks good to me. > > General question: how do we treat KVM single stepping and concurrent TF > in the guest? IOW, shouldn't the "else" rather be a check for ctxt->tf ? > (or is that handled later on e.g. in user space?) At this time, not very well. What you suggest seems sensible, however note that this function is only used on the (slow and rare) emulation path, not when the guest is running in VMX (or SVM) non-root mode. Paolo