public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel
       [not found]   ` <20130414110320.GB20547@pd.tnic>
@ 2013-04-16 16:18     ` Borislav Petkov
  2013-04-17  0:38       ` Sasha Levin
  2013-04-17 23:25       ` Marcelo Tosatti
  0 siblings, 2 replies; 14+ messages in thread
From: Borislav Petkov @ 2013-04-16 16:18 UTC (permalink / raw)
  To: Pekka Enberg
  Cc: Ingo Molnar, H. Peter Anvin, Sasha Levin, Fengguang Wu, lkml,
	x86-ml, kvm

On Sun, Apr 14, 2013 at 01:03:20PM +0200, Borislav Petkov wrote:
> On Sun, Apr 14, 2013 at 12:31:12PM +0300, Pekka Enberg wrote:
> > I obviously support having something like this in mainline. I wonder
> > though if we could just call this "default standalone KVM guest
> > config" instead of emphasizing testing angle.
> 
> /me nods agreeingly...
> 
> And it should be unter HYPERVISOR_GUEST where the rest of this stuff
> resides. Good point.

Sanity check question:

Why not add the select stuff, i.e. this:

	select NET
	select NETDEVICES
	select PCI
	select BLOCK
	select BLK_DEV
	select NETWORK_FILESYSTEMS
	select INET
	select EXPERIMENTAL
	select TTY
	select SERIAL_8250
	select SERIAL_8250_CONSOLE
	select IP_PNP
	select IP_PNP_DHCP
	select BINFMT_ELF
	select PCI_MSI
	select HAVE_ARCH_KGDB
	select DEBUG_KERNEL
	select KGDB
	select KGDB_SERIAL_CONSOLE
	select VIRTUALIZATION
	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

to the option below which we already have. It is in the same sense a KVM
guest support deal.

Hmm.

KVM people, any objections?

config KVM_GUEST
        bool "KVM Guest support (including kvmclock)"
        depends on PARAVIRT
        select PARAVIRT_CLOCK
        default y
        ---help---
          This option enables various optimizations for running under the KVM
          hypervisor. It includes a paravirtualized clock, so that instead
          of relying on a PIT (or probably other) emulation by the
          underlying device model, the host provides the guest with
          timing infrastructure such as time of day, and system time

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel
  2013-04-16 16:18     ` [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel Borislav Petkov
@ 2013-04-17  0:38       ` Sasha Levin
  2013-04-17  7:50         ` Borislav Petkov
  2013-04-17 23:25       ` Marcelo Tosatti
  1 sibling, 1 reply; 14+ messages in thread
From: Sasha Levin @ 2013-04-17  0:38 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Pekka Enberg, Ingo Molnar, H. Peter Anvin, Fengguang Wu, lkml,
	x86-ml, kvm

On 04/16/2013 12:18 PM, Borislav Petkov wrote:
> On Sun, Apr 14, 2013 at 01:03:20PM +0200, Borislav Petkov wrote:
>> On Sun, Apr 14, 2013 at 12:31:12PM +0300, Pekka Enberg wrote:
>>> I obviously support having something like this in mainline. I wonder
>>> though if we could just call this "default standalone KVM guest
>>> config" instead of emphasizing testing angle.
>>
>> /me nods agreeingly...
>>
>> And it should be unter HYPERVISOR_GUEST where the rest of this stuff
>> resides. Good point.
> 
> Sanity check question:
> 
> Why not add the select stuff, i.e. this:
> 
> 	select NET
> 	select NETDEVICES
> 	select PCI
> 	select BLOCK
> 	select BLK_DEV
> 	select NETWORK_FILESYSTEMS
> 	select INET
> 	select EXPERIMENTAL
> 	select TTY
> 	select SERIAL_8250
> 	select SERIAL_8250_CONSOLE
> 	select IP_PNP
> 	select IP_PNP_DHCP
> 	select BINFMT_ELF
> 	select PCI_MSI
> 	select HAVE_ARCH_KGDB
> 	select DEBUG_KERNEL
> 	select KGDB
> 	select KGDB_SERIAL_CONSOLE
> 	select VIRTUALIZATION
> 	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
> 
> to the option below which we already have. It is in the same sense a KVM
> guest support deal.
> 
> Hmm.
> 
> KVM people, any objections?
> 
> config KVM_GUEST
>         bool "KVM Guest support (including kvmclock)"
>         depends on PARAVIRT
>         select PARAVIRT_CLOCK
>         default y
>         ---help---
>           This option enables various optimizations for running under the KVM
>           hypervisor. It includes a paravirtualized clock, so that instead
>           of relying on a PIT (or probably other) emulation by the
>           underlying device model, the host provides the guest with
>           timing infrastructure such as time of day, and system time

KVM guests don't need a serial device, KGDB, DEBUG_KERNEL or 9p in particular.


Thanks,
Sasha

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

* Re: [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel
  2013-04-17  0:38       ` Sasha Levin
@ 2013-04-17  7:50         ` Borislav Petkov
  0 siblings, 0 replies; 14+ messages in thread
From: Borislav Petkov @ 2013-04-17  7:50 UTC (permalink / raw)
  To: Sasha Levin
  Cc: Pekka Enberg, Ingo Molnar, H. Peter Anvin, Fengguang Wu, lkml,
	x86-ml, kvm

On Tue, Apr 16, 2013 at 08:38:56PM -0400, Sasha Levin wrote:
> > 	select NET
> > 	select NETDEVICES
> > 	select PCI
> > 	select BLOCK
> > 	select BLK_DEV
> > 	select NETWORK_FILESYSTEMS
> > 	select INET
> > 	select EXPERIMENTAL
> > 	select TTY
> > 	select SERIAL_8250
> > 	select SERIAL_8250_CONSOLE
> > 	select IP_PNP
> > 	select IP_PNP_DHCP
> > 	select BINFMT_ELF
> > 	select PCI_MSI
> > 	select HAVE_ARCH_KGDB
> > 	select DEBUG_KERNEL
> > 	select KGDB
> > 	select KGDB_SERIAL_CONSOLE
> > 	select VIRTUALIZATION
> > 	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
> > 
> > to the option below which we already have. It is in the same sense a KVM
> > guest support deal.
> > 
> > Hmm.
> > 
> > KVM people, any objections?
> > 
> > config KVM_GUEST
> >         bool "KVM Guest support (including kvmclock)"
> >         depends on PARAVIRT
> >         select PARAVIRT_CLOCK
> >         default y
> >         ---help---
> >           This option enables various optimizations for running under the KVM
> >           hypervisor. It includes a paravirtualized clock, so that instead
> >           of relying on a PIT (or probably other) emulation by the
> >           underlying device model, the host provides the guest with
> >           timing infrastructure such as time of day, and system time
> 
> KVM guests don't need a serial device, KGDB, DEBUG_KERNEL or 9p in particular.

Let's see:

* we need serial device for catching serial output on the host from the guest
  kernel

* KGDB - I guess this was meant to jump into the debugger when the guest crashes
  or so, we could drop it.

* DEBUG_KERNEL is also good for testing kernels
* 9p is needed for -virtfs folder sharing, AFAICT: http://wiki.qemu.org/Documentation/9psetup

So, I guess we can have another KVM_GUEST_KERNEL_TESTING option which
enables those additional, good for debugging options (except 9p - it
should be in the main thing) and which depends on KVM_GUEST. It would also
contain other DEBUG_* stuff.

Thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel
  2013-04-16 16:18     ` [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel Borislav Petkov
  2013-04-17  0:38       ` Sasha Levin
@ 2013-04-17 23:25       ` Marcelo Tosatti
  2013-04-18  9:46         ` Borislav Petkov
  1 sibling, 1 reply; 14+ messages in thread
From: Marcelo Tosatti @ 2013-04-17 23:25 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Pekka Enberg, Ingo Molnar, H. Peter Anvin, Sasha Levin,
	Fengguang Wu, lkml, x86-ml, kvm

On Tue, Apr 16, 2013 at 06:18:52PM +0200, Borislav Petkov wrote:
> On Sun, Apr 14, 2013 at 01:03:20PM +0200, Borislav Petkov wrote:
> > On Sun, Apr 14, 2013 at 12:31:12PM +0300, Pekka Enberg wrote:
> > > I obviously support having something like this in mainline. I wonder
> > > though if we could just call this "default standalone KVM guest
> > > config" instead of emphasizing testing angle.
> > 
> > /me nods agreeingly...
> > 
> > And it should be unter HYPERVISOR_GUEST where the rest of this stuff
> > resides. Good point.
> 
> Sanity check question:
> 
> Why not add the select stuff, i.e. this:
> 
> 	select NET
> 	select NETDEVICES
> 	select PCI
> 	select BLOCK
> 	select BLK_DEV
> 	select NETWORK_FILESYSTEMS
> 	select INET
> 	select EXPERIMENTAL
> 	select TTY
> 	select SERIAL_8250
> 	select SERIAL_8250_CONSOLE
> 	select IP_PNP
> 	select IP_PNP_DHCP
> 	select BINFMT_ELF
> 	select PCI_MSI
> 	select HAVE_ARCH_KGDB
> 	select DEBUG_KERNEL
> 	select KGDB
> 	select KGDB_SERIAL_CONSOLE
> 	select VIRTUALIZATION
> 	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
> 
> to the option below which we already have. It is in the same sense a KVM
> guest support deal.
> 
> Hmm.
> 
> KVM people, any objections?

None, but please don't mix it with 'KVM_GUEST' flag below. 

Actually, what about adding kvm variants of the two files at
arch/x86/configs/ ?

> config KVM_GUEST
>         bool "KVM Guest support (including kvmclock)"
>         depends on PARAVIRT
>         select PARAVIRT_CLOCK
>         default y
>         ---help---
>           This option enables various optimizations for running under the KVM
>           hypervisor. It includes a paravirtualized clock, so that instead
>           of relying on a PIT (or probably other) emulation by the
>           underlying device model, the host provides the guest with
>           timing infrastructure such as time of day, and system time

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

* Re: [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel
  2013-04-17 23:25       ` Marcelo Tosatti
@ 2013-04-18  9:46         ` Borislav Petkov
  2013-04-18  9:55           ` Geert Uytterhoeven
  2013-04-18 13:36           ` Marcelo Tosatti
  0 siblings, 2 replies; 14+ messages in thread
From: Borislav Petkov @ 2013-04-18  9:46 UTC (permalink / raw)
  To: Marcelo Tosatti
  Cc: Pekka Enberg, Ingo Molnar, H. Peter Anvin, Sasha Levin,
	Fengguang Wu, lkml, x86-ml, kvm

On Wed, Apr 17, 2013 at 08:25:07PM -0300, Marcelo Tosatti wrote:
> On Tue, Apr 16, 2013 at 06:18:52PM +0200, Borislav Petkov wrote:
> > On Sun, Apr 14, 2013 at 01:03:20PM +0200, Borislav Petkov wrote:
> > > On Sun, Apr 14, 2013 at 12:31:12PM +0300, Pekka Enberg wrote:
> > > > I obviously support having something like this in mainline. I wonder
> > > > though if we could just call this "default standalone KVM guest
> > > > config" instead of emphasizing testing angle.
> > > 
> > > /me nods agreeingly...
> > > 
> > > And it should be unter HYPERVISOR_GUEST where the rest of this stuff
> > > resides. Good point.
> > 
> > Sanity check question:
> > 
> > Why not add the select stuff, i.e. this:
> > 
> > 	select NET
> > 	select NETDEVICES
> > 	select PCI
> > 	select BLOCK
> > 	select BLK_DEV
> > 	select NETWORK_FILESYSTEMS
> > 	select INET
> > 	select EXPERIMENTAL
> > 	select TTY
> > 	select SERIAL_8250
> > 	select SERIAL_8250_CONSOLE
> > 	select IP_PNP
> > 	select IP_PNP_DHCP
> > 	select BINFMT_ELF
> > 	select PCI_MSI
> > 	select HAVE_ARCH_KGDB
> > 	select DEBUG_KERNEL
> > 	select KGDB
> > 	select KGDB_SERIAL_CONSOLE
> > 	select VIRTUALIZATION
> > 	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
> > 
> > to the option below which we already have. It is in the same sense a KVM
> > guest support deal.
> > 
> > Hmm.
> > 
> > KVM people, any objections?
> 
> None, but please don't mix it with 'KVM_GUEST' flag below. 
> 
> Actually, what about adding kvm variants of the two files at
> arch/x86/configs/ ?

two files?

> 
> > config KVM_GUEST
> >         bool "KVM Guest support (including kvmclock)"
> >         depends on PARAVIRT
> >         select PARAVIRT_CLOCK
> >         default y
> >         ---help---
> >           This option enables various optimizations for running under the KVM
> >           hypervisor. It includes a paravirtualized clock, so that instead
> >           of relying on a PIT (or probably other) emulation by the
> >           underlying device model, the host provides the guest with
> >           timing infrastructure such as time of day, and system time

Hmm,

ok, maybe I wasn't clear enough. My proposal was to actually add all (or
maybe not *all* of them, but most) those selects above to the KVM_GUEST
config option. Because, you very probably want to select all that stuff
above anyway if you want to build a kvm guest kernel, no?

IOW, something which says "Enable KVM guest support" should enable all
the stuff needed for that.

Or do you want to keep the current CONFIG_KVM_GUEST separate for special
stuff?

And yes, Sasha's suggestion to have an additional
CONFIG_KVM_GUEST_KERNEL_TESTING or so option which enables debug
stuff for people who write patches for the kernel and want to quickly
smoke-test it in kvm.

Basically, I'm looking from the perspective of a kernel dev who would
like to make an optimal use of kvm for testing kernels.

Does that make more sense?

Thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel
  2013-04-18  9:46         ` Borislav Petkov
@ 2013-04-18  9:55           ` Geert Uytterhoeven
  2013-04-18 10:18             ` Borislav Petkov
  2013-04-18 13:36           ` Marcelo Tosatti
  1 sibling, 1 reply; 14+ messages in thread
From: Geert Uytterhoeven @ 2013-04-18  9:55 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Marcelo Tosatti, Pekka Enberg, Ingo Molnar, H. Peter Anvin,
	Sasha Levin, Fengguang Wu, lkml, x86-ml, kvm

On Thu, Apr 18, 2013 at 11:46 AM, Borislav Petkov <bp@alien8.de> wrote:
> ok, maybe I wasn't clear enough. My proposal was to actually add all (or
> maybe not *all* of them, but most) those selects above to the KVM_GUEST
> config option. Because, you very probably want to select all that stuff
> above anyway if you want to build a kvm guest kernel, no?
>
> IOW, something which says "Enable KVM guest support" should enable all
> the stuff needed for that.

"needed" yes,
"probably" no, as there's no way to disable them if they're selected
unconditionally.

Perhaps you can make the "probably" selects depend on !EXPERT to fix this?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

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

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

* Re: [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel
  2013-04-18  9:55           ` Geert Uytterhoeven
@ 2013-04-18 10:18             ` Borislav Petkov
  0 siblings, 0 replies; 14+ messages in thread
From: Borislav Petkov @ 2013-04-18 10:18 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Marcelo Tosatti, Pekka Enberg, Ingo Molnar, H. Peter Anvin,
	Sasha Levin, Fengguang Wu, lkml, x86-ml, kvm

On Thu, Apr 18, 2013 at 11:55:33AM +0200, Geert Uytterhoeven wrote:
> On Thu, Apr 18, 2013 at 11:46 AM, Borislav Petkov <bp@alien8.de> wrote:
> > ok, maybe I wasn't clear enough. My proposal was to actually add all (or
> > maybe not *all* of them, but most) those selects above to the KVM_GUEST
> > config option. Because, you very probably want to select all that stuff
> > above anyway if you want to build a kvm guest kernel, no?
> >
> > IOW, something which says "Enable KVM guest support" should enable all
> > the stuff needed for that.
> 
> "needed" yes,
> "probably" no, as there's no way to disable them if they're selected
> unconditionally.
> 
> Perhaps you can make the "probably" selects depend on !EXPERT to fix this?

Nah, I don't want to really involve EXPERT here. You could point,
though, which are the ones one probably won't select even though it
would be good to have them on and I could stick them in the second,
kernel testing option.

IOW, The way it currently shapes up is this:

* CONFIG_KVM_GUEST - maybe not change it at all, depending on what kvm
people want in the end.

* CONFIG_KVM_KERNEL_TESTING - all the things you would - probably or
really - need selected so that you don't go and hunt Kconfig options
just so the damn guest kernel boots. And not only that but also
convenience stuff like debugging options and such so that you have the
chance of getting some more info when the guest dies.

That second option is to be enabled when building the guest kernel only,
of course.

Better?

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel
  2013-04-18  9:46         ` Borislav Petkov
  2013-04-18  9:55           ` Geert Uytterhoeven
@ 2013-04-18 13:36           ` Marcelo Tosatti
  2013-04-19 10:35             ` Borislav Petkov
  1 sibling, 1 reply; 14+ messages in thread
From: Marcelo Tosatti @ 2013-04-18 13:36 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Pekka Enberg, Ingo Molnar, H. Peter Anvin, Sasha Levin,
	Fengguang Wu, lkml, x86-ml, kvm

On Thu, Apr 18, 2013 at 11:46:29AM +0200, Borislav Petkov wrote:
> On Wed, Apr 17, 2013 at 08:25:07PM -0300, Marcelo Tosatti wrote:
> > On Tue, Apr 16, 2013 at 06:18:52PM +0200, Borislav Petkov wrote:
> > > On Sun, Apr 14, 2013 at 01:03:20PM +0200, Borislav Petkov wrote:
> > > > On Sun, Apr 14, 2013 at 12:31:12PM +0300, Pekka Enberg wrote:
> > > > > I obviously support having something like this in mainline. I wonder
> > > > > though if we could just call this "default standalone KVM guest
> > > > > config" instead of emphasizing testing angle.
> > > > 
> > > > /me nods agreeingly...
> > > > 
> > > > And it should be unter HYPERVISOR_GUEST where the rest of this stuff
> > > > resides. Good point.
> > > 
> > > Sanity check question:
> > > 
> > > Why not add the select stuff, i.e. this:
> > > 
> > > 	select NET
> > > 	select NETDEVICES
> > > 	select PCI
> > > 	select BLOCK
> > > 	select BLK_DEV
> > > 	select NETWORK_FILESYSTEMS
> > > 	select INET
> > > 	select EXPERIMENTAL
> > > 	select TTY
> > > 	select SERIAL_8250
> > > 	select SERIAL_8250_CONSOLE
> > > 	select IP_PNP
> > > 	select IP_PNP_DHCP
> > > 	select BINFMT_ELF
> > > 	select PCI_MSI
> > > 	select HAVE_ARCH_KGDB
> > > 	select DEBUG_KERNEL
> > > 	select KGDB
> > > 	select KGDB_SERIAL_CONSOLE
> > > 	select VIRTUALIZATION
> > > 	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
> > > 
> > > to the option below which we already have. It is in the same sense a KVM
> > > guest support deal.
> > > 
> > > Hmm.
> > > 
> > > KVM people, any objections?
> > 
> > None, but please don't mix it with 'KVM_GUEST' flag below. 
> > 
> > Actually, what about adding kvm variants of the two files at
> > arch/x86/configs/ ?
> 
> two files?

