Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3998627rdb; Thu, 14 Sep 2023 08:51:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IELhscKWg7m6/dKH99Nq1A4RVGPNd14Zloli1NoXyiJtqjL46ERsKtre0b/CVrVJND+1Nqq X-Received: by 2002:a05:6358:4327:b0:132:d32d:d929 with SMTP id r39-20020a056358432700b00132d32dd929mr6793889rwc.20.1694706669639; Thu, 14 Sep 2023 08:51:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694706669; cv=none; d=google.com; s=arc-20160816; b=sgA4ct6BuZe/8BXPEh+NduR9kQYnPIdVp9g6cGrrEIGvYuLqgHMpk+PZ5lX+5pe9gk AkPvmzVh4Tqs1fdzUakmgAbyCXAO1W0/MsKMlOeBo+gR0VdqGi8OMP3YkJ/gPj/y6Mt8 ZkdVcatW2cEvvktxTjoDEWtooBN3YrevLesigU5OAZoXfmBTld9DPBnNcGr6BC6cvue9 84x6nn8yqiCw95MPTk9KlDLxkSbud/30fbaFkU3oY9Q3N8o1TYE1HXWqDydhn8JcJNdf 52OohC8gHN+rEJQIyftMoV8+EqQwysmlKDrr/PNpswd8L3Zc6lJUqgMUlbFhB8+jbT56 1qcg== 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=VyIjI/I6fiuQb5fro76kkYxOSc4xq/0TuIo+mtjDBWI=; fh=7lrMDt/MQ2QrBKqiTZd7MEULaT3zyrnCTeQ3rx0dAe8=; b=kKO6eQyegy2FoHILZOgvuMkxLnOKdWimKfkrGJhfvaBco4fzM2WU5Ee/Rumhw4xNFg P10O18GXIJbTYWdVLrGfBjdDmG/RCnTYQ6JVsdWNPC8qfWA8woAw/IF/sCQ12ItJSKah KmiyjvLrKrktuc+iU686Yz6P3AY7YIC8ZY1U/fCJxtosHyFb+q8W+L1S8TcAVK3cqtMY y4hNipGAn7Sp4Zkc6Vq6WQP5lVCYysrMaF4gCSS/tGmeJiwrX1I9Nz9nfs4OLmGEUNZh vplY7HQdtf+TOABx/RHGlhqUYkIC+N44xngH5eXoUg6syg9oDzSGlLfDRM/uM0mDp4dO HZag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=QA3eGr+g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id z11-20020a65610b000000b0054ff717395dsi1693237pgu.691.2023.09.14.08.51.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 08:51:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=QA3eGr+g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id C007E822C61C; Thu, 14 Sep 2023 03:16:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238067AbjINKQA (ORCPT + 99 others); Thu, 14 Sep 2023 06:16:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237276AbjINKP7 (ORCPT ); Thu, 14 Sep 2023 06:15:59 -0400 Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D7981BE9 for ; Thu, 14 Sep 2023 03:15:54 -0700 (PDT) Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-40434d284f7so5430715e9.3 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=JJhdvUCfd9zwqwc3PpmWZlGW1Oz/ntdJkQmjTXGijOcvAiWwLvcgrMLAr5uWAMXB67 jMxFhPWuEvDlir66wW4q8piSiYi5TGz6wQ4kaJxhK7MTmFAFqQNuSohs66FZtZsjE4Ya zTl8BdtBnnH6E/wnRTqJ9sX4XmLWeiI6GTjY5yg5Cv8S0kAA2tgWw6XCQGeisljlkNAl zVxfs99EMpGgFLuOcSvcQtWJdADuA203oKbIYSrqfW+PYfld8y1um0RIROtVxUBg6FaO F/Ql1sUUL3+GhUdf3fQ1vWlrrs4j8YbG19cMk5ytqkj8TXBEJvpur1ULiS1DJqxPxvLX IwQA== X-Gm-Message-State: AOJu0Yz34rmMKVY/5cVgaV3s4HmmfBdymsXqps/hrYDbw4qXC81lxQhD Y+8L7RWAZLN7jQM3v0uNWF+0pQ== 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: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 14 Sep 2023 03:16:07 -0700 (PDT) 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