Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp819436lqo; Fri, 10 May 2024 16:54:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWo+Yl76k2hKv9dSht6tah/t4OoW7Vxvr3g05xQ8ThkezEtFOlgW7eVOU/YTO6A7A101h8pvHlStwaByV/AD2/oP3oGFP/mGZNC983+Sg== X-Google-Smtp-Source: AGHT+IHo3eOQ4HQIo9kFXR+f+w9JCaYADhFmooW1Evm1C3ZvtEATsi9MIMm8Bi+pkNg/pP8GtfPD X-Received: by 2002:a05:6359:4113:b0:192:26d8:fd40 with SMTP id e5c5f4694b2df-193bd0082f6mr405443255d.27.1715385274160; Fri, 10 May 2024 16:54:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715385274; cv=pass; d=google.com; s=arc-20160816; b=ibLYotM6/oO6Dob2J3JMvk4P62osU91JjpKq+ERcmY5R/rr6J0HoJ7miUZ169MRGyj EDDmzD2d9VwELqDpFK9agYs5FAKWDoZNw0x5lrEPjx6/yZk2nZaZsP10paCfETz8aErP I/WrZ4EA8u30jCE3yJb8B4PPbETWUZNRIWhk0E+R6EoGLDms5g0wPoDFKEcKOcZpzo1t AtjnJ6SIFlpQHIpRxHyxYbdD1+mOaLOmBryDFgiP8EaGgbh13ErR9T0ubofODvgixLa9 wF3N3wt4sSCT7zhIgILjpNbvAj8jeoQQdgr8ms1RydGGpMMmSwtJXEN9lMXZfYrIwsaq c5aQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :reply-to:dkim-signature; bh=hZTZMqbrhKFbALv0wH7v4E1dBb2W4CdYh+08yY5Xv/Y=; fh=bSMHS9WdT5Rwle/aRcuQ9RRPWbxPMFIzg+fl9V/Hqag=; b=MfcbKOiOxzL7gKn4btiNRY+q1YXQSedilURxBnbmFJURyjkF1MZTuHh/Rs9PGGPdyL TgSQsK+VuZiOVmlT7silPhbqKNC7pGmKj+Q5n9OdzBLxnZXpvpeoSNS0kXE/uMUklAG3 wES8YD+GXi6k/feY+L2jAMaTg22hr/+NWdc3sRfErGZvUp2kz44+G15eHeUBn/JGqcMe CNdXNF+EMZGDR3d3ryJ3GqDUAJY0Fn0WrWWaCc0EHKYiLtF8xQegpUENkJlFrBJuMaq1 rpOB2rWJvBDoaUV94PKEPa4gjWtS0WFzesm12WrEda3GFz6u1k2t1hXbNexzG8IYjjlk ph8w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RwJ7tQa6; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-176309-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176309-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-63409e837b4si4419309a12.71.2024.05.10.16.54.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 May 2024 16:54:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176309-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=RwJ7tQa6; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-176309-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176309-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 89428B244B7 for ; Fri, 10 May 2024 23:52:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E7C3117B519; Fri, 10 May 2024 23:51:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RwJ7tQa6" Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A84EC17A932 for ; Fri, 10 May 2024 23:51:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715385068; cv=none; b=PbMugElszvjPVxouJstWvrmct+LPO91bgfYvZE2239TdXfVwrOc7xZMkvBfcScxmPZZVSIeLEu9IWaSYQRJop+uF+M97AMWou32g62NziQ8WTt49lS9e6LCiUGBBRrYxrTbR2wx1nY8XU5RUoNTLPESCH5ByXL4geI2fb4zonGE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715385068; c=relaxed/simple; bh=uQVa5GV6l573W5V02dsJrOxh0J85arazX6O7XuEK/1I=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=NRuvS97QkfpbbrvtyybCVCjXDi5YL/YOT/S+XrwSCOYS6PSBz7pQSfP9igaKVSyn7H6km7APUeRN1ExmAC1IKrz1FhSA2HdoYfo4MNWJNPPPwKaRIElKUjIPkEMCuU5liZgcp2ECzMTUtRXJnMSK5E+YZwEsR4ORIqwchjgVtw4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=RwJ7tQa6; arc=none smtp.client-ip=209.85.214.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-1edf507b9e4so26238625ad.1 for ; Fri, 10 May 2024 16:51:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1715385066; x=1715989866; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=hZTZMqbrhKFbALv0wH7v4E1dBb2W4CdYh+08yY5Xv/Y=; b=RwJ7tQa6I/SyhMOPmPesEg1T1d9umG6eLwcqt3LyVSJOJq3wh1fo++y2k9sKyiFADa iNJeOM/sl2t2btKiAouhQGcPYx+X6Gu2PbSVmsuql2SxVFdhYz3kckHc6999R77mmxmW PUnkVKkQE0bbQQDdV0eCWBUdhxAlsMRjckRhrn5u8jIkvNvu404BZlxa2x1UrYFUcqxW db+U0sV/u8irXsa+lZnn4tZajIKI3qmqSOaI6E3N9AUtdVhnUoY+fZCEpQ4tTRvnwwyQ ySiJCppH5wCnDGQ2NyhS1kWIQu2rG+aNk7mBbdyQydLdL9XBr8E6I8iSRp75E2Di9L9y cVew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715385066; x=1715989866; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hZTZMqbrhKFbALv0wH7v4E1dBb2W4CdYh+08yY5Xv/Y=; b=E8UpBfICWp69eZpTFNnlMa+zIL5HeuIF/wVvoTN+4jg0byorrJa+ZQIYUDrk0/le8d ZGVOGhlFWhccGVSFW7Fw1J9Gk2eSnY08BhRYsV/d5vxeZ+qRPUxpLvRauJrtRmQWj1az ll3B2XeS/BpwCxIJ5XllNasyzCR9OLcKjMoNjwflDZ8feZuldQaYESOLexExGrFlhoZf +wPKR7SFCRr+Qf3B2yHB7WfTCqd4ULfC6U1f55AXV8cYPbS09P+WZwrF+YI8Um0aoCMy SHBjAn2kBc5gVFh6ys9/iokbjdjkh65/S9Ksr5qsHScbgw+3Hx84bxPSUAdNdud9vyQ0 oliw== X-Forwarded-Encrypted: i=1; AJvYcCUdD7fxJT4S6MYUDWys+DO4NDoEAb4nW3QL97EA5iNwbhPltnY8d5FmRF7shPY3e+h5wPbt1q9Pa81HTtSKhOSHZRY8Q8Py2IXWopBP X-Gm-Message-State: AOJu0YyrGPzqpAFrFEvYuZS6PkzBT6gRbfnxrGE180F1IXTetXApADgK ZsycqK/b2WmZZ+QvcqBoPKz+jS8lSl2bVimEGH+zTKIbU8gX0HncRGntBHHOuWZVq6hg3fplJDM ElA== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:903:187:b0:1eb:511d:a48d with SMTP id d9443c01a7336-1ef43f4ce3cmr2781985ad.9.1715385066106; Fri, 10 May 2024 16:51:06 -0700 (PDT) Reply-To: Sean Christopherson Date: Fri, 10 May 2024 16:50:49 -0700 In-Reply-To: <20240510235055.2811352-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240510235055.2811352-1-seanjc@google.com> X-Mailer: git-send-email 2.45.0.118.g7fe29c98d7-goog Message-ID: <20240510235055.2811352-5-seanjc@google.com> Subject: [GIT PULL] KVM: Selftests cleanups and fixes for 6.10 From: Sean Christopherson To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson Content-Type: text/plain; charset="UTF-8" This is 1 of 2 selftests pull request for 6.10. This is (by far) the smaller of the two, and contains fairly localized changes. The most notable fix is to skip tests as needed if the host doesn't support KVM_CAP_USER_MEMORY2, as the selftests currently just fail miserably on KVM_SET_USER_MEMORY_REGION2. More details about why there are two pull requests in 2 of 2. The following changes since commit fec50db7033ea478773b159e0e2efb135270e3b7: Linux 6.9-rc3 (2024-04-07 13:22:46 -0700) are available in the Git repository at: https://github.com/kvm-x86/linux.git tags/kvm-x86-selftests-6.10 for you to fetch changes up to 8a53e13021330a25775a31ced44fbec2225a9443: KVM: selftests: Require KVM_CAP_USER_MEMORY2 for tests that create memslots (2024-05-02 16:12:28 -0700) ---------------------------------------------------------------- KVM selftests cleanups and fixes for 6.10: - Enhance the demand paging test to allow for better reporting and stressing of UFFD performance. - Convert the steal time test to generate TAP-friendly output. - Fix a flaky false positive in the xen_shinfo_test due to comparing elapsed time across two different clock domains. - Skip the MONITOR/MWAIT test if the host doesn't actually support MWAIT. - Avoid unnecessary use of "sudo" in the NX hugepage test to play nice with running in a minimal userspace environment. - Allow skipping the RSEQ test's sanity check that the vCPU was able to complete a reasonable number of KVM_RUNs, as the assert can fail on a completely valid setup. If the test is run on a large-ish system that is otherwise idle, and the test isn't affined to a low-ish number of CPUs, the vCPU task can be repeatedly migrated to CPUs that are in deep sleep states, which results in the vCPU having very little net runtime before the next migration due to high wakeup latencies. ---------------------------------------------------------------- Anish Moorthy (3): KVM: selftests: Report per-vcpu demand paging rate from demand paging test KVM: selftests: Allow many vCPUs and reader threads per UFFD in demand paging test KVM: selftests: Use EPOLL in userfaultfd_util reader threads Brendan Jackman (1): KVM: selftests: Avoid assuming "sudo" exists in NX hugepage test Colin Ian King (1): KVM: selftests: Remove second semicolon Sean Christopherson (1): KVM: selftests: Require KVM_CAP_USER_MEMORY2 for tests that create memslots Thomas Huth (1): KVM: selftests: Use TAP in the steal_time test Vitaly Kuznetsov (1): KVM: selftests: Compare wall time from xen shinfo against KVM_GET_CLOCK Zide Chen (2): KVM: selftests: Make monitor_mwait require MONITOR/MWAIT feature KVM: selftests: Allow skipping the KVM_RUN sanity check in rseq_test .../selftests/kvm/aarch64/page_fault_test.c | 4 +- tools/testing/selftests/kvm/demand_paging_test.c | 90 +++++++++--- .../selftests/kvm/include/userfaultfd_util.h | 16 ++- tools/testing/selftests/kvm/lib/kvm_util.c | 8 ++ tools/testing/selftests/kvm/lib/userfaultfd_util.c | 153 ++++++++++++--------- tools/testing/selftests/kvm/rseq_test.c | 35 ++++- tools/testing/selftests/kvm/steal_time.c | 47 +++---- .../selftests/kvm/x86_64/monitor_mwait_test.c | 1 + .../selftests/kvm/x86_64/nx_huge_pages_test.sh | 13 +- .../testing/selftests/kvm/x86_64/xen_shinfo_test.c | 52 +++---- 10 files changed, 282 insertions(+), 137 deletions(-)