Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932575AbeAOJX7 (ORCPT + 1 other); Mon, 15 Jan 2018 04:23:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51608 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754462AbeAOJX6 (ORCPT ); Mon, 15 Jan 2018 04:23:58 -0500 Subject: Re: [PATCH 3/8] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest To: "Longpeng (Mike)" Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, rkrcmar@redhat.com, liran.alon@oracle.com, jmattson@google.com, aliguori@amazon.com, thomas.lendacky@amd.com, dwmw@amazon.co.uk, bp@alien8.de, x86@kernel.org, Gonglei References: <20180109120311.27565-1-pbonzini@redhat.com> <20180109120311.27565-4-pbonzini@redhat.com> <5A59DC65.5010908@huawei.com> From: Paolo Bonzini Message-ID: <93f6b277-fd12-71a0-3334-f92e069a9615@redhat.com> Date: Mon, 15 Jan 2018 10:23:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <5A59DC65.5010908@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 15 Jan 2018 09:23:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 13/01/2018 11:16, Longpeng (Mike) wrote: >> + /* >> + * FIXME: this is only needed until SPEC_CTRL is supported >> + * by upstream Linux in cpufeatures, then it can be replaced >> + * with static_cpu_has. >> + */ >> + have_spec_ctrl = cpu_has_spec_ctrl(); >> + if (have_spec_ctrl) >> + pr_info("kvm: SPEC_CTRL available\n"); >> + else >> + pr_info("kvm: SPEC_CTRL not available\n"); >> + > > In this approach, we must reload these modules if we update the microcode later ? I strongly suggest using early microcode update anyway. Paolo