Received: by 10.192.165.148 with SMTP id m20csp4132505imm; Mon, 23 Apr 2018 20:00:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+PX5Bp3W4S/C0tr9aFjGh00lFlgvxHtPwfAYcwBqVeNYOe1RmVu9aYE96srw3p2ElPiXqF X-Received: by 10.99.109.203 with SMTP id i194mr18216228pgc.402.1524538834174; Mon, 23 Apr 2018 20:00:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524538834; cv=none; d=google.com; s=arc-20160816; b=u8dNsYuPBTsFtT8TtrUYS0v8fzKYVY4R6QsymvwK7iCkffZ85JmRWTnsIDPUNRZ5ZV VnnjqiJhsRUY9nVAo6j5CIwxgk2J4nJ8MYmWfVCSnZww1OKWgcVs1UwLDdOPCkUQYhRu AO44yKzSMTuDNAQe8XfjWE2xXENMvh82yiT0wUqarIP7hoa7SLWX1lkXUrNK6ifDKlcc 4e90EqoziaPw+pfsM7pCfeXUFRfmCuAkv5T8YIL0DzUKhya6iqR3NjfaJ8FvBrUiLwEC S8RPoVF2XRZ+1LbMEML6yNH3hgZWcbF/VNTA15A4+8nppzmRB+YuYbK8QJT9LHKXwrE1 CObQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=xdGEOBU3dCOQh42bu4mP1lI151XTYrpdWa3Y8bJENMU=; b=ZIVkMn0BefkgJslHZaABjLCLx98lqHNbMM1XjiD8acHTUn4PuQAi0X9TO3NzvytEkf oSa2PVex3Z1YjC2VQsKHepVktUyfKBQ+niKYDLJxK8ve06FsHzWvvll8mocnO6yNxOvP 8dPSQJeyS7FossOqK7LK6BBMglRGDjnVEyWU2KtOo2fbHTUVyYHsW1y3ydqqD/K9j2zn 6l/DDCQSK3V/WOXg9+QEWhbF3a7al5ABhZDa98teXEtS63ewcSnBPHTQ1ApUI/64ZlDj uJoOp1Qd8qMAqG0f0gEZiJ+Y3GrZdSAbIfCX9Oo1OgZ9OV2j9PUMULBOX52O6AbpepQj YPDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XJVcScNl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si8670372pfh.295.2018.04.23.20.00.19; Mon, 23 Apr 2018 20:00:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XJVcScNl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932863AbeDXC7J (ORCPT + 99 others); Mon, 23 Apr 2018 22:59:09 -0400 Received: from mail-ot0-f178.google.com ([74.125.82.178]:42885 "EHLO mail-ot0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932787AbeDXC7F (ORCPT ); Mon, 23 Apr 2018 22:59:05 -0400 Received: by mail-ot0-f178.google.com with SMTP id q10-v6so14902777oth.9; Mon, 23 Apr 2018 19:59:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=xdGEOBU3dCOQh42bu4mP1lI151XTYrpdWa3Y8bJENMU=; b=XJVcScNlFRzxYqH1zmAA3jdLD7bcAngFg21M78BZTNIaenNve+cuTLlcfAD3GIFeoT CxhwV/i5M7NoB9nwcO4oR6ue9jT8XF3pBCnsJnfsNvPDHZpPVwcmlJd9KBvbSeJHsEnL UFs43IVANSr6oXphhL6OJGNFWD1GIher9mvro70geZXBWh98/3M1SG+zm1kIcp8AI2jR 8lnumTONyJ5p5Nra409wtlCdeEL1S8fp/FYcGxYsj47A7YxL32KSJY8R1YgmrHv09h3Q dH7Xhtc4sB62cf/OvtiirTwEQoSD4HpmE0eaL30RNSQyazuhyORTEjANhUcXVEOTzwSb RIIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=xdGEOBU3dCOQh42bu4mP1lI151XTYrpdWa3Y8bJENMU=; b=YWfccAqUfLGVQ3dVUJy1Q6lB3dV4jFMlTTehocmKKpKUXh65jFo+7272uqVykIANqM bSH8HCTsqaTYVpZJDqlYbO9pUUiuJ5d+c4VUXVoTo7T/l5IH752lftmrRbyIhKqMZNjY NSCTpKUxurSLtjQYBJmssdSObzQE5AKyxGRU+g6JE38YPazMSk2mqRFZUh+21XfwIMzx yFT30/V+9VQfDVkPkjKhjOgkUJJvVgMlKDqn/ZDb+uFUlL7DQu008kgakthlgm2cEEUB SxXrm2ZgcGDGq1/ExE2EZzBnT6V+Ejok2NKjCFfEP0fx6BUBp4FHObGkiUhv9Fm2bO4K ar3Q== X-Gm-Message-State: ALQs6tD8474ljG6SaDIKqUHbdZbgQzPW0cbWtwuckSBJLf2k8FN1/4sY q7LQRUD+o84QneG5EvmEJeiFNOtX0pDR+19hxeg= X-Received: by 2002:a9d:cb9:: with SMTP id b54-v6mr15827822otb.249.1524538744913; Mon, 23 Apr 2018 19:59:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.210.81 with HTTP; Mon, 23 Apr 2018 19:59:04 -0700 (PDT) In-Reply-To: References: <20180226114409.GD4377@pd.tnic> <46cecef2-b0fb-b0c2-bbf3-983328d52763@redhat.com> <20180226121509.GE4377@pd.tnic> <24cd527d-5287-f0be-ffe8-eab341bf1d94@redhat.com> <3866d359-0ef8-6a99-6254-84890be62b93@redhat.com> <20180226122205.GG4377@pd.tnic> <20180417202417.GA29865@localhost.localdomain> <20180418090329.GJ29865@localhost.localdomain> From: Wanpeng Li Date: Tue, 24 Apr 2018 10:59:04 +0800 Message-ID: Subject: Re: [PATCH] KVM: X86: Allow userspace to define the microcode version To: Paolo Bonzini Cc: Eduardo Habkost , Borislav Petkov , LKML , kvm , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-04-18 18:36 GMT+08:00 Paolo Bonzini : > On 18/04/2018 11:03, Eduardo Habkost wrote: >>>> QEMU setting ucode_rev automatically using the host value when >>>> using "-cpu host" (with no need for explicit ucode_rev option) >>>> makes sense to me. >>> QEMU can't get the host value by rdmsr MSR_IA32_UCODE_REV directly >>> since rdmsr will #GP when ring !=0, any idea? >> By looking at kvm_get_msr_feature(), it looks like >> ioctl(system_fd, KVM_GET_MSRS) would return the host MSR value >> for us. > > Yes, that's exactly what it was introduced for (together with other MSRs > including VMX capabilities). How about the live migration? What will happen if the source and destination machines have different microcode version? Regards, Wanpeng Li