All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] KVM: arm64: Clean up CONFIG_KVM vs CONFIG_HAVE_KVM
@ 2021-09-21 22:22 ` Sean Christopherson
  0 siblings, 0 replies; 18+ messages in thread
From: Sean Christopherson @ 2021-09-21 22:22 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Marc Zyngier
  Cc: James Morse, Alexandru Elisei, Suzuki K Poulose,
	linux-arm-kernel, kvmarm, linux-kernel, Sean Christopherson

Fix an oddity where arm64 can end up with KVM=y and HAVE_KVM=n.  This
doesn't cause problems today as no generic code that supports arm64 uses
HAVE_KVM, but that may not always be the case, e.g. I stumbled across this
when exploring hiding perf's guest callbacks behind HAVE_KVM=y.

Sean Christopherson (2):
  KVM: arm64: Unconditionally include generic KVM's Kconfig
  KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF

 arch/arm64/Kconfig     | 1 +
 arch/arm64/kvm/Kconfig | 9 ++-------
 2 files changed, 3 insertions(+), 7 deletions(-)

-- 
2.33.0.464.g1972c5931b-goog


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

* [PATCH 0/2] KVM: arm64: Clean up CONFIG_KVM vs CONFIG_HAVE_KVM
@ 2021-09-21 22:22 ` Sean Christopherson
  0 siblings, 0 replies; 18+ messages in thread
From: Sean Christopherson @ 2021-09-21 22:22 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Marc Zyngier
  Cc: James Morse, Alexandru Elisei, Suzuki K Poulose,
	linux-arm-kernel, kvmarm, linux-kernel, Sean Christopherson

Fix an oddity where arm64 can end up with KVM=y and HAVE_KVM=n.  This
doesn't cause problems today as no generic code that supports arm64 uses
HAVE_KVM, but that may not always be the case, e.g. I stumbled across this
when exploring hiding perf's guest callbacks behind HAVE_KVM=y.

Sean Christopherson (2):
  KVM: arm64: Unconditionally include generic KVM's Kconfig
  KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF

 arch/arm64/Kconfig     | 1 +
 arch/arm64/kvm/Kconfig | 9 ++-------
 2 files changed, 3 insertions(+), 7 deletions(-)

-- 
2.33.0.464.g1972c5931b-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 0/2] KVM: arm64: Clean up CONFIG_KVM vs CONFIG_HAVE_KVM
@ 2021-09-21 22:22 ` Sean Christopherson
  0 siblings, 0 replies; 18+ messages in thread
From: Sean Christopherson @ 2021-09-21 22:22 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Marc Zyngier
  Cc: Sean Christopherson, linux-kernel, kvmarm, linux-arm-kernel

Fix an oddity where arm64 can end up with KVM=y and HAVE_KVM=n.  This
doesn't cause problems today as no generic code that supports arm64 uses
HAVE_KVM, but that may not always be the case, e.g. I stumbled across this
when exploring hiding perf's guest callbacks behind HAVE_KVM=y.

Sean Christopherson (2):
  KVM: arm64: Unconditionally include generic KVM's Kconfig
  KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF

 arch/arm64/Kconfig     | 1 +
 arch/arm64/kvm/Kconfig | 9 ++-------
 2 files changed, 3 insertions(+), 7 deletions(-)

-- 
2.33.0.464.g1972c5931b-goog

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

* [PATCH 1/2] KVM: arm64: Unconditionally include generic KVM's Kconfig
  2021-09-21 22:22 ` Sean Christopherson
  (?)
