To enable KVM support on P5040DS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

To enable KVM support on P5040DS

2,731 Views
manikanta
Contributor I

Hi,

Good day,

Need your help in bringup KVM support in PowerPC5040ds,

freescale-p5040ds_defconfig” file  edited with these options, and generated .conf file using 'bitbake –c menuconfig linux’

CONFIG_VIRTUALIZATION=y

CONFIG_KVM=y

CONFIG_KVM_EXIT_TIMING=y

CONFIG_KVM_E500=y

CONFIG_E500=y

these values are visible in .config file, and tried to compile for kernel image using (‘bitbake linux’) following error pops up, I needs your help to solve this issue and to bringup KVM in Powerpc 5040ds, please do the needful.

+ cd /nobackup/users/VTKernel/celt/mv/tmp/work/freescale-p5040ds-mv-linux/linux-2.6.32-1412251630/linux-2.6.32

+ do_compile

+ mvl_kernel_do_compile

+ kernel_do_compile

+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE

+ oe_runmake include/linux/version.h 'CC=powerpc-montavista-linux-gnu-gcc ' 'LD=powerpc-montavista-linux-gnu-ld '

+ '[' xmake = x ']'

+ oenote make -j4 include/linux/version.h 'CC=powerpc-montavista-linux-gnu-gcc ' 'LD=powerpc-montavista-linux-gnu-ld '

+ echo NOTE: 'make -j4 include/linux/version.h CC=powerpc-montavista-linux-gnu-gcc  LD=powerpc-montavista-linux-gnu-ld '

NOTE: make -j4 include/linux/version.h CC=powerpc-montavista-linux-gnu-gcc  LD=powerpc-montavista-linux-gnu-ld

+ make -j4 include/linux/version.h 'CC=powerpc-montavista-linux-gnu-gcc ' 'LD=powerpc-montavista-linux-gnu-ld '

  CHK     include/linux/version.h

  UPD     include/linux/version.h

+ '[' None '!=' 2.6 ']'

+ oe_runmake dep 'CC=powerpc-montavista-linux-gnu-gcc ' 'LD=powerpc-montavista-linux-gnu-ld '

+ '[' xmake = x ']'

+ oenote make -j4 dep 'CC=powerpc-montavista-linux-gnu-gcc ' 'LD=powerpc-montavista-linux-gnu-ld '

+ echo NOTE: 'make -j4 dep CC=powerpc-montavista-linux-gnu-gcc  LD=powerpc-montavista-linux-gnu-ld '

NOTE: make -j4 dep CC=powerpc-montavista-linux-gnu-gcc LD=powerpc-montavista-linux-gnu-ld

+ make -j4 dep 'CC=powerpc-montavista-linux-gnu-gcc ' 'LD=powerpc-montavista-linux-gnu-ld '

scripts/kconfig/conf -s arch/powerpc/Kconfig

*** Warning: make dep is unnecessary now.

+ oe_runmake vmlinux 'CC=powerpc-montavista-linux-gnu-gcc ' 'LD=powerpc-montavista-linux-gnu-ld '

+ '[' xmake = x ']'

+ oenote make -j4 vmlinux 'CC=powerpc-montavista-linux-gnu-gcc ' 'LD=powerpc-montavista-linux-gnu-ld '

+ echo NOTE: 'make -j4 vmlinux CC=powerpc-montavista-linux-gnu-gcc  LD=powerpc-montavista-linux-gnu-ld '

NOTE: make -j4 vmlinux CC=powerpc-montavista-linux-gnu-gcc  LD=powerpc-montavista-linux-gnu-ld

+ make -j4 vmlinux 'CC=powerpc-montavista-linux-gnu-gcc ' 'LD=powerpc-montavista-linux-gnu-ld '

  CHK     include/linux/version.h

  CHK include/linux/utsrelease.h

  UPD include/linux/utsrelease.h

  SYMLINK include/asm -> include/asm-powerpc

  HOSTCC  scripts/kallsyms

  HOSTCC  scripts/dtc/checks.o

  HOSTCC  scripts/genksyms/genksyms.o

  CC      scripts/mod/empty.o

  HOSTCC  scripts/dtc/data.o

  SHIPPED scripts/dtc/dtc-lexer.lex.c

  SHIPPED scripts/genksyms/lex.c

Thanks and Regards

Manikantag

0 Kudos
26 Replies

1,842 Views
manikanta
Contributor I

Hi,

we are trying to do back porting,

Need the kernel tar  used for kvm support from sdk1.3. basically I need kernal tar file supported for KVM in sdk1.3.

Please share the file.

Thanks

Manikantag

0 Kudos

1,842 Views
manikanta
Contributor I

