Skip to contentSkip to conversation

config: Add 'make kvmconfig'

PATCH In review Sasha Levin 9 participants 30 messages Oct 27, 2011 – Nov 2, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config: Add 'make kvmconfig'

This patch adds 'make kvmconfig' which allows to add KVM guest support to a config file.

This allows for easier testing of configurations under virtualized environments.

---

Updated sym list to include everything required when starting from 'make allnoconfig' plus KGDB support.

 arch/x86/Kconfig         |   27 +++++++++++++++++++++++++++
 scripts/kconfig/Makefile |    6 +++++-
 2 files changed, 32 insertions(+), 1 deletions(-)
arch/x86/Kconfig +27 -0
index 6a47bb2..0b74528 100644
@@ -520,6 +520,33 @@ config SCHED_OMIT_FRAME_POINTER
 
 	  If in doubt, say "Y".
 
+config KVMTOOL_TEST_ENABLE
+	bool "Enable options to create a bootable tools/kvm/ kernel"
+	select NET
+	select NETDEVICES
+	select PCI
+	select BLK_DEV
+	select NETWORK_FILESYSTEMS
+	select INET
+	select EXPERIMENTAL
+	select SERIAL_8250
+	select SERIAL_8250_CONSOLE
+	select IP_PNP
+	select IP_PNP_DHCP
+	select BINFMT_ELF
+	select PCI_MSI
+	select KGDB
+	select KGDB_SERIAL_CONSOLE
+	select VIRTIO
+	select VIRTIO_RING
+	select VIRTIO_PCI
+	select VIRTIO_BLK
+	select VIRTIO_CONSOLE
+	select VIRTIO_NET
+	select 9P_FS
+	select NET_9P
+	select NET_9P_VIRTIO
+
 menuconfig PARAVIRT_GUEST
 	bool "Paravirtualized guest support"
 	---help---
scripts/kconfig/Makefile +5 -1
index 82d2eb2..356e551 100644
@@ -3,7 +3,7 @@
 # These targets are used from top-level makefile
 
 PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
-	localmodconfig localyesconfig
+	localmodconfig localyesconfig kvmconfig
 
 ifdef KBUILD_KCONFIG
 Kconfig := $(KBUILD_KCONFIG)
@@ -33,6 +33,10 @@ silentoldconfig: $(obj)/conf
 	$(Q)mkdir -p include/generated
 	$< --$@ $(Kconfig)
 
+kvmconfig:
+	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/config -e KVMTOOL_TEST_ENABLE
+	@echo 'Kernel configuration modified to run as KVM guest.'
+
 # if no path is given, then use src directory to find file
 ifdef LSMOD
 LSMOD_F := $(LSMOD)
Signature · 1 line
1.7.7.1
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Sasha Levin

This patch adds 'make kvmconfig' which allows to add KVM guest support to a config file.

This allows for easier testing of configurations under virtualized environments.

Quoted 8 lines

Btw, Michal, if people are OK with the patch I'd really love to take this patch in my kvmtool git tree to have it contained in a single pull request.

Quoted 80 lines

---

Updated sym list to include everything required when starting from 'make allnoconfig' plus KGDB support.

 arch/x86/Kconfig         |   27 +++++++++++++++++++++++++++ scripts/kconfig/Makefile |    6 +++++-

 2 files changed, 32 insertions(+), 1 deletions(-)
arch/x86/Kconfig +0 -0
index 6a47bb2..0b74528 100644
@@ -520,6 +520,33 @@ config SCHED_OMIT_FRAME_POINTER
 

         If in doubt, say "Y".

arch/x86/Kconfig +27 -0
+config KVMTOOL_TEST_ENABLE
+       bool "Enable options to create a bootable tools/kvm/ kernel"
+       select NET
+       select NETDEVICES
+       select PCI
+       select BLK_DEV
+       select NETWORK_FILESYSTEMS
+       select INET
+       select EXPERIMENTAL
+       select SERIAL_8250
+       select SERIAL_8250_CONSOLE
+       select IP_PNP
+       select IP_PNP_DHCP
+       select BINFMT_ELF
+       select PCI_MSI
+       select KGDB
+       select KGDB_SERIAL_CONSOLE
+       select VIRTIO
+       select VIRTIO_RING
+       select VIRTIO_PCI
+       select VIRTIO_BLK
+       select VIRTIO_CONSOLE
+       select VIRTIO_NET
+       select 9P_FS
+       select NET_9P
+       select NET_9P_VIRTIO
+

 menuconfig PARAVIRT_GUEST
       bool "Paravirtualized guest support"
       ---help---