@ 2021-09-21 22:22   ` Sean Christopherson
  -1 siblings, 0 replies; 18+ messages in thread
From: Sean Christopherson @ 2021-09-21 22:22 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Marc Zyngier
  Cc: James Morse, Alexandru Elisei, Suzuki K Poulose,
	linux-arm-kernel, kvmarm, linux-kernel, Sean Christopherson

Unconditionally "source" the generic KVM Kconfig instead of wrapping it
with KVM=y.  A future patch will select HAVE_KVM so that referencing
HAVE_KVM in common kernel code doesn't break, and because KVM=y and
HAVE_KVM=n is weird.  Source the generic KVM Kconfig unconditionally so
that HAVE_KVM and KVM don't end up with a circular dependency.

Note, all but one of generic KVM's "configs" are of the HAVE_XYZ nature,
and the one outlier correctly takes a dependency on CONFIG_KVM, i.e. the
generic Kconfig is intended to be included unconditionally.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 arch/arm64/kvm/Kconfig | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
index a4eba0908bfa..c50f75cf76fe 100644
--- a/arch/arm64/kvm/Kconfig
+++ b/arch/arm64/kvm/Kconfig
@@ -4,6 +4,7 @@
 #
 
 source "virt/lib/Kconfig"
+source "virt/kvm/Kconfig"
 
 menuconfig VIRTUALIZATION
 	bool "Virtualization"
@@ -42,10 +43,4 @@ menuconfig KVM
 
 	  If unsure, say N.
 
-if KVM
-
-source "virt/kvm/Kconfig"
-
-endif # KVM
-
 endif # VIRTUALIZATION
-- 
2.33.0.464.g1972c5931b-goog


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

* [PATCH 1/2] KVM: arm64: Unconditionally include generic KVM's Kconfig
@ 2021-09-21 22:22   ` Sean Christopherson
  0 siblings, 0 replies; 18+ messages in thread
From: Sean Christopherson @ 2021-09-21 22:22 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Marc Zyngier
  Cc: James Morse, Alexandru Elisei, Suzuki K Poulose,
	linux-arm-kernel, kvmarm, linux-kernel, Sean Christopherson

Unconditionally "source" the generic KVM Kconfig instead of wrapping it
with KVM=y.  A future patch will select HAVE_KVM so that referencing
HAVE_KVM in common kernel code doesn't break, and because KVM=y and
HAVE_KVM=n is weird.  Source the generic KVM Kconfig unconditionally so
that HAVE_KVM and KVM don't end up with a circular dependency.

Note, all but one of generic KVM's "configs" are of the HAVE_XYZ nature,
and the one outlier correctly takes a dependency on CONFIG_KVM, i.e. the
generic Kconfig is intended to be included unconditionally.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 arch/arm64/kvm/Kconfig | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
index a4eba0908bfa..c50f75cf76fe 100644
--- a/arch/arm64/kvm/Kconfig
+++ b/arch/arm64/kvm/Kconfig
@@ -4,6 +4,7 @@
 #
 
 source "virt/lib/Kconfig"
+source "virt/kvm/Kconfig"
 
 menuconfig VIRTUALIZATION
 	bool "Virtualization"
@@ -42,10 +43,4 @@ menuconfig KVM
 
 	  If unsure, say N.
 
-if KVM
-
-source "virt/kvm/Kconfig"
-
-endif # KVM
-
 endif # VIRTUALIZATION
-- 
2.33.0.464.g1972c5931b-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 1/2] KVM: arm64: Unconditionally include generic KVM's Kconfig
@ 2021-09-21 22:22   ` Sean Christopherson
  0 siblings, 0 replies; 18+ messages in thread
From: Sean Christopherson @ 2021-09-21 22:22 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Marc Zyngier
  Cc: Sean Christopherson, linux-kernel, kvmarm, linux-arm-kernel

Unconditionally "source" the generic KVM Kconfig instead of wrapping it
with KVM=y.  A future patch will select HAVE_KVM so that referencing
HAVE_KVM in common kernel code doesn't break, and because KVM=y and
HAVE_KVM=n is weird.  Source the generic KVM Kconfig unconditionally so
that HAVE_KVM and KVM don't end up with a circular dependency.

Note, all but one of generic KVM's "configs" are of the HAVE_XYZ nature,
and the one outlier correctly takes a dependency on CONFIG_KVM, i.e. the
generic Kconfig is intended to be included unconditionally.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 arch/arm64/kvm/Kconfig | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
index a4eba0908bfa..c50f75cf76fe 100644
--- a/arch/arm64/kvm/Kconfig
+++ b/arch/arm64/kvm/Kconfig
@@ -4,6 +4,7 @@
 #
 
 source "virt/lib/Kconfig"
+source "virt/kvm/Kconfig"
 
 menuconfig VIRTUALIZATION
 	bool "Virtualization"
@@ -42,10 +43,4 @@ menuconfig KVM
 
 	  If unsure, say N.
 
-if KVM
-
-source "virt/kvm/Kconfig"
-
-endif # KVM
-
 endif # VIRTUALIZATION
-- 
2.33.0.464.g1972c5931b-goog

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

* [PATCH 2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
  2021-09-21 22:22 ` Sean Christopherson
  (?)