awaiting for the reply, please share the kernel tar file supported for KVM in sdk1.3.

thanks

Manikantag

0 Kudos

1,842 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Manikantag,

I transcended SDK 1.3 Kernel source to you, please pay attention to your email box.

Thanks,

Yiping

0 Kudos

1,842 Views
manikanta
Contributor I

Is there any reason why KVM support is not available in P5040ds which uses core e5500. I am using linux kernel 2.6.32, is this kernel version doesn't support KVM at all, if yes then what is the reason for it. Please share info on this.

Thanks

Manikantag

0 Kudos

1,842 Views
manikanta
Contributor I

Hi Yiping,

    I tried your method in loading .tar.gz file in kvm folder and compile for the kernel image, but it didn’t work, the KVM support is not there for e5500, for the core present in p5040ds.

    And my goal is to bring up kvm in 2.6.32 kernel, so kernel up gradation is not possible.

    So only option left is to get freescale sdk1.2 code make changes to port e500mc kvm support.

    Is there any other possibilities exist to solve this issue. And if this is the only option exist then is it possible to get support from your side, Please let me know.

Thanks

Manikantag

0 Kudos

1,842 Views
scottwood
NXP Employee
NXP Employee

SDK 1.2 is based on the 3.0 kernel.  SDK 1.3 is also based on 3.0, so there's no reason to be looking at SDK 1.2.  Since you're backporting anyway, I'd recommend also looking at the latest SDK to identify fixes and improvements that have been made to the KVM code.

Regarding "Is there any other possibilities exist to solve this issue", yes -- use a newer kernel.  Evaluate whether backporting KVM is more or less work/risk than forward-porting whatever other kernel changes are keeping you on 2.6.32, and keep in mind that forward-porting is usually easier than backporting.  Also consider the other risks of using an old SDK, such as missing non-KVM-related bug fixes and errata workarounds.

Again, if you need support with doing the backporting, please raise the issue with your sales/FAE contact.

0 Kudos

1,842 Views
manikanta
Contributor I

Is there any such things tried to  backporting KVM to work on 2.6.32.

0 Kudos

1,842 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello mani kanta,

Which version Linux SDK are you using? It seems that the Linux Kernel is 2.6.32.

The following basic options need to be enabled for KVM in the host Kernel.

[*] Virtualization

For e500mc-based (and e5500/e6500 systems) systems:

[*] KVM support for PowerPC E500MC/E5500/E6500 processors

For all systems enable MPIC emulation

[*] KVM in-kernel MPIC emulation

In addition, your log doesn't include any build error, would you please provide the whole build log?


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,842 Views
manikanta
Contributor I

Hi,

Good day ☺.

Thanks for the reply,

I am using workspace to build Kernel image to support KVM and will merger this image with IOS, and will build IOS image for cisco product.

The workspace Linux bgl-ads-1279 2.6.18-371.11.1.el5 #1 SMP Mon Jun 30 04:51:39 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux

And my IOS linux kernel is 2.6.32

Linux APPS_TLI 2.6.32.59-freescale-p5040ds.cge #1 SMP PREEMPT Mon Nov 24 17:05:30 PST 2014 ppc GNU/Linux

Tried to build kernel image by editing kernel cfg of p5040 with below following options, file edited was freescale-p5040ds.defaultcfg

CONFIG_VIRTUALIZATION=y

CONFIG_KVM=y

CONFIG_KVM_EXIT_TIMING=y

CONFIG_KVM_E500=y

CONFIG_E500=y

Was able to generate the .conf file (bash-3.2$ bitbake -c menuconfig linux), now initiated process to build kernel image using bitbake linux CLI, and got error issues.

Mailing the .conf file info and error logged in kernel dir (log.do_compile.10467) file. Please go through it and let me know what should be done to solve this issue.

Thanks and Regads

Manikantag

0 Kudos

1,842 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello mani kanta,

In Kernel configuration menu, please enable E500MC processor, and under Virtualization configure the following options, then rebuild the Kernel.

CONFIG_KVM_E500MC=y

CONFIG_KVM_MPIC=y

If your problem remains, please also send the file arch/powerpc/kvm/emulate.c to me.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,842 Views
manikanta
Contributor I

Hi Yiping,

Can I retain old cfg and enable with this new option, or do I need to disable any other option. Please let me know.

Thanks

Manikantag

0 Kudos

1,842 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello mani kanta,

Since you are not using Freescale formal release Linux SDK, please make sure that you have specific Patch applied for KVM feature provided by Freescale.

Please refer to the following Kernel configuration related with KVM.

CONFIG_EXPERIMENTAL=y

CONFIG_KVM_MMIO=y

CONFIG_KVM=y

CONFIG_KVM_BOOKE_HV=y

# CONFIG_KVM_EXIT_TIMING is not set

CONFIG_KVM_BOOKE206_PERFMON=y

CONFIG_KVM_E500MC=y

I cannot find a 2.6.32 Kernel with KVM enabled, please refer to the attached configuration file generated in Kernel 3.0.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,842 Views
manikanta
Contributor I

Hi Yiping,

I placed the cfg in Random Number Generation block, and compiled for .config file, and in .config file not seeing the below enabled values.

#Random Number Generation block

CONFIG_EXPERIMENTAL=y

CONFIG_KVM_MMIO=y

CONFIG_KVM=y

CONFIG_KVM_BOOKE_HV=y

  1. CONFIG_KVM_EXIT_TIMING is not set

CONFIG_KVM_BOOKE206_PERFMON=y

CONFIG_KVM_E500MC=y

After compile:

  1. CONFIG_KVM_E500 is not set

bash-3.2$ cat .config | grep KVM

  1. CONFIG_KVM_E500 is not set

bash-3.2$

thanks

Manikantag

0 Kudos

1,842 Views
yipingwang
NXP TechSupport
NXP TechSupport

Would you please make a tall ball for the source files in arch/powerpc/kvm/, and send it to me? Probably you didn't apply Freescale specific patch.


Have a great day,
Yiping

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,842 Views
manikanta
Contributor I

bash-3.2$ pwd

/nobackup/manikag/VTKernel/celt/mv/tmp/staging/freescale-p5040ds-mv-linux/kernel/arch/powerpc/kvm

bash-3.2$ ls

44x.c Kconfig booke_emulate.c e500_tlb.c timing.c

44x_emulate.c Makefile booke_interrupts.S e500_tlb.h timing.h

44x_tlb.c booke.c e500.c emulate.c trace.h

44x_tlb.h booke.h e500_emulate.c powerpc.c

bash-3.2$

bash-3.2$ la -la

bash-3.2$ ls -la

total 168

drwxr-xr-x 2 manikag eng 4096 May 30 17:10 .

drwxr-xr-x 14 manikag eng 4096 Jun 5 22:21 ..

-rw-rr 1 manikag eng 3629 Jun 5 22:21 44x.c

-rw-rr 1 manikag eng 4512 Jun 5 22:21 44x_emulate.c

-rw-rr 1 manikag eng 13941 Jun 5 22:21 44x_tlb.c

-rw-rr 1 manikag eng 2465 Jun 5 22:21 44x_tlb.h

-rw-rr 1 manikag eng 1535 Jun 5 22:21 Kconfig

-rw-rr 1 manikag eng 754 Jun 5 22:21 Makefile

-rw-rr 1 manikag eng 16041 Jun 5 22:21 booke.c

-rw-rr 1 manikag eng 2429 Jun 5 22:21 booke.h

-rw-rr 1 manikag eng 6991 Jun 5 22:21 booke_emulate.c

-rw-rr 1 manikag eng 11684 Jun 5 22:21 booke_interrupts.S

-rw-rr 1 manikag eng 3469 Jun 5 22:21 e500.c

-rw-rr 1 manikag eng 5329 Jun 5 22:21 e500_emulate.c

-rw-rr 1 manikag eng 19436 Jun 5 22:21 e500_tlb.c

-rw-rr 1 manikag eng 4982 Jun 5 22:21 e500_tlb.h

-rw-rr 1 manikag eng 10690 Jun 5 22:21 emulate.c

-rw-rr 1 manikag eng 9450 Jun 5 22:21 powerpc.c

-rw-rr 1 manikag eng 7268 Jun 5 22:21 timing.c

-rw-rr 1 manikag eng 3166 Jun 5 22:21 timing.h

-rw-rr 1 manikag eng 2446 Jun 5 22:21 trace.h

bash-3.2$

Please check this.

Thanks

Manikantag

0 Kudos

1,841 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please send these files to me, I want to compare with my kernel code.

Thanks.

0 Kudos

1,841 Views
manikanta
Contributor I

Please let me know the files…..

0 Kudos

1,841 Views
manikanta
Contributor I

in case u need all the file contents can zip it and send.

0 Kudos

1,841 Views
yipingwang
NXP TechSupport
NXP TechSupport

OK, please zip all the files in the folder "arch/powerpc/kvm" and send it to me.

Thanks,

Yiping

0 Kudos

1,841 Views
manikanta
Contributor I

Hi Yiping,

Please find the request files from below path.

/nobackup/manikag/VTKernel/celt/mv/tmp/staging/freescale-p5040ds-mv-linux/kernel/arch/powerpc/kvm

Thanks

Manikantag

0 Kudos