scripts/kconfig/Makefile +1 -1
index 82d2eb2..356e551 100644
@@ -3,7 +3,7 @@
  # These targets are used from top-level makefile
 
  PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \
-       localmodconfig localyesconfig
+       localmodconfig localyesconfig kvmconfig
 

 ifdef KBUILD_KCONFIG
 Kconfig := $(KBUILD_KCONFIG)

scripts/kconfig/Makefile +0 -0
@@ -33,6 +33,10 @@ silentoldconfig: $(obj)/conf

       $(Q)mkdir -p include/generated
       $< --$@ $(Kconfig)

scripts/kconfig/Makefile +4 -0
+kvmconfig:
+       $(Q)$(CONFIG_SHELL) $(srctree)/scripts/config -e KVMTOOL_TEST_ENABLE
+       @echo 'Kernel configuration modified to run as KVM guest.'
+
 # if no path is given, then use src directory to find file
 ifdef LSMOD
 LSMOD_F := $(LSMOD)
--
1.7.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Acked-by
#2 lore raw
Quoted 16 lines · Pekka Enberg
Quoted 6 lines · Sasha Levin

This patch adds 'make kvmconfig' which allows to add KVM guest support to a config file.

This allows for easier testing of configurations under virtualized environments.

Quoted 8 lines
Quoted 5 lines

Btw, Michal, if people are OK with the patch I'd really love to take this patch in my kvmtool git tree to have it contained in a single pull request.

I like the feature - i hope it's expressed in the right Kbuild-ish fashion.

Thanks,

Ingo

#3 lore raw
Quoted 21 lines · Ingo Molnar
Quoted 18 lines · Pekka Enberg
Quoted 6 lines · Sasha Levin

This patch adds 'make kvmconfig' which allows to add KVM guest support to a config file.

This allows for easier testing of configurations under virtualized environments.

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

Btw, Michal, if people are OK with the patch I'd really love to take this patch in my kvmtool git tree to have it contained in a single pull request.

I like the feature - i hope it's expressed in the right Kbuild-ish fashion.

I hope we won't now also be getting make nfsconfig, make paeconfig and whatnot :). Also, the lists of select statements might need updates from time to time, if new dependencies appear.

Michal

#4 lore raw
Quoted 26 lines · Michal Marek
Quoted 25 lines · Ingo Molnar
Quoted 21 lines · Pekka Enberg
Quoted 6 lines · Sasha Levin

This patch adds 'make kvmconfig' which allows to add KVM guest support to a config file.

This allows for easier testing of configurations under virtualized environments.

Quoted 8 lines

Btw, Michal, if people are OK with the patch I'd really love to take this patch in my kvmtool git tree to have it contained in a single pull request.

Quoted 7 lines
Quoted 4 lines

I like the feature - i hope it's expressed in the right Kbuild-ish fashion.

I hope we won't now also be getting make nfsconfig, make paeconfig and whatnot :).

;-)

Well, we could make any such future naming fit into it naturally. 'make defconfig kvm' perhaps?

Quoted 2 lines

[...] Also, the lists of select statements might need updates from time to time, if new dependencies appear.

Yeah, correct.

I have a similar solution myself, a 'make ingoconfig' in essence, to make stuff boot on my test-boxes - and updates are needed every now and then - about once a year. It's manageable.

Thanks,

Ingo

#5 lore raw
In reply to Michal Marek
Quoted 8 lines · Michal Marek
Quoted 4 lines

I like the feature - i hope it's expressed in the right Kbuild-ish fashion.

I hope we won't now also be getting make nfsconfig, make paeconfig and whatnot :). Also, the lists of select statements might need updates from time to time, if new dependencies appear.

The use case is to be able to take a .config posted in a bug report and easily turn that into something that the KVM tool can boot.

"kvmconfig" really represents a virtualized x86 architecture configuration. Maybe the naming is off because it's not about individual features like paeconfig or nfsconfig would be but rather about turning on all the required options for virtualized x86 for the KVM tool.

If you have better ideas how to do this, we're happy to change the implementation.

Pekka

#6 lore raw
Quoted 10 lines · Pekka Enberg
Quoted 8 lines · Michal Marek
Quoted 4 lines

I like the feature - i hope it's expressed in the right Kbuild-ish fashion.

I hope we won't now also be getting make nfsconfig, make paeconfig and whatnot :). Also, the lists of select statements might need updates from time to time, if new dependencies appear.

Quoted 8 lines

The use case is to be able to take a .config posted in a bug report and easily turn that into something that the KVM tool can boot.

"kvmconfig" really represents a virtualized x86 architecture configuration. Maybe the naming is off because it's not about individual features like paeconfig or nfsconfig would be but rather about turning on all the required options for virtualized x86 for the KVM tool.

OK, if it's just this single use case, then why not.

Quoted 2 lines

If you have better ideas how to do this, we're happy to change the implementation.

The implementation is not as important as the new user interface that people get used to. And I think the user interface is OK. Regarding implementation, expect that you'll have to add more select statements from time to time. But there is ATM no better solution to this.

Michal

#7 lore raw

Hi,

Quoted 14 lines · Michal Marek
Quoted 13 lines · Pekka Enberg
Quoted 8 lines · Michal Marek
Quoted 4 lines

I like the feature - i hope it's expressed in the right Kbuild-ish fashion.

I hope we won't now also be getting make nfsconfig, make paeconfig and whatnot :). Also, the lists of select statements might need updates from time to time, if new dependencies appear.

The use case is to be able to take a .config posted in a bug report and easily turn that into something that the KVM tool can boot.

Quoted 8 lines
Quoted 5 lines

"kvmconfig" really represents a virtualized x86 architecture configuration. Maybe the naming is off because it's not about individual features like paeconfig or nfsconfig would be but rather about turning on all the required options for virtualized x86 for the KVM tool.

OK, if it's just this single use case, then why not.

Still, it should not be a pretext to open the Pendora's box and have 15 different hack popping up in the future.

Quoted 8 lines
Quoted 2 lines

If you have better ideas how to do this, we're happy to change the implementation.

The implementation is not as important as the new user interface that people get used to. And I think the user interface is OK. Regarding implementation, expect that you'll have to add more select statements from time to time. But there is ATM no better solution to this.

what about providing hook for sourcing a given Makefile ? I can have a look at that tonight.

- Arnaud

Quoted 6 lines

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

#8 lore raw
In reply to Pekka Enberg

Hi,

Quoted 10 lines · Pekka Enberg
Quoted 8 lines · Michal Marek
Quoted 4 lines

I like the feature - i hope it's expressed in the right Kbuild-ish fashion.

I hope we won't now also be getting make nfsconfig, make paeconfig and whatnot :). Also, the lists of select statements might need updates from time to time, if new dependencies appear.

Quoted 6 lines

The use case is to be able to take a .config posted in a bug report and easily turn that into something that the KVM tool can boot.

"kvmconfig" really represents a virtualized x86 architecture configuration.

How do you expect:

# make ARCH=hexagon kvmconfig

to behave ? If it is not meant to work outside the x86 world, it should not be accessible outside the x86 world.

Quoted 8 lines

Maybe the naming is off because it's not about
individual features like paeconfig or nfsconfig would be but rather about turning on all the required options for virtualized x86 for the KVM tool.

If you have better ideas how to do this, we're happy to change the implementation.

As I said, I'll have a look tonight to provide a better implementation.

- Arnaud

Quoted 6 lines

                       Pekka
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

#9 lore raw
Quoted 6 lines · Arnaud Lacombe
Quoted 6 lines

The use case is to be able to take a .config posted in a bug report and easily turn that into something that the KVM tool can boot.

"kvmconfig" really represents a virtualized x86 architecture configuration.

Quoted 6 lines

How do you expect:

# make ARCH=hexagon kvmconfig

to behave ? If it is not meant to work outside the x86 world, it should not be accessible outside the x86 world.

Right. Hexagon is not interesting but ARM and PowerPC will be if someone ports the KVM tool to the architectures.

Quoted 9 lines
Quoted 8 lines

Maybe the naming is off because it's not about
individual features like paeconfig or nfsconfig would be but rather about turning on all the required options for virtualized x86 for the KVM tool.

If you have better ideas how to do this, we're happy to change the implementation.

