From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E0DFC43334 for ; Wed, 20 Jul 2022 17:06:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237384AbiGTRGP (ORCPT ); Wed, 20 Jul 2022 13:06:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35060 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230296AbiGTRGN (ORCPT ); Wed, 20 Jul 2022 13:06:13 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2A1C3883 for ; Wed, 20 Jul 2022 10:06:12 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id b7-20020a17090a12c700b001f20eb82a08so2669513pjg.3 for ; Wed, 20 Jul 2022 10:06:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mxHGrxH+znEL4PRhhQoMwVhj8V9iLKntKa0rkmrwJv4=; b=fbjdnhZvC9kMvbvM6vh8zZy9HlHhttZKk16gK14eiFO7kO/GvZqF55tSu1EGa3IRyn Xs932CjVdzCoN1Xha0K4yCLixViV0VU/msLYPWQgtckwqb4DQ/X1CrGQtQdwN/rOKu2l IZCjoghDzCbTLLjk8RetbSQLcZSxSUvRpsKLKMNvjc1x161i8fuGGaHFHlvxl/yz3w6+ LAVy2FbXMFIy9bHp7nWTF7EmFceYnDgw5QRkKFpIWhrHoFmtb+Zl0YatFAxx+R32uXSq 4UkR0eSGoms2o1c+B1/5RBi32z/8yNaM+L47J7W4d+KrnOpWb7LWRu6PhP1K1vkFG+E5 P4mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mxHGrxH+znEL4PRhhQoMwVhj8V9iLKntKa0rkmrwJv4=; b=baaabNQDLCzYR7TZl7VCQ/irTheO3DFi+K6zQ5CxxGXYYx30nw58/Qw6nuB1+GGdVr RVZngUq2vOelKxtmIiKPLUEOBGtCSozq6sH1kfVg9p1jPIhf9gPDA7CQiaj1e1vS+U55 wCc3w0OF2O+W6LzXkUpbx0ymCITZpzQJxQLGZn5NmuaoBYPN9BTPFtgtG7b9+zIXQbt0 pDq2HD5JbbTpzn8FQcZR+zulQ0H7SMWBumJxa964NkxcFW3hgAhQI4/M//QXo3c0nxcD O2JdEcsDmRhTXkL0QJsN4QTw5r0UwkZRrxL22MxAwej99D3HZIdQcpiQ071g6DyLeUIt Aovg== X-Gm-Message-State: AJIora8uS1lCqxaSFGTqlYVhcTn+VoL1nxFdu75WfQU2iVrUq4MqCPjr YTBvdmmHAKxC75i9lRpn650nyA== X-Google-Smtp-Source: AGRyM1solFLAy7ymWlgW+LsLC2BHsNXqOFRXkS+mSO/KJNk/bJkM5O1Crk8ZbcCIbzEVLo5ouruAmw== X-Received: by 2002:a17:902:7795:b0:16c:b506:d41b with SMTP id o21-20020a170902779500b0016cb506d41bmr33616432pll.72.1658336772073; Wed, 20 Jul 2022 10:06:12 -0700 (PDT) Received: from google.com (123.65.230.35.bc.googleusercontent.com. [35.230.65.123]) by smtp.gmail.com with ESMTPSA id f11-20020a17090a664b00b001ef82e5f5aesm1941383pjm.47.2022.07.20.10.06.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 10:06:11 -0700 (PDT) Date: Wed, 20 Jul 2022 17:06:07 +0000 From: Sean Christopherson To: Kechen Lu Cc: kvm@vger.kernel.org, pbonzini@redhat.com, chao.gao@intel.com, vkuznets@redhat.com, somduttar@nvidia.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v4 6/7] KVM: x86: Add a new guest_debug flag forcing exit to userspace Message-ID: References: <20220622004924.155191-1-kechenl@nvidia.com> <20220622004924.155191-7-kechenl@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220622004924.155191-7-kechenl@nvidia.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 21, 2022, Kechen Lu wrote: > For debug and test purposes, there are needs to explicitly make > instruction triggered exits could be trapped to userspace. Simply > add a new flag for guest_debug interface could achieve this. > > This patch also fills the userspace accessible field > vcpu->run->hw.hardware_exit_reason for userspace to determine the > original triggered VM-exits. This patch belongs in a different series, AFAICT there are no dependencies between this and allowing per-vCPU disabling of exits. Allowing userspace to exit on "every" instruction exit is going to be much more controversial, largely because it will be difficult for KVM to provide a consistent, robust ABI. E.g. should KVM exit to userspace if an intercepted instruction is encountered by the emualtor? TL;DR: drop this patch from the next version.