Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1686493rwb; Wed, 16 Nov 2022 23:53:56 -0800 (PST) X-Google-Smtp-Source: AA0mqf4aipELaxNZXuXgFyaewhk22S16Pza1+oSIbbiz3zzNRrqZcncHTn5OnkDQoOVn9FcE3yh+ X-Received: by 2002:a17:906:c405:b0:7aa:4560:2dc7 with SMTP id u5-20020a170906c40500b007aa45602dc7mr1198808ejz.33.1668671636658; Wed, 16 Nov 2022 23:53:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668671636; cv=none; d=google.com; s=arc-20160816; b=OKoyV6nvJTd4S2O3fLE8ORhP9Lb3qF1BO8FT63w32OhgBU1xx47ZHQgJhocIZPV8of RkrLX3Sd8y+/sbfcVlk+edmy0Vj5KpW8w2ibU4RPrC4LRPKDvri6CN8ye10ZMVzVcWpU eAilohgi5t76ONN+qgx0VVdaV9j3InJXhdXS8j+qBI/U+1zH5wOEz75BhrB//w+hie55 W0I1pziVf6aVbwFf5xScdb/glWQWzI91QRoebQs5WtTY+IXOxgYvqHcBQk4ApFU90l7Z JY8ab65XWrDZjXUVueCSFWTNnd+SmE085lB0ghtWlu+vYrnOQq2VGM3U/O/HmB56rDYm CCkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=UAu7Qq9urA/2CACA9Hh+1UR/gyDzRKpeK8exN8pGRGc=; b=cCoxekR6eESx5d5IvsqyZkI2J6Q2uTSs5jeu+20N1LdBZdhuotqZ3zRgCEta7VpPzM O2n44uHB5tBLdr1MhzJjcE8XEFwlzOeZ+LewXTcPKO+xHODctdIYV6jXPqgNB+GqfW5k SHoEyvVkqaaVAG4Z+ytAuiVEaCc3i/QqL/SSO2n0OZ8OenGCnnsEXh0UhpkaFuzWXydI ZcrRgqsKAyTe7dJC3Dyq2+qEtcUQL+bMcXLJwWkaElvv49HKo7CuV9Im5pruzKB4F3xR OGVV7W0uRvu+QZ2CfKMgFSNk3z3/H/hILOA5wdNGy7wza9HifBEzAXxNoPW6JkNLBjTq h/9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=tPom7jgm; 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 ga5-20020a1709070c0500b0078a19032c70si40271ejc.334.2022.11.16.23.53.34; Wed, 16 Nov 2022 23:53:56 -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=@google.com header.s=20210112 header.b=tPom7jgm; 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 S234734AbiKQHIO (ORCPT + 91 others); Thu, 17 Nov 2022 02:08:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234313AbiKQHIL (ORCPT ); Thu, 17 Nov 2022 02:08:11 -0500 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 28563657D4 for ; Wed, 16 Nov 2022 23:08:11 -0800 (PST) Received: by mail-pg1-x534.google.com with SMTP id 130so1212059pgc.5 for ; Wed, 16 Nov 2022 23:08:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=UAu7Qq9urA/2CACA9Hh+1UR/gyDzRKpeK8exN8pGRGc=; b=tPom7jgm4aEV3UcuTrtkJ9WXPYx1xLs3GpHHDkKphwOmPBFKz+yATUKMk1dUX4Czj4 9m5Z41vo7tXTj7X4CpnPP4xffZ3+eD1hoPOupmGXTUhfpccza0/QJojWLXRBN+MxesBW KZEcXnv6FIphs/mg4YlCNzY7DHdrlS6QVeSkGZLMgoDsYR++Us4LGtpvqaXaj5+hqdNN 2LA9sydaeL6d283yzEM9HnUJWbNrbdbNUZkXH08AuHtpCWvJHy7hE6HSL3aJJbCpXFwI UD0QHIiRDU2+sHuipLJUXt8zTOxvp7n2MWM0ecdjFJKRG+6u2eNgX+75bjq4NKrmPGEK wCGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=UAu7Qq9urA/2CACA9Hh+1UR/gyDzRKpeK8exN8pGRGc=; b=5pKfQ0VHAEbk8mQcwW0643c4SvG5tnd6Uzsm0BJWi01neJMG3feQifF4wGZNt/8rFe VhJ209cVH2LE6PSGdzJ8vcxYVD6erRnxDy0RjjzY8I0iYQycUJe+7Iw/PMpjcOOJ2Lx4 DYOsMMLUHJ3mOnaoe4iFS864xnpQzGkXLrP4BoF6KlEBZoFRlhNTcFE+qa9YlwxKwO5X ennOwUOFjDRXy6tFUstenpChqq6GW5vUIUbfOkTQ8lg9yhW6vnJT1pCApw3JYbPZluHP LHoQmnWondZm8hKLGSznV4+KGGCx9crKbdvYuNSl+ckvnV0lsSGWlCaesaT+z1GEJmqS OYWA== X-Gm-Message-State: ANoB5plG+u9vbmcF7Op/a1MCFhb/E18XR3Uph6k7W6wOLjMyLPJOUOp0 tSg+hvwoFEiJ3SZInB77KnL42rktttiOBSaRrNtPig== X-Received: by 2002:aa7:80d8:0:b0:56d:98e3:4df8 with SMTP id a24-20020aa780d8000000b0056d98e34df8mr1695579pfn.37.1668668890570; Wed, 16 Nov 2022 23:08:10 -0800 (PST) MIME-Version: 1.0 References: <20221117002350.2178351-1-seanjc@google.com> <20221117002350.2178351-3-seanjc@google.com> In-Reply-To: <20221117002350.2178351-3-seanjc@google.com> From: Reiji Watanabe Date: Wed, 16 Nov 2022 23:07:53 -0800 Message-ID: Subject: Re: [PATCH 2/2] KVM: arm64: selftests: Disable single-step without relying on ucall() To: Sean Christopherson Cc: Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" 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 Wed, Nov 16, 2022 at 4:24 PM 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. > > 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. > > Link: https://lore.kernel.org/all/20221006003409.649993-8-seanjc@google.com > Cc: Oliver Upton > Cc: Marc Zyngier > Signed-off-by: Sean Christopherson Reviewed-by: Reiji Watanabe