Bug 71521 - Host call trace when create guest.
Summary: Host call trace when create guest.
Status: RESOLVED CODE_FIX
Alias: None
Product: Virtualization
Classification: Unclassified
Component: kvm (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: virtualization_kvm
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-05 02:56 UTC by Robert Ho
Modified: 2014-03-28 06:29 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.14.0-rc1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
host-dmesg (82.16 KB, text/plain)
2014-03-05 02:56 UTC, Robert Ho
Details
patch to fix bug71521 (1.38 KB, text/plain)
2014-03-11 01:49 UTC, Zhou, Chao
Details

Description Robert Ho 2014-03-05 02:56:25 UTC
Created attachment 128051 [details]
host-dmesg

Environment:
------------
Host OS (ia32/ia32e/IA64):ia32e
Guest OS (ia32/ia32e/IA64):ia32e
Guest OS Type (Linux/Windows):Linux
kvm.git Commit:d3714010c307d26df251c45be9cd12ab6d41f0c4
qemu-kvm Commit:9fbee91a131a05e443d7108d7fbdf3ca91020290
Host Kernel Version:3.14.0-rc1
Hardware:Romley_EP, Ivytown_EP


Bug detailed description:
--------------------------
after create guest, the host will call trace


Reproduce steps:
----------------
1. create guest
qemu-system-x86_64 -enable-kvm -m 1024 -smp 2 -net none /root/rhel6u4.qcow

Current result:
----------------
host call trace

Expected result:
----------------
guest and host work fine

Basic root-causing log:
----------------------
vmwrite error: reg 2812 value 0 (err 12)
CPU: 2 PID: 10596 Comm: qemu-system-x86 Not tainted 3.14.0-rc1 #2
Hardware name: Intel Corporation S2600CP/S2600CP, BIOS SE5C600.86B.02.01.1001.080920131108 08/09/2013
 0000000000000000 ffff880234079c78 ffffffff81482475 0000000000000006
 ffff880623130040 ffff880234079c88 ffffffffa02d51d2 ffff880234079c98
 ffffffffa02d51ed ffff880234079cc8 ffffffffa02dd407 00000000000003c0
Call Trace:
 [<ffffffff81482475>] dump_stack+0x49/0x5c
 [<ffffffffa02d51d2>] vmwrite_error+0x27/0x29 [kvm_intel]
 [<ffffffffa02d51ed>] vmcs_writel+0x19/0x1b [kvm_intel]
 [<ffffffffa02dd407>] vmx_set_msr+0x10b/0x26e [kvm_intel]
 [<ffffffffa025c37c>] do_set_msr+0x27/0x29 [kvm]
 [<ffffffffa02673cf>] msr_io+0xa0/0x101 [kvm]
 [<ffffffffa025c355>] ? kvm_set_msr+0x13/0x13 [kvm]
 [<ffffffffa0267936>] kvm_arch_vcpu_ioctl+0x37e/0xb7b [kvm]
 [<ffffffffa02d5484>] ? update_cr8_intercept+0x1b/0x1d [kvm_intel]
 [<ffffffffa0264495>] ? update_cr8_intercept+0x65/0x6a [kvm]
 [<ffffffffa026a07c>] ? kvm_arch_vcpu_ioctl_set_sregs+0x38b/0x407 [kvm]
 [<ffffffffa025750e>] ? kvm_vcpu_ioctl+0x25c/0x4b5 [kvm]
 [<ffffffffa02681d8>] ? kvm_arch_vcpu_load+0xa5/0x16c [kvm]
 [<ffffffffa02576f0>] kvm_vcpu_ioctl+0x43e/0x4b5 [kvm]
 [<ffffffff8110349b>] ? do_brk+0x265/0x2bc
 [<ffffffff8113495d>] do_vfs_ioctl+0x2a2/0x2be
 [<ffffffff8113c799>] ? __fget_light+0x4a/0x5c
 [<ffffffff811349d2>] SyS_ioctl+0x59/0x7d
 [<ffffffff8148c762>] system_call_fastpath+0x16/0x1b


more tests:
kernel version:3.14.0-rc1
kvm.git  +  qemu.git  =result
d3714010 +  732c66ce  =pass
d3714010 +  9fbee91a  =fail


kernel version:3.13.-rc2
kvm.git   +   qemu.git  =result
7650b687  +   732c66ce  =  pass
7650b687  +   9fbee91a  = pass
Comment 1 Zhou, Chao 2014-03-11 01:49:24 UTC
Created attachment 128901 [details]
patch to fix bug71521

apply the patch to kvm.git:d3714010c307d26df251c45be9cd12ab6d41f0c4, after create guest, the guest and host work fine, the bug can't reproduce.
Comment 2 Robert Ho 2014-03-11 01:49:38 UTC
Hi,

I'm on leave during March 10 ~12.
During this period, I may occasionally check my email and probably not able to reply you in time.

Anything urgent could reach me by +86 186 2190 5686.

Thanks.
Comment 3 Paolo Bonzini 2014-03-25 10:18:01 UTC
In the reporter's case, this is caused by a bug in VMX microcode.  However it can happen also with nested virtualization.  A patch was posted to kvm@vger.kernel.org.
Comment 4 Zhou, Chao 2014-03-28 04:32:54 UTC
kvm.git + qemu.git:920c8377_9c5793c5
test on Romley_EP and Ivytown_EP,after create guest, the guest and host work fine, the bug can't reproduce.
Comment 5 Zhou, Chao 2014-03-28 04:34:06 UTC
this patch fixed the bug:
commit 920c837785699bcc48f4a729ba9ee3492f620b95
Author: Paolo Bonzini <pbonzini@redhat.com>
Date:   Wed Mar 26 15:54:00 2014 +0100

    KVM: vmx: fix MPX detection

    kvm_x86_ops is still NULL at this point.  Since kvm_init_msr_list
    cannot fail, it is safe to initialize it before the call.

    Fixes: 93c4adc7afedf9b0ec190066d45b6d67db5270da
    Reported-by: Fengguang Wu <fengguang.wu@intel.com>
    Tested-by: Jet Chen <jet.chen@intel.com>
    Cc: kvm@vger.kernel.org
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Note You need to log in before you can comment on or make changes to this bug.