x86_64, x86_32.

> > 
> > > config KVM_GUEST
> > >         bool "KVM Guest support (including kvmclock)"
> > >         depends on PARAVIRT
> > >         select PARAVIRT_CLOCK
> > >         default y
> > >         ---help---
> > >           This option enables various optimizations for running under the KVM
> > >           hypervisor. It includes a paravirtualized clock, so that instead
> > >           of relying on a PIT (or probably other) emulation by the
> > >           underlying device model, the host provides the guest with
> > >           timing infrastructure such as time of day, and system time
> 
> Hmm,
> 
> ok, maybe I wasn't clear enough. My proposal was to actually add all (or
> maybe not *all* of them, but most) those selects above to the KVM_GUEST
> config option. Because, you very probably want to select all that stuff
> above anyway if you want to build a kvm guest kernel, no?

Very probably but not certainly.

> IOW, something which says "Enable KVM guest support" should enable all
> the stuff needed for that.

I get your point, but thats up to the person selecting the options.

> Or do you want to keep the current CONFIG_KVM_GUEST separate for special
> stuff?

Yes.

> And yes, Sasha's suggestion to have an additional
> CONFIG_KVM_GUEST_KERNEL_TESTING or so option which enables debug
> stuff for people who write patches for the kernel and want to quickly
> smoke-test it in kvm.

Thats fine.

> Basically, I'm looking from the perspective of a kernel dev who would
> like to make an optimal use of kvm for testing kernels.
> 
> Does that make more sense?

