Re: [PATCH] make KVM selectable again

Previous thread: jffs2 summary buffer by michael on Saturday, February 9, 2008 - 4:46 pm. (1 message)

Next thread: [PATCH][RFC] Remove "obsolete" digiepca content. by Robert P. J. Day on Saturday, February 9, 2008 - 5:45 pm. (4 messages)
To: Avi Kivity <avi@...>
Cc: linux-kernel@vger.kernel.org <linux-kernel@...>, kvm-devel <kvm-devel@...>, Sam Ravnborg <sam@...>
Date: Saturday, February 9, 2008 - 4:59 pm

Current git for me (b1d0e4f535e10775cffde922208b49629169aeaa) doesn't
let me build KVM. In fact, I don't seem to have *ANY* kvm-related
symbols in my .config at all.

I've verified that arch/x86/kvm/Kconfig was getting run by putting some
comments in it. It seems to me like just putting:

config HAVE_KVM
bool

isn't letting anything come into my .config at all. I'm not sure why we
do that, and then have:

select HAVE_KVM

in arch/x86/Kconfig.

This patch just defines HAVE_KVM in the x86 Kconfig and is done with it.
Seems to work for me.

Was there some reason that it was done this way? Was it ever tested?

-- Dave

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 65a70b7..cbbf35d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -115,7 +115,8 @@ config ARCH_HAS_CPU_RELAX
config HAVE_SETUP_PER_CPU_AREA
def_bool X86_64

-select HAVE_KVM
+config HAVE_KVM
+ def_bool y

config ARCH_HIBERNATION_POSSIBLE
def_bool y
diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index 41962e7..f2177ec 100644
--- a/arch/x86/kvm/Kconfig
+++ b/arch/x86/kvm/Kconfig
@@ -1,8 +1,6 @@
#
# KVM configuration
#
-config HAVE_KVM
- bool

menuconfig VIRTUALIZATION
bool "Virtualization"

--

To: Dave Hansen <haveblue@...>
Cc: Avi Kivity <avi@...>, linux-kernel@vger.kernel.org <linux-kernel@...>, kvm-devel <kvm-devel@...>, Sam Ravnborg <sam@...>
Date: Sunday, February 10, 2008 - 7:38 am

Hi, Dave,

I did not see your email, until just now. I've posted a patch at
http://lkml.org/lkml/2008/2/10/26. Avi has acked it

Balbir
--

To: Dave Hansen <haveblue@...>
Cc: Avi Kivity <avi@...>, linux-kernel@vger.kernel.org <linux-kernel@...>, kvm-devel <kvm-devel@...>
Date: Sunday, February 10, 2008 - 6:50 am

See rationale in Documentation/kbuild/kconfig-language.txt - last chapter.
In this case the select was just placed wrongly.

Sam
--

To: Dave Hansen <haveblue@...>
Cc: Avi Kivity <avi@...>, linux-kernel@vger.kernel.org <linux-kernel@...>, kvm-devel <kvm-devel@...>, Sam Ravnborg <sam@...>
Date: Saturday, February 9, 2008 - 5:24 pm

i think it might be better to just move the select to after the "config
X86" option. (this is a legitimate use of select) Sam, do you concur?

(but, your current fix should go in ASAP, so no objections from me.)

Ingo
--

To: Ingo Molnar <mingo@...>
Cc: Dave Hansen <haveblue@...>, Avi Kivity <avi@...>, linux-kernel@vger.kernel.org <linux-kernel@...>, kvm-devel <kvm-devel@...>
Date: Sunday, February 10, 2008 - 6:49 am

Correct.
We should see it used like this:

config X86
select HAVE_KVM

Sam
--

Previous thread: jffs2 summary buffer by michael on Saturday, February 9, 2008 - 4:46 pm. (1 message)

Next thread: [PATCH][RFC] Remove "obsolete" digiepca content. by Robert P. J. Day on Saturday, February 9, 2008 - 5:45 pm. (4 messages)