linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/rcutorture move CONFIG_HYPERVISOR_GUEST to kvm-test-1-run.sh
@ 2024-04-27  0:56 Zhouyi Zhou
  2024-04-29 23:22 ` Paul E. McKenney
  0 siblings, 1 reply; 3+ messages in thread
From: Zhouyi Zhou @ 2024-04-27  0:56 UTC (permalink / raw)
  To: linux-kernel, paulmck, frederic, boqun.feng, joel,
	neeraj.upadhyay, qiang.zhang1211, rcu, lance
  Cc: Zhouyi Zhou

CONFIG_HYPERVISOR_GUEST is a x86 specific kernel option, move to
kvm-test-1-run.sh to avoid ConfigFragment.diags in non-x86 platforms.

Tested in both PPC VM of Open Source lab of Oregon State University and
local x86_64 server.

Fixes: a6fda6dab93c ("rcutorture: Tweak kvm options")
Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
---
 tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 4 ++++
 tools/testing/selftests/rcutorture/configs/rcu/CFcommon  | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
index b33cd8753689..75774bc70be7 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -68,6 +68,10 @@ config_override_param "--gdb options" KcList "$TORTURE_KCONFIG_GDB_ARG"
 config_override_param "--kasan options" KcList "$TORTURE_KCONFIG_KASAN_ARG"
 config_override_param "--kcsan options" KcList "$TORTURE_KCONFIG_KCSAN_ARG"
 config_override_param "--kconfig argument" KcList "$TORTURE_KCONFIG_ARG"
+if uname -a | grep -q x86
+then
+	config_override_param "x86 specific option" KcList "CONFIG_HYPERVISOR_GUEST=y"
+fi
 cp $T/KcList $resdir/ConfigFragment
 
 base_resdir=`echo $resdir | sed -e 's/\.[0-9]\+$//'`
diff --git a/tools/testing/selftests/rcutorture/configs/rcu/CFcommon b/tools/testing/selftests/rcutorture/configs/rcu/CFcommon
index 0e92d85313aa..cf0387ae5358 100644
--- a/tools/testing/selftests/rcutorture/configs/rcu/CFcommon
+++ b/tools/testing/selftests/rcutorture/configs/rcu/CFcommon
@@ -1,6 +1,5 @@
 CONFIG_RCU_TORTURE_TEST=y
 CONFIG_PRINTK_TIME=y
-CONFIG_HYPERVISOR_GUEST=y
 CONFIG_PARAVIRT=y
 CONFIG_KVM_GUEST=y
 CONFIG_KCSAN_ASSUME_PLAIN_WRITES_ATOMIC=n
-- 
2.34.1


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

* Re: [PATCH] x86/rcutorture move CONFIG_HYPERVISOR_GUEST to kvm-test-1-run.sh
  2024-04-27  0:56 [PATCH] x86/rcutorture move CONFIG_HYPERVISOR_GUEST to kvm-test-1-run.sh Zhouyi Zhou
@ 2024-04-29 23:22 ` Paul E. McKenney
  2024-04-30  0:58   ` Zhouyi Zhou
  0 siblings, 1 reply; 3+ messages in thread
From: Paul E. McKenney @ 2024-04-29 23:22 UTC (permalink / raw)
  To: Zhouyi Zhou
  Cc: linux-kernel, frederic, boqun.feng, joel, neeraj.upadhyay,
	qiang.zhang1211, rcu, lance

On Sat, Apr 27, 2024 at 12:56:26AM +0000, Zhouyi Zhou wrote:
> CONFIG_HYPERVISOR_GUEST is a x86 specific kernel option, move to
> kvm-test-1-run.sh to avoid ConfigFragment.diags in non-x86 platforms.
> 
> Tested in both PPC VM of Open Source lab of Oregon State University and
> local x86_64 server.
> 
> Fixes: a6fda6dab93c ("rcutorture: Tweak kvm options")
> Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>

I like this general approach, but why not have something like a
CFCOMMON.arch for the various "arch"s that need it?

Better yet, I bet that there is already something somewhere in the
Linux kernel source tree that knows what hypervisor Kconfig options
each architecture needs.  If so, it would be most excellent to reuse
that information instead of maintaining it separately in RCU.

							Thanx, Paul

> ---
>  tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 4 ++++
>  tools/testing/selftests/rcutorture/configs/rcu/CFcommon  | 1 -
>  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
> index b33cd8753689..75774bc70be7 100755
> --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
> +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
> @@ -68,6 +68,10 @@ config_override_param "--gdb options" KcList "$TORTURE_KCONFIG_GDB_ARG"
>  config_override_param "--kasan options" KcList "$TORTURE_KCONFIG_KASAN_ARG"
>  config_override_param "--kcsan options" KcList "$TORTURE_KCONFIG_KCSAN_ARG"
>  config_override_param "--kconfig argument" KcList "$TORTURE_KCONFIG_ARG"
> +if uname -a | grep -q x86
> +then
> +	config_override_param "x86 specific option" KcList "CONFIG_HYPERVISOR_GUEST=y"
> +fi
>  cp $T/KcList $resdir/ConfigFragment
>  
>  base_resdir=`echo $resdir | sed -e 's/\.[0-9]\+$//'`
> diff --git a/tools/testing/selftests/rcutorture/configs/rcu/CFcommon b/tools/testing/selftests/rcutorture/configs/rcu/CFcommon
> index 0e92d85313aa..cf0387ae5358 100644
> --- a/tools/testing/selftests/rcutorture/configs/rcu/CFcommon
> +++ b/tools/testing/selftests/rcutorture/configs/rcu/CFcommon
> @@ -1,6 +1,5 @@
>  CONFIG_RCU_TORTURE_TEST=y
>  CONFIG_PRINTK_TIME=y
> -CONFIG_HYPERVISOR_GUEST=y
>  CONFIG_PARAVIRT=y
>  CONFIG_KVM_GUEST=y
>  CONFIG_KCSAN_ASSUME_PLAIN_WRITES_ATOMIC=n
> -- 
> 2.34.1
> 

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

* Re: [PATCH] x86/rcutorture move CONFIG_HYPERVISOR_GUEST to kvm-test-1-run.sh
  2024-04-29 23:22 ` Paul E. McKenney
