Return-path: Received: from mx2.suse.de ([195.135.220.15]) by Galois.linutronix.de with esmtps (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1fBdk2-0001to-EG for speck@linutronix.de; Thu, 26 Apr 2018 12:03:06 +0200 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 09210ADE9 for ; Thu, 26 Apr 2018 10:03:01 +0000 (UTC) Date: Thu, 26 Apr 2018 12:02:48 +0200 From: Borislav Petkov Subject: [MODERATED] Re: [PATCH v5 04/11] [PATCH v5 04/10] Linux Patch #4 Message-ID: <20180426100248.GB15043@pd.tnic> References: <20180426020545.989155437@localhost.localdomain> MIME-Version: 1.0 In-Reply-To: <20180426020545.989155437@localhost.localdomain> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable To: speck@linutronix.de List-ID: On Wed, Apr 25, 2018 at 10:04:19PM -0400, speck for konrad.wilk_at_oracle.com= wrote: > KVM/SVM/VMX/x86/bugs: Support the combination of guest IBRS and ours. >=20 > A guest may modify the SPEC_CTRL MSR from the value used by the > kernel. Since we don't use IBRS, this means a value of zero > is what we need in the host. >=20 > But the 336996-Speculative-Execution-Side-Channel-Mitigations.pdf > refers to the other bits as reserved so we should respect the > boot time SPEC_CTRL value and use that. >=20 > This allows us to deal with future extensions to the SPEC_CTRL > interface if any at all. >=20 > Note: We are using wrmsrl instead of native_wrmsl. I does not make > any difference as paravirt will over-write the callq *0xfff.. with > the wrmsrl assembler code. >=20 > A copy of this document is available at > https://bugzilla.kernel.org/show_bug.cgi?id=3D199511 >=20 > Signed-off-by: Konrad Rzeszutek Wilk > --- > v2: New patch > v3: Use the two accessory functions instead of poking at the global variabl= e. > v4: Use x86_get_spec_ctrl instead of global variable. > v5: Use x86_get_default_spec_ctrl instead of x86_get_spec_ctrl > --- > arch/x86/include/asm/nospec-branch.h | 10 ++++++++++ > arch/x86/kernel/cpu/bugs.c | 18 ++++++++++++++++++ > arch/x86/kvm/svm.c | 6 ++---- > arch/x86/kvm/vmx.c | 6 ++---- > 4 files changed, 32 insertions(+), 8 deletions(-) Reviewed-by: Borislav Petkov --=20 Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imend=C3=B6rffer, Jane Smithard, Graham Norton, HR= B 21284 (AG N=C3=BCrnberg) --=20