Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1031438pxb; Wed, 1 Sep 2021 15:47:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsgCmYJkW0ufQ74Bk0Lqcao1+jZYcJDHTOsHYbA4NQasM8Bhd7v5xLHSCEKAIlOE6xp44G X-Received: by 2002:a05:6402:221b:: with SMTP id cq27mr262576edb.374.1630536470381; Wed, 01 Sep 2021 15:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630536470; cv=none; d=google.com; s=arc-20160816; b=qsLsSa72klXfMTjHlK/HLRtiHxqT7KplSfWg5YuzF6gmV8Fg7RGaiCENmZ582KX659 nF6OOlc9OJdrGL+Kuhh3JXjVG1rejUPamJanntR4ma5zYBX6Ln0skz/MqxL8YAz2eS0a 2fHlUc6rTcn56L3AnV4S61uMNf42dvFk7xNzJplTGUZF2hkLcW97fbZk5K13Je0Surfl DsEWvBMqjTjH5lzebaUvgHmqRU/KKtrdjYFBQEB6yJh4tEyrL9zVbIVZcAYpDeW8LQkY uDm0iKCwvI2Om7j/lSZv5hBTO81vW5ED9fus2bq1O83Voo5kV95EmY0Hm4t0MloZWqKa symg== 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=KGjRFCzfFxSnSrNaojtITxfWpjAOQrO+uEsac7dWTTA=; b=Jg3/8gbzOIB6v6mrOnThzCAvrBl/AeaT2QeodlgvjJzGylSVefsIZlmRm9RYSg/6CO 4qpW7+VIHnkc3Am0akRD/SiFDDt0htATeJrc3hD/VmF5sTjnSvj4Tbd+DEI+J0/ffhvd AbLaQvVNSZGC3fE1hUr2tIH3Fr3oPah7z9HSO8VWonrLvkxPV5LIp+nUPyZITeYPyrq0 bPFdmQsAPuerVLBBc9iSBIG7UU23gx70Jzsu1A46mcRQwb4Elzo3SpPno1MYPHfTpl+s quRTSMX4PtDQ+4ZAvFRSXU9ZWZ+s5D7rtO/rqnUAMk2FDK1k7EBcqAv4si/8yyx2SGhG TM8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="OOv/w+/p"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si122937edv.347.2021.09.01.15.47.27; Wed, 01 Sep 2021 15:47:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="OOv/w+/p"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S245599AbhIAWLQ (ORCPT + 99 others); Wed, 1 Sep 2021 18:11:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245001AbhIAWLP (ORCPT ); Wed, 1 Sep 2021 18:11:15 -0400 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED643C061757 for ; Wed, 1 Sep 2021 15:10:17 -0700 (PDT) Received: by mail-io1-xd33.google.com with SMTP id j18so1105178ioj.8 for ; Wed, 01 Sep 2021 15:10:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=KGjRFCzfFxSnSrNaojtITxfWpjAOQrO+uEsac7dWTTA=; b=OOv/w+/psizy/DhiK4zgTzBa+yQSn/axNYDdGlR698y7GMR6zMuAi8a9i4OuVbJLj3 fxD9JF82Ws31zhzEUgBPX8DyK2uc5kiIr+iDVadf9MWECxBs6evXSoq5kcnSaN46O5bp B5VZpg7XIgwW5ytafFIlN9wteWQn88jXrRqcyEjFL0L1h6vjf0ZFDqOolmNB+QJ7q/ak 3LdJxADcRoOE1RnP3pEbq+pX9f9mXOV4yNFMF89myZ/5WsWQWA4JzdA7i61pov79exlC 45VVE8GosGLs1VbO1TF3PymyAC3q/7uspmPnOapVMh9PmqySmvvqo1DaS2J8kSn+Q4iu z7Kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KGjRFCzfFxSnSrNaojtITxfWpjAOQrO+uEsac7dWTTA=; b=iWvV1qY1lhadnMAwOUpE8ofH+/VjPFulWVkhGJVPQi1vgdaM0RWwzuDZH5j2OMEuHC rf7u8JtIwh1PXC9phNlSafm1Im0RWYrsMZ7BSwu/r15M8QDIpLBP89cb1Pw7xYQFowOy wOz7aXkKFFLjNnTslnvN52MZVazP+SYGrm0uNeZNRKEjEIBunXZ44aj9BqZCW8aHcM2g 67SINHzubIrZ1SQymdwX4apC29aUutYQ8aFypYe59cTbqpbNz0iZvxQ+iLU+e5FDzC72 EY6MUOe3VNvhFUL02NXt5iqYWOMHcGcPOGEFiwdwPGES2X8HeoxizXaKZ1IGdNyDPI+Y YXkA== X-Gm-Message-State: AOAM531y20m+zZe2Qki0XGftYVpliiR5xZDTV8SimWk2bZcMvvNq9DCv 0WYYja1Ej5y7x5cDfLe9WhBA2g== X-Received: by 2002:a05:6602:2c07:: with SMTP id w7mr50345iov.122.1630534217200; Wed, 01 Sep 2021 15:10:17 -0700 (PDT) Received: from google.com (194.225.68.34.bc.googleusercontent.com. [34.68.225.194]) by smtp.gmail.com with ESMTPSA id a17sm489028ios.36.2021.09.01.15.10.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Sep 2021 15:10:16 -0700 (PDT) Date: Wed, 1 Sep 2021 22:10:13 +0000 From: Oliver Upton To: Raghavendra Rao Ananta Cc: Paolo Bonzini , Marc Zyngier , James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , Peter Shier , Ricardo Koller , Reiji Watanabe , Jing Zhang , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH v3 03/12] KVM: arm64: selftests: Add support for cpu_relax Message-ID: References: <20210901211412.4171835-1-rananta@google.com> <20210901211412.4171835-4-rananta@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210901211412.4171835-4-rananta@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 01, 2021 at 09:14:03PM +0000, Raghavendra Rao Ananta wrote: > Implement the guest helper routine, cpu_relax(), to yield > the processor to other tasks. > > The function was derived from > arch/arm64/include/asm/vdso/processor.h. > > Signed-off-by: Raghavendra Rao Ananta Reviewed-by: Oliver Upton > --- > tools/testing/selftests/kvm/include/aarch64/processor.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/tools/testing/selftests/kvm/include/aarch64/processor.h b/tools/testing/selftests/kvm/include/aarch64/processor.h > index 082cc97ad8d3..78df059dc974 100644 > --- a/tools/testing/selftests/kvm/include/aarch64/processor.h > +++ b/tools/testing/selftests/kvm/include/aarch64/processor.h > @@ -191,6 +191,11 @@ asm( > val; \ > }) > > +static inline void cpu_relax(void) > +{ > + asm volatile("yield" ::: "memory"); > +} > + > #define isb() asm volatile("isb" : : : "memory") > #define dsb(opt) asm volatile("dsb " #opt : : : "memory") > #define dmb(opt) asm volatile("dmb " #opt : : : "memory") > -- > 2.33.0.153.gba50c8fa24-goog >