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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31060EDE99C for ; Thu, 14 Sep 2023 10:15:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230444AbjINKQA (ORCPT ); Thu, 14 Sep 2023 06:16:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237175AbjINKP7 (ORCPT ); Thu, 14 Sep 2023 06:15:59 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CA541BE8 for ; Thu, 14 Sep 2023 03:15:54 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-401d80f4ef8so8495435e9.1 for ; Thu, 14 Sep 2023 03:15:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1694686553; x=1695291353; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VyIjI/I6fiuQb5fro76kkYxOSc4xq/0TuIo+mtjDBWI=; b=QA3eGr+g541KCdar2tCcnj5cTCklF9uEIbH6NOz9SXHpL0vOAKJBOKvewdQFiNhQrD ZBu9q3pL2wUuSBviEFP36/T5c02jF8lmYaxkpY1TOxj7UkB/H/4ZzkEMv/3DlvakqTqz YV/NolPyqkBEjkIufXupEfjuF7kfCjUiGKNm/8AAYXlXjKw48qjqbeKjytASiU0RomIz enDWv2eGMJ1Wz8WkC8vg7+0dMUWSCTjBXX0a4VqPD/4nx+LUOKbhTGo5ssvU4ssDG8ha RGnAEPnT2AqoFf6MQ0NYSRRjosa1m1wzX+7CUMoyEG3dScBrDQwmEUz94hL6bzy22H9q 9l9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694686553; x=1695291353; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VyIjI/I6fiuQb5fro76kkYxOSc4xq/0TuIo+mtjDBWI=; b=QmT7rAgjSo3EIeX5+FA8xKRTtTqNwWBD29wQBpiQ7obiAotvSS5Am27lH4L6IGN3uh GFSABxfQFudkxfi+pDOdOV58dHentUg3vc5NP+RRj7NWsA9eLo0YOgSrgw5kBoE6QnbZ s6VAD3+1u1iVWiEEODA9PkKZIeWyQoHnOBdvuAMveugPgnjHMLzH4LFPkxizwqcSazUz C24Zycw0qlbo4wL5xSjk+RMUFfm0iQpJiNkqr/b3Ui7mlNVneaR9PTf+vjCN6KId6CId f/ZLsyIYEyrFmjGZ4c4ly7mNyG1uUz9NyMHBMQHGieBSMerWBVsK5ZrbEV/EO7gyPMkN Sf0Q== X-Gm-Message-State: AOJu0YwKtVQpNWuDYWLWIMc53nEq8x+RFEjj86VSaZuzaXmdUi8zLAIF LXQoVPbFwctmDguUcaBz++xLYQ== X-Google-Smtp-Source: AGHT+IH7ZT746JOyiS+eOvZlolhRQEl4EX2Lm6S0kGQOnu5nvVuWeFGDXcIG88aW5kDFIAcnKh6/BQ== X-Received: by 2002:adf:d0c3:0:b0:31a:d2f9:7372 with SMTP id z3-20020adfd0c3000000b0031ad2f97372mr4347143wrh.29.1694686552802; Thu, 14 Sep 2023 03:15:52 -0700 (PDT) Received: from localhost (cst2-173-16.cust.vodafone.cz. [31.30.173.16]) by smtp.gmail.com with ESMTPSA id k8-20020a5d5248000000b0031fc4c31d77sm1340310wrc.88.2023.09.14.03.15.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 03:15:51 -0700 (PDT) Date: Thu, 14 Sep 2023 12:15:50 +0200 From: Andrew Jones To: Conor Dooley Cc: Haibo Xu , xiaobo55x@gmail.com, Paul Walmsley , Palmer Dabbelt , Albert Ou , Paolo Bonzini , Shuah Khan , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Anup Patel , Atish Patra , Sean Christopherson , Ricardo Koller , Vishal Annapurve , Vitaly Kuznetsov , Vipin Sharma , David Matlack , Colton Lewis , Aaron Lewis , Thomas Huth , linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm-riscv@lists.infradead.org Subject: Re: [PATCH v3 9/9] KVM: riscv: selftests: Add sstc timer test Message-ID: <20230914-2232dea1c6d03fb5985755e6@orel> References: <64e0637cd6f22dd7557ed44bd2242001e7830d1c.1694421911.git.haibo1.xu@intel.com> <20230914-ee133dd5e804282ce28833d6@orel> <20230914-reflector-preshow-786425ad7ae2@wendy> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230914-reflector-preshow-786425ad7ae2@wendy> Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On Thu, Sep 14, 2023 at 10:52:15AM +0100, Conor Dooley wrote: > On Thu, Sep 14, 2023 at 11:36:01AM +0200, Andrew Jones wrote: > > > +static inline void cpu_relax(void) > > > +{ > > > +#ifdef __riscv_zihintpause > > > + asm volatile("pause" ::: "memory"); > > > +#else > > > + /* Encoding of the pause instruction */ > > > + asm volatile(".4byte 0x100000F" ::: "memory"); > > > +#endif > > > +} > > > > cpu_relax() should go to include/riscv/processor.h > > Can the one from asm/vdso/processor.h be reused, or are there special > considerations preventing that? We'd need to copy it into tools/arch/riscv/include/asm, but it could be done. Hmm, now that I look at it, I see we're missing the barrier() call in this kvm selftests version. Thanks, drew