From: Xiao Guangrong <guangrong.xiao@linux.intel.com>
To: Janusz <januszmk6@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>,
Wanpeng Li <wanpeng.li@hotmail.com>,
Laszlo Ersek <lersek@redhat.com>,
kvm@vger.kernel.org
Cc: edk2-devel@ml01.01.org
Subject: Re: [edk2] KVM: MTRR: fix memory type handling if MTRR is completely disabled
Date: Thu, 15 Oct 2015 12:19:30 +0800 [thread overview]
Message-ID: <561F2952.5060300@linux.intel.com> (raw)
In-Reply-To: <561E9A36.3080302@gmail.com>
On 10/15/2015 02:08 AM, Janusz wrote:
> W dniu 14.10.2015 o 10:32, Xiao Guangrong pisze:
>>
>>
>> On 10/14/2015 04:24 PM, Xiao Guangrong wrote:
>>>
>>>
>>> On 10/14/2015 03:37 PM, Janusz wrote:
>>>> I was able to run my virtual machine with this, but had very high cpu
>>>> usage when something happen in it like booting system. once, my virtual
>>>> machine hang and I couln't even get my mouse / keyboard back from qemu.
>>>> When I did vga passthrough, I didn't get any video output, and cpu
>>>> usage
>>>> was also high. Tried it on 4.3
>>>
>>> Which tree are you using? Is it kvm tree?
>>> Could you please work on queue brancn on current kvm tree based on
>>> top commit 73917739334c6509: KVM: x86: fix SMI to halted VCPU.
>>>
>>> Hmm... interesting, this diff works on my box...
>>
>> Forgot to say that i built my test env following the instructions on
>> kvm-wiki:
>> http://www.linux-kvm.org/page/OVMF
>>
>> My test script is attached, and i will try to build the env like yours
>> as much
>> as possible...
> I cloned git://git.kernel.org/pub/scm/virt/kvm/kvm.git 73917739334c6509
> commit, but this is breaking my system...
> Slim is not able to start i3, xdm is not killing X when I stop xdm, qemu
> is not able to start when I don't use option -nographic
> log from qemu on that kernel version:
> xcb_connection_has_error() returned true
> No protocol specified
> Could not initialize SDL(No available video device) - exiting
>
> On main kernel branch I don't have those problems.
>
> I tried to run with -nographic, and tried pc-i440fx-2.1 but the same
> problem as before, high cpu usage and no graphic on my GPU.
> I don't know if that will help by this is my log from option -global
> isa-debugcon.iobase=0x402 -debugcon file:fedora.ovmf.log:
> https://bpaste.net/show/36c54dba68c2
Well, the bug may be not in KVM. When this bug happened, i saw OVMF
only checked 1 CPU out, there is the log from OVMF's debug input:
Flushing GCD
Flushing GCD
Flushing GCD
Flushing GCD
Flushing GCD
Flushing GCD
Flushing GCD
Flushing GCD
Flushing GCD
Flushing GCDs
Detect CPU count: 1
So that the startup code has been freed however the APs are still running,
i think that why we saw the vCPUs executed on unexpected address.
After digging into OVMF's code, i noticed that BSP CPU waits for APs
for a fixed timer period, however, KVM recent changes require zap all
mappings if CR0.CD is changed, that means the APs need more time to
startup.
After following changes to OVMF, the bug is completely gone on my side:
--- a/UefiCpuPkg/CpuDxe/ApStartup.c
+++ b/UefiCpuPkg/CpuDxe/ApStartup.c
@@ -454,7 +454,9 @@ StartApsStackless (
//
// Wait 100 milliseconds for APs to arrive at the ApEntryPoint routine
//
- MicroSecondDelay (100 * 1000);
+ MicroSecondDelay (10 * 100 * 1000);
return EFI_SUCCESS;
}
Janusz, could you please check this instead? You can switch to your
previous kernel to do this test.
next prev parent reply other threads:[~2015-10-15 4:25 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-18 9:37 [edk2] KVM: MTRR: fix memory type handling if MTRR is completely disabled Janusz
2015-09-18 10:07 ` Laszlo Ersek
2015-09-18 17:48 ` Janusz
2015-09-21 2:51 ` Xiao Guangrong
2015-09-21 3:30 ` Wanpeng Li
2015-09-21 3:40 ` Xiao Guangrong
2015-10-01 14:12 ` Janusz
2015-10-01 14:18 ` Paolo Bonzini
2015-10-02 14:38 ` Janusz
2015-10-10 20:07 ` Xiao Guangrong
2015-10-12 18:20 ` Xiao Guangrong
2015-10-12 18:29 ` Xiao Guangrong
2015-10-14 3:58 ` Xiao Guangrong
2015-10-14 7:37 ` Janusz
2015-10-14 8:24 ` Xiao Guangrong
2015-10-14 8:32 ` Xiao Guangrong
2015-10-14 9:13 ` Janusz
2015-10-14 9:16 ` Janusz
2015-10-14 9:47 ` Laszlo Ersek
2015-10-15 3:59 ` Xiao Guangrong
2015-10-14 18:08 ` Janusz
2015-10-15 4:19 ` Xiao Guangrong [this message]
2015-10-15 6:19 ` Janusz
2015-10-15 6:41 ` Xiao Guangrong
2015-10-15 6:58 ` Janusz
2015-10-15 7:10 ` Xiao Guangrong
2015-10-15 7:21 ` Janusz
2015-10-15 16:18 ` Laszlo Ersek
2015-10-15 16:53 ` Kinney, Michael D
2015-10-15 18:46 ` Laszlo Ersek
2015-10-20 17:27 ` Janusz
2015-10-20 17:44 ` Laszlo Ersek
2015-10-20 18:52 ` Janusz Mocek
[not found] ` <5620696F.7050406@linux.intel.com>
2015-10-16 18:22 ` Laszlo Ersek
2015-09-21 8:23 ` Janusz
2015-09-22 8:59 ` Paolo Bonzini
2015-09-22 10:29 ` Janusz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=561F2952.5060300@linux.intel.com \
--to=guangrong.xiao@linux.intel.com \
--cc=edk2-devel@ml01.01.org \
--cc=januszmk6@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=lersek@redhat.com \
--cc=pbonzini@redhat.com \
--cc=wanpeng.li@hotmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).