Received: by 10.192.165.156 with SMTP id m28csp1677824imm; Tue, 17 Apr 2018 03:42:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx49C7A7N+C6Rc7jl2j9ZA5U5BlYLvZMXtsgEv690hWsLlxX+yZ0DdLIi5cU9ge37ZbNbmBKN X-Received: by 2002:a17:902:8d96:: with SMTP id v22-v6mr1513129plo.373.1523961747282; Tue, 17 Apr 2018 03:42:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523961747; cv=none; d=google.com; s=arc-20160816; b=r0NXySrlTM2cCoxT1J9IRKyr8E4f+MJVOTWnfxVsRovz82OtmaPLPjKqi3cRswHBrD Udtt9qbgCRq8p09n1z5nb9EJug25JM9hAjoGPIAMGKVcY9dRULygdmrR47Yk/SzmuQ05 FDxscbW4EAoWK0xqLR+89NTCfy2d9in2X6eaV0TBnHmJI5v/9Kd6QJFnGqZn1XogkS8I 3bKp0FiWUUbHm9zQaKv+kC80dJ6LpC//INymRTi9VqSuaUNlAPm2SPWBWIEZvcJ+bU26 Bgk3U7PMhobVsfmeNdIpEynJBcR8Ui3gQkd2wTyxGLhhIXxElO9jj1k8pnR40dY39/+D d9kA== 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=zYoxLnVAmpKvDYtFtl6WKdACfHC07cg4m5MC52y8c6M=; b=gRX51lVw7VIkTqtHqMH92BJdmy88NihWJsBAPo9oIpuWwe55DQ7CusTv6Ahhsx5OYX h2vut1p+w0wUBzs2H+cTa2wkYWz7x5ztsdofbMmZP7Vlo+e+pIVWmVuyf43RGeLlQIBw mzeh6nYoJrpl4KYZsn+FCgxd07sTfwcONetIziHJK9pkmPQ/m8Tcb07pILhZjyu2AIcy Ft5sJ5xUtd0ZSltR0CccwJyHYJrIGfGGTWPzN5+cPqj9XmwP/0qJGAfqy+JoJjwIHwlu Za6jd1sX6Ehmjx3sqySk83L4ZE+VTE50hyhdPwiJZSbOoIbUQoe2mWeyHE/j0mcIe/FM jPsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IBr0sfQP; 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 o8si5271141pgv.375.2018.04.17.03.42.13; Tue, 17 Apr 2018 03:42:27 -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=IBr0sfQP; 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 S1752618AbeDQKlB (ORCPT + 99 others); Tue, 17 Apr 2018 06:41:01 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:45975 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751927AbeDQKk7 (ORCPT ); Tue, 17 Apr 2018 06:40:59 -0400 Received: by mail-ot0-f193.google.com with SMTP id w4-v6so1842421ote.12; Tue, 17 Apr 2018 03:40:58 -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=zYoxLnVAmpKvDYtFtl6WKdACfHC07cg4m5MC52y8c6M=; b=IBr0sfQPHUJe43MVnlPLzzKCC7OWjC4hXfUaOUdCOV6uMr058R2NMZNUiMb6G2eLHx NUzQmAfEOz7lq3ezCBCqR31huNLXlvoOVtqG1i2ZimoPagDIXNk90AVUNfjc+BtiUgX7 CPpM1JoA7F9ESu5EATonF6bXkOLrBGDCFsrCcYotjyobaPpdpe5AEREODJuXcd3kFGHf b30zQvJ9802Ex438GNAhn5VNmiaKRCrlG10/z83gyZMYNGCCHC86/6mlAC/FYkqic7G+ ZfrdEWGUbgA4IajeKZqWxqICBcz+TCHS5r2Avp19kguiOruCLqd7hMN7rjyJXn77mql1 X7tg== 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=zYoxLnVAmpKvDYtFtl6WKdACfHC07cg4m5MC52y8c6M=; b=V3+vd+VpFKlsHULsXmGqnjzcoZaUJ5Zy3ITeLSQ9bt6h4C3uwBZXCqL4IjewrlLXV2 ET8VBypBNMg9HsXjWSN2j61dbnhB1vCTCxBLvY1l9MjrF9XqJIF4muyOmqRcuX7Dm7jQ E6bYyTe/0pHa086iK8Eb02gsswZFHCLMZSxyAGEyR/l85iHLNluYAssSdxEs50+EMk3V s/PYxwzcjLgruuIz53IHRFwxVUTC4ziT4IzAPXXLCyPsaG3b5W77YaGVrmEay5uowW7y FWxpOf0fIOC6R/CwMM5TEIjuzlQL+V9cJZW0DzaKUgUvFEk8jqWQsi3qMh8oRZRRmqoq pZ9g== X-Gm-Message-State: ALQs6tCTdduQl0Q0cAvEsjNjAsfGRFpQCRREeu7Q3OaHb8JuZHTub4m4 YUSZ7jQDRCCfb0I2YHVGZGz9kA1fW7Wr2p71vj+wmw== X-Received: by 2002:a9d:282b:: with SMTP id m40-v6mr777045otb.203.1523961658487; Tue, 17 Apr 2018 03:40:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.210.78 with HTTP; Tue, 17 Apr 2018 03:40:58 -0700 (PDT) In-Reply-To: References: <20180226111630.GB4377@pd.tnic> <20180226113000.GC4377@pd.tnic> <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> From: Wanpeng Li Date: Tue, 17 Apr 2018 18:40:58 +0800 Message-ID: Subject: Re: [PATCH] KVM: X86: Allow userspace to define the microcode version To: Paolo Bonzini Cc: Borislav Petkov , LKML , kvm , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Eduardo Habkost 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 Cc Eduardo, 2018-02-26 20:41 GMT+08:00 Paolo Bonzini : > On 26/02/2018 13:22, Borislav Petkov wrote: >> On Mon, Feb 26, 2018 at 01:18:07PM +0100, Paolo Bonzini wrote: >>>> In this context, "host-initiated" write means written by KVM userspace >>>> with ioctl(KVM_SET_MSR). It generally happens only on VM startup, reset >>>> or live migration. >>> >>> To be clear, the target of the write is still the vCPU's emulated MSR. >> >> So how am I to imagine this as a user: >> >> qemu-system-x86_64 --microcode-revision=0xdeadbeef... > > More like "-cpu foo,ucode_rev=0xdeadbeef". But in practice what would > happen is one of the following: > > 1) "-cpu host" sets ucode_rev to the same value of the host, everyone > else leaves it to zero as is now. Hi Paolo, Do you mean the host admin to get the ucode_rev from the host and set to -cpu host, ucode_rev=xxxxxx or qemu get the ucode_rev directly by rdmsr? Regards, Wanpeng Li