Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp103798rdb; Tue, 19 Dec 2023 10:31:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCOGAk20vICN29MXqxL1izCYeuJiReFiw5WlbbzHH+9WfprXlqfW9q+hacVDHFGBRnrP7J X-Received: by 2002:a50:c21a:0:b0:553:ab19:85b7 with SMTP id n26-20020a50c21a000000b00553ab1985b7mr252465edf.139.1703010688171; Tue, 19 Dec 2023 10:31:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703010688; cv=none; d=google.com; s=arc-20160816; b=00rFYVCYPEq5/I/lEMqiBr1Hxc3qN13chKNrXwzA4vKV9HUpN7KJ775q2tmnflrSrt 8DpR5OXDnQMe7QcMQUhHVHPNQqeLiTB1BidLNlnnS02ig5tWzrFXm48sA2iSCLSGIK7W JpZSOs3CaIx2QjMr5l28hcAaV4EmtLa8gzqJdeUfWO3R6U98avuaQT5uLiSOcCTso9S5 beTqkHkReTr3vDD0skaDoq1Dz5KlDoV+Dt3ohIw1iU+c/edFpNO+1wYINkQazZhoWvJj +978Z27xHpU5b9TymmPRU6iKfgeSDibyODSj3VoUPeQZ4F+uR16S+or77R57HhYcJard yo/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature; bh=ENSrytisd/2t10ErKGsLWwcvmSKweFjDm7b8DCgtQpA=; fh=2mFoRHDT0Nm4AZBQWJMmpDecHf3pDHUTloGXAgml1vI=; b=XAhbwcCpW1IGcNXMGUJi2uB08nCZxibiIeTIkYK2kCzWVTUzoPI5pMDz2wR4I/y3CS WSEw9bkN30dxrix7E4YWXsEWn9li20Fn//9PyEJh8IVJMZwE02S6YNc0gU+rhrsAbGrf x+Tm9rnu19Eet1UZoXQj+DSf5IjVV97IPUPzKlFnRz8SoGVP2oqdX/Fb5OeZ1c1Wp7Aw Fxvnrq3vM8ubv3ZVDy5w1F22xfHIW+U4PngOWuhbzYqM3GjbJlJN5YVXLih2WebU0ea5 ciTvCnuIOKJpWvN1H62EuzE9ua5cHAIh9CN4MeFUKdkUXPbD5MRPE1yqjV2i3ZKr0VmP yPbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lJ7TR7dH; spf=pass (google.com: domain of linux-kernel+bounces-5807-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5807-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 9-20020a508e09000000b0055313a2274bsi2941929edw.581.2023.12.19.10.31.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 10:31:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5807-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lJ7TR7dH; spf=pass (google.com: domain of linux-kernel+bounces-5807-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5807-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 91D631F27A08 for ; Tue, 19 Dec 2023 18:23:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D301A38DF7; Tue, 19 Dec 2023 18:22:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lJ7TR7dH" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0576638DEB; Tue, 19 Dec 2023 18:22:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78AA1C433C7; Tue, 19 Dec 2023 18:22:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703010168; bh=DPuOkfzjPhady10Q5o+36I/qim38sfvyYNHfU9o8g4s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lJ7TR7dHiGeTaDrDcD0P3s9K3/Cy0c5R+1JMsyHoyWSfR09sTOekdWbvT6dGuVtMM +MApXmtcHV+t2luxAN1lSgKWm++Ahv8W3hdZa37W1zwijBzqvRKv3ogmQQ3lwJtsH8 IeMlSpos+7YynBF91UFPlkwtiaeyVcQL5JGEx9DWDK6ncwFsjZ1IvVPSg9+4aNJNL3 oE03fa8trLY7ghnI0z+tR3HRpqSs+MYJo2GIFMKbAAeJ7/LiCe9FcaRMq2mvI7QGCD qYfD7Zh7ZWB9MMFX6UtMTZ4bCCpZWw6dKP6hxxwd3z8WAxC1YbU/jqaRGJ5bHb6Ljm q2fleBZ31mTBg== Received: from sofa.misterjones.org ([185.219.108.64] helo=wait-a-minute.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rFejt-005SbH-35; Tue, 19 Dec 2023 18:22:45 +0000 Date: Tue, 19 Dec 2023 18:22:44 +0000 Message-ID: <8734vy832j.wl-maz@kernel.org> From: Marc Zyngier To: Haibo Xu Cc: xiaobo55x@gmail.com, ajones@ventanamicro.com, Paul Walmsley , Palmer Dabbelt , Albert Ou , Paolo Bonzini , Shuah Khan , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Anup Patel , Atish Patra , Guo Ren , Mayuresh Chitale , Greentime Hu , wchen , Conor Dooley , Heiko Stuebner , Minda Chen , Samuel Holland , Jisheng Zhang , Sean Christopherson , Peter Xu , Like Xu , Vipin Sharma , Maciej Wieczor-Retman , 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 v4 11/11] KVM: selftests: Enable tunning of err_margin_us in arch timer test In-Reply-To: <0343a9e4bfa8011fbb6bca0286cee7eab1f17d5d.1702371136.git.haibo1.xu@intel.com> References: <0343a9e4bfa8011fbb6bca0286cee7eab1f17d5d.1702371136.git.haibo1.xu@intel.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: haibo1.xu@intel.com, xiaobo55x@gmail.com, ajones@ventanamicro.com, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, pbonzini@redhat.com, shuah@kernel.org, oliver.upton@linux.dev, james.morse@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, anup@brainfault.org, atishp@atishpatra.org, guoren@kernel.org, mchitale@ventanamicro.com, greentime.hu@sifive.com, waylingii@gmail.com, conor.dooley@microchip.com, heiko@sntech.de, minda.chen@starfivetech.com, samuel@sholland.org, jszhang@kernel.org, seanjc@google.com, peterx@redhat.com, likexu@tencent.com, vipinsh@google.com, maciej.wieczor-retman@intel.com, aaronlewis@google.com, thuth@redhat.com, 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 X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false On Tue, 12 Dec 2023 09:31:20 +0000, Haibo Xu wrote: > > @@ -216,6 +221,9 @@ static bool parse_args(int argc, char *argv[]) > case 'm': > test_args.migration_freq_ms = atoi_non_negative("Frequency", optarg); > break; > + case 'e': > + test_args.timer_err_margin_us = atoi_non_negative("Error Margin", optarg); > + break; So your error margin is always unsigned... > case 'o': > test_args.counter_offset = strtol(optarg, NULL, 0); > test_args.reserved = 0; > diff --git a/tools/testing/selftests/kvm/include/timer_test.h b/tools/testing/selftests/kvm/include/timer_test.h > index 968257b893a7..b1d405e7157d 100644 > --- a/tools/testing/selftests/kvm/include/timer_test.h > +++ b/tools/testing/selftests/kvm/include/timer_test.h > @@ -22,6 +22,7 @@ struct test_args { > int nr_iter; > int timer_period_ms; > int migration_freq_ms; > + int timer_err_margin_us; ... except that you are storing it as a signed value. Some consistency wouldn't hurt, really, and would avoid issues when passing large values. M. -- Without deviation from the norm, progress is not possible.