Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4656551pxb; Tue, 31 Aug 2021 10:06:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqBlDR+UEXNglv44F+eYfubpnkHt5C1KIgUgNeXYhdo2i029ErP/4rxJ4/S2P3s8RNVW8U X-Received: by 2002:a17:906:840d:: with SMTP id n13mr14720001ejx.53.1630429580644; Tue, 31 Aug 2021 10:06:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630429580; cv=none; d=google.com; s=arc-20160816; b=cD7bKq+lZFqlnU55PaUvz8CLxKZEwFkuZWBXSfMIuLD3rTyzLJLJwxeWUl2JDTfubA xo5OQsTYyHX73nAfdE4O8/8nA5mRlGEQ/tHwfmIGpvMhkmdmER+cwSBBC3dNbjvR7SVT QD0XDDvUU7Fm0tEyQtvAFYAC5BhVCMjkORFHlG7wEfgc78PwFcezdKHuk16caWqxrchy zSSNrfL5riKoE9slMtwszooI+bPZ1Xfmuu/KlmqduPjyYhCawNpX8nMgd2fCSNhG10Au KmY3cuPuP6sDBNC7DG1kf07Qzx7Ve9/MMw4EGFQiIq42ICQYkomGBP6gJc/92wiCFq4I vu9Q== 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=vSsyLkLytT485YxJhtDSyUreAWOp01WMhEhWSjhjWSQ=; b=uUGKffxdjvma0ZqnyzmA0g4Y2fkJ8aqZjG0S21rpwoKvHQ+P9wqr9r7V1ee+DQHm/P DdWxb3iy31ry6UsIwRZGMWOru9VQFiROyZyaECEbF1sPWebosfDIODh0UFWW49uZknzU vHeBqS59YXRiookwQ+MM8MGjaXFBDDGfVkYTASRpWNRKYzjum5F/7dHKMOamCWI9I6c7 Q1IFmVu+bQS420XIQX9flrDLqPV4f0wg4KKOEvf38/6JzpWTFE7qwetLykwhzdmiZWQo iUitAww/7quqDynQScTckHkFqAakyYRY/9rqAX94fq6EQyivmyj4hLD560YU8UvOomzb rnww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=WikKTHCG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id js5si17680248ejc.249.2021.08.31.10.05.52; Tue, 31 Aug 2021 10:06:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=WikKTHCG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240212AbhHaQ7t (ORCPT + 99 others); Tue, 31 Aug 2021 12:59:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239443AbhHaQ7p (ORCPT ); Tue, 31 Aug 2021 12:59:45 -0400 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C20B7C061760 for ; Tue, 31 Aug 2021 09:58:49 -0700 (PDT) Received: by mail-pf1-x42f.google.com with SMTP id 7so15444520pfl.10 for ; Tue, 31 Aug 2021 09:58:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=vSsyLkLytT485YxJhtDSyUreAWOp01WMhEhWSjhjWSQ=; b=WikKTHCGSrl0kxsZN24g3MXifcsxcZtAFFRO48tUni80/KqA8LTr8XSi4fNFo65Aao gKy+EtOibB7v+ZJIdF1Wa328jMqZNCbLv4cCb4i+z0ynk/8l9lpl3kw9gcX6h9rUpCjj 2Gn61+sOAbk86lUBL8oNCEyo9YX9I6pjhVx/8D9upbekveGjCSNiqQeYDavYkHs2QP7s wlyUPeRRFo0wljtXm0cBxeWR5o6v2yarB+S16jqWC+wEM8K1XmychGW+iQAzv/V/+tPl VDEJrvb4YXLG/prOWTh2Nvy5C9cuStXPC/8rXvUWq+lS4GPlKFtXFx7jCCRXFpQyeRdN reKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=vSsyLkLytT485YxJhtDSyUreAWOp01WMhEhWSjhjWSQ=; b=XgHfu/arRAsauG/7zTSIpYcYb6cTrh+xZcNZCqTfBjF9qJaBbuB1RZ+mqn0eo5X+MB SBZiLJUY1HYBkUz9WRwjWWVJJUPPGU4RY7iMEmfklyqeqmmkIB7L9UCYydUZ1HgCaev0 VhoucUbK64+iZLgo5grfjCqWlkUBx0Z5g1ETu3ldyyNs/n+31zo2mEEgKTn+vr1eTuRe wlPOn1nATTqiePl4CS/nwrIGz5WbTdJw0joPSAXKR0wL4GLWiHDvopGn+ZcIM/kwvufF 7Az/pQD1V23nBl7hw1Xcj56XNFoffwL5IU/t9SCQ8FLEBJPbjfeTo4hsSLhSamNpfI2Z sLGw== X-Gm-Message-State: AOAM5323pBf9t+flwnQUr7FkUk6eJsfv4+eQ9Yg2Q9BEXFjkkC2yM8GC DkxNykIMMegN9ThYJyPvNzcQVg== X-Received: by 2002:a05:6a00:706:b0:404:d92b:82a5 with SMTP id 6-20020a056a00070600b00404d92b82a5mr4761642pfl.79.1630429129108; Tue, 31 Aug 2021 09:58:49 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id y25sm18351069pfm.80.2021.08.31.09.58.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Aug 2021 09:58:48 -0700 (PDT) Date: Tue, 31 Aug 2021 16:58:44 +0000 From: Sean Christopherson To: Ben Gardon Cc: Mingwei Zhang , Paolo Bonzini , kvm , LKML , David Matlack , Jing Zhang , Peter Xu Subject: Re: [PATCH v3 2/2] selftests: KVM: use dirty logging to check if page stats work correctly Message-ID: References: <20210830044425.2686755-1-mizhang@google.com> <20210830044425.2686755-3-mizhang@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 30, 2021, Ben Gardon wrote: > On Sun, Aug 29, 2021 at 9:44 PM Mingwei Zhang wrote: > > diff --git a/tools/testing/selftests/kvm/lib/test_util.c b/tools/testing/selftests/kvm/lib/test_util.c > > index af1031fed97f..07eb6b5c125e 100644 > > --- a/tools/testing/selftests/kvm/lib/test_util.c > > +++ b/tools/testing/selftests/kvm/lib/test_util.c > > @@ -15,6 +15,13 @@ > > #include "linux/kernel.h" > > > > #include "test_util.h" > > +#include "processor.h" > > + > > +static const char * const pagestat_filepaths[] = { > > + "/sys/kernel/debug/kvm/pages_4k", > > + "/sys/kernel/debug/kvm/pages_2m", > > + "/sys/kernel/debug/kvm/pages_1g", > > +}; > > I think these should only be defined for x86_64 too. Is this the right > file for these definitions or is there an arch specific file they > should go in? The stats also need to be pulled from the selftest's VM, not from the overall KVM stats, otherwise the test will fail if there are any other active VMs on the host, e.g. I like to run to selftests and kvm-unit-tests in parallel.