Bug 116031

Summary: Many MSR sets are skipped when vcpu type is qemu64.
Product: Virtualization Reporter: changlimin
Component: kvmAssignee: virtualization_kvm
Status: NEW ---    
Severity: high CC: changlimin
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 4.1.x Subsystem:
Regression: No Bisected commit-id:

Description changlimin 2016-04-08 06:54:48 UTC
1. When vcpu type is qemu64, cpuid[8000_0001_EDX] does not support EXT2_RDTSCP on default.

2. Because kvm msrs_to_save contains MSR_TSC_AUX, qemu will set MSR_TSC_AUX in kvm_put_msrs.

3. In kvm, vmx->rdtscp_enabled is false(see 1), so vmx_set_msr set MSR_TSC_AUX will return error.

4. In __msr_io, the error will break the loop, so msrs after MSR_TSC_AUX will be skipped.
Comment 1 changlimin 2016-04-08 08:06:21 UTC
The bug exists when Qemu version >= 2.5

It seems merge these patches to 4.1.x can solve it.
609e36d372ad9329269e4a1467bd35311893d1d6
1cea0ce68ed76490ffa64a9e2a7a40104efe9352
81b1b9ca6d5ca5f3ce91c0095402def657cf5db3