From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [edk2] KVM: MTRR: fix memory type handling if MTRR is completely disabled Date: Mon, 21 Sep 2015 11:40:49 +0800 Message-ID: <55FF7C41.7070400@linux.intel.com> References: <55FBDB6D.4040207@gmail.com> <55FBE248.4010809@redhat.com> <55FC4E6F.8030104@gmail.com> <55FF7095.5060106@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: edk2-devel@ml01.01.org To: Wanpeng Li , Janusz , Laszlo Ersek , kvm@vger.kernel.org Return-path: Received: from mga02.intel.com ([134.134.136.20]:9841 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755772AbbIUDq5 (ORCPT ); Sun, 20 Sep 2015 23:46:57 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 09/21/2015 11:30 AM, Wanpeng Li wrote: > On 9/21/15 10:51 AM, Xiao Guangrong wrote: >> >> Thanks for your report and analysis, Janusz! >> >> On 09/19/2015 01:48 AM, Janusz wrote: >>> W dniu 18.09.2015 o 12:07, Laszlo Ersek pisze: >>>> On 09/18/15 11:37, Janusz wrote: >>>>> Hello, >>>>> >>>>> I am writting about this patch that was posted by Xiao: >>>>> http://www.spinics.net/lists/kvm/msg119044.html and this: >>>>> http://www.spinics.net/lists/kvm/msg119045.html >>>>> I've tested both kernel 4.2 and 4.3 and problem still exists when I use >>>>> OVMF - 100% cpu usage, VM resetting, while it works properly on kernel 4.1 >>>> My last (still current) request remains "please quirk it". See the end >>>> of , >>>> and other messages in that subthread. >>> when I saw message from Xiao that he posted patch for it and have seen >>> this code in kernel sources (landed in 4.2-rc3) I though that the status >>> is not "please quirk it" anymore >>>> >>>> I haven't been following kernel development, so maybe the quirk has not >>>> happened. No clue. >>>> >>>> ... "VM resetting" looks something different though; I've been under the >>>> impression that the pedantic (=unquirked) MTRR configuration didn't >>>> impact other things than speed. Janusz, maybe you could contribute with >>>> a host kernel bisection for the VM reset symptom. >>> To be more exact - VM is mostly not starting or its starting after long >>> time and then resetting it self at random time (but before system boots) >>> or gets very high cpu usage or sometimes boots without problem (the >>> least possible case scenario). When I start VM with -vga std, not with >>> my gpu passthrough - in most of the time I get this: >>> http://pastebin.com/raw.php?i=CKrNsueS >> >> It seems the behaviour is different with previous (previously, it can boot >> but slowly), right? >> >> The URL cat not be accessed, i do not know it's your web server issue or >> our networking issue. >> > > It can be accessed and dump as below: > > KVM internal error. Suberror: 1 > emulation failure > KVM internal error. Suberror: 1 > emulation failure > KVM internal error. Suberror: 1 > emulation failure > KVM internal error. Suberror: 1 > emulation failure > KVM internal error. Suberror: 1 > emulation failure > KVM internal error. Suberror: 1 > emulation failure > KVM internal error. Suberror: 1 > emulation failure > EAX=bfefa000 EBX=00000002 ECX=00000000 EDX=00000600 > ESI=00000000 EDI=00003eb8 EBP=00000000 ESP=00000000 > EIP=000a0000 EFL=00010086 [--S--P-] CPL=0 II=0 A20=1 SMM=0 HLT=0 > ES =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > CS =0010 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA] > SS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > DS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > FS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > GS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT > TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy > GDT= bfee87d8 0000003f > IDT= 00000000 0000ffff > CR0=00000033 CR2=00000000 CR3=bfefa000 CR4=00000640 > DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 > DR6=00000000ffff0ff0 DR7=0000000000000400 > EFER=0000000000000000 > Code=af af af af af af af af af af af af af af af af af af af af <00> 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > EAX=bfefa000 EBX=00000002 ECX=00000000 EDX=00000600 > ESI=00000000 EDI=00003eb8 EBP=00000000 ESP=00000000 > EIP=000a0000 EFL=00010086 [--S--P-] CPL=0 II=0 A20=1 SMM=0 HLT=0 > ES =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > CS =0010 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA] > SS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > DS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > FS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > GS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT > TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy > GDT= bfee87d8 0000003f > IDT= 00000000 0000ffff > CR0=00000033 CR2=00000000 CR3=bfefa000 CR4=00000640 > DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 > DR6=00000000ffff0ff0 DR7=0000000000000400 > EFER=0000000000000000 > Code=af af af af af af af af af af af af af af af af af af af af <00> 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000600 > ESI=00000000 EDI=00002000 EBP=00000000 ESP=00000000 > EIP=00001000 EFL=00010046 [---Z-P-] CPL=0 II=0 A20=1 SMM=0 HLT=0 > ES =0000 00000000 0000ffff 00009300 > CS =9f00 0009f000 0000ffff 00009b00 > SS =0000 00000000 0000ffff 00009300 > DS =0000 00000000 0000ffff 00009300 > FS =0000 00000000 0000ffff 00009300 > GS =0000 00000000 0000ffff 00009300 > LDT=0000 00000000 0000ffff 00008200 > TR =0000 00000000 0000ffff 00008b00 > GDT= 00000000 0000ffff > IDT= 00000000 0000ffff > CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000 > DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 > DR6=00000000ffff0ff0 DR7=0000000000000400 > EFER=0000000000000000 > Code=af af af af af af af af af af af af af af af af af af af af <00> 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > EAX=00000023 EBX=00000002 ECX=00000000 EDX=00000600 > ESI=00000000 EDI=00001fc2 EBP=00000000 ESP=00000000 > EIP=00001000 EFL=00010002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 > ES =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA] > CS =9f00 0009f000 0000ffff 00009b00 DPL=0 CS16 [-RA] > SS =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA] > DS =9f00 0009f000 0000ffff 00009300 DPL=0 DS16 [-WA] > FS =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA] > GS =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA] > LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT > TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy > GDT= bfee87d8 0000003f > IDT= 00000000 0000ffff > CR0=00000033 CR2=00000000 CR3=00000000 CR4=00000000 > DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 > DR6=00000000ffff0ff0 DR7=0000000000000400 > EFER=0000000000000000 > Code=af af af af af af af af af af af af af af af af af af af af <00> 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > EAX=00000023 EBX=00000002 ECX=00000000 EDX=00000600 > ESI=00000000 EDI=00001fc2 EBP=00000000 ESP=00000000 > EIP=00001000 EFL=00010002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 > ES =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA] > CS =9f00 0009f000 0000ffff 00009b00 DPL=0 CS16 [-RA] > SS =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA] > DS =9f00 0009f000 0000ffff 00009300 DPL=0 DS16 [-WA] > FS =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA] > GS =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA] > LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT > TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy > GDT= bfee87d8 0000003f > IDT= 00000000 0000ffff > CR0=00000033 CR2=00000000 CR3=00000000 CR4=00000000 > DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 > DR6=00000000ffff0ff0 DR7=0000000000000400 > EFER=0000000000000000 > Code=af af af af af af af af af af af af af af af af af af af af <00> 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > EAX=00000023 EBX=00000002 ECX=00000000 EDX=00000600 > ESI=00000000 EDI=00001fc2 EBP=00000000 ESP=00000000 > EIP=00001000 EFL=00010002 [-------] CPL=0 II=0 A20=1 SMM=0 HLT=0 > ES =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA] > CS =9f00 0009f000 0000ffff 00009b00 DPL=0 CS16 [-RA] > SS =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA] > DS =9f00 0009f000 0000ffff 00009300 DPL=0 DS16 [-WA] > FS =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA] > GS =0000 00000000 0000ffff 00009300 DPL=0 DS16 [-WA] > LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT > TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy > GDT= bfee87d8 0000003f > IDT= 00000000 0000ffff > CR0=00000033 CR2=00000000 CR3=00000000 CR4=00000000 > DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 > DR6=00000000ffff0ff0 DR7=0000000000000400 > EFER=0000000000000000 > Code=af af af af af af af af af af af af af af af af af af af af <00> 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > EAX=bfefa000 EBX=00000002 ECX=00000000 EDX=00000600 > ESI=00000000 EDI=00003eb8 EBP=00000000 ESP=00000000 > EIP=000a0000 EFL=00010086 [--S--P-] CPL=0 II=0 A20=1 SMM=0 HLT=0 > ES =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > CS =0010 00000000 ffffffff 00c09b00 DPL=0 CS32 [-RA] > SS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > DS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > FS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > GS =0008 00000000 ffffffff 00c09300 DPL=0 DS [-WA] > LDT=0000 00000000 0000ffff 00008200 DPL=0 LDT > TR =0000 00000000 0000ffff 00008b00 DPL=0 TSS32-busy > GDT= bfee87d8 0000003f > IDT= 00000000 0000ffff > CR0=00000033 CR2=00000000 CR3=bfefa000 CR4=00000640 > DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 > DR6=00000000ffff0ff0 DR7=0000000000000400 > EFER=0000000000000000 > Code=af af af af af af af af af af af af af af af af af af af af <00> 00 00 00 00 00 00 00 00 00 00 > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > Got it, thank you!