Re: [PATCH 00/17] KVM monolithic v1

From: Sean Christopherson
Date: Mon Sep 23 2019 - 11:39:51 EST


On Fri, Sep 20, 2019 at 05:24:52PM -0400, Andrea Arcangeli wrote:
> Andrea Arcangeli (17):
> x86: spec_ctrl: fix SPEC_CTRL initialization after kexec
> KVM: monolithic: x86: convert the kvm_x86_ops methods to external
> functions
> KVM: monolithic: x86: handle the request_immediate_exit variation
> KVM: monolithic: x86: convert the kvm_pmu_ops methods to external
> functions
> KVM: monolithic: x86: enable the kvm_x86_ops external functions
> KVM: monolithic: x86: enable the kvm_pmu_ops external functions
> KVM: monolithic: x86: adjust the section prefixes
> KVM: monolithic: adjust the section prefixes in the KVM common code
> KVM: monolithic: x86: remove kvm.ko

IMO, the conversion to a monolithic module should occur immediately, i.e.
"KVM: monolithic: x86: remove kvm.ko" should be patch 01/nn.

Removing kvm_x86_ops and kvm_pmu_ops isn't a preqrequisite to making KVM
a monolothic module, rather they're enhancements that are made possible
*because* KVM is a monolithic module.

With that ordering, I suspect the convert->enable->use of kvm_x86_ops can
be collapsed into a single patch.

> KVM: monolithic: x86: use the external functions instead of kvm_x86_ops
> KVM: monolithic: x86: remove exports
> KVM: monolithic: remove exports from KVM common code
> KVM: monolithic: x86: drop the kvm_pmu_ops structure

> KVM: monolithic: x86: inline more exit handlers in vmx.c
> KVM: retpolines: x86: eliminate retpoline from vmx.c exit handlers
> KVM: retpolines: x86: eliminate retpoline from svm.c exit handlers
> x86: retpolines: eliminate retpoline from msr event handlers