Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4449807rdb; Fri, 15 Sep 2023 02:33:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6PiZu63IcxJVYECPYDRB57nNf5WzbqpF3u2fAHQbp0Kwe9d7wVZOMDeKyMMz92suOg0Ac X-Received: by 2002:a17:903:2310:b0:1af:aafb:64c8 with SMTP id d16-20020a170903231000b001afaafb64c8mr1287858plh.21.1694770388497; Fri, 15 Sep 2023 02:33:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694770388; cv=none; d=google.com; s=arc-20160816; b=I+oRQX9fE+5YS0SvCcboJ5n3xGLvPY8VAwHZkyTKAKi8uAalpAfcAeuWJVlhRrH020 3+fKMPRk+BsQUsyGpRlN3UNEZe00DmYT5gWfSDlnDLZ2gKOlIrn+oQd6C7HrbO1+tjpg R2cPXhxK+bFaHOOU7LJhTisMicsVsdO+bWVD//B3U3G19tu/fX2Ar5aPytjClwWBuuhY mP3eLlYhpwQjZURIKyWYKXpTxPoZgx5G0LSkAqqO+7eSv/1WkFjPM94SL5Vi6FoH+ZJ+ pPtTXuqp3zlyrZCItjC0p9at5Ys8QJ9MgF2rUXVkjKOdxET17QOAV7ZDFvhYdKuJshU3 b3cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=4CbOaBoTgdqZjkC9bgxngrjMf2gb+bcUOXRH9i9PPC4=; fh=i9kO9nGU8XAXSktHUrF/mydeOqZ9IGD0urJtC1NEWH4=; b=wJrjunzDQNzLoqua7aileVqXozfJcnRaFfL6Ao2eLUBjxeHW6Q9WBmIFibvgt9CHO3 SL7RcMev0qNPMguy3G5TEEH4NdbKX+oQLfmjNS5qkgKWKZQ+JWbNzB9CxuFdprGBSZcb frYXwOStkQehOWJYgWGa1Bhowo5t9qSeLy76E1QnI6BKVEFKppkLx/vHpBF/fLZZQb9T Mup13N97qXC+uvsmRg+CeEoehNNYuLLbp2vrj+CmNDRoASmu3VaQ7Lz78TPfwNW+hVfv HQQTy9weWPXF95kDOH+KOsm7mVd3DrqBlJo06zT4UMYzpIoww9ceddk13J1N7l7/2hmt NBtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gY+rr6zZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id l20-20020a170903005400b001c4352c2c9esi681860pla.160.2023.09.15.02.33.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 02:33:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gY+rr6zZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 9110C837432F; Thu, 14 Sep 2023 23:22:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231302AbjIOGWD (ORCPT + 99 others); Fri, 15 Sep 2023 02:22:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229561AbjIOGWC (ORCPT ); Fri, 15 Sep 2023 02:22:02 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B68091BD0; Thu, 14 Sep 2023 23:21:54 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-500cfb168c6so2907381e87.2; Thu, 14 Sep 2023 23:21:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694758912; x=1695363712; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=4CbOaBoTgdqZjkC9bgxngrjMf2gb+bcUOXRH9i9PPC4=; b=gY+rr6zZ+YNlIujztVUPNA9p9k5+SIjUrRBND7JK73DqqDCwFV2qwVGcOoIpoTjpKb wGdWVNtFHkttnGvDtEqS16t2h3VNhNq2LgyjVl/iaiP7t7OcO5vwWSWs7+GDDBuQzGgy 0dBtxL2S/hOe5P1ofEm70vrL5o+gGSsNeLNsnRgmaqbdNUPr6QOQTgYXuovk0Y8dhiMT KLUym03KOpoih4bEFfdV22IbdzxztVDPS+kUlpeMAI6Vzy5UzLR3qk5NsRVsOwGape37 KxQRbS9ZXI4AAZk3rxJ+Tl2KVU9glLl6Je4/9iY/NWqKB2FqtAidAPOxVZAlLYq7iXVw OZyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694758912; x=1695363712; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4CbOaBoTgdqZjkC9bgxngrjMf2gb+bcUOXRH9i9PPC4=; b=uwZbp8JZNhe9yVQL+A5klm49Iua6vsgYriFHdAFYRdtWdupNH6tlZzo82wxlU+kNDx 3jmj8MTaV7FmsP4iMzShpwF3Xp5VP2357WicKYKHeDApmm94ZDsH6dN0qqbUnS6/TV7V Mi4gdwlhYjtHf0sXA+pxln14B8+mIpNvcIxSo9JX1vz/H3OfFK1ETcZVvdiOWjkVyYqp 4fxOkkXUZamrrW85+aiKpzc/tLaA9PPbn8RVih9/NIlFlj4L4z1A6TK4vW/sm3+lcPi1 JodhSnJEqc0kyJb3lTqZ/2R2fnD/kT5+n59YQhaiqRyPdmUI2/SBBo+gGAkL989hvhzj WkhQ== X-Gm-Message-State: AOJu0YwOctrAs+SF+9U5ve2sExGXejlKe9i3pk72vmZODV1oWSoftKoJ bAwDO/2zcHrP4Pg5mOZPp7VPZIiaGuRfnVgPQRE= X-Received: by 2002:a19:6715:0:b0:502:e2be:54b5 with SMTP id b21-20020a196715000000b00502e2be54b5mr569046lfc.17.1694758912398; Thu, 14 Sep 2023 23:21:52 -0700 (PDT) MIME-Version: 1.0 References: <64e0637cd6f22dd7557ed44bd2242001e7830d1c.1694421911.git.haibo1.xu@intel.com> <20230914-d2e594e7d84503ad14036e2d@orel> In-Reply-To: <20230914-d2e594e7d84503ad14036e2d@orel> From: Haibo Xu Date: Fri, 15 Sep 2023 14:21:41 +0800 Message-ID: Subject: Re: [PATCH v3 9/9] KVM: riscv: selftests: Add sstc timer test To: Andrew Jones Cc: Haibo Xu , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Thu, 14 Sep 2023 23:22:38 -0700 (PDT) On Thu, Sep 14, 2023 at 5:52=E2=80=AFPM Andrew Jones wrote: > > On Thu, Sep 14, 2023 at 09:37:03AM +0800, Haibo Xu wrote: > > Add a KVM selftests to validate the Sstc timer functionality. > > The test was ported from arm64 arch timer test. > > I just tried this test out. Running it over and over again on QEMU I see > it works sometimes, but it frequently fails with the > GUEST_ASSERT_EQ(config_iter + 1, irq_iter) assert and at least once I > also saw the __GUEST_ASSERT(xcnt >=3D cmp) assert. > Good catch! I can also reproduce this issue and it is a common problem for both arm64 and riscv because it also happens in a arm64 Qemu VM. It seems like a synchronization issue between host and guest shared variables. Will double check the test code. > Thanks, > drew