qemu-devel
[Top][All Lists]
Advanced

[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 14:53:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1

On 04/12/19 14:33, Catherine Ho wrote:
> Hi Paolo
> [sorry to resend it, seems to reply it incorrectly]
> 
> On Wed, 4 Dec 2019 at 19:23, Paolo Bonzini <address@hidden
> <mailto:address@hidden>> wrote:
> 
>     On 04/12/19 09:50, Catherine Ho wrote:
>     > Commit 20a78b02d315 ("target/i386: add VMX features") unconditionally
>     > add vmx msr entry although older host kernels don't include them.
>     >
>     > But old host kernel + newest qemu will cause a qemu crash as follows:
>     > qemu-system-x86_64: error: failed to set MSR 0x480 to 0x0
>     > target/i386/kvm.c:2932: kvm_put_msrs: Assertion `ret ==
>     > cpu->kvm_msr_buf->nmsrs' failed.
>     >
>     > This fixes it by relaxing the condition.
> 
>     This is intentional.  The VMX MSR entries should not have been added.
>     What combination of host kernel/QEMU are you using, and what QEMU
>     command line?
> 
> 
> Host kernel: 4.15.0 (ubuntu 18.04)
> Qemu: https://gitlab.com/virtio-fs/qemu/tree/virtio-fs-dev
> cmdline: qemu-system-x86_64 -M pc -cpu host --enable-kvm -smp 8 \
>                   -m 4G,maxmem=4G
> 
> But before 20a78b02d315, the older kernel + latest qemu can boot guest
> successfully.

Ok, so the problem is that some MSR didn't exist in that version.  Which
one it is?  Can you make it conditional, similar to MSR_IA32_VMX_VMFUNC?

Thanks,

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]