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 X-Spam-Level: X-Spam-Status: No, score=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29D87C432BE for ; Wed, 1 Sep 2021 22:12:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EB14D60F42 for ; Wed, 1 Sep 2021 22:12:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EB14D60F42 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=kSryKOVWL6mM3aKKaSz0CYrxuqenKfE0920ZZrKDMtY=; b=Mk3rtbbhENKMAo J5ykcxQ+Nn1Id7YAlpUIn9WxShUd8qDOypN2sYJOznIL3IWua3s+v43MApu6mDWnWSjzvkwBzlycL bloxvwAdhfPzpfcu9Fl+csE8DBU9IVAxnAnU0fn2peT8eWXx3zzO8J7oNzrkGMtaw+p50AA9rdsBm 7ZRirWFxR/pADAcKei7EH/MgnnWXkH7sWobzqVgw67vd8YH9RpxF+t8s0gF+CvkLGI6JQUAEp1Srt d2DKlron2248SlG1G8idTzAm7OJXwOAP82OvAMXH2OGpH4K+2LQ1bjHYpMl57dClT8wRKC/dtfcoR vDa4QTfM0QGo4rVVjb9A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLYR4-007eDX-Le; Wed, 01 Sep 2021 22:10:22 +0000 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mLYR0-007eCH-KA for linux-arm-kernel@lists.infradead.org; Wed, 01 Sep 2021 22:10:20 +0000 Received: by mail-io1-xd34.google.com with SMTP id e186so1083198iof.12 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=Ejn5pEk2SUVcU4j0AAS/Z2wOrPpjij7rR/2tD1G4KemA9Ykwt//NkkIx+z3amT+Oij PV4WeeIzzG/3csuWxnqCx84MFfm1oky36mLApWfo5xRSC2eoHyvAZwPXuri/uyYl18gR t/HDoWyUw6f2Q/xcIKChZdxcf7dxjKNXWeMEXsZ6P5sD5zLfOVA1ZYI/el+7E0neBlVy 7p31Fzgp1qRxHMd9e+dEOsp+oaZw2+FjNjpUO4PmsV/6EytKT7H2Vz17JUapAR3r7f1M dSdyi1/vsCLCwWkBsbnvcYwrB8u6M6CQeMxnG6lYCqSbX0ezkrP0v7MapcdsIpfos/cW Rh7g== X-Gm-Message-State: AOAM531N+CtOX3jC7Fr8Q/nEvwYpvutltEPgZjV4I6dUMxwSb8FFi3tV 4P8dX1Z7kz/QNdjDSXl5CF0Grg== X-Google-Smtp-Source: ABdhPJySzt8yvEcNMvACBvDBo4zdwifpTI+hcV+s3GieMcGv75P4h3hv4hnkMh9HLpsRhVbkfBXl9Q== 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-Disposition: inline In-Reply-To: <20210901211412.4171835-4-rananta@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210901_151018_733856_C782071B X-CRM114-Status: GOOD ( 17.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel