Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1712844pxb; Wed, 10 Feb 2021 15:09:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJzpLXbYLiixdNGLZ6k5ro6CgM8Nms32vcc3Kh9z8uSRLLtrek9Uz/PkgK9J3SNHX5wp+6h8 X-Received: by 2002:a17:906:1a0c:: with SMTP id i12mr5155979ejf.276.1612998569228; Wed, 10 Feb 2021 15:09:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612998569; cv=none; d=google.com; s=arc-20160816; b=Cuan+K2tG4ql7iEBoHKc0NLzhLsKYeRcEPJaVmjdIV844rXMUc8RrogfSm8PyCMZGn l5Xq78xr6fjlAbKD5rLnlg7Unf94GI3zEACF/yAP3oouUCp0QQbUHhlnbnuNUd3cgKEz 6GD7Bv12iY/N1oV9+sCO5bam3gwPBM/DduAi6PfvSD7bmPz4aNa5Unl2jNq7vgpQogLr Vwd3w5q8rS/s/lnW+0zcJbvMGZJdZAWwa7yF8gWc/nefXZIO3LKo/7rwXUj/9+YuRxF1 pv/fHpOZqZsmzyO6be/YlPcqhAhnLPFKohtRh9fxOk3U1hplRrkSrbN9sIyUReur5TqC +DYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:mime-version:message-id:date :reply-to:sender:dkim-signature; bh=lEvJNf+eeRBlW12CD2hGETxb4z2rF+2HjSgOd3i59N4=; b=tcbbgeCTcER79xLchXDTlM3zPHvPmB9DeO+cz2PMFK9V+8VWdZBTq/X9dXlLWAu8zk 6AGgYidQLfp3kUvItVz0BX3j2sS95qdt5CBYrmntoWZFZWPOg/XuJcQx1PQecu+XDD+v VDVdmw7NYx+FfD5106d4g6JWaDlZYp98AIME5YRzU3rCYnidswaehJYfyzIjCnpbPmfz cuM/6Ayqoq4cRPDRzVcqoyw9KOMGkMbeTLUujbz0kLcwk9FCB+xpN2cALzXYhj3LWy4e oLsQnQUe9A5oLlabBomQZgjJEgB7NaPMKn4S/OOWp1rmeQBL3XcKwz7YMRdBXgBflpAD 5mBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=EtP2zMcj; 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 q14si2316510ejy.320.2021.02.10.15.09.03; Wed, 10 Feb 2021 15:09:29 -0800 (PST) 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=EtP2zMcj; 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 S233557AbhBJXHP (ORCPT + 99 others); Wed, 10 Feb 2021 18:07:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233358AbhBJXHN (ORCPT ); Wed, 10 Feb 2021 18:07:13 -0500 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B77EAC06174A for ; Wed, 10 Feb 2021 15:06:32 -0800 (PST) Received: by mail-yb1-xb4a.google.com with SMTP id v17so4233081ybq.9 for ; Wed, 10 Feb 2021 15:06:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:reply-to:date:message-id:mime-version:subject:from:to:cc; bh=lEvJNf+eeRBlW12CD2hGETxb4z2rF+2HjSgOd3i59N4=; b=EtP2zMcj9He4HNUCSKuttQNySDsBqi1ZFBdhPZjDXSzxacN8PGSoJ1aA/bNqHr26np lm/gO+046j/WVp1Lnb7WOP8ix1jcu3LvnZMtkfU/KFvVMhPlOXE3UKpCbgzTjnQGk0KD hPrA3sQzfMYMa/bCG9W5TDrxAuMLqgz8PRzJ4fyd8yqEIp95QmeysR+VAykYWzsTWG8e 2FBlLPp6EhPCTPEJ2oALEzQKLMBhsd9I9G7mU/SZna34pkK8LMuwnIeAAHR0rgiT1psO MmFaAUeRnPN9GQawQf1wv01h1HanZAtVMuKkDPUXCfXEsLAJtKIrUNBXDM+7VR/bSrSo Q2xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:date:message-id:mime-version :subject:from:to:cc; bh=lEvJNf+eeRBlW12CD2hGETxb4z2rF+2HjSgOd3i59N4=; b=VTP03+RbueIoFWvB9fX6jPDeH8J67DKFlq+FYH+0bsKLc3rwILZHJu1f2mlgatMdmf 1PL4qRXvkD/O5vtkdVg+q0K83+x4avLAKKIn5ZbwdN7a5VK1mz11MbzNWzh1XP+/j19u T0DTrMpSPYpZE4L3Co6hE6Iio5czYxD2c/OzNWIbLPlQttYIr3fHE6wl/EZ0EJeYz0lG NkaAEJPtAuFxQRIkiOzM6ojxXqZ+FcY26S6TdamtUvv5QL+e2ZkGl9lH+bvQrQCDzIDb qLXafPmS2b78zG/uAvqRRUZMaJH7+HvF0iZ0LdUP53R5aluoyHiGJiinOqOrumInV3ay 18JA== X-Gm-Message-State: AOAM531hX4XZZ/VQ6tHZFYDnD/iYcOqLoCQq8Q+ujywE5IEOTE4UsuGP smsQeU5LD+jhKbZUrGiDeSwVGDZBkFI= Sender: "seanjc via sendgmr" X-Received: from seanjc798194.pdx.corp.google.com ([2620:15c:f:10:11fc:33d:bf1:4cb8]) (user=seanjc job=sendgmr) by 2002:a25:e052:: with SMTP id x79mr7761396ybg.378.1612998391954; Wed, 10 Feb 2021 15:06:31 -0800 (PST) Reply-To: Sean Christopherson Date: Wed, 10 Feb 2021 15:06:10 -0800 Message-Id: <20210210230625.550939-1-seanjc@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.30.0.478.g8a0d178c01-goog Subject: [PATCH 00/15] VM: selftests: Hugepage fixes and cleanups From: Sean Christopherson To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson , Ben Gardon , Yanan Wang , Andrew Jones , Peter Xu , Aaron Lewis Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix hugepage bugs in the KVM selftests that specifically affect dirty logging and demand paging tests. Found while attempting to verify KVM changes/fixes related to hugepages and dirty logging (patches incoming in a separate series). Clean up the perf_test_args util on top of the hugepage fixes to clarify what "page size" means, and to improve confidence in the code doing what it thinks it's doing. In a few cases, users of perf_test_args were duplicating (approximating?) calculations made by perf_test_args, and it wasn't obvious that both pieces of code were guaranteed to end up with the same result. Sean Christopherson (15): KVM: selftests: Explicitly state indicies for vm_guest_mode_params array KVM: selftests: Expose align() helpers to tests KVM: selftests: Align HVA for HugeTLB-backed memslots KVM: selftests: Force stronger HVA alignment (1gb) for hugepages KVM: selftests: Require GPA to be aligned when backed by hugepages KVM: selftests: Use shorthand local var to access struct perf_tests_args KVM: selftests: Capture per-vCPU GPA in perf_test_vcpu_args KVM: selftests: Use perf util's per-vCPU GPA/pages in demand paging test KVM: selftests: Move per-VM GPA into perf_test_args KVM: selftests: Remove perf_test_args.host_page_size KVM: selftests: Create VM with adjusted number of guest pages for perf tests KVM: selftests: Fill per-vCPU struct during "perf_test" VM creation KVM: selftests: Sync perf_test_args to guest during VM creation KVM: selftests: Track size of per-VM memslot in perf_test_args KVM: selftests: Get rid of gorilla math in memslots modification test .../selftests/kvm/demand_paging_test.c | 39 ++--- .../selftests/kvm/dirty_log_perf_test.c | 10 +- .../testing/selftests/kvm/include/kvm_util.h | 28 ++++ .../selftests/kvm/include/perf_test_util.h | 18 +-- tools/testing/selftests/kvm/lib/kvm_util.c | 36 ++--- .../selftests/kvm/lib/perf_test_util.c | 139 ++++++++++-------- .../kvm/memslot_modification_stress_test.c | 16 +- 7 files changed, 145 insertions(+), 141 deletions(-) -- 2.30.0.478.g8a0d178c01-goog