Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 17 Jul 2018 11:15:07 -0000 Received: from mx3-rdu2.redhat.com ([66.187.233.73] helo=mx1.redhat.com) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1ffNwf-0005u6-Mm for speck@linutronix.de; Tue, 17 Jul 2018 13:15:06 +0200 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 869067C6CA for ; Tue, 17 Jul 2018 11:14:58 +0000 (UTC) Received: from [10.36.116.189] (ovpn-116-189.ams2.redhat.com [10.36.116.189]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D3FDE2026D68 for ; Tue, 17 Jul 2018 11:14:57 +0000 (UTC) Subject: [MODERATED] Re: [PATCH] L1TF KVM ARCH_CAPABILITIES #4 References: <20180715135716.1874-1-pbonzini@redhat.com> <20180715135716.1874-5-pbonzini@redhat.com> From: Paolo Bonzini Message-ID: <4b6089f5-7640-8211-c133-6f5dec026a79@redhat.com> Date: Tue, 17 Jul 2018 13:14:56 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="T6vwZLMiUch5YX3QbUINmZek8Oh3zbzL8"; protected-headers="v1" To: speck@linutronix.de List-ID: This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156) --T6vwZLMiUch5YX3QbUINmZek8Oh3zbzL8 Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 16/07/2018 22:06, speck for Thomas Gleixner wrote: >> + >> + rdmsrl_safe(MSR_IA32_ARCH_CAPABILITIES, &data); >> + if (l1tf_vmx_mitigation !=3D VMENTER_L1D_FLUSH_NEVER) >> + data |=3D ARCH_CAP_SKIP_L1DFL_VMENTRY; > Why is this not checking for BUG_L1TF? If the host does not have it the= n > the guest should not have it either, right? The CPU model of the host can also be different from the guest (of course the latter should be older). Always setting the bit avoids the L1D flushes even if the CPU model does not match one of those in cpu_no_l1tf. Paolo --T6vwZLMiUch5YX3QbUINmZek8Oh3zbzL8--