[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191025162645.GE6483@zn.tnic>
Date: Fri, 25 Oct 2019 18:26:45 +0200
From: Borislav Petkov <bp@...en8.de>
To: Sean Christopherson <sean.j.christopherson@...el.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, linux-kernel@...r.kernel.org,
Paolo Bonzini <pbonzini@...hat.com>,
Radim Krčmář <rkrcmar@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>, kvm@...r.kernel.org
Subject: Re: [PATCH v2 05/16] KVM: VMX: Drop initialization of
IA32_FEATURE_CONTROL MSR
On Mon, Oct 21, 2019 at 05:08:20PM -0700, Sean Christopherson wrote:
> + if (WARN_ON_ONCE(!(msr & FEATURE_CONTROL_LOCKED)))
> + return 1;
> +
> + /* launched w/ TXT and VMX disabled */
> + if (!(msr & FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX) &&
> + tboot_enabled())
> + return 1;
> + /* launched w/o TXT and VMX only enabled w/ TXT */
> + if (!(msr & FEATURE_CONTROL_VMXON_ENABLED_OUTSIDE_SMX) &&
> + (msr & FEATURE_CONTROL_VMXON_ENABLED_INSIDE_SMX) &&
> + !tboot_enabled()) {
> + pr_warn("kvm: disable TXT in the BIOS or "
> + "activate TXT before enabling KVM\n");
> + return 1;
Might as well fix that with a cleanup patch ontop:
WARNING: quoted string split across lines
#69: FILE: arch/x86/kvm/vmx/vmx.c:2208:
+ pr_warn("kvm: disable TXT in the BIOS or "
+ "activate TXT before enabling KVM\n");
Also in that same cleanup patch, if the order of those tests doesn't
matter, you can simplify them a bit:
if (tboot_enabled()) {
/* msr flag test here */
/* tboot disabled */
} else {
/* other two tests here */
}
Should make it a bit easier to parse.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists