Laszlo, I downloaded the stable 4.4.6 and build it myself. 1. enable KVM as a module in "make menuconfig" 2. "make -j3" 2. install the modules/kernel: "sudo make install_modules" and "sudo make install" 3. update the boot loader "sudo update-grub2" 4. reboot to use the new kernel "sudo reboot"
I can confirm that the new kernel is used because in the first time I built the kernel, I forgot to turn on KVM which resulted the QEMU failed to start. After I turned on the KVM in "make menuconfig", the new kernel can start QEMU. However, I got the same result as that when I used the 4.4.1 in ppa. The QEMU stops at UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c : SmmRelocateBases() in the line: while (!mRebased[BspIndex]); What else did I miss? Is there any advanced feature requirement to the HOST CPU besides the fundamental VT? Could it because my HOST CPU is too old? Please forgive my ignorance. :( I attached the /proc/cpuinfo. Regards, Ray >-----Original Message----- >From: Laszlo Ersek [mailto:[email protected]] >Sent: Wednesday, March 16, 2016 10:30 PM >To: Ni, Ruiyu <[email protected]> >Cc: Paolo Bonzini <[email protected]>; Justen, Jordan L ><[email protected]>; [email protected] ><[email protected]> >Subject: Re: [edk2] Software SMI STS bit is not set when writing port B2 in >QEMU Q35 > >On 03/16/16 14:47, Ni, Ruiyu wrote: >> Laszlo, >> Which kernel version are you using? Yes I indeed used 4.4.1 from ppa wily. >> I would more likely to assume 4.4.1 has a regression. Will try 4.4 tomorrow. > >I am using a RHEL-7 kernel that is not publicly released yet. While I >was working on SMM for OVMF, I built upstream kernels manually. > >It is not justified to suspect a 4.4.1 regression until you test a >hand-built upstream 4.4.1 kernel (or, even better, the latest in the >4.4.y stable series, 4.4.5 at this moment). > >What a PPA offers has zero relevance. Please build your kernel manually >from the upstream sources, or use an official (and fully updated) >distribution release that is built on the 4.4 kernel. > >(The difference between my using an unreleased, development RHEL-7 >kernel and your using some random Ubuntu PPA is that my RHEL-7 kernel >was built by the upstream KVM maintainer: Paolo, as part of his work at >Red Hat. He knows what he's doing. The official distro releases also >tend to. I wouldn't be so sure about a random *personal* packaging >archive (PPA) though. > >It is *possible* that upstream 4.4.1 indeed contains a regression, but >when using a PPA, your first suspect should be the PPA.) > >Thanks >Laszlo > >> Thanks a lot for your long mail. >> >> Thanks, >> Ray >> >>> 在 2016年3月16日,下午8:38,Laszlo Ersek <[email protected]> 写道: >>> >>>> On 03/16/16 01:55, Ni, Ruiyu wrote: >>>> >>>> >>>> Regards, >>>> Ray >>>> >>>> >>>>> -----Original Message----- >>>>> From: Paolo Bonzini [mailto:[email protected]] >>>>> Sent: Wednesday, March 16, 2016 12:06 AM >>>>> To: Ni, Ruiyu <[email protected]> >>>>> Cc: Laszlo Ersek <[email protected]>; Justen, Jordan L >>>>> <[email protected]>; [email protected] >>>>> <[email protected]> >>>>> Subject: Re: [edk2] Software SMI STS bit is not set when writing port B2 >>>>> in QEMU Q35 >>>>> >>>>> >>>>> >>>>>> On 15/03/2016 16:48, Ni, Ruiyu wrote: >>>>>> I don't think CSM matters and the bin I am using cannot be >>>>>> distributed. Does the qemu build steps matters? I ran configure >>>>>> --target-list=x86_64-softmmu. I traced the code and found the code >>>>>> hung when SMM is relocating. The code was waiting for mRebased flag >>>>>> be set. >>>>> >>>>> First of all, can you reproduce the problem without CSM? >>>> >>>> Yes. I also attached the OVMF_CODE.fd and OVMF_VARS.fd >>>> (in OVMF.zip). >>>> Can you help to try whether it can boot to shell in your qemu? >>>> I can confirm when accel=tcg the OVMF can boot well. >>>> But when accel=kvm it cannot. >>>> SMM emulation over KVM has certain requirements for >>>> HOST PC which I am not aware of? >>> >>> Your binary works for me (it boots to the UEFI shell) on KVM. >>> >>> As far as I understand, for the host kernel (= KVM), the requirement is >>> Linux 4.4 or later. >>> >>> I'm not using an upstream host kernel; at the moment I'm using one of >>> Paolo's RHEL-7 backport kernels. So, my testing didn't repeat that part >>> of your setup. >>> >>> I can see from your earlier email that you upgraded your host kernel to >>> 4.4.1 and you rebooted your PC with it. Is this an upstream kernel that >>> you built, or is it packaged by Ubuntu? >>> >>> As far as I can see, the latest release for Ubuntu 14.04 is 14.04.4. By >>> default it comes with a 4.2 based kernel: >>> >>> https://wiki.ubuntu.com/TrustyTahr/ReleaseNotes#Updated_Packages >>> >>> I think something is wrong with your host kernel. Based on the >>> information available, I cannot decide if it is actually a Ubuntu kernel >>> that is simply too old, or an upstream 4.4.1 stable kernel release that >>> you built yourself, and maybe 4.4.1 regressed relative to 4.4.0. >>> >>> If you built the host kernel manually, why did you pick 4.4.1 exactly? >>> As far as I can see, 4.4.5 is also available from stable git: >>> >>> >http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-4.4.y&id=62e21959dc6f25c5fce0c1a0934 >e4a9d982bf99b >>> >>> Hmm, I googled "Ubuntu" and "4.4.1" together, and the only relevant hits >>> I seem to be getting are from: >>> >>> http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.1-wily/ >>> >>> I wouldn't recommend using those -- PPA means "Personal Package >>> Archives", plus the "wily" suffix implies the 15.10 release of Ubuntu, >>> not 14.04. >>> >>> If you insist on using Ubuntu, please at least try 16.04 LTS ("Xenial >>> Xerus"), which is apparently based on 4.4 *officially*. >>> >>> Thanks >>> Laszlo
processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz stepping : 11 microcode : 0xb6 cpu MHz : 2667.000 cache size : 4096 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm tpr_shadow vnmi flexpriority bugs : bogomips : 5320.27 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 Duo CPU E6750 @ 2.66GHz stepping : 11 microcode : 0xb6 cpu MHz : 1998.000 cache size : 4096 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm tpr_shadow vnmi flexpriority bugs : bogomips : 5320.27 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:
_______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

