From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.windriver.com (mail.windriver.com [147.11.1.11]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 22DD5E0047F for ; Wed, 9 Jan 2013 23:31:51 -0800 (PST) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail.windriver.com (8.14.5/8.14.3) with ESMTP id r0A7VmSE001879 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 9 Jan 2013 23:31:48 -0800 (PST) Received: from [128.224.158.164] (128.224.158.164) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.2.318.4; Wed, 9 Jan 2013 23:31:48 -0800 Message-ID: <50EE6E80.1090105@windriver.com> Date: Thu, 10 Jan 2013 15:32:16 +0800 From: Lei Yang User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: "Prica, Mihai" References: <1357560505-24122-1-git-send-email-mihai.prica@intel.com> <1357560505-24122-2-git-send-email-mihai.prica@intel.com> <50EB053F.2040809@se-eng.com> <50EB1486.4080901@se-eng.com> <97BD068FB200C44AA73C2B641F162ECF8FB2DC@IRSMSX101.ger.corp.intel.com> <97BD068FB200C44AA73C2B641F162ECF8FB671@IRSMSX101.ger.corp.intel.com> In-Reply-To: <97BD068FB200C44AA73C2B641F162ECF8FB671@IRSMSX101.ger.corp.intel.com> X-Originating-IP: [128.224.158.164] X-Mailman-Approved-At: Mon, 14 Jan 2013 04:48:58 -0800 Cc: "meta-virtualization@yoctoproject.org" Subject: Re: [PATCH 1/2] linux-yocto: added kernel configuration for KVM X-BeenThere: meta-virtualization@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: lei.yang@windriver.com List-Id: "Discussion of layer enabling hypervisor, virtualization tool stack, and cloud support" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2013 07:31:51 -0000 Content-Type: multipart/alternative; boundary="------------070408020902030900060604" --------------070408020902030900060604 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit On 01/10/2013 03:43 AM, Prica, Mihai wrote: > > On Tue, Jan 8, 2013 at 1:45 PM, Prica, Mihai > wrote: > > I didn't know about the configuration fragments from the kernel tree. > I'll redo the patch to use those. > > I see that the .cfg from the kernel tree enables kvm as modules. In > this situation, I think I need to add an extra RRECOMMENDS with the > necessary kernel-module-kvm to bring the necessary modules to the > sysroot. Where would be the best places to add this, considering > there is no specific recipe for kvm? I tried to add them to the image > recipe but it didn't worked. > > You are presumably going to enable the in tree fragments by appending > to KERNEL_FEATURES > > in the linux-yocto_3.4.bbappend. Which to me, seems like the right > place to also add the > > RRECOMMENDS. Or had you tried this and it didn't work for some reason > I'm missing at the > > moment (it's late here, and I've spent all day hunting autobuilder > breakage) :) > > It doesn't work in the kernel recipe. I've talked with Richard and he > said PACKAGE_INSTALL_ATTEMPTONLY can > > be used for this in the image recipe. He said he will add a new > IMAGE_INSTALL_RECOMMEND option for this. > > There is however one more thing. Which is the best way to configure > the modules to be loaded at boot-time? I > > saw some discussion on the mailing list about update-modules becoming > obsolete. > I think "module_autoload_iwlwifi = "iwlwifi" " is your choice Lei > Thanks, > > Mihai > > Cheers, > > Bruce > > Thanks, > > Mihai > > *From:*meta-virtualization-bounces@yoctoproject.org > > [mailto:meta-virtualization-bounces@yoctoproject.org > ] *On Behalf > Of *Raymond Danks > *Sent:* Monday, January 07, 2013 8:32 PM > *To:* Bruce Ashfield > *Cc:* meta-virtualization@yoctoproject.org > > *Subject:* Re: [meta-virtualization] [PATCH 1/2] linux-yocto: > added kernel configuration for KVM > > On 01/07/2013 11:10 AM, Bruce Ashfield wrote: > > On Mon, Jan 7, 2013 at 12:26 PM, Raymond Danks > > wrote: > > I'm going to show my lack of knowledge in this area, but I > know this is going to come up when I push a xen.cfg that I > apparently never added. > > Is it possible to do something along the lines of > PACKAGE_CONFIG in the linux-yocto.bbappend? For example, in > the libvirt package one can use PACKAGE_CONFIG to construct a > "minimal" build of libvirt. What would be the method for one > to do the same in this package? > > kernel configuration fragment use are controlled via the > KERNEL_FEATURES variable, and > > for anything pre-yocto 1.4 that means an in-tree kernel > configuration fragment (I'm still pushing > > for the fragments to be maintained in tree, since that allows > them to be reused and maintained > > more easily). > > KERNEL_FEATURES is managed like any other variable in the > system, including updating > > it via optional/dynamic features as we see fit. > > > Thanks Bruce. Yes, KERNEL_FEATURES is what I was looking for, I > believe. I'm seeing some references and examples for this now. > > Ray > > > Yes, I imagine that worst case there can be a SRC_URI_distro > definition that includes only the .scc files required for that > "minimal" image build, but it seems like we want to keep away > from that as much as possible being that this isn't a distro > layer. > > Typically we do this via a base KERNEL_FEATURES specification in > the relevant recipe(s), and > > distros, or other configurations can override/extend it as required. > > Cheers, > > Buce > > Thanks, > Ray > > > > On 01/07/2013 05:08 AM, Mihai Prica wrote: > > Signed-off-by: Mihai Prica > > --- > recipes-kernel/linux/linux-yocto/kvm-enable.scc | 4 ++++ > recipes-kernel/linux/linux-yocto/kvm.cfg | 4 ++++ > recipes-kernel/linux/linux-yocto_3.4.bbappend | 1 + > 3 files changed, 9 insertions(+) > create mode 100644 > recipes-kernel/linux/linux-yocto/kvm-enable.scc > create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg > > diff --git a/recipes-kernel/linux/linux-yocto/kvm-enable.scc > b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > new file mode 100644 > index 0000000..0b5f4fc > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm-enable.scc > @@ -0,0 +1,4 @@ > +define KFEATURE_DESCRIPTION "Enable KVM host support" > +define KFEATURE_COMPATIBILITY board > + > +kconf non-hardware kvm.cfg > diff --git a/recipes-kernel/linux/linux-yocto/kvm.cfg > b/recipes-kernel/linux/linux-yocto/kvm.cfg > new file mode 100644 > index 0000000..0cfcf58 > --- /dev/null > +++ b/recipes-kernel/linux/linux-yocto/kvm.cfg > @@ -0,0 +1,4 @@ > +CONFIG_KVM=y > +CONFIG_KVM_INTEL=y > +CONFIG_KVM_AMD=y > +CONFIG_TUN=y > diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend > b/recipes-kernel/linux/linux-yocto_3.4.bbappend > index 5b163ff..71bead2 100644 > --- a/recipes-kernel/linux/linux-yocto_3.4.bbappend > +++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend > @@ -4,5 +4,6 @@ SRC_URI += "file://xt-checksum.scc \ > file://ebtables.scc \ > file://vswitch.scc \ > file://lxc.scc \ > + file://kvm-enable.scc \ > " > > _______________________________________________ > meta-virtualization mailing list > meta-virtualization@yoctoproject.org > > https://lists.yoctoproject.org/listinfo/meta-virtualization > > > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness > await thee at its end" > > > > -- > "Thou shalt not follow the NULL pointer, for chaos and madness await > thee at its end" > > > > _______________________________________________ > meta-virtualization mailing list > meta-virtualization@yoctoproject.org > https://lists.yoctoproject.org/listinfo/meta-virtualization --------------070408020902030900060604 Content-Type: text/html; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit On 01/10/2013 03:43 AM, Prica, Mihai wrote:

On Tue, Jan 8, 2013 at 1:45 PM, Prica, Mihai <mihai.prica@intel.com> wrote:

 

I didn’t know about the configuration fragments from the kernel tree. I’ll redo the patch to use those.

I see that the .cfg from the kernel tree enables kvm as modules. In this situation, I think I need to add an extra RRECOMMENDS with the necessary kernel-module-kvm to bring the necessary modules to the sysroot.  Where would be the best places to add this, considering there is no specific recipe for kvm? I tried to add them to the image recipe but it didn’t worked.

 

 

You are presumably going to enable the in tree fragments by appending to KERNEL_FEATURES

in the linux-yocto_3.4.bbappend. Which to me, seems like the right place to also add the

RRECOMMENDS. Or had you tried this and it didn't work for some reason I'm missing at the

moment (it's late here, and I've spent all day hunting autobuilder breakage) :)

 

It doesn’t work in the kernel recipe. I’ve talked with Richard and he said PACKAGE_INSTALL_ATTEMPTONLY can

be used for this in the image recipe. He said he will add a new IMAGE_INSTALL_RECOMMEND option for this.

 

There is however one more thing. Which is the best way to configure the modules to be loaded at boot-time? I

saw some discussion on the mailing list about update-modules becoming obsolete.

 


I think "module_autoload_iwlwifi = "iwlwifi" " is your choice

Lei
 


Thanks,

Mihai

 

Cheers,

 

Bruce

 

 

Thanks,

Mihai

 

From:meta-virtualization-bounces@yoctoproject.org [mailto:meta-virtualization-bounces@yoctoproject.org] On Behalf Of Raymond Danks
Sent: Monday, January 07, 2013 8:32 PM
To: Bruce Ashfield
Cc: meta-virtualization@yoctoproject.org
Subject: Re: [meta-virtualization] [PATCH 1/2] linux-yocto: added kernel configuration for KVM

 

On 01/07/2013 11:10 AM, Bruce Ashfield wrote:

 

 

On Mon, Jan 7, 2013 at 12:26 PM, Raymond Danks <ray.danks@se-eng.com> wrote:

I'm going to show my lack of knowledge in this area, but I know this is going to come up when I push a xen.cfg that I apparently never added.

Is it possible to do something along the lines of PACKAGE_CONFIG in the linux-yocto.bbappend?  For example, in the libvirt package one can use PACKAGE_CONFIG to construct a "minimal" build of libvirt.  What would be the method for one to do the same in this package?

 

kernel configuration fragment use are controlled via the KERNEL_FEATURES variable, and

for anything pre-yocto 1.4 that means an in-tree kernel configuration fragment (I'm still pushing

for the fragments to be maintained in tree, since that allows them to be reused and maintained

more easily).

 

KERNEL_FEATURES is managed like any other variable in the system, including updating

it via optional/dynamic features as we see fit.


Thanks Bruce.  Yes, KERNEL_FEATURES is what I was looking for, I believe.  I'm seeing some references and examples for this now.

Ray

 


Yes, I imagine that worst case there can be a SRC_URI_distro definition that includes only the .scc files required for that "minimal" image build, but it seems like we want to keep away from that as much as possible being that this isn't a distro layer.

 

Typically we do this via a base KERNEL_FEATURES specification in the relevant recipe(s), and

distros, or other configurations can override/extend it as required.

 

Cheers,

 

Buce

 

Thanks,
Ray



On 01/07/2013 05:08 AM, Mihai Prica wrote:

Signed-off-by: Mihai Prica <mihai.prica@intel.com>
---
  recipes-kernel/linux/linux-yocto/kvm-enable.scc |    4 ++++
  recipes-kernel/linux/linux-yocto/kvm.cfg        |    4 ++++
  recipes-kernel/linux/linux-yocto_3.4.bbappend   |    1 +
  3 files changed, 9 insertions(+)
  create mode 100644 recipes-kernel/linux/linux-yocto/kvm-enable.scc
  create mode 100644 recipes-kernel/linux/linux-yocto/kvm.cfg

diff --git a/recipes-kernel/linux/linux-yocto/kvm-enable.scc b/recipes-kernel/linux/linux-yocto/kvm-enable.scc
new file mode 100644
index 0000000..0b5f4fc
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/kvm-enable.scc
@@ -0,0 +1,4 @@
+define KFEATURE_DESCRIPTION "Enable KVM host support"
+define KFEATURE_COMPATIBILITY board
+
+kconf non-hardware kvm.cfg
diff --git a/recipes-kernel/linux/linux-yocto/kvm.cfg b/recipes-kernel/linux/linux-yocto/kvm.cfg
new file mode 100644
index 0000000..0cfcf58
--- /dev/null
+++ b/recipes-kernel/linux/linux-yocto/kvm.cfg
@@ -0,0 +1,4 @@
+CONFIG_KVM=y
+CONFIG_KVM_INTEL=y
+CONFIG_KVM_AMD=y
+CONFIG_TUN=y
diff --git a/recipes-kernel/linux/linux-yocto_3.4.bbappend b/recipes-kernel/linux/linux-yocto_3.4.bbappend
index 5b163ff..71bead2 100644
--- a/recipes-kernel/linux/linux-yocto_3.4.bbappend
+++ b/recipes-kernel/linux/linux-yocto_3.4.bbappend
@@ -4,5 +4,6 @@ SRC_URI += "file://xt-checksum.scc \
              file://ebtables.scc \
            file://vswitch.scc \
            file://lxc.scc \
+            file://kvm-enable.scc \
           
"
 

 

_______________________________________________
meta-virtualization mailing list
meta-virtualization@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-virtualization



 

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"

 



 

--
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"



_______________________________________________
meta-virtualization mailing list
meta-virtualization@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-virtualization

--------------070408020902030900060604--