@ 2024-04-30  0:58   ` Zhouyi Zhou
  0 siblings, 0 replies; 3+ messages in thread
From: Zhouyi Zhou @ 2024-04-30  0:58 UTC (permalink / raw)
  To: paulmck
  Cc: linux-kernel, frederic, boqun.feng, joel, neeraj.upadhyay,
	qiang.zhang1211, rcu, lance

On Tue, Apr 30, 2024 at 7:22 AM Paul E. McKenney <paulmck@kernel.org> wrote:
>
> On Sat, Apr 27, 2024 at 12:56:26AM +0000, Zhouyi Zhou wrote:
> > CONFIG_HYPERVISOR_GUEST is a x86 specific kernel option, move to
> > kvm-test-1-run.sh to avoid ConfigFragment.diags in non-x86 platforms.
> >
> > Tested in both PPC VM of Open Source lab of Oregon State University and
> > local x86_64 server.
> >
> > Fixes: a6fda6dab93c ("rcutorture: Tweak kvm options")
> > Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
>
> I like this general approach, but why not have something like a
> CFCOMMON.arch for the various "arch"s that need it?
>
> Better yet, I bet that there is already something somewhere in the
> Linux kernel source tree that knows what hypervisor Kconfig options
> each architecture needs.  If so, it would be most excellent to reuse
> that information instead of maintaining it separately in RCU.
Thank Paul for your great guidance and valuable advice!

I will do a thorough research on the above approaches.

Thanks again ;-)
Zhouyi
>
>                                                         Thanx, Paul
>
> > ---
> >  tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 4 ++++
> >  tools/testing/selftests/rcutorture/configs/rcu/CFcommon  | 1 -
> >  2 files changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
> > index b33cd8753689..75774bc70be7 100755
> > --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
> > +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
> > @@ -68,6 +68,10 @@ config_override_param "--gdb options" KcList "$TORTURE_KCONFIG_GDB_ARG"
> >  config_override_param "--kasan options" KcList "$TORTURE_KCONFIG_KASAN_ARG"
> >  config_override_param "--kcsan options" KcList "$TORTURE_KCONFIG_KCSAN_ARG"
> >  config_override_param "--kconfig argument" KcList "$TORTURE_KCONFIG_ARG"
> > +if uname -a | grep -q x86
> > +then
> > +     config_override_param "x86 specific option" KcList "CONFIG_HYPERVISOR_GUEST=y"
> > +fi
> >  cp $T/KcList $resdir/ConfigFragment
> >
> >  base_resdir=`echo $resdir | sed -e 's/\.[0-9]\+$//'`
> > diff --git a/tools/testing/selftests/rcutorture/configs/rcu/CFcommon b/tools/testing/selftests/rcutorture/configs/rcu/CFcommon
> > index 0e92d85313aa..cf0387ae5358 100644
> > --- a/tools/testing/selftests/rcutorture/configs/rcu/CFcommon
> > +++ b/tools/testing/selftests/rcutorture/configs/rcu/CFcommon
> > @@ -1,6 +1,5 @@
> >  CONFIG_RCU_TORTURE_TEST=y
> >  CONFIG_PRINTK_TIME=y
> > -CONFIG_HYPERVISOR_GUEST=y
> >  CONFIG_PARAVIRT=y
> >  CONFIG_KVM_GUEST=y
> >  CONFIG_KCSAN_ASSUME_PLAIN_WRITES_ATOMIC=n
> > --
> > 2.34.1
> >

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

end of thread, other threads:[~2024-04-30  0:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-27  0:56 [PATCH] x86/rcutorture move CONFIG_HYPERVISOR_GUEST to kvm-test-1-run.sh Zhouyi Zhou
2024-04-29 23:22 ` Paul E. McKenney
2024-04-30  0:58   ` Zhouyi Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).