Message ID | 20230202-kvm-selftest-userfaultfd-v1-1-8186ac5a33a5@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp475063wrn; Thu, 2 Feb 2023 13:10:23 -0800 (PST) X-Google-Smtp-Source: AK7set/Hx+TkE0qrVRrj3rM6a6vbh2rfncW6ybCFIkNoQS81ErJ54UKRFm6b3KFjWwsR3DOS1FdZ X-Received: by 2002:a17:906:cccc:b0:88c:e373:8f09 with SMTP id ot12-20020a170906cccc00b0088ce3738f09mr7026029ejb.70.1675372222792; Thu, 02 Feb 2023 13:10:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675372222; cv=none; d=google.com; s=arc-20160816; b=U48W4gINJNwkdQuJqAtREXV44Z8TmMqnrWhRem46+IRgidZRTF3io9gBdVEAO6c3FE bnWn9oo16e3TMChuKufydzegi/GnK8Y4iz0No0DYSUi8mjFOiwb08i2BJvUXuIIpck+J 49tOhT7hFWB3BuGdFknzFnHJGF1rCsp9GZNGwG0V6/wwi1XwXP7XbVnMaLrF7ey/xWYD xYR+a+kr1XITZhJd+4p6eq2w0FyLx5sLXnx7ZWTUZ774cd/mCjv/jASujjqfV8n3PN6v yHiN39FFwnkb1gYATTEBI73g70o3i5Memb83uVOeyeH4kKHH6A8zvac+6SQx38NeVip1 yx0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:message-id:content-transfer-encoding :mime-version:subject:date:from:dkim-signature; bh=ILZNSqyBBvaOA8Q6+h8hUuys0ByCTGhSqEag1HhnVz8=; b=jmZ4kziqYx8Xq5FYg439Iz7zVgq2kfORPvck5IaSHLgD3NlRniISTgOZzOxyQiJuPb foDjHHWSoQUOuiKN1gUnkyNei6m/Bf77stK0v9SIVYPMSTd7x3TQmW6ekUSJS5kLtvrU XY+dy01s9d7cSOIMZEAyBRXJs/OqdTWVwdJjn1MtNj6xnPDZSvWCvz62DW4vF1ydwpkg G+xB2b4He8iVRiOGjUi6VHD4K7Uj4/WG65lRO7M8YMLJ6hObTELJ2DKAqAKL468+GB9g IJS2yC681UomibEsdqH/M5sYMFBRV1PEyi3SfCJ1MH1TnAqMAaPXUMG8H4XaZJZBYjzK pzxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LxuFv6qn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fx10-20020a1709069e8a00b0088c3a872136si584450ejc.693.2023.02.02.13.09.58; Thu, 02 Feb 2023 13:10:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LxuFv6qn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233090AbjBBVB5 (ORCPT <rfc822;il.mystafa@gmail.com> + 99 others); Thu, 2 Feb 2023 16:01:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233112AbjBBVBp (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 2 Feb 2023 16:01:45 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C833834B0; Thu, 2 Feb 2023 13:01:45 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id AE77AB8286C; Thu, 2 Feb 2023 21:01:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4504C433EF; Thu, 2 Feb 2023 21:01:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675371702; bh=pAsMU92a1kCb2rKpQkLrMe9BIidKskm5XpaUiW3uPTA=; h=From:Date:Subject:To:Cc:From; b=LxuFv6qnz9tJoG3fRDTwNdWIpTUAL5nJVvHy9zVHNz2GiBMe3x00F+Bb8O68qob+q zwkHhxqEgN68y2n1q58Ciw+w5HiU1bRblF/GUy2uVhoXsXKdJi/bCyZyCDuw5HN1Tf 8RDN1jU0a6rB9h2s0hkkQM5AGKDFrAuGQxf+k8tu7PWE5XdOnWs+xK0SaLa0oRreSH jAkB4pdmH52EsdfwB8LSeFqPeo03u4+GPtflEdWK2EJBS77IYwmpRkXWP+rse8fCeU 1kHiseahv34X4hcThNPTh1xmJjECY9YFqYKslX9gZeBNSPdPFjO/eRcrKu7XmMiiQ5 4UmZ4N7bDwYPg== From: Mark Brown <broonie@kernel.org> Date: Thu, 02 Feb 2023 21:01:36 +0000 Subject: [PATCH] KVM: selftests: Enable USERFAULTFD MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20230202-kvm-selftest-userfaultfd-v1-1-8186ac5a33a5@kernel.org> X-B4-Tracking: v=1; b=H4sIAK8k3GMC/x2N2wqDQAxEf0Xy3IBVpEt/pfQhq0ldtGtJ1guI/ +7al4EzcGZ2MNbABs9iB+UlWJhihvutgLan+GEMXWaoyqouc+CwfNF4lMSWcM620Dwm6ZDJNeR 8I+5RQ9Y9GaNXim1/DayTDlf9U5aw/R9f7+M4Aci9MzeBAAAA To: Paolo Bonzini <pbonzini@redhat.com>, Shuah Khan <shuah@kernel.org>, Oliver Upton <oliver.upton@linux.dev> Cc: kvm@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org> X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=972; i=broonie@kernel.org; h=from:subject:message-id; bh=pAsMU92a1kCb2rKpQkLrMe9BIidKskm5XpaUiW3uPTA=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBj3CSzb3mxsxHX43429e0HnfD6WwKwvfP65sZRp/4T gNhVqm+JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCY9wkswAKCRAk1otyXVSH0HUKB/ 0Q0xqagueHxarbUjNpZ06zZxiVxOD1PDiq6Nngw3UZ60Z24DI+78x+vxUbPd9YNwg/kK6oKpUjX1NE wJLXFA9qcXpANo6EwczOrTSc6H6JF/YPlxMDtKM9dimW4l/Q9VgkxTDSZZHF9UYo28b/fUfeoeNrYE Gkr8rkFozuu0kSIH1glvHejvdzXB3q5gLVsEfubCm4X9CYawBEWzetCVFdLlagN7MJPsLwYTQE5dvK dIM9oTwMjpiyuOVK30dpr3O/w0IxNlKR+xm71G07fqcaW/FNkUklFJtl7rNTYr4AuoMeYdVC3GdeN4 1SnAvO/ItZwBkVj73/MIgvD6lli6hz X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756755103989136824?= X-GMAIL-MSGID: =?utf-8?q?1756755103989136824?= |
Series |
KVM: selftests: Enable USERFAULTFD
|
|
Commit Message
Mark Brown
Feb. 2, 2023, 9:01 p.m. UTC
The page_fault_test KVM selftest requires userfaultfd but the config
fragment for the KVM selftests does not enable it, meaning that those tests
are skipped in CI systems that rely on appropriate settings in the config
fragments except on S/390 which happens to have it in defconfig. Enable
the option in the config fragment so that the tests get run.
Signed-off-by: Mark Brown <broonie@kernel.org>
---
tools/testing/selftests/kvm/config | 1 +
1 file changed, 1 insertion(+)
---
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20230202-kvm-selftest-userfaultfd-ea85a8b5f873
Best regards,
Comments
+cc x86, riscv as they're also affected. On Thu, Feb 02, 2023 at 09:01:36PM +0000, Mark Brown wrote: > The page_fault_test KVM selftest requires userfaultfd but the config > fragment for the KVM selftests does not enable it, meaning that those tests > are skipped in CI systems that rely on appropriate settings in the config > fragments except on S/390 which happens to have it in defconfig. Enable > the option in the config fragment so that the tests get run. Thanks for catching this. I believe we also need UFFD for demand_paging_test, which is used by all the KVM selftests arches. I plan on picking this up, but if anyone has objections please shout :) -- Thanks, Oliver > Signed-off-by: Mark Brown <broonie@kernel.org> > --- > tools/testing/selftests/kvm/config | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/testing/selftests/kvm/config b/tools/testing/selftests/kvm/config > index 63ed533f73d6..d011b38e259e 100644 > --- a/tools/testing/selftests/kvm/config > +++ b/tools/testing/selftests/kvm/config > @@ -1,3 +1,4 @@ > CONFIG_KVM=y > CONFIG_KVM_INTEL=y > CONFIG_KVM_AMD=y > +CONFIG_USERFAULTFD=y > > --- > base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2 > change-id: 20230202-kvm-selftest-userfaultfd-ea85a8b5f873 > > Best regards, > -- > Mark Brown <broonie@kernel.org> >
On Mon, Feb 06, 2023, Oliver Upton wrote: > +cc x86, riscv as they're also affected. > > On Thu, Feb 02, 2023 at 09:01:36PM +0000, Mark Brown wrote: > > The page_fault_test KVM selftest requires userfaultfd but the config > > fragment for the KVM selftests does not enable it, meaning that those tests > > are skipped in CI systems that rely on appropriate settings in the config > > fragments except on S/390 which happens to have it in defconfig. Enable > > the option in the config fragment so that the tests get run. What do CI systems do for HugeTLB and THP? Those are the other config options I can think of where there are very interesting interactions from a KVM perspective, but where KVM doesn't have a strict dependency on the feature. E.g. x86_64_defconfig selects CONFIG_HUGETLBFS=y, but I don't see anything for THP, and AFAICT TRANSPARENT_HUGEPAGE is default=n. > Thanks for catching this. > > I believe we also need UFFD for demand_paging_test, which is used by all > the KVM selftests arches. I plan on picking this up, but if anyone has > objections please shout :) All yours. Reviewed-by: Sean Christopherson <seanjc@google.com>
On Mon, Feb 06, 2023 at 06:15:16PM +0000, Sean Christopherson wrote: > On Mon, Feb 06, 2023, Oliver Upton wrote: > > +cc x86, riscv as they're also affected. > > > > On Thu, Feb 02, 2023 at 09:01:36PM +0000, Mark Brown wrote: > > > The page_fault_test KVM selftest requires userfaultfd but the config > > > fragment for the KVM selftests does not enable it, meaning that those tests > > > are skipped in CI systems that rely on appropriate settings in the config > > > fragments except on S/390 which happens to have it in defconfig. Enable > > > the option in the config fragment so that the tests get run. > > What do CI systems do for HugeTLB and THP? Those are the other config options I > can think of where there are very interesting interactions from a KVM perspective, > but where KVM doesn't have a strict dependency on the feature. > > E.g. x86_64_defconfig selects CONFIG_HUGETLBFS=y, but I don't see anything for THP, > and AFAICT TRANSPARENT_HUGEPAGE is default=n. Looks like arm64 defconfig enables THP and hugetlb. Regardless, I think it would be valuable if our Kconfig fragment expressed the options that buy us additional code coverage. -- Thanks, Oliver
On Mon, Feb 06, 2023 at 06:15:16PM +0000, Sean Christopherson wrote: > What do CI systems do for HugeTLB and THP? Those are the other config options I > can think of where there are very interesting interactions from a KVM perspective, > but where KVM doesn't have a strict dependency on the feature. > E.g. x86_64_defconfig selects CONFIG_HUGETLBFS=y, but I don't see anything for THP, > and AFAICT TRANSPARENT_HUGEPAGE is default=n. Most likely they'll either just go with defconfig plus whatever's in the fragement, or they'll lump all the kselftest fragments together (which isn't ideal but cuts down on the number of kernels you have to build). If someone's specifically set something up for KVM they might do more combinations.
On Thu, 02 Feb 2023 21:01:36 +0000, Mark Brown wrote: > The page_fault_test KVM selftest requires userfaultfd but the config > fragment for the KVM selftests does not enable it, meaning that those tests > are skipped in CI systems that rely on appropriate settings in the config > fragments except on S/390 which happens to have it in defconfig. Enable > the option in the config fragment so that the tests get run. > > > [...] Applied to kvmarm/next, thanks! [1/1] KVM: selftests: Enable USERFAULTFD https://git.kernel.org/kvmarm/kvmarm/c/d23650547819 -- Best, Oliver
diff --git a/tools/testing/selftests/kvm/config b/tools/testing/selftests/kvm/config index 63ed533f73d6..d011b38e259e 100644 --- a/tools/testing/selftests/kvm/config +++ b/tools/testing/selftests/kvm/config @@ -1,3 +1,4 @@ CONFIG_KVM=y CONFIG_KVM_INTEL=y CONFIG_KVM_AMD=y +CONFIG_USERFAULTFD=y