From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48897) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFFOE-0001yo-Gl for qemu-devel@nongnu.org; Thu, 29 Aug 2013 23:28:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFFO6-0003IF-BT for qemu-devel@nongnu.org; Thu, 29 Aug 2013 23:28:50 -0400 Received: from smtp.nue.novell.com ([195.135.221.5]:42240) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFFO5-0003Hx-Ul for qemu-devel@nongnu.org; Thu, 29 Aug 2013 23:28:42 -0400 Date: Fri, 30 Aug 2013 11:28:28 +0800 From: Gary Ching-Pang Lin Message-ID: <20130830032828.GA1713@GaryOffice.site> References: <20130828103552.GC2038@GaryOffice.site> <521DE2EB.9050404@redhat.com> <521DE3C0.4030603@suse.de> <521DE8C7.1010903@redhat.com> <521DF33E.4090205@suse.de> <20130829082317.GA1852@GaryOffice.site> <521F1CB802000048000E30E0@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <521F1CB802000048000E30E0@suse.com> Subject: Re: [Qemu-devel] [edk2] OVMF hung on qemu 1.6.0 with KVM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bruce Rogers Cc: Jordan Justen , edk2-devel@lists.sourceforge.net, Alexander Graf , "qemu-devel@nongnu.org" , Ludwig Nussel , Laszlo Ersek , afaerber@suse.de On Fri, Aug 30, 2013 at 02:04:40AM +1000, Bruce Rogers wrote: > >>> On 8/29/2013 at 02:23 AM, Gary Ching-Pang Lin wrote: > > On Wed, Aug 28, 2013 at 02:55:26PM +0200, Andreas Färber wrote: > >> Am 28.08.2013 14:10, schrieb Laszlo Ersek: > >> > On 08/28/13 13:49, Andreas Färber wrote: > >> >> Am 28.08.2013 13:45, schrieb Laszlo Ersek: > >> >>> (qemu-devel CC'd) > >> >>> > >> >>> On 08/28/13 12:35, Gary Ching-Pang Lin wrote: > >> >>>> Hi, > >> >>>> > >> >>>> I recently updated qemu to 1.6.0 and found OVMF just showed a blank > >> >>>> screen when kvm was enabled. I tried to dump OVMF log with the > >> >>>> following commond but nothing was stored in debug.log. > >> >>>> > >> >>>> qemu-system-x86_64 -s -enable-kvm -bios OVMF.fd -debugcon file:debug.log -global > > isa-debugcon.iobase=0x402 > >> >>>> > >> >>>> The kvm trace was recorded with "trace-cmd record -b 20000 -e kvm" > >> >>>> and uploaded to the following link: > >> >>>> > > https://docs.google.com/file/d/0B9hbtlc_aK_gcGh2TDZLUVlzWWc/edit?usp=sharing > >> >>>> > >> >>>> I found a similar case with kernel < 3.9, but I already upgraded linux > >> >>>> kernel to 3.10.5, so this may be another bug. > >> >>> > >> >>> Well, the usual first response in cases like this is... > >> >>> > >> >>> Can you bisect qemu? :) > >> >> > >> >> We had a similar report: > >> >> https://bugzilla.novell.com/show_bug.cgi?id=835895 > >> > > >> > Well that's sorta the same report, considering you and Gary both work > >> > for SUSE, and the Novell BZ seems to imply the build in question was > > Gary's: > >> > > >> >> qemu 1.6.0 fails to run the tianocore firmware > >> >> (home:gary_lin:UEFI/OVMF) properly. This worked with previous qemu > >> > ^^^^^^^^ > >> >> versions: > >> > > >> > :) > >> > >> Different reporters, so who knows if the setups are the same. ;) > >> > >> >> git-bisect said: > >> >> 235e8982ad393e5611cb892df54881c872eea9e1 is the first bad commit > >> >> commit 235e8982ad393e5611cb892df54881c872eea9e1 > >> >> Author: Jordan Justen > >> >> Date: Wed May 29 01:27:26 2013 -0700 > >> >> > >> >> kvm: support using KVM_MEM_READONLY flag for regions > >> >> > >> >> For readonly memory regions and rom devices in romd_mode, > >> >> we make use of the KVM_MEM_READONLY. A slot that uses > >> >> KVM_MEM_READONLY can be read from and code can execute from the > >> >> region, but writes will exit to qemu. > >> >> > >> >> For rom devices with !romd_mode, we force the slot to be > >> >> removed so reads or writes to the region will exit to qemu. > >> >> (Note that a memory region in this state is not executable > >> >> within kvm.) > >> >> > >> >> v7: > >> >> * Update for readable => romd_mode rename (5f9a5ea1) > >> >> > >> >> Signed-off-by: Jordan Justen > >> >> Reviewed-by: Xiao Guangrong (v4) > >> >> Reviewed-by: Paolo Bonzini (v5) > >> >> Message-id: 1369816047-16384-4-git-send-email-jordan.l.justen@intel.com > >> >> Signed-off-by: Anthony Liguori > >> >> > >> >> > >> >> Any hints or patches welcome. :) > >> > > >> > Hm. LP 1212402 probably > >> > concerns the "similar case with kernel < 3.9" mentioned by Gary, and is > >> > likely not revelant here. > >> > > >> > > >> > Gary & Ludwig, can you confirm that your OVMF build includes SVN r14494? > >> > > >> > Author: Jordan Justen > >> > Date: Thu Jul 18 22:51:27 2013 +0000 > >> > > >> > OvmfPkg/Sec: Build identity mapped pages in RAM for X64 > >> > > >> > This is based on MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c. > >> > > >> > Previously we would run using page tables built into the > >> > firmware device. > >> > > >> > If a flash memory is available, it is unsafe for the page > >> > tables to be stored in memory since the processor may try > >> > to write to the page table data structures. > >> > > >> > Additionally, when KVM ROM support is enabled for the > >> > firmware device, then PEI fails to boot when the page > >> > tables are in the firmware device. > >> > >> https://build.opensuse.org/package/show/Virtualization/OVMF > >> is at r14547 and that one works for me. > >> > >> Gary/Ludwig, can you confirm that this is resolved? > >> > > I still got the black screen even with OVMF r14547 or r14608. I also > > tried kernel 3.10.9 and 3.11-rc7, but no luck. > > > > Reverting the KVM_MEM_READONLY patch works for me, but the OVMF patch > > somehow didn't work. > > > > Thanks, > > > > Gary Lin > > I tried this out, and I get the black screen as well when ept=n, but it boots > successfully to the efi shell when ept=y. > > Gary, what does 'cat /sys/module/kvm_intel/parameters/ept' report on your > failing machine? > I think this is the root cause. My machine doesn't support ept. Gary Lin