From: Sean Christopherson <seanjc@google.com>
To: Kai Huang <kai.huang@intel.com>
Cc: Xiaoyao Li <xiaoyao.li@intel.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"pbonzini@redhat.com" <pbonzini@redhat.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/3] KVM: x86: Fix supported VM_TYPES caps
Date: Mon, 29 Apr 2024 08:56:37 -0700 [thread overview]
Message-ID: <Zi_DNaC4FIIr7bRP@google.com> (raw)
In-Reply-To: <514f75b3-a2c5-4e8f-a98a-1ec54acb10bc@intel.com>
On Mon, Apr 29, 2024, Kai Huang wrote:
> On 27/04/2024 3:47 am, Sean Christopherson wrote:
> > On Fri, Apr 26, 2024, Kai Huang wrote:
> > > On Thu, 2024-04-25 at 07:30 -0700, Sean Christopherson wrote:
> > > > On Thu, Apr 25, 2024, Xiaoyao Li wrote:
> > > > > On 4/24/2024 12:53 AM, Sean Christopherson wrote:
> > > > > > Fix a goof where KVM fails to re-initialize the set of supported VM types,
> > > > > > resulting in KVM overreporting the set of supported types when a vendor
> > > > > > module is reloaded with incompatible settings. E.g. unload kvm-intel.ko,
> > > > > > reload with ept=0, and KVM will incorrectly treat SW_PROTECTED_VM as
> > > > > > supported.
> > > > >
> > > > > Hah, this reminds me of the bug of msrs_to_save[] and etc.
> > > > >
> > > > > 7a5ee6edb42e ("KVM: X86: Fix initialization of MSR lists")
> > > >
> > > > Yeah, and we had the same bug with allow_smaller_maxphyaddr
> > > >
> > > > 88213da23514 ("kvm: x86: disable the narrow guest module parameter on unload")
> > > >
> > > > If the side effects of linking kvm.ko into kvm-{amd,intel}.ko weren't so painful
> > > > for userspace,
> > > >
> > >
> > > Do we have any real side effects for _userspace_ here?
> >
> > kvm.ko ceasing to exist, and "everything" being tied to the vendor module is the
> > big problem. E.g. params from the kernel command line for kvm.??? will become
> > ineffective, etc. Some of that can be handled in the kernel, e.g. KVM can create
> > a sysfs symlink so that the accesses through sysfs continue to work, but AFAIK
> > params don't supporting such aliasing/links.
> >
> > I don't think there are any deal breakers, but I don't expect it to Just Work either.
>
> Perhaps we can make the kvm.ko as a dummy module which only keeps the module
> parameters for backward compatibility?
Keeping parameters in a dummy kvm.ko would largely defeat the purpose of linking
everything into vendor modules, i.e. would make it possible for the parameters to
hold a stale value.
next prev parent reply other threads:[~2024-04-29 15:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-23 16:53 [PATCH 0/3] KVM: x86: Fix supported VM_TYPES caps Sean Christopherson
2024-04-23 16:53 ` [PATCH 1/3] KVM: x86: Fully re-initialize supported_vm_types on vendor module load Sean Christopherson
2024-04-23 16:53 ` [PATCH 2/3] KVM: x86: Fully re-initialize supported_mce_cap " Sean Christopherson
2024-04-23 16:53 ` [PATCH 3/3] KVM: x86: Explicitly zero kvm_caps during " Sean Christopherson
2024-04-24 3:25 ` Huang, Kai
2024-04-24 15:33 ` Sean Christopherson
2024-04-25 10:07 ` Huang, Kai
2024-04-25 13:43 ` [PATCH 0/3] KVM: x86: Fix supported VM_TYPES caps Xiaoyao Li
2024-04-25 14:30 ` Sean Christopherson
2024-04-26 1:17 ` Huang, Kai
2024-04-26 15:47 ` Sean Christopherson
2024-04-29 2:45 ` Huang, Kai
2024-04-29 15:56 ` Sean Christopherson [this message]
2024-05-07 17:20 ` Paolo Bonzini
2024-05-07 17:08 ` Paolo Bonzini
2024-05-10 14:50 ` Paolo Bonzini
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=Zi_DNaC4FIIr7bRP@google.com \
--to=seanjc@google.com \
--cc=kai.huang@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).