Understood (just don't mix it with the current CONFIG_KVM_GUEST option).

Even though can't see why those options can live in defconfig files as
suggested.

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

* Re: [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel
  2013-04-18 13:36           ` Marcelo Tosatti
@ 2013-04-19 10:35             ` Borislav Petkov
  2013-04-26  0:05               ` [PATCH -v2] x86: Add a Kconfig shortcut for kvm guest kernel Borislav Petkov
  0 siblings, 1 reply; 14+ messages in thread
From: Borislav Petkov @ 2013-04-19 10:35 UTC (permalink / raw)
  To: Marcelo Tosatti
  Cc: Pekka Enberg, Ingo Molnar, H. Peter Anvin, Sasha Levin,
	Fengguang Wu, lkml, x86-ml, kvm

On Thu, Apr 18, 2013 at 10:36:31AM -0300, Marcelo Tosatti wrote:
> > IOW, something which says "Enable KVM guest support" should enable all
> > the stuff needed for that.
> 
> I get your point, but thats up to the person selecting the options.

Ok.

> > Or do you want to keep the current CONFIG_KVM_GUEST separate for special
> > stuff?
> 
> Yes.

Ok.

> > Basically, I'm looking from the perspective of a kernel dev who would
> > like to make an optimal use of kvm for testing kernels.
> > 
> > Does that make more sense?
> 
> Understood (just don't mix it with the current CONFIG_KVM_GUEST option).

Ok, got it - we want those additional options in another Kconfig option,
probably depending on KVM_GUEST.

> Even though can't see why those options can live in defconfig files as
> suggested.

Well, for one, some of the options are already in the defconfig files.
However, you want to have a single shortcut option which selects those
when building randconfigs and trying to boot them in kvm. I.e., you want
some basic functionality to be always present, even with randconfigs.
And you won't have that functionality enabled if you put them in a
defconfig, AFAICT.

Now, I do that already in my tests by having those and other options in
an all.config file in the kernel repo which gets parsed by Kconfig.

The reason for adding this to the kernel though was to save other people
the time of looking for all those options everytime but have one single
shortcut. Which can also be updated by kvm people whenever they feel
like new guest kernel functionality should be enabled.

If people still feel like this is not a good idea, I can drop it. But it
makes a bunch of sense to me, currently at least :).

Thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* [PATCH -v2] x86: Add a Kconfig shortcut for kvm guest kernel
  2013-04-19 10:35             ` Borislav Petkov
@ 2013-04-26  0:05               ` Borislav Petkov
  2013-04-26  6:42                 ` Ingo Molnar
  0 siblings, 1 reply; 14+ messages in thread
From: Borislav Petkov @ 2013-04-26  0:05 UTC (permalink / raw)
  To: Marcelo Tosatti
  Cc: Pekka Enberg, Ingo Molnar, H. Peter Anvin, Sasha Levin,
	Fengguang Wu, lkml, x86-ml, kvm

From: Borislav Petkov <bp@suse.de>
Date: Tue, 16 Apr 2013 18:24:34 +0200
Subject: [PATCH -v2] x86: Add a Kconfig shortcut for kvm guest kernel

This is pretty useful for the case where people want to boot the
resulting kernel in qemu/kvm. Instead of going and searching for each
required option through the Kconfig maze, this single option should
simply enable everything required/good to have to boot the resulting
kernel in the guest.

Cc: Fengguang Wu <fengguang.wu@intel.com>
Originally-by: Pekka Enberg <penberg@kernel.org>
Originally-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
---


Here's v2 which should be addressing all review comments so far.


 arch/x86/Kconfig | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5651374d179f..76a95ffa959a 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -680,6 +680,44 @@ config KVM_GUEST
 	  underlying device model, the host provides the guest with
 	  timing infrastructure such as time of day, and system time
 
+config KVM_GUEST_COMMODITY_OPTIONS
+	bool "Enable commodity options for a standalone KVM guest"
+	depends on KVM_GUEST
+	select NET
+	select NETDEVICES
+	select BLOCK
+	select BLK_DEV
+	select NETWORK_FILESYSTEMS
+	select INET
+	select EXPERIMENTAL
+	select TTY
+	select SERIAL_8250
+	select SERIAL_8250_CONSOLE
+	select IP_PNP
+	select IP_PNP_DHCP
+	select BINFMT_ELF
+	select PCI_MSI
+	select HAVE_ARCH_KGDB
+	select DEBUG_KERNEL
+	select KGDB
+	select KGDB_SERIAL_CONSOLE
+	select VIRTUALIZATION
+	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
+	---help---
+	  Select guest kernel functionality which facilitates booting the
+	  kernel as a guest in qemu/kvm. This entails basic stuff like
+	  serial support, kgdb, virtio and other so that you can be able to
+	  have commodity functionality like serial output from the guest,
+	  networking, etc.
+
 source "arch/x86/lguest/Kconfig"
 
 config PARAVIRT_TIME_ACCOUNTING
-- 
1.8.2.135.g7b592fa

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH -v2] x86: Add a Kconfig shortcut for kvm guest kernel
  2013-04-26  0:05               ` [PATCH -v2] x86: Add a Kconfig shortcut for kvm guest kernel Borislav Petkov
@ 2013-04-26  6:42                 ` Ingo Molnar
  2013-04-26  9:51                   ` [PATCH -v2.1] " Borislav Petkov
  0 siblings, 1 reply; 14+ messages in thread
From: Ingo Molnar @ 2013-04-26  6:42 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Marcelo Tosatti, Pekka Enberg, H. Peter Anvin, Sasha Levin,
	Fengguang Wu, lkml, x86-ml, kvm


* Borislav Petkov <bp@alien8.de> wrote:

> From: Borislav Petkov <bp@suse.de>
> Date: Tue, 16 Apr 2013 18:24:34 +0200
> Subject: [PATCH -v2] x86: Add a Kconfig shortcut for kvm guest kernel
> 
> This is pretty useful for the case where people want to boot the
> resulting kernel in qemu/kvm. Instead of going and searching for each
> required option through the Kconfig maze, this single option should
> simply enable everything required/good to have to boot the resulting
> kernel in the guest.

Please mention:

 ' This patch is based on a similar utility patch of the external
   lkvm tree. '

> 
> Cc: Fengguang Wu <fengguang.wu@intel.com>
> Originally-by: Pekka Enberg <penberg@kernel.org>
> Originally-by: Sasha Levin <levinsasha928@gmail.com>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> ---
> 
> 
> Here's v2 which should be addressing all review comments so far.
> 
> 
>  arch/x86/Kconfig | 38 ++++++++++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 5651374d179f..76a95ffa959a 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -680,6 +680,44 @@ config KVM_GUEST
>  	  underlying device model, the host provides the guest with
>  	  timing infrastructure such as time of day, and system time
>  
> +config KVM_GUEST_COMMODITY_OPTIONS

Call this KVM_GUEST_COMMON_OPTIONS?

> +	bool "Enable commodity options for a standalone KVM guest"
> +	depends on KVM_GUEST
> +	select NET
> +	select NETDEVICES
> +	select BLOCK
> +	select BLK_DEV
> +	select NETWORK_FILESYSTEMS
> +	select INET
> +	select EXPERIMENTAL
> +	select TTY
> +	select SERIAL_8250
> +	select SERIAL_8250_CONSOLE
> +	select IP_PNP
> +	select IP_PNP_DHCP
> +	select BINFMT_ELF
> +	select PCI_MSI
> +	select HAVE_ARCH_KGDB
> +	select DEBUG_KERNEL
> +	select KGDB
> +	select KGDB_SERIAL_CONSOLE
> +	select VIRTUALIZATION
> +	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
> +	---help---
> +	  Select guest kernel functionality which facilitates booting the
> +	  kernel as a guest in qemu/kvm. This entails basic stuff like

s/qemu/qemu or lkvm

> +	  serial support, kgdb, virtio and other so that you can be able to
> +	  have commodity functionality like serial output from the guest,
> +	  networking, etc.

And seemless host file system integration into guest context. (that is 
what the 9P options are about)

Thanks,

	Ingo

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

* [PATCH -v2.1] x86: Add a Kconfig shortcut for kvm guest kernel
  2013-04-26  6:42                 ` Ingo Molnar
@ 2013-04-26  9:51                   ` Borislav Petkov
  2013-05-01 13:19                     ` Marcelo Tosatti
  0 siblings, 1 reply; 14+ messages in thread
From: Borislav Petkov @ 2013-04-26  9:51 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Marcelo Tosatti, Pekka Enberg, H. Peter Anvin, Sasha Levin,
	Fengguang Wu, lkml, x86-ml, kvm

On Fri, Apr 26, 2013 at 08:42:50AM +0200, Ingo Molnar wrote:
>
> ... < take all review comments >

Here it is:

--
>From 56880e448600ca1504df8c68c59f31153f7b5b0f Mon Sep 17 00:00:00 2001
From: Borislav Petkov <bp@suse.de>
Date: Tue, 16 Apr 2013 18:24:34 +0200
Subject: [PATCH -v2.1] x86: Add a Kconfig shortcut for kvm guest kernel

This is pretty useful for the case where people want to boot the
resulting kernel in qemu/kvm or lkvm. Instead of going and searching for
each required option through the Kconfig maze, this single option should
simply enable everything required/good to have to boot the resulting
kernel in the guest.

Patch has been adapted from a version in the external lkvm tree.

Cc: Fengguang Wu <fengguang.wu@intel.com>
Originally-by: Pekka Enberg <penberg@kernel.org>
Originally-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
---
 arch/x86/Kconfig | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5651374d179f..432478a7b814 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -680,6 +680,45 @@ config KVM_GUEST
 	  underlying device model, the host provides the guest with
 	  timing infrastructure such as time of day, and system time
 
+config KVM_GUEST_COMMON_OPTIONS
+	bool "Enable commodity options for a standalone KVM guest"
+	depends on KVM_GUEST
+	select NET
+	select NETDEVICES
+	select BLOCK
+	select BLK_DEV
+	select NETWORK_FILESYSTEMS
+	select INET
+	select EXPERIMENTAL
+	select TTY
+	select SERIAL_8250
+	select SERIAL_8250_CONSOLE
+	select IP_PNP
+	select IP_PNP_DHCP
+	select BINFMT_ELF
+	select PCI_MSI
+	select HAVE_ARCH_KGDB
+	select DEBUG_KERNEL
+	select KGDB
+	select KGDB_SERIAL_CONSOLE
+	select VIRTUALIZATION
+	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
+	---help---
+	  Select guest kernel functionality which facilitates booting the
+	  kernel as a guest in qemu or lkvm. This entails basic stuff like
+	  serial support, kgdb, virtio and other so that you can be able to
+	  have commodity functionality like serial output from the guest,
+	  networking, seamless host file system integration into guest context
+	  and other useful things.
+
 source "arch/x86/lguest/Kconfig"
 
 config PARAVIRT_TIME_ACCOUNTING
-- 
1.8.2.135.g7b592fa

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

* Re: [PATCH -v2.1] x86: Add a Kconfig shortcut for kvm guest kernel
  2013-04-26  9:51                   ` [PATCH -v2.1] " Borislav Petkov
@ 2013-05-01 13:19                     ` Marcelo Tosatti
  2013-05-01 23:21                       ` Borislav Petkov
  0 siblings, 1 reply; 14+ messages in thread
From: Marcelo Tosatti @ 2013-05-01 13:19 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Ingo Molnar, Pekka Enberg, H. Peter Anvin, Sasha Levin,
	Fengguang Wu, lkml, x86-ml, kvm

On Fri, Apr 26, 2013 at 11:51:40AM +0200, Borislav Petkov wrote:
> On Fri, Apr 26, 2013 at 08:42:50AM +0200, Ingo Molnar wrote:
> >
> > ... < take all review comments >
> 
> Here it is:
> 
> --
> >From 56880e448600ca1504df8c68c59f31153f7b5b0f Mon Sep 17 00:00:00 2001
> From: Borislav Petkov <bp@suse.de>
> Date: Tue, 16 Apr 2013 18:24:34 +0200
> Subject: [PATCH -v2.1] x86: Add a Kconfig shortcut for kvm guest kernel
> 
> This is pretty useful for the case where people want to boot the
> resulting kernel in qemu/kvm or lkvm. Instead of going and searching for
> each required option through the Kconfig maze, this single option should
> simply enable everything required/good to have to boot the resulting
> kernel in the guest.
> 
> Patch has been adapted from a version in the external lkvm tree.
> 
> Cc: Fengguang Wu <fengguang.wu@intel.com>
> Originally-by: Pekka Enberg <penberg@kernel.org>
> Originally-by: Sasha Levin <levinsasha928@gmail.com>
> Signed-off-by: Borislav Petkov <bp@suse.de>
> ---
>  arch/x86/Kconfig | 39 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)

Applied, thanks.

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

* Re: [PATCH -v2.1] x86: Add a Kconfig shortcut for kvm guest kernel
  2013-05-01 13:19                     ` Marcelo Tosatti
@ 2013-05-01 23:21                       ` Borislav Petkov
  0 siblings, 0 replies; 14+ messages in thread
From: Borislav Petkov @ 2013-05-01 23:21 UTC (permalink / raw)
  To: Marcelo Tosatti
  Cc: Ingo Molnar, Pekka Enberg, H. Peter Anvin, Sasha Levin,
	Fengguang Wu, lkml, x86-ml, kvm

On Wed, May 01, 2013 at 10:19:24AM -0300, Marcelo Tosatti wrote:
> Applied, thanks.

You shouldn't have - Ingo took it already.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

end of thread, other threads:[~2013-05-01 23:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20130412181956.GA13099@pd.tnic>
     [not found] ` <516A7760.7030907@kernel.org>
     [not found]   ` <20130414110320.GB20547@pd.tnic>
2013-04-16 16:18     ` [PATCH] x86: Add a Kconfig shortcut for a kvm-bootable kernel Borislav Petkov
2013-04-17  0:38       ` Sasha Levin
2013-04-17  7:50         ` Borislav Petkov
2013-04-17 23:25       ` Marcelo Tosatti
2013-04-18  9:46         ` Borislav Petkov
2013-04-18  9:55           ` Geert Uytterhoeven
2013-04-18 10:18             ` Borislav Petkov
2013-04-18 13:36           ` Marcelo Tosatti
2013-04-19 10:35             ` Borislav Petkov
2013-04-26  0:05               ` [PATCH -v2] x86: Add a Kconfig shortcut for kvm guest kernel Borislav Petkov
2013-04-26  6:42                 ` Ingo Molnar
2013-04-26  9:51                   ` [PATCH -v2.1] " Borislav Petkov
2013-05-01 13:19                     ` Marcelo Tosatti
2013-05-01 23:21                       ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox