From: Zhao Liu <zhao1.liu@intel.com>
To: Ewan Hai <ewanhai-oc@zhaoxin.com>
Cc: Xiaoyao Li <xiaoyao.li@intel.com>,
pbonzini@redhat.com, mtosatti@redhat.com, kvm@vger.kernel.org,
qemu-devel@nongnu.org, ewanhai@zhaoxin.com, cobechen@zhaoxin.com
Subject: Re: [PATCH v3] target/i386/kvm: Refine VMX controls setting for backward compatibility
Date: Tue, 25 Jun 2024 22:08:53 +0800 [thread overview]
Message-ID: <ZnrPdZdgcBSY1sMi@intel.com> (raw)
In-Reply-To: <53119b66-3528-41d6-ac44-df166699500a@zhaoxin.com>
[snip]
> > Additionally, has_msr_vmx_vmfunc has the similar compat issue. I think
> > it deserves a fix, too.
> >
> > -Zhao
> Thanks for your reply. In fact, I've tried to process has_msr_vmx_vmfunc in
> the same
> way as has_msr_vmx_procbased_ctls in this patch, but when I tested on Linux
> kernel
> 4.19.67, I encountered an "error: failed to set MSR 0x491 to 0x***".
>
> This issue is due to Linux kernel commit 27c42a1bb ("KVM: nVMX: Enable
> VMFUNC
> for the L1 hypervisor", 2017-08-03) exposing VMFUNC to the QEMU guest
> without
> corresponding VMFUNC MSR modification code, leading to an error when QEMU
> attempts
> to set the VMFUNC MSR. This bug affects kernels from 4.14 to 5.2, with a fix
> introduced
> in 5.3 by Paolo (e8a70bd4e "KVM: nVMX: allow setting the VMFUNC controls
> MSR", 2019-07-02).
It looks like this fix was not ported to the 4.19 stable kernel.
> So the fix for has_msr_vmx_vmfunc is clearly different from
> has_msr_vmx_procbased_ctls2.
> However, due to the different kernel support situations, I have not yet come
> up with a suitable
> way to handle the compatibility of has_msr_vmx_procbased_ctls2 across
> different kernel versions.
>
> Therefore, should we consider only fixing has_msr_vmx_procbased_ctls2 this
> time and addressing
> has_msr_vmx_vmfunc in a future patch when the timing is more appropriate?
>
I agree this fix should focus on MSR_IA32_VMX_PROCBASED_CTLS2.
But I think at least we need a comment (maybe a TODO) to note the case of
has_msr_vmx_vmfunc in a followup patch.
Let's wait and see what Paolo will say.
-Zhao
next prev parent reply other threads:[~2024-06-25 13:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 9:58 [PATCH v3] target/i386/kvm: Refine VMX controls setting for backward compatibility EwanHai
2024-06-24 10:20 ` Ewan Hai
2024-06-25 9:49 ` Zhao Liu
2024-06-25 12:46 ` Ewan Hai
2024-06-25 14:08 ` Zhao Liu [this message]
2024-07-24 2:03 ` Ewan Hai
2024-08-30 2:58 ` PING: " EwanHai
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=ZnrPdZdgcBSY1sMi@intel.com \
--to=zhao1.liu@intel.com \
--cc=cobechen@zhaoxin.com \
--cc=ewanhai-oc@zhaoxin.com \
--cc=ewanhai@zhaoxin.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xiaoyao.li@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.