All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: selftests: Enable USERFAULTFD
@ 2023-02-02 21:01 Mark Brown
  2023-02-06 17:09 ` Oliver Upton
  2023-02-08 17:30 ` Oliver Upton
  0 siblings, 2 replies; 6+ messages in thread
From: Mark Brown @ 2023-02-02 21:01 UTC (permalink / raw)
  To: Paolo Bonzini, Shuah Khan, Oliver Upton
  Cc: kvm, linux-kselftest, linux-kernel, Mark Brown

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(+)

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>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] KVM: selftests: Enable USERFAULTFD
  2023-02-02 21:01 [PATCH] KVM: selftests: Enable USERFAULTFD Mark Brown
@ 2023-02-06 17:09 ` Oliver Upton
  2023-02-06 18:15   ` Sean Christopherson
  2023-02-08 17:30 ` Oliver Upton
  1 sibling, 1 reply; 6+ messages in thread
From: Oliver Upton @ 2023-02-06 17:09 UTC (permalink / raw)
  To: Mark Brown
  Cc: Paolo Bonzini, Shuah Khan, kvm, linux-kselftest, linux-kernel,
	seanjc, anup

+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>
> 

-- 
Thanks,
Oliver

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] KVM: selftests: Enable USERFAULTFD
  2023-02-06 17:09 ` Oliver Upton
@ 2023-02-06 18:15   ` Sean Christopherson
  2023-02-06 19:49     ` Oliver Upton
  2023-02-06 21:10     ` Mark Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Sean Christopherson @ 2023-02-06 18:15 UTC (permalink / raw)
  To: Oliver Upton
  Cc: Mark Brown, Paolo Bonzini, Shuah Khan, kvm, linux-kselftest,
	linux-kernel, anup

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>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] KVM: selftests: Enable USERFAULTFD
  2023-02-06 18:15   ` Sean Christopherson
@ 2023-02-06 19:49     ` Oliver Upton
  2023-02-06 21:10     ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Oliver Upton @ 2023-02-06 19:49 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Mark Brown, Paolo Bonzini, Shuah Khan, kvm, linux-kselftest,
	linux-kernel, anup

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] KVM: selftests: Enable USERFAULTFD
  2023-02-06 18:15   ` Sean Christopherson
  2023-02-06 19:49     ` Oliver Upton
@ 2023-02-06 21:10     ` Mark Brown
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Brown @ 2023-02-06 21:10 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Oliver Upton, Paolo Bonzini, Shuah Khan, kvm, linux-kselftest,
	linux-kernel, anup

[-- Attachment #1: Type: text/plain, Size: 738 bytes --]

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] KVM: selftests: Enable USERFAULTFD
  2023-02-02 21:01 [PATCH] KVM: selftests: Enable USERFAULTFD Mark Brown
  2023-02-06 17:09 ` Oliver Upton
@ 2023-02-08 17:30 ` Oliver Upton
  1 sibling, 0 replies; 6+ messages in thread
From: Oliver Upton @ 2023-02-08 17:30 UTC (permalink / raw)
  To: Mark Brown, Paolo Bonzini, Shuah Khan
  Cc: Oliver Upton, kvm, linux-kernel, linux-kselftest

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-02-08 17:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-02 21:01 [PATCH] KVM: selftests: Enable USERFAULTFD Mark Brown
2023-02-06 17:09 ` Oliver Upton
2023-02-06 18:15   ` Sean Christopherson
2023-02-06 19:49     ` Oliver Upton
2023-02-06 21:10     ` Mark Brown
2023-02-08 17:30 ` Oliver Upton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.