From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751945AbdK0KkH (ORCPT ); Mon, 27 Nov 2017 05:40:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55846 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751423AbdK0KkG (ORCPT ); Mon, 27 Nov 2017 05:40:06 -0500 Subject: Re: [PATCH 2/2] KVM: x86: Allow userspace to define what's the microcode version To: Filippo Sironi , rkrcmar@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <1511714482-3273-1-git-send-email-sironi@amazon.de> <1511714482-3273-2-git-send-email-sironi@amazon.de> From: Paolo Bonzini Message-ID: <42809091-3330-c99b-0d11-218db66a3de9@redhat.com> Date: Mon, 27 Nov 2017 11:40:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <1511714482-3273-2-git-send-email-sironi@amazon.de> 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.26]); Mon, 27 Nov 2017 10:40:06 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/11/2017 17:41, Filippo Sironi wrote: > ... that the guest should see. > Guest operating systems may check the microcode version to decide whether > to disable certain features that are known to be buggy up to certain > microcode versions. Address the issue by making the microcode version > that the guest should see settable. What's the advantage of specifying the microcode version, rather than relying on userspace to drop the CPUID bit for the buggy feature? old guest(*) new guest hide in CPUID good good use ucode rev BAD good (*) old guest = doesn't know that the feature is buggy until a given ucode revision Thanks, Paolo > The rationale for having userspace specifying the microcode version, rather > than having the kernel picking it, is to ensure consistency for live-migrated > instances; we don't want them to see a microcode version increase without a > reset.