[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YS/wwkZu4lfqtmYx@google.com>
Date: Wed, 1 Sep 2021 21:29:38 +0000
From: Oliver Upton <oupton@...gle.com>
To: Raghavendra Rao Ananta <rananta@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, Marc Zyngier <maz@...nel.org>,
James Morse <james.morse@....com>,
Alexandru Elisei <alexandru.elisei@....com>,
Suzuki K Poulose <suzuki.poulose@....com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Peter Shier <pshier@...gle.com>,
Ricardo Koller <ricarkol@...gle.com>,
Reiji Watanabe <reijiw@...gle.com>,
Jing Zhang <jingzhangos@...gle.com>,
linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH v3 03/12] KVM: arm64: selftests: Add support for cpu_relax
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 <rananta@...gle.com>
Reviewed-by: Oliver Upton <oupton@...gle.com>
> ---
> 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
>
Powered by blists - more mailing lists