lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABgObfa9AjsDTTKJY5sZLcH0+-7tbpUvMnEiyq_wxhe9-fajzA@mail.gmail.com>
Date: Fri, 11 Oct 2024 12:08:52 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Vishal Chourasia <vishalc@...ux.ibm.com>
Cc: linuxppc-dev@...ts.ozlabs.org, Michael Ellerman <mpe@...erman.id.au>, 
	Nicholas Piggin <npiggin@...il.com>, Christophe Leroy <christophe.leroy@...roup.eu>, 
	Naveen N Rao <naveen@...nel.org>, Madhavan Srinivasan <maddy@...ux.ibm.com>, kvm@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [RFC] powerpc/kvm: Fix spinlock member access for PREEMPT_RT

On Fri, Oct 11, 2024 at 12:04 PM Vishal Chourasia <vishalc@...ux.ibm.com> wrote:
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 8094a01974cca..568dc856f0dfa 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -168,6 +168,7 @@ config PPC
>         select ARCH_STACKWALK
>         select ARCH_SUPPORTS_ATOMIC_RMW
>         select ARCH_SUPPORTS_DEBUG_PAGEALLOC    if PPC_BOOK3S || PPC_8xx
> +       select ARCH_SUPPORTS_RT                 if !PPC || !KVM_BOOK3S_64_HV
>         select ARCH_USE_BUILTIN_BSWAP
>         select ARCH_USE_CMPXCHG_LOCKREF         if PPC64
>         select ARCH_USE_MEMTEST
> I tried rebuilding with the above diff as per your suggestion
> though it works when KVM_BOOK3S_64_HV is set to N, but for
> pseries_le_defconfig, it's set to M, by default, which then requires setting it
> to N explicitly.

Yes, that was intentional (the "!PPC ||" part is not necessary since
you placed this in "config PPC"). I understand however that it's hard
to discover that you need KVM_BOOK3S_64_HV=n in order to build an RT
kernel.

> Will something like below be a better solution? This will set
> KVM_BOOK3S_64_HV to N if ARCH_SUPPORTS_RT is set.
>
> diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig
> index dbfdc126bf144..33e0d50b08b14 100644
> --- a/arch/powerpc/kvm/Kconfig
> +++ b/arch/powerpc/kvm/Kconfig
> @@ -80,7 +80,7 @@ config KVM_BOOK3S_64
>
>  config KVM_BOOK3S_64_HV
>         tristate "KVM for POWER7 and later using hypervisor mode in host"
> -       depends on KVM_BOOK3S_64 && PPC_POWERNV
> +       depends on KVM_BOOK3S_64 && PPC_POWERNV && !ARCH_SUPPORTS_RT
>         select KVM_BOOK3S_HV_POSSIBLE
>         select KVM_GENERIC_MMU_NOTIFIER
>         select CMA

No, that would make it completely impossible to build with KVM enabled.

Paolo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