[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] target/i386: relax assert when old host kernels don't includ
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH] target/i386: relax assert when old host kernels don't include msrs |
Date: |
Wed, 4 Dec 2019 17:23:50 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 |
On 04/12/19 16:47, Eduardo Habkost wrote:
> On Wed, Dec 04, 2019 at 04:34:45PM +0100, Paolo Bonzini wrote:
>> On 04/12/19 16:07, Catherine Ho wrote:
>>>> Ok, so the problem is that some MSR didn't exist in that version. Which
>>> I thought in my platform, the only MSR didn't exist is MSR_IA32_VMX_BASIC
>>> (0x480). If I remove this kvm_msr_entry_add(), everything is ok, the guest
>>> can
>>> be boot up successfully.
>>>
>>
>> MSR_IA32_VMX_BASIC was added in kvm-4.10. Maybe the issue is the
>> _value_ that is being written to the VM is not valid? Can you check
>> what's happening in vmx_restore_vmx_basic?
>
> I believe env->features[FEAT_VMX_BASIC] will be initialized to 0
> if the host kernel doesn't have KVM_CAP_GET_MSR_FEATURES.
But the host must have MSR features if the MSRs are added:
if (kvm_feature_msrs && cpu_has_vmx(env)) {
kvm_msr_entry_add_vmx(cpu, env->features);
}
Looks like feature MSRs were backported to 4.14, but
1389309c811b0c954bf3b591b761d79b1700283d and the previous commit weren't.
Paolo
- [PATCH] target/i386: relax assert when old host kernels don't include msrs, Catherine Ho, 2019/12/04
- Re: [PATCH] target/i386: relax assert when old host kernels don't include msrs, Paolo Bonzini, 2019/12/04
- Re: [PATCH] target/i386: relax assert when old host kernels don't include msrs, Catherine Ho, 2019/12/04
- [PATCH] target/i386: skip kvm_msr_entry_add when kvm_vmx_basic is 0, Catherine Ho, 2019/12/06
- Re: [PATCH] target/i386: skip kvm_msr_entry_add when kvm_vmx_basic is 0, Catherine Ho, 2019/12/06
- Re: [PATCH] target/i386: skip kvm_msr_entry_add when kvm_vmx_basic is 0, Paolo Bonzini, 2019/12/06
- Re: [PATCH] target/i386: skip kvm_msr_entry_add when kvm_vmx_basic is 0, no-reply, 2019/12/06