Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1030898pxb; Wed, 1 Sep 2021 15:46:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzn+PNX0bn088Sjrf9ekvnmuP7M6NfLtuelU2bbmiqiRatdzSHhSnSlwyYGMZK2hoHlK/9t X-Received: by 2002:aa7:c408:: with SMTP id j8mr255552edq.280.1630536411318; Wed, 01 Sep 2021 15:46:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630536411; cv=none; d=google.com; s=arc-20160816; b=cFrUWpvQ8twMPVjv4TJib33Ni25YeXbPa5gVS12jCo45vcQ1pyMzy+EJ4Rm5ApXKvV 8rwMBPYa5PL9PjVhLBfjuITVYVmcXv05xWGcFrE9ZIGD+l7tYaA0CmU+F2ZfGwLXRvLj pAjrSrMhLhlyz0LN3zxYiiUkqPcfozWVPeMMp/6s6Z9KAYvwgCqMWO5ztP2k8zhJ6FSM tfQCgZeAXxy0kVhH0xWk5yyXUTiP/PPkY9YjiEutLpE+q2lzJkxwsT5GKGxGHlbD8hiR BBo5ZPTkG6hMhY8AhoUVh6U5u6TkwdUvU8P4Oz9DKdH1owaeFfHl1FG07AwZrVVe7DHl S1yA== 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=fFpSwbSHNrliOmSihL0bS2tGLhQO8Q2+V4hUwb1x3wPAJPm5T5bMXxji97n7Uv7wQD ykNjxOL7QaC/8iM40DPsXOgVoeOmagiJG8skZhBDPPajJAckG7qV1Ta3XhhpmV9yUuy1 QwRK2JlVBad/t51bZ5RSM/K6SFdNR4ioBrLO6e0GfZfUT14XnVcT9a5i8q4ZHZQ5lj7T ZyWIbbGzHySgkKLkOYfVjgBK3A42L7q6dWNijlFYCkOXKpJV10xFUWFnU429R4c4DGaj utnwwOM/gbKwEsTnmd7lSEb0Eknf/vz7soPq8+zJeLt+u9v7RlWv3IeEYzHhQWs28IH9 zc1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="qjLS/Lwo"; 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 i18si167312edc.271.2021.09.01.15.46.28; Wed, 01 Sep 2021 15:46:51 -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="qjLS/Lwo"; 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 S231829AbhIAVal (ORCPT + 99 others); Wed, 1 Sep 2021 17:30:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344791AbhIAVak (ORCPT ); Wed, 1 Sep 2021 17:30:40 -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 3DCF6C061575 for ; Wed, 1 Sep 2021 14:29:43 -0700 (PDT) Received: by mail-io1-xd33.google.com with SMTP id a15so1028445iot.2 for ; Wed, 01 Sep 2021 14:29:43 -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=qjLS/Lwo+l0y/xWgb9Yqx3gwHHIqKU/h+4CZY2e91pjpHo2fM2km+R+Aq1kPhbzrnZ 9qQlZ6aVuw/V8/m7LWoa9oAT13KmdbzLWMNmSSSK1j+h8xUuBVM3U75RfhDXnSCLx56l e50E1QwY4UL8edEAGNbUGfdr70SvdMu3IPDdZkNiQHr+/mypm6nHNYFwljYmDPTznfY6 CAdSB9tO3n2qGOn4DB8Zi0LQ1+0R1iPSeFN/+weC7GkYwQede6i4CDzK8ATXfeahkA/b 7rKQEF2qEPrKFEaL6vftzbbGLeCOo2drtmjnuxEOup5KXei3+jcr/OWCRJCHnHicLRIJ Rzyg== 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=FRtzX3SUx3IC9tcdp8deRWl/453qCcfuXBrrsjoBWTR5zTvMK1T54vRYnYKsPMNySi HOK2eAtnciz5xLfp4rB2vrNkf7PVvxaOuCTy0v3wO9ZxGwO9qEyVQXZG2FDE47Bob8GW XluwNvWyHSgxya+6SvpuEKVQ+1iKIPnfFdvSv+PDXfqvz+EUN8i5T9OwColwqfNn0wmc h+45qEsbU/k29uvOZtMh9TAgajOAIavyaw0Djm6KSLlVZ0N1FCyV5zG5NEFFfYxdqV0A DxsGqbTX9l//AiD72hdG62hGPVWpJFQ53oMo2h3nCAlCd3nNqEAeAk3qdXHvKzTVnUwq 6PGA== X-Gm-Message-State: AOAM5308xOtFnqSsMHAypQx8JXyvyWiLClXunx3yCHzNX0NVdFGzefIp 0naWYOiFMl3UWt7G96pZxqfAiA== X-Received: by 2002:a02:908a:: with SMTP id x10mr1409251jaf.30.1630531782445; Wed, 01 Sep 2021 14:29:42 -0700 (PDT) Received: from google.com (194.225.68.34.bc.googleusercontent.com. [34.68.225.194]) by smtp.gmail.com with ESMTPSA id g12sm416700iok.32.2021.09.01.14.29.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Sep 2021 14:29:41 -0700 (PDT) Date: Wed, 1 Sep 2021 21:29:38 +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 >