@ 2021-09-21 22:22   ` Sean Christopherson
  -1 siblings, 0 replies; 18+ messages in thread
From: Sean Christopherson @ 2021-09-21 22:22 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Marc Zyngier
  Cc: James Morse, Alexandru Elisei, Suzuki K Poulose,
	linux-arm-kernel, kvmarm, linux-kernel, Sean Christopherson

Select HAVE_KVM if the KVM dependency is met (OF / Open Firmware), and
make KVM depend on HAVE_KVM instead of directly on OF.  This fixes the
oddity where arm64 configs can end up with KVM=y and HAVE_KVM=n, and will
hopefully prevent breakage if there are future users of HAVE_KVM.

Note, arm64 unconditionally selects OF, and has always done so (see
commit 8c2c3df31e3b ("arm64: Build infrastructure").  Keep the somewhat
pointless HAVE_KVM dependency on OF to document that KVM requires Open
Firmware support.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 arch/arm64/Kconfig     | 1 +
 arch/arm64/kvm/Kconfig | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index b5b13a932561..38c0f36a5ed4 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -187,6 +187,7 @@ config ARM64
 	select HAVE_GCC_PLUGINS
 	select HAVE_HW_BREAKPOINT if PERF_EVENTS
 	select HAVE_IRQ_TIME_ACCOUNTING
+	select HAVE_KVM if OF
 	select HAVE_NMI
 	select HAVE_PATA_PLATFORM
 	select HAVE_PERF_EVENTS
diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
index c50f75cf76fe..e1e400bd8de5 100644
--- a/arch/arm64/kvm/Kconfig
+++ b/arch/arm64/kvm/Kconfig
@@ -20,7 +20,7 @@ if VIRTUALIZATION
 
 menuconfig KVM
 	bool "Kernel-based Virtual Machine (KVM) support"
-	depends on OF
+	depends on HAVE_KVM
 	select MMU_NOTIFIER
 	select PREEMPT_NOTIFIERS
 	select HAVE_KVM_CPU_RELAX_INTERCEPT
-- 
2.33.0.464.g1972c5931b-goog


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

* [PATCH 2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
@ 2021-09-21 22:22   ` Sean Christopherson
  0 siblings, 0 replies; 18+ messages in thread
From: Sean Christopherson @ 2021-09-21 22:22 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Marc Zyngier
  Cc: James Morse, Alexandru Elisei, Suzuki K Poulose,
	linux-arm-kernel, kvmarm, linux-kernel, Sean Christopherson

Select HAVE_KVM if the KVM dependency is met (OF / Open Firmware), and
make KVM depend on HAVE_KVM instead of directly on OF.  This fixes the
oddity where arm64 configs can end up with KVM=y and HAVE_KVM=n, and will
hopefully prevent breakage if there are future users of HAVE_KVM.

Note, arm64 unconditionally selects OF, and has always done so (see
commit 8c2c3df31e3b ("arm64: Build infrastructure").  Keep the somewhat
pointless HAVE_KVM dependency on OF to document that KVM requires Open
Firmware support.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 arch/arm64/Kconfig     | 1 +
 arch/arm64/kvm/Kconfig | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index b5b13a932561..38c0f36a5ed4 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -187,6 +187,7 @@ config ARM64
 	select HAVE_GCC_PLUGINS
 	select HAVE_HW_BREAKPOINT if PERF_EVENTS
 	select HAVE_IRQ_TIME_ACCOUNTING
+	select HAVE_KVM if OF
 	select HAVE_NMI
 	select HAVE_PATA_PLATFORM
 	select HAVE_PERF_EVENTS
diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
index c50f75cf76fe..e1e400bd8de5 100644
--- a/arch/arm64/kvm/Kconfig
+++ b/arch/arm64/kvm/Kconfig
@@ -20,7 +20,7 @@ if VIRTUALIZATION
 
 menuconfig KVM
 	bool "Kernel-based Virtual Machine (KVM) support"
-	depends on OF
+	depends on HAVE_KVM
 	select MMU_NOTIFIER
 	select PREEMPT_NOTIFIERS
 	select HAVE_KVM_CPU_RELAX_INTERCEPT
-- 
2.33.0.464.g1972c5931b-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
@ 2021-09-21 22:22   ` Sean Christopherson
  0 siblings, 0 replies; 18+ messages in thread
From: Sean Christopherson @ 2021-09-21 22:22 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Marc Zyngier
  Cc: Sean Christopherson, linux-kernel, kvmarm, linux-arm-kernel

Select HAVE_KVM if the KVM dependency is met (OF / Open Firmware), and
make KVM depend on HAVE_KVM instead of directly on OF.  This fixes the
oddity where arm64 configs can end up with KVM=y and HAVE_KVM=n, and will
hopefully prevent breakage if there are future users of HAVE_KVM.

Note, arm64 unconditionally selects OF, and has always done so (see
commit 8c2c3df31e3b ("arm64: Build infrastructure").  Keep the somewhat
pointless HAVE_KVM dependency on OF to document that KVM requires Open
Firmware support.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 arch/arm64/Kconfig     | 1 +
 arch/arm64/kvm/Kconfig | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index b5b13a932561..38c0f36a5ed4 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -187,6 +187,7 @@ config ARM64
 	select HAVE_GCC_PLUGINS
 	select HAVE_HW_BREAKPOINT if PERF_EVENTS
 	select HAVE_IRQ_TIME_ACCOUNTING
+	select HAVE_KVM if OF
 	select HAVE_NMI
 	select HAVE_PATA_PLATFORM
 	select HAVE_PERF_EVENTS
diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
index c50f75cf76fe..e1e400bd8de5 100644
--- a/arch/arm64/kvm/Kconfig
+++ b/arch/arm64/kvm/Kconfig
@@ -20,7 +20,7 @@ if VIRTUALIZATION
 
 menuconfig KVM
 	bool "Kernel-based Virtual Machine (KVM) support"
-	depends on OF
+	depends on HAVE_KVM
 	select MMU_NOTIFIER
 	select PREEMPT_NOTIFIERS
 	select HAVE_KVM_CPU_RELAX_INTERCEPT
-- 
2.33.0.464.g1972c5931b-goog

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

* Re: [PATCH 2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
  2021-09-21 22:22   ` Sean Christopherson
  (?)
@ 2021-09-29 15:53     ` Will Deacon
  -1 siblings, 0 replies; 18+ messages in thread
From: Will Deacon @ 2021-09-29 15:53 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Catalin Marinas, Marc Zyngier, James Morse, Alexandru Elisei,
	Suzuki K Poulose, linux-arm-kernel, kvmarm, linux-kernel

On Tue, Sep 21, 2021 at 03:22:31PM -0700, Sean Christopherson wrote:
> Select HAVE_KVM if the KVM dependency is met (OF / Open Firmware), and
> make KVM depend on HAVE_KVM instead of directly on OF.  This fixes the
> oddity where arm64 configs can end up with KVM=y and HAVE_KVM=n, and will
> hopefully prevent breakage if there are future users of HAVE_KVM.
> 
> Note, arm64 unconditionally selects OF, and has always done so (see
> commit 8c2c3df31e3b ("arm64: Build infrastructure").  Keep the somewhat
> pointless HAVE_KVM dependency on OF to document that KVM requires Open
> Firmware support.
> 
> No functional change intended.
> 
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> ---
>  arch/arm64/Kconfig     | 1 +
>  arch/arm64/kvm/Kconfig | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index b5b13a932561..38c0f36a5ed4 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -187,6 +187,7 @@ config ARM64
>  	select HAVE_GCC_PLUGINS
>  	select HAVE_HW_BREAKPOINT if PERF_EVENTS
>  	select HAVE_IRQ_TIME_ACCOUNTING
> +	select HAVE_KVM if OF

Honestly, I'd just drop the 'if OF' here. We select it unconditionally a
few lines below and so I think it's more confusing to have the check.

With that:

Acked-by: Will Deacon <will@kernel.org>

Will

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

* Re: [PATCH 2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
@ 2021-09-29 15:53     ` Will Deacon
  0 siblings, 0 replies; 18+ messages in thread
From: Will Deacon @ 2021-09-29 15:53 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Catalin Marinas, linux-kernel, Marc Zyngier, kvmarm, linux-arm-kernel

On Tue, Sep 21, 2021 at 03:22:31PM -0700, Sean Christopherson wrote:
> Select HAVE_KVM if the KVM dependency is met (OF / Open Firmware), and
> make KVM depend on HAVE_KVM instead of directly on OF.  This fixes the
> oddity where arm64 configs can end up with KVM=y and HAVE_KVM=n, and will
> hopefully prevent breakage if there are future users of HAVE_KVM.
> 
> Note, arm64 unconditionally selects OF, and has always done so (see
> commit 8c2c3df31e3b ("arm64: Build infrastructure").  Keep the somewhat
> pointless HAVE_KVM dependency on OF to document that KVM requires Open
> Firmware support.
> 
> No functional change intended.
> 
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> ---
>  arch/arm64/Kconfig     | 1 +
>  arch/arm64/kvm/Kconfig | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index b5b13a932561..38c0f36a5ed4 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -187,6 +187,7 @@ config ARM64
>  	select HAVE_GCC_PLUGINS
>  	select HAVE_HW_BREAKPOINT if PERF_EVENTS
>  	select HAVE_IRQ_TIME_ACCOUNTING
> +	select HAVE_KVM if OF

Honestly, I'd just drop the 'if OF' here. We select it unconditionally a
few lines below and so I think it's more confusing to have the check.

With that:

Acked-by: Will Deacon <will@kernel.org>

Will
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

* Re: [PATCH 2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
@ 2021-09-29 15:53     ` Will Deacon
  0 siblings, 0 replies; 18+ messages in thread
From: Will Deacon @ 2021-09-29 15:53 UTC (permalink / raw)
  To: Sean Christopherson
  Cc: Catalin Marinas, Marc Zyngier, James Morse, Alexandru Elisei,
	Suzuki K Poulose, linux-arm-kernel, kvmarm, linux-kernel

On Tue, Sep 21, 2021 at 03:22:31PM -0700, Sean Christopherson wrote:
> Select HAVE_KVM if the KVM dependency is met (OF / Open Firmware), and
> make KVM depend on HAVE_KVM instead of directly on OF.  This fixes the
> oddity where arm64 configs can end up with KVM=y and HAVE_KVM=n, and will
> hopefully prevent breakage if there are future users of HAVE_KVM.
> 
> Note, arm64 unconditionally selects OF, and has always done so (see
> commit 8c2c3df31e3b ("arm64: Build infrastructure").  Keep the somewhat
> pointless HAVE_KVM dependency on OF to document that KVM requires Open
> Firmware support.
> 
> No functional change intended.
> 
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> ---
>  arch/arm64/Kconfig     | 1 +
>  arch/arm64/kvm/Kconfig | 2 +-
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index b5b13a932561..38c0f36a5ed4 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -187,6 +187,7 @@ config ARM64
>  	select HAVE_GCC_PLUGINS
>  	select HAVE_HW_BREAKPOINT if PERF_EVENTS
>  	select HAVE_IRQ_TIME_ACCOUNTING
> +	select HAVE_KVM if OF

Honestly, I'd just drop the 'if OF' here. We select it unconditionally a
few lines below and so I think it's more confusing to have the check.

With that:

Acked-by: Will Deacon <will@kernel.org>

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
  2021-09-29 15:53     ` Will Deacon
  (?)
@ 2021-09-29 15:56       ` Sean Christopherson
  -1 siblings, 0 replies; 18+ messages in thread
From: Sean Christopherson @ 2021-09-29 15:56 UTC (permalink / raw)
  To: Will Deacon
  Cc: Catalin Marinas, Marc Zyngier, James Morse, Alexandru Elisei,
	Suzuki K Poulose, linux-arm-kernel, kvmarm, linux-kernel

On Wed, Sep 29, 2021, Will Deacon wrote:
> On Tue, Sep 21, 2021 at 03:22:31PM -0700, Sean Christopherson wrote:
> > Select HAVE_KVM if the KVM dependency is met (OF / Open Firmware), and
> > make KVM depend on HAVE_KVM instead of directly on OF.  This fixes the
> > oddity where arm64 configs can end up with KVM=y and HAVE_KVM=n, and will
> > hopefully prevent breakage if there are future users of HAVE_KVM.
> > 
> > Note, arm64 unconditionally selects OF, and has always done so (see
> > commit 8c2c3df31e3b ("arm64: Build infrastructure").  Keep the somewhat
> > pointless HAVE_KVM dependency on OF to document that KVM requires Open
> > Firmware support.
> > 
> > No functional change intended.
> > 
> > Signed-off-by: Sean Christopherson <seanjc@google.com>
> > ---
> >  arch/arm64/Kconfig     | 1 +
> >  arch/arm64/kvm/Kconfig | 2 +-
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > index b5b13a932561..38c0f36a5ed4 100644
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/arm64/Kconfig
> > @@ -187,6 +187,7 @@ config ARM64
> >  	select HAVE_GCC_PLUGINS
> >  	select HAVE_HW_BREAKPOINT if PERF_EVENTS
> >  	select HAVE_IRQ_TIME_ACCOUNTING
> > +	select HAVE_KVM if OF
> 
> Honestly, I'd just drop the 'if OF' here. We select it unconditionally a
> few lines below and so I think it's more confusing to have the check.

Work for me.  I all but flipped a coin when deciding whether or not to keep the
OF dependency.

Thanks!

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

* Re: [PATCH 2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
@ 2021-09-29 15:56       ` Sean Christopherson
  0 siblings, 0 replies; 18+ messages in thread
From: Sean Christopherson @ 2021-09-29 15:56 UTC (permalink / raw)
  To: Will Deacon
  Cc: Catalin Marinas, linux-kernel, Marc Zyngier, kvmarm, linux-arm-kernel

On Wed, Sep 29, 2021, Will Deacon wrote:
> On Tue, Sep 21, 2021 at 03:22:31PM -0700, Sean Christopherson wrote:
> > Select HAVE_KVM if the KVM dependency is met (OF / Open Firmware), and
> > make KVM depend on HAVE_KVM instead of directly on OF.  This fixes the
> > oddity where arm64 configs can end up with KVM=y and HAVE_KVM=n, and will
> > hopefully prevent breakage if there are future users of HAVE_KVM.
> > 
> > Note, arm64 unconditionally selects OF, and has always done so (see
> > commit 8c2c3df31e3b ("arm64: Build infrastructure").  Keep the somewhat
> > pointless HAVE_KVM dependency on OF to document that KVM requires Open
> > Firmware support.
> > 
> > No functional change intended.
> > 
> > Signed-off-by: Sean Christopherson <seanjc@google.com>
> > ---
> >  arch/arm64/Kconfig     | 1 +
> >  arch/arm64/kvm/Kconfig | 2 +-
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > index b5b13a932561..38c0f36a5ed4 100644
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/arm64/Kconfig
> > @@ -187,6 +187,7 @@ config ARM64
> >  	select HAVE_GCC_PLUGINS
> >  	select HAVE_HW_BREAKPOINT if PERF_EVENTS
> >  	select HAVE_IRQ_TIME_ACCOUNTING
> > +	select HAVE_KVM if OF
> 
> Honestly, I'd just drop the 'if OF' here. We select it unconditionally a
> few lines below and so I think it's more confusing to have the check.

Work for me.  I all but flipped a coin when deciding whether or not to keep the
OF dependency.

Thanks!
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

* Re: [PATCH 2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
@ 2021-09-29 15:56       ` Sean Christopherson
  0 siblings, 0 replies; 18+ messages in thread
From: Sean Christopherson @ 2021-09-29 15:56 UTC (permalink / raw)
  To: Will Deacon
  Cc: Catalin Marinas, Marc Zyngier, James Morse, Alexandru Elisei,
	Suzuki K Poulose, linux-arm-kernel, kvmarm, linux-kernel

On Wed, Sep 29, 2021, Will Deacon wrote:
> On Tue, Sep 21, 2021 at 03:22:31PM -0700, Sean Christopherson wrote:
> > Select HAVE_KVM if the KVM dependency is met (OF / Open Firmware), and
> > make KVM depend on HAVE_KVM instead of directly on OF.  This fixes the
> > oddity where arm64 configs can end up with KVM=y and HAVE_KVM=n, and will
> > hopefully prevent breakage if there are future users of HAVE_KVM.
> > 
> > Note, arm64 unconditionally selects OF, and has always done so (see
> > commit 8c2c3df31e3b ("arm64: Build infrastructure").  Keep the somewhat
> > pointless HAVE_KVM dependency on OF to document that KVM requires Open
> > Firmware support.
> > 
> > No functional change intended.
> > 
> > Signed-off-by: Sean Christopherson <seanjc@google.com>
> > ---
> >  arch/arm64/Kconfig     | 1 +
> >  arch/arm64/kvm/Kconfig | 2 +-
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> > index b5b13a932561..38c0f36a5ed4 100644
> > --- a/arch/arm64/Kconfig
> > +++ b/arch/arm64/Kconfig
> > @@ -187,6 +187,7 @@ config ARM64
> >  	select HAVE_GCC_PLUGINS
> >  	select HAVE_HW_BREAKPOINT if PERF_EVENTS
> >  	select HAVE_IRQ_TIME_ACCOUNTING
> > +	select HAVE_KVM if OF
> 
> Honestly, I'd just drop the 'if OF' here. We select it unconditionally a
> few lines below and so I think it's more confusing to have the check.

Work for me.  I all but flipped a coin when deciding whether or not to keep the
OF dependency.

Thanks!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 0/2] KVM: arm64: Clean up CONFIG_KVM vs CONFIG_HAVE_KVM
  2021-09-21 22:22 ` Sean Christopherson
  (?)
@ 2021-10-11  9:18   ` Marc Zyngier
  -1 siblings, 0 replies; 18+ messages in thread
From: Marc Zyngier @ 2021-10-11  9:18 UTC (permalink / raw)
  To: Will Deacon, Catalin Marinas, Sean Christopherson
  Cc: linux-kernel, kvmarm, linux-arm-kernel

On Tue, 21 Sep 2021 15:22:29 -0700, Sean Christopherson wrote:
> Fix an oddity where arm64 can end up with KVM=y and HAVE_KVM=n.  This
> doesn't cause problems today as no generic code that supports arm64 uses
> HAVE_KVM, but that may not always be the case, e.g. I stumbled across this
> when exploring hiding perf's guest callbacks behind HAVE_KVM=y.
> 
> Sean Christopherson (2):
>   KVM: arm64: Unconditionally include generic KVM's Kconfig
>   KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
> 
> [...]

Applied to next, thanks!

[1/2] KVM: arm64: Unconditionally include generic KVM's Kconfig
      commit: c8f1e96734069c788b10545f4fd82bcbb6b55dfa
[2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
      commit: e26bb75aa2f17fc079e6a24dff653b098e1f5d37

Cheers,

	M.
-- 
Without deviation from the norm, progress is not possible.


_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

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

* Re: [PATCH 0/2] KVM: arm64: Clean up CONFIG_KVM vs CONFIG_HAVE_KVM
@ 2021-10-11  9:18   ` Marc Zyngier
  0 siblings, 0 replies; 18+ messages in thread
From: Marc Zyngier @ 2021-10-11  9:18 UTC (permalink / raw)
  To: Will Deacon, Catalin Marinas, Sean Christopherson
  Cc: linux-arm-kernel, Alexandru Elisei, Suzuki K Poulose,
	James Morse, linux-kernel, kvmarm

On Tue, 21 Sep 2021 15:22:29 -0700, Sean Christopherson wrote:
> Fix an oddity where arm64 can end up with KVM=y and HAVE_KVM=n.  This
> doesn't cause problems today as no generic code that supports arm64 uses
> HAVE_KVM, but that may not always be the case, e.g. I stumbled across this
> when exploring hiding perf's guest callbacks behind HAVE_KVM=y.
> 
> Sean Christopherson (2):
>   KVM: arm64: Unconditionally include generic KVM's Kconfig
>   KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
> 
> [...]

Applied to next, thanks!

[1/2] KVM: arm64: Unconditionally include generic KVM's Kconfig
      commit: c8f1e96734069c788b10545f4fd82bcbb6b55dfa
[2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
      commit: e26bb75aa2f17fc079e6a24dff653b098e1f5d37

Cheers,

	M.
-- 
Without deviation from the norm, progress is not possible.



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

* Re: [PATCH 0/2] KVM: arm64: Clean up CONFIG_KVM vs CONFIG_HAVE_KVM
@ 2021-10-11  9:18   ` Marc Zyngier
  0 siblings, 0 replies; 18+ messages in thread
From: Marc Zyngier @ 2021-10-11  9:18 UTC (permalink / raw)
  To: Will Deacon, Catalin Marinas, Sean Christopherson
  Cc: linux-arm-kernel, Alexandru Elisei, Suzuki K Poulose,
	James Morse, linux-kernel, kvmarm

On Tue, 21 Sep 2021 15:22:29 -0700, Sean Christopherson wrote:
> Fix an oddity where arm64 can end up with KVM=y and HAVE_KVM=n.  This
> doesn't cause problems today as no generic code that supports arm64 uses
> HAVE_KVM, but that may not always be the case, e.g. I stumbled across this
> when exploring hiding perf's guest callbacks behind HAVE_KVM=y.
> 
> Sean Christopherson (2):
>   KVM: arm64: Unconditionally include generic KVM's Kconfig
>   KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
> 
> [...]

Applied to next, thanks!

[1/2] KVM: arm64: Unconditionally include generic KVM's Kconfig
      commit: c8f1e96734069c788b10545f4fd82bcbb6b55dfa
[2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF
      commit: e26bb75aa2f17fc079e6a24dff653b098e1f5d37

Cheers,

	M.
-- 
Without deviation from the norm, progress is not possible.



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-10-11  9:21 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21 22:22 [PATCH 0/2] KVM: arm64: Clean up CONFIG_KVM vs CONFIG_HAVE_KVM Sean Christopherson
2021-09-21 22:22 ` Sean Christopherson
2021-09-21 22:22 ` Sean Christopherson
2021-09-21 22:22 ` [PATCH 1/2] KVM: arm64: Unconditionally include generic KVM's Kconfig Sean Christopherson
2021-09-21 22:22   ` Sean Christopherson
2021-09-21 22:22   ` Sean Christopherson
2021-09-21 22:22 ` [PATCH 2/2] KVM: arm64: Depend on HAVE_KVM => OF instead of directly on OF Sean Christopherson
2021-09-21 22:22   ` Sean Christopherson
2021-09-21 22:22   ` Sean Christopherson
2021-09-29 15:53   ` Will Deacon
2021-09-29 15:53     ` Will Deacon
2021-09-29 15:53     ` Will Deacon
2021-09-29 15:56     ` Sean Christopherson
2021-09-29 15:56       ` Sean Christopherson
2021-09-29 15:56       ` Sean Christopherson
2021-10-11  9:18 ` [PATCH 0/2] KVM: arm64: Clean up CONFIG_KVM vs CONFIG_HAVE_KVM Marc Zyngier
2021-10-11  9:18   ` Marc Zyngier
2021-10-11  9:18   ` Marc Zyngier

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.