As I said, I'll have a look tonight to provide a better implementation.

Excellent, thanks!

Pekka

#10 lore raw
In reply to Sasha Levin
Quoted 18 lines · Sasha Levin

+config KVMTOOL_TEST_ENABLE
+       bool "Enable options to create a bootable tools/kvm/ kernel"
+       select NET
+       select NETDEVICES
+       select PCI
+       select BLK_DEV
+       select NETWORK_FILESYSTEMS
+       select INET
+       select EXPERIMENTAL
+       select SERIAL_8250
+       select SERIAL_8250_CONSOLE
+       select IP_PNP
+       select IP_PNP_DHCP
+       select BINFMT_ELF
+       select PCI_MSI
+       select KGDB
+       select KGDB_SERIAL_CONSOLE
+       select VIRTIO

Quoted 8 lines

+       select VIRTIO_RING
+       select VIRTIO_PCI
+       select VIRTIO_BLK
+       select VIRTIO_CONSOLE
+       select VIRTIO_NET
+       select 9P_FS
+       select NET_9P
+       select NET_9P_VIRTIO

This lot doesn't seem to be enough for me on next-20111025. I seem to have to also enable CONFIG_FB_VESA for the kernel to boot.

Without CONFIG_FB_VESA, I just get:

$ tools/kvm/kvm run --debug arch/x86/boot/bzImage --disk
~/kernel/linux-0.2.img
  # kvm run -k arch/x86/boot/bzImage -m 448 -c 4 --name guest-11466
PPrroobbiinngg  EEDDDD  ((eedddd==ooffff  ttoo  ddiissaabbllee))......  ookk
<no more output>
#12 lore raw
In reply to Sasha Levin
Quoted 6 lines · Sasha Levin

This patch adds 'make kvmconfig' which allows to add KVM guest support to a config file.

This allows for easier testing of configurations under virtualized environments.

Quoted 8 lines

Two points about the implmentation that I do not like...

The kvmconfig is an x86 specific thing - so it does not belong in the scripts/kconfig/Makefile

The *config namespace is general config targets.

Suggestion:
Move the implmentation to arch/x86/Makefile and name the target something that does not match the *config pattern.

Suggestion:

make kvmbootable

To tell that this convert the current config to a kvmbootable config.

And then add the target to the x86 specific help too.

Sam

#11 lore raw
In reply to Rabin Vincent
Quoted 31 lines · Rabin Vincent
Quoted 16 lines · Sasha Levin
arch/x86/Kconfig +16 -0
+config KVMTOOL_TEST_ENABLE
+       bool "Enable options to create a bootable tools/kvm/ kernel"
+       select NET
+       select NETDEVICES
+       select PCI
+       select BLK_DEV
+       select NETWORK_FILESYSTEMS
+       select INET
+       select EXPERIMENTAL
+       select SERIAL_8250
+       select SERIAL_8250_CONSOLE
+       select IP_PNP
+       select IP_PNP_DHCP
+       select BINFMT_ELF
+       select PCI_MSI
+       select KGDB

arch/x86/Kconfig config SCHED_OMIT_FRAME_POINTER · line 548

Quoted 10 lines
arch/x86/Kconfig +10 -0
+       select KGDB_SERIAL_CONSOLE
+       select VIRTIO
+       select VIRTIO_RING
+       select VIRTIO_PCI
+       select VIRTIO_BLK
+       select VIRTIO_CONSOLE
+       select VIRTIO_NET
+       select 9P_FS
+       select NET_9P
+       select NET_9P_VIRTIO

This lot doesn't seem to be enough for me on next-20111025. I seem to have to also enable CONFIG_FB_VESA for the kernel to boot.

Quoted 7 lines

Without CONFIG_FB_VESA, I just get:

$ tools/kvm/kvm run --debug arch/x86/boot/bzImage --disk
~/kernel/linux-0.2.img
  # kvm run -k arch/x86/boot/bzImage -m 448 -c 4 --name guest-11466
PPrroobbiinngg  EEDDDD  ((eedddd==ooffff  ttoo  ddiissaabbllee))......  ookk
<no more output>

This is a kvm tools issue and should be fixed within kvm tools.

Signature · 1 line
Sasha.
#13 lore raw
In reply to Sam Ravnborg
Quoted 27 lines · Sam Ravnborg
Quoted 6 lines · Sasha Levin

This patch adds 'make kvmconfig' which allows to add KVM guest support to a config file.

This allows for easier testing of configurations under virtualized environments.

Quoted 8 lines

Two points about the implmentation that I do not like...

The kvmconfig is an x86 specific thing - so it does not belong in the scripts/kconfig/Makefile

The *config namespace is general config targets.

Suggestion:
Move the implmentation to arch/x86/Makefile and name the target something that does not match the *config pattern.

Quoted 7 lines

Suggestion:

make kvmbootable

To tell that this convert the current config to a kvmbootable config.

And then add the target to the x86 specific help too.

KVM itself is not x86 specific (although this patch obviously is), so we'd like to keep at least the naming non-x86.

Furthermore, the functionality generally fits into the pattern that 'oldconfig' does: it changes an existing config - so having 'config' in the name somewhere makes quite a bit of sense. If i didn't know what 'kvmbootable' does i couldnt guess that it touches the .config - while the *config pattern makes that patently obvious.

Could we set aside some sort of name for such subsystem specific purposes and be done with it? Could we reuse the 'defconfig' naming perhaps and make it richer:

make defconfig kvm

or:

make defconfig-kvm

? It would be very obvious at a glance what it does.

Thanks,

Ingo

#14 lore raw
Quoted 50 lines · Ingo Molnar
Quoted 27 lines · Sam Ravnborg
Quoted 6 lines · Sasha Levin

This patch adds 'make kvmconfig' which allows to add KVM guest support to a config file.

This allows for easier testing of configurations under virtualized environments.

Quoted 8 lines

Two points about the implmentation that I do not like...

The kvmconfig is an x86 specific thing - so it does not belong in the scripts/kconfig/Makefile

The *config namespace is general config targets.

Suggestion:
Move the implmentation to arch/x86/Makefile and name the target something that does not match the *config pattern.

Quoted 7 lines

Suggestion:

make kvmbootable

To tell that this convert the current config to a kvmbootable config.

And then add the target to the x86 specific help too.

KVM itself is not x86 specific (although this patch obviously is), so we'd like to keep at least the naming non-x86.

Furthermore, the functionality generally fits into the pattern that 'oldconfig' does: it changes an existing config - so having 'config' in the name somewhere makes quite a bit of sense. If i didn't know what 'kvmbootable' does i couldnt guess that it touches the .config - while the *config pattern makes that patently obvious.

Could we set aside some sort of name for such subsystem specific purposes and be done with it? Could we reuse the 'defconfig' naming perhaps and make it richer:

Quoted 7 lines

make defconfig kvm

or:

make defconfig-kvm

? It would be very obvious at a glance what it does.

We can possibly make 'make defconfig abc' run arch specific script located next to the defconfig files (arch/$(ARCH)/configs/).

It would both solve the problem with being arch specific, and would allow for future expansion of other 'kvm defconfig' options.

Signature · 1 line
Sasha.
#15 lore raw
Quoted 4 lines · Sasha Levin
Quoted 1 line

? It would be very obvious at a glance what it does.

We can possibly make 'make defconfig abc' run arch specific script located next to the defconfig files (arch/$(ARCH)/configs/).

AFAICS that's not the same as the current kvmconfig functionality
though: we want to minimally enable certain config options in the current .config - not pick some default config.

My main usecase for this is that i want to minimally change .config's that get mailed to me, to reproduce a bug reporter's kernel as closely as possible - and be able to boot it in KVM.

It's a straightforward, very useful feature, i've been using my own similar hack to do something similar for years and it works very well.

Thanks,

Ingo

#16 lore raw
Quoted 10 lines · Ingo Molnar
Quoted 4 lines · Sasha Levin
Quoted 1 line

? It would be very obvious at a glance what it does.

We can possibly make 'make defconfig abc' run arch specific script located next to the defconfig files (arch/$(ARCH)/configs/).

AFAICS that's not the same as the current kvmconfig functionality
though: we want to minimally enable certain config options in the current .config - not pick some default config.

Yup, I wasn't planning on it to work like defconfig does where it just uses a default config, thats why I said 'run arch specific script' :)

That script could either copy over a default config, or simply add config options like what we're interested in doing.

Signature · 1 line
Sasha.
#18 lore raw
In reply to Ingo Molnar
Quoted 31 lines · Ingo Molnar
Quoted 9 lines · Sam Ravnborg

The kvmconfig is an x86 specific thing - so it does not belong in the scripts/kconfig/Makefile

The *config namespace is general config targets.

Suggestion:
Move the implmentation to arch/x86/Makefile and name the target something that does not match the *config pattern.

Quoted 7 lines

Suggestion:

   make kvmbootable

To tell that this convert the current config to a kvmbootable config.

And then add the target to the x86 specific help too.

KVM itself is not x86 specific (although this patch obviously is), so we'd like to keep at least the naming non-x86.

Furthermore, the functionality generally fits into the pattern that 'oldconfig' does: it changes an existing config - so having 'config' in the name somewhere makes quite a bit of sense. If i didn't know what 'kvmbootable' does i couldnt guess that it touches the .config - while the *config pattern makes that patently obvious.

Could we set aside some sort of name for such subsystem specific purposes and be done with it? Could we reuse the 'defconfig' naming perhaps and make it richer:

Quoted 7 lines

       make defconfig kvm

or:

       make defconfig-kvm

? It would be very obvious at a glance what it does.

This fits in the generic "I have a .config and I want to enable an additional option" functionality:

make oldconfig CONFIG_KVMTOOL_TEST_ENABLE=y

Don't we already have that support? I seem to remember it flying by. Or was it just a proposal that never got implemented?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds

#17 lore raw
In reply to Sasha Levin
Quoted 12 lines · Sasha Levin
Quoted 10 lines · Ingo Molnar
Quoted 4 lines · Sasha Levin
Quoted 1 line

? It would be very obvious at a glance what it does.

We can possibly make 'make defconfig abc' run arch specific script located next to the defconfig files (arch/$(ARCH)/configs/).

AFAICS that's not the same as the current kvmconfig functionality
though: we want to minimally enable certain config options in the current .config - not pick some default config.

Quoted 6 lines

Yup, I wasn't planning on it to work like defconfig does where it just uses a default config, thats why I said 'run arch specific script' :)

That script could either copy over a default config, or simply add config options like what we're interested in doing.

i'd be fine with that extension to defconfig functionality. It in fact makes much more sense than the *current* defconfig functionality which is kind of a joke (as it's really just an arbitrary config).

Thanks,

Ingo

#19 lore raw
In reply to Geert Uytterhoeven
Quoted 9 lines · Geert Uytterhoeven
Quoted 1 line

? It would be very obvious at a glance what it does.

This fits in the generic "I have a .config and I want to enable an additional option" functionality:

make oldconfig CONFIG_KVMTOOL_TEST_ENABLE=y

Don't we already have that support? I seem to remember it flying by. Or was it just a proposal that never got implemented?

Well, it would be nice to have something (much) shorter and more obvious, as we really expect to use this frequently.

Maybe:

make oldconfig kvm

would work too.

Thanks,

Ingo

#29 lore raw
In reply to Geert Uytterhoeven
Quoted 40 lines · Geert Uytterhoeven
Quoted 31 lines · Ingo Molnar
Quoted 9 lines · Sam Ravnborg

The kvmconfig is an x86 specific thing - so it does not belong in the scripts/kconfig/Makefile

The *config namespace is general config targets.

Suggestion:
Move the implmentation to arch/x86/Makefile and name the target something that does not match the *config pattern.

Quoted 7 lines

Suggestion:

make kvmbootable

To tell that this convert the current config to a kvmbootable config.

And then add the target to the x86 specific help too.

KVM itself is not x86 specific (although this patch obviously is), so we'd like to keep at least the naming non-x86.

Furthermore, the functionality generally fits into the pattern that 'oldconfig' does: it changes an existing config - so having 'config' in the name somewhere makes quite a bit of sense. If i didn't know what 'kvmbootable' does i couldnt guess that it touches the .config - while the *config pattern makes that patently obvious.

Could we set aside some sort of name for such subsystem specific purposes and be done with it? Could we reuse the 'defconfig' naming perhaps and make it richer:

Quoted 7 lines

make defconfig kvm

or:

make defconfig-kvm

? It would be very obvious at a glance what it does.

Quoted 7 lines

This fits in the generic "I have a .config and I want to enable an additional option" functionality:

make oldconfig CONFIG_KVMTOOL_TEST_ENABLE=y

Don't we already have that support? I seem to remember it flying by. Or was it just a proposal that never got implemented?

AFAIK it never got merged.

Signature · 1 line
Sasha.
#20 lore raw
In reply to Ingo Molnar
Quoted 13 lines · Ingo Molnar
Quoted 9 lines · Geert Uytterhoeven
Quoted 1 line

? It would be very obvious at a glance what it does.

This fits in the generic "I have a .config and I want to enable an additional option" functionality:

make oldconfig CONFIG_KVMTOOL_TEST_ENABLE=y

Don't we already have that support? I seem to remember it flying by. Or was it just a proposal that never got implemented?

Quoted 6 lines

Well, it would be nice to have something (much) shorter and more obvious, as we really expect to use this frequently.

Maybe:

make oldconfig kvm

Maybe something more obvious?:
make modconfig kvm
or
make modconfig=kvm

That would also fit nicely for future addition.

Bis denn

Signature · 4 lines
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.
#21 lore raw
Quoted 17 lines · Matthias Schniedermeyer
Quoted 16 lines · Ingo Molnar
Quoted 9 lines · Geert Uytterhoeven
Quoted 1 line

? It would be very obvious at a glance what it does.

This fits in the generic "I have a .config and I want to enable an additional option" functionality:

make oldconfig CONFIG_KVMTOOL_TEST_ENABLE=y

Don't we already have that support? I seem to remember it flying by. Or was it just a proposal that never got implemented?

Well, it would be nice to have something (much) shorter and more obvious, as we really expect to use this frequently.

Quoted 8 lines
Quoted 3 lines

Maybe:

make oldconfig kvm

Maybe something more obvious?:
make modconfig kvm
or
make modconfig=kvm

Well, i run distinctly non-modular kernels so modconfig would not be particularly good. Also, many of the features enabled are non-modular core kernel features to begin with.

But i don't particularly care about how it's named, as long as there's a sane and obvious shortcut for it.

Thanks,

Ingo

#22 lore raw
Quoted 24 lines · Ingo Molnar
Quoted 21 lines · Matthias Schniedermeyer
Quoted 19 lines · Ingo Molnar
Quoted 9 lines · Geert Uytterhoeven
Quoted 1 line

? It would be very obvious at a glance what it does.

This fits in the generic "I have a .config and I want to enable an additional option" functionality:

make oldconfig CONFIG_KVMTOOL_TEST_ENABLE=y

Don't we already have that support? I seem to remember it flying by. Or was it just a proposal that never got implemented?

Well, it would be nice to have something (much) shorter and more obvious, as we really expect to use this frequently.

Maybe:

make oldconfig kvm

Quoted 8 lines
Quoted 4 lines

Maybe something more obvious?:
make modconfig kvm
or
make modconfig=kvm

Well, i run distinctly non-modular kernels so modconfig would not be particularly good. Also, many of the features enabled are non-modular core kernel features to begin with.

I thougt about that just as i send the e-mail, to near to "mod"ular. What i meant was "mod"ify.

And AFAICS there currently is no "modconfig", only an "allmodconfig" (and "localmodconfig")

With no letters dropped it would be less ambiguous. make modifyconfig=kvm

Bis denn

Signature · 4 lines
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.
#23 lore raw
Quoted 5 lines · Matthias Schniedermeyer

And AFAICS there currently is no "modconfig", only an "allmodconfig" (and "localmodconfig")

With no letters dropped it would be less ambiguous. make modifyconfig=kvm

Yeah. Note that it's more like an 'add' operation, not a modify operation, thus:

make addconfig=kvm

or:

make addconfig kvm

would be intuitive and would work well too.

Sam, Michal, which one would you prefer? The latter might have the advantage that it's additive, enabling future usages like:

make addconfig kvm debug

as a quick shortcut to enable baseline KVM support and generic kernel debugging features, without having to twiddle with the menuconfig.

Hm? Would be nice to move on this issue, we've painted it to death already ;-)

Thanks,

Ingo

#24 lore raw
Quoted 16 lines · Ingo Molnar
Quoted 5 lines · Matthias Schniedermeyer

And AFAICS there currently is no "modconfig", only an "allmodconfig" (and "localmodconfig")

With no letters dropped it would be less ambiguous. make modifyconfig=kvm

Yeah. Note that it's more like an 'add' operation, not a modify operation, thus:

make addconfig=kvm

or:

Quoted 8 lines

make addconfig kvm

would be intuitive and would work well too.

Sam, Michal, which one would you prefer? The latter might have the advantage that it's additive, enabling future usages like:

make addconfig kvm debug

The problem is that neither of these fit into the make command syntax:

make addconfig kvm debug

tells make to build three different targets, and

make addconfig=kvm

tells make to create a variable named addconfig with the value kvm and build the default target. And BTW, you or someone else reassured me earlier in the thread that this is going to be needed for the kvm case solely, so why are you inventing something generic now? :)

Michal

#25 lore raw
Quoted 32 lines · Michal Marek
Quoted 16 lines · Ingo Molnar
Quoted 5 lines · Matthias Schniedermeyer

And AFAICS there currently is no "modconfig", only an "allmodconfig" (and "localmodconfig")

With no letters dropped it would be less ambiguous. make modifyconfig=kvm

Yeah. Note that it's more like an 'add' operation, not a modify operation, thus:

make addconfig=kvm

or:

Quoted 8 lines

make addconfig kvm

would be intuitive and would work well too.

Sam, Michal, which one would you prefer? The latter might have the advantage that it's additive, enabling future usages like:

make addconfig kvm debug

The problem is that neither of these fit into the make command syntax:

make addconfig kvm debug

tells make to build three different targets, and

Quoted 7 lines

make addconfig=kvm

tells make to create a variable named addconfig with the value kvm and build the default target. And BTW, you or someone else reassured me earlier in the thread that this is going to be needed for the kvm case solely, so why are you inventing something generic now? :)

Because we are trying to find *something* that is both usable and which you guys are willing to ack.

So what's your suggestion? Is 'make kvmconfig' OK? It certainly is intuitive and useful to us and we could move on to more important things to discuss.

Thanks,

Ingo

#26 lore raw
Quoted 32 lines · Ingo Molnar
Quoted 23 lines · Michal Marek
Quoted 7 lines · Ingo Molnar

Yeah. Note that it's more like an 'add' operation, not a modify operation, thus:

make addconfig=kvm

or:

Quoted 8 lines

make addconfig kvm

would be intuitive and would work well too.

Sam, Michal, which one would you prefer? The latter might have the advantage that it's additive, enabling future usages like:

make addconfig kvm debug

The problem is that neither of these fit into the make command syntax:

make addconfig kvm debug

tells make to build three different targets, and

Quoted 7 lines

make addconfig=kvm

tells make to create a variable named addconfig with the value kvm and build the default target. And BTW, you or someone else reassured me earlier in the thread that this is going to be needed for the kvm case solely, so why are you inventing something generic now? :)

Quoted 4 lines

Because we are trying to find *something* that is both usable and which you guys are willing to ack.

So what's your suggestion? Is 'make kvmconfig' OK?

As I said, make kvmconfig is fine with me, if it's just this single case.

Michal

#27 lore raw
Quoted 33 lines · Michal Marek
Quoted 32 lines · Ingo Molnar
Quoted 30 lines · Michal Marek
Quoted 7 lines · Ingo Molnar

Yeah. Note that it's more like an 'add' operation, not a modify operation, thus:

make addconfig=kvm

or:

Quoted 8 lines

make addconfig kvm

would be intuitive and would work well too.

Sam, Michal, which one would you prefer? The latter might have the advantage that it's additive, enabling future usages like:

make addconfig kvm debug

The problem is that neither of these fit into the make command syntax:

make addconfig kvm debug

tells make to build three different targets, and

make addconfig=kvm

tells make to create a variable named addconfig with the value kvm and build the default target. And BTW, you or someone else reassured me earlier in the thread that this is going to be needed for the kvm case solely, so why are you inventing something generic now? :)

Quoted 8 lines
Quoted 4 lines

Because we are trying to find *something* that is both usable and which you guys are willing to ack.

So what's your suggestion? Is 'make kvmconfig' OK?

As I said, make kvmconfig is fine with me, if it's just this single case.

Michal

Great, thanks!

Ingo

#28 lore raw
Quoted 3 lines · Ingo Molnar
Quoted 1 line

As I said, make kvmconfig is fine with me, if it's just this single case.

Great, thanks!

I applied Sasha's patch. We're happy to revisit the Kbuild changes if someone comes up with something more generic in the future.

Pekka