OSDN Git Service

x86/kvm: Move l1tf setup function
authorThomas Gleixner <tglx@linutronix.de>
Fri, 13 Jul 2018 14:23:19 +0000 (16:23 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 13 Jul 2018 14:29:54 +0000 (16:29 +0200)
commit7db92e165ac814487264632ab2624e832f20ae38
tree6259a9d65a10ea1430568eb4e7e5bd1ecaabd408
parenta7b9020b06ec6d7c3f3b0d4ef1a9eba12654f4f7
x86/kvm: Move l1tf setup function

In preparation of allowing run time control for L1D flushing, move the
setup code to the module parameter handler.

In case of pre module init parsing, just store the value and let vmx_init()
do the actual setup after running kvm_init() so that enable_ept is having
the correct state.

During run-time invoke it directly from the parameter setter to prepare for
run-time control.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Jiri Kosina <jkosina@suse.cz>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
Link: https://lkml.kernel.org/r/20180713142322.694063239@linutronix.de
arch/x86/kvm/vmx.c