Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5690660imw; Wed, 20 Jul 2022 10:26:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uF2mPkY/ooW36XFHxOFnTu8GD5OPgyLLz+IcKOaIvKM8EWYLdYIUbrhBBsDQ7vP3iL6bWG X-Received: by 2002:a05:6402:4410:b0:434:f35f:132e with SMTP id y16-20020a056402441000b00434f35f132emr52115221eda.215.1658337994248; Wed, 20 Jul 2022 10:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658337994; cv=none; d=google.com; s=arc-20160816; b=ZQBJQdYDyltCnoymWXD7SqXMEGUfb33x6s4NDKLGfYD8KnTufBaYjTl70s+FTrHtbD Mwz3x1MCac/GAQ/T7KyYM4O+x4LY8e6o/pWJ3fXLSqKSN+bJJRBqzGkKXIqXfW0A/6Rl kRu+MI1qcVmg789hx52OPEW5PfG0Nw2RdYgrhl9eS3U7Q1pcUr0dUFjYfoZK4n8flGfO RU65Q2Vv1jG8tM+SF3ByRLZ4JACsLuX1D00hd8oKB84hhtyzDWbwrQb7PKdbC3lWW8uH ZoFN1HZngLsDnGssTJHYy9sqi3SyGfOYMHjDUqKBEjxWol8EAtgF7NlveFKfF5xW7WcO dq6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=mxHGrxH+znEL4PRhhQoMwVhj8V9iLKntKa0rkmrwJv4=; b=A6Kv0ZpFG5SylqrL2XAMDXNWicBaf21Z55uUO0dvxFp1T5SDPuIb2Xp8VwNy0ynOSl 0CYoDiS23V1/+O9hZrK8Xvl+0JwQYd0MhMtHa8xYevijF33aNLFEenxOY4IrG6e0+bTH aUm8Exc4lnNs7O5oZSVdIn8zioZaGDVi/OusSCtpU8EY4DnhBSRbPsz8zlzVEBWNRTof 5936bjB4FF9U7+OG8moCozCVkgQYxgB3yYZbGx/sy2wOKj/ZMEqbn3CuyzJheNE4juju vYYte/yybSoa14oRVSmNlkzh2dKP/FaBJ5yphbLM8u0v7K5tJEFOemnfKbRxSPXM8q0D dACA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=fbjdnhZv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k8-20020a170906128800b0070d5a5343a3si22051666ejb.353.2022.07.20.10.26.09; Wed, 20 Jul 2022 10:26:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=fbjdnhZv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237372AbiGTRGO (ORCPT + 99 others); Wed, 20 Jul 2022 13:06:14 -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-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> X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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.