Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1429428rwb; Wed, 16 Nov 2022 18:00:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf6FjFkPAz2S+M9BxoniM6bRVI7mQv6StrjBbX8xlSf62UxCO/rZ0quvnwCyik4bhULYEncJ X-Received: by 2002:a17:90b:3605:b0:213:3918:9be6 with SMTP id ml5-20020a17090b360500b0021339189be6mr6323811pjb.183.1668650430282; Wed, 16 Nov 2022 18:00:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668650430; cv=none; d=google.com; s=arc-20160816; b=VFrafFYheq+c7+vE4QrTxRJDXOsfzPW2STWaeOz04U14sSan9XtzR9WuOe3Jxmh//A T5yINrMxKFZv27fO6S1mGwMq4JLAeYmW/z7JvM/x2mCi7OJGHtvW1E/Y6T9B5ZknKHjZ gjvbfG8rSxMLcV1QjmOwnLeMB+Mn4oofh9kZ6yXZd4ZncCe8mQRXpadqrpugKkrRjEVl Tug2vJ9orHZpanAsa7d9zf6Jmwv8Ef3k4aVGCgT27g0CeinVTsJ+vwgHl3qcU/qLE5Xk orcMaLq/iZe63s9v1mUeXE7/NhoEsubYytyInvfIRts7YljMEssH0dm9orRY7KaEaRXN Yu2w== 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:dkim-signature:date; bh=9w7G+RKrt6/0HCKLnjPutAV/rlAGAe32flfBEfmtnv8=; b=K1Lyn/DojRH7rwyzC3vWNEKQSvuJBOYP6rUD8zbs7YCfswZaiLkBdP2ZWGp29pwQHT KIQcq+ZN5wJ9+CVEcRq7Uf566l00dvGPh9ex+GVjiq4FX+DMEt60D1JpQcVcsMQhlR4g KSURhjesejxEre+vf6t0Wx9iE+5Y9Dm2MhdKIQ2GwvVPN0pbtAWXJ1ID85mr12cFJETc OSVMOyXAIx4q/4cjil37RO3t9AXOFKPdFszJryykbjEu0jmUdPMBgdCOAz0B4gBBjLUf ksuahxrHjD7n7h8D6k+rTUnwvUruTvF/Oo1VpNB7o8sgS8qKgok1m85wA2ReTBu636wb G7lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=b829zptC; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i186-20020a6387c3000000b004769f0faab8si7703398pge.740.2022.11.16.18.00.18; Wed, 16 Nov 2022 18:00:30 -0800 (PST) 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=@linux.dev header.s=key1 header.b=b829zptC; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234083AbiKQAxT (ORCPT + 90 others); Wed, 16 Nov 2022 19:53:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233842AbiKQAxR (ORCPT ); Wed, 16 Nov 2022 19:53:17 -0500 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6A763B0 for ; Wed, 16 Nov 2022 16:53:16 -0800 (PST) Date: Thu, 17 Nov 2022 00:53:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1668646395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9w7G+RKrt6/0HCKLnjPutAV/rlAGAe32flfBEfmtnv8=; b=b829zptC3O+9DM0djao1VXWtUd9yQZCLJ0iTnicGDk6kS0jfrCkKFVos4k5N+1z3/+BWrA k+imAyUjuM1YCw7shdK4v9BdLNUew96BAc+lw/OE/Wt3G3K8UXmvbi26TtxB+z1h0qXI0F MH99Vwj6tHqavnVM9+gO2jNkoZprpcI= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Oliver Upton To: Sean Christopherson Cc: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, Reiji Watanabe Subject: Re: [PATCH 2/2] KVM: arm64: selftests: Disable single-step without relying on ucall() Message-ID: References: <20221117002350.2178351-1-seanjc@google.com> <20221117002350.2178351-3-seanjc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221117002350.2178351-3-seanjc@google.com> X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS 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 Thu, Nov 17, 2022 at 12:23:50AM +0000, Sean Christopherson wrote: > Automatically disable single-step when the guest reaches the end of the > verified section instead of using an explicit ucall() to ask userspace to > disable single-step. An upcoming change to implement a pool-based scheme > for ucall() will add an atomic operation (bit test and set) in the guest > ucall code, and if the compiler generate "old school" atomics, e.g. Off topic, but I didn't ask when we were discussing this issue. What is the atomic used for in the pool-based ucall implementation? > 40e57c: c85f7c20 ldxr x0, [x1] > 40e580: aa100011 orr x17, x0, x16 > 40e584: c80ffc31 stlxr w15, x17, [x1] > 40e588: 35ffffaf cbnz w15, 40e57c <__aarch64_ldset8_sync+0x1c> > > the guest will hang as the local exclusive monitor is reset by eret, > i.e. the stlxr will always fail due to the VM-Exit for the debug > exception. ... due to the debug exception taken to EL2. What's a VM-Exit anyways? ;-) > Link: https://lore.kernel.org/all/20221006003409.649993-8-seanjc@google.com > Cc: Oliver Upton > Cc: Marc Zyngier > Signed-off-by: Sean Christopherson With the commit message nit: Reviewed-by: Oliver Upton -- Thanks, Oliver