Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1261443imm; Fri, 27 Jul 2018 14:05:26 -0700 (PDT) X-Google-Smtp-Source: AAOMgpegUc4qpR6873RHuGJAmkRYKnFJ79UYhS89kR7CuIjo3XIsZALT7cCduFu4CiDMdG1SnlzP X-Received: by 2002:a62:748:: with SMTP id b69-v6mr8093039pfd.177.1532725526848; Fri, 27 Jul 2018 14:05:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532725526; cv=none; d=google.com; s=arc-20160816; b=EgDRvJ99mWsooodsOUenPd/qD96oCF5ZZatg1AgofsrFKYyX/YPYNq3ZEn1iD1CnGO 05kHJqTes1TEQS1jyThRZe4hpS4gT/TdW3looOvf3VwUbmbma0x9Kn3wLjoR167P7iim uZNuXe1umbFyjk0eORhBvStHIKKlCs/o1W3t64JYfMaBMmJbi4LwYtJgBjTTT480gZ0z bjvDX9Act+AtcGLKZjgh23ddfndXYzGDMVuwLOkr1H3r9W9UgNgNxW/ZaKMWQU8qpP1J SE1rk8VOS2QANLsYogpH+QIG6K05YK8PKVVbZfFFPd8LUszaBv4ndcTzxCEUd/IVqBT9 3RBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:references:in-reply-to:mime-version :dkim-signature:arc-authentication-results; bh=dAf+q5uZJdFty79H+woEwbuw89ltcUxVjRgYA8EiT5o=; b=tAvI/Gh+Aux6OftFzkS9y8Jpd+rZj8Wmq1i6O6Da/JAtZoXn7uSxeAemSsuCMq/bEo pm1gZwve1JgCcgXXRfGffHsOi3ITOk4cnyMdC5tnDr9zn725hyvEDtUyvq/oYugRMrlE B5rvh/LB5alxoi8hY+zPF72xbUwtQo37Y5OzyeowphUISfFQcs92TrogcAIgUXmWMi1Q RmB48CKKkun3cQRtyscoE7715NKmJuw1JZO2fo3BiH1drDeKp9IfdTXv0ZiTvqHVYYvA 9TQVH+A9BAW2sYedjZ6FPDZzkTdr0DyNTH53vZXkphqYsnaEpL/5AjCZMb6nbnYAeL+U j/qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=NqE4vu7H; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z68-v6si4816943pfz.163.2018.07.27.14.05.12; Fri, 27 Jul 2018 14:05:26 -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=@google.com header.s=20161025 header.b=NqE4vu7H; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389695AbeG0W1d (ORCPT + 99 others); Fri, 27 Jul 2018 18:27:33 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:44123 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389542AbeG0W1c (ORCPT ); Fri, 27 Jul 2018 18:27:32 -0400 Received: by mail-oi0-f68.google.com with SMTP id s198-v6so11397955oih.11 for ; Fri, 27 Jul 2018 14:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=dAf+q5uZJdFty79H+woEwbuw89ltcUxVjRgYA8EiT5o=; b=NqE4vu7HLDk/vjjGp0LIuH5IL4wSHjUpBkcwIgpVfkURRdq5lGlsOUBX7eqPSZkJbu vz+EyWgT1H4OhgiQ8xzUxbu+i3rwmCnZ6BPn+IY6a/NCZY5c0xayJdIC46SEF8n2d4L+ Ah2sC+X/NscsGwLBM37FCO3QVfQabS9zLJOuMPOVLbshoPNeB6VFkrxdRh/V1wYwrHTc SwynmAV8+64UKpNdvhFYxEdN5g13YByy3Z+T/txQuWux8aCrJqqdli1Kc9Q3+yrEVJMN C0tzfHOBh384XyadpM13WLHr0Jm7E255iTFFQtCki3u0B0XNjVoxREOex/yj1e67wQGX raOA== 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:content-transfer-encoding; bh=dAf+q5uZJdFty79H+woEwbuw89ltcUxVjRgYA8EiT5o=; b=MoaTZ/CNrBUZtmf3J7pFqf5UHiCQnJGTkwqNMxE+OzuKYx3xhZaBMvSUcz3qwUgPw0 609n4HC4imAJCxVweNP9qcj2IKLgdMB62ZuonOefpKERX4vYLXKgKLS8LuDGra5uD0aA uB1R35DYgOsaurj4xyMPDUYmF8EaaJMH1E60RKR7BK+fEltBQ5Qc5Os/6g+//gUhQBay csbNfGi19+wxdy8uvGXP9IN4j9Ea0PyQt8uD1YXvOSVDG6kTxqDA14ll9SOeGkF0lp// pZs+9m1Lxf+2K2WLLVBd6ZFHAa2yxt/WwFqT+DszSOVUTFOq1goEsbCfucvzMngWudvo 4mJQ== X-Gm-Message-State: AOUpUlGbcW6Ub3D3MD+X3YTg5J2U954wZ2v+Yd2Cf6vCIgSk0mQzwpZJ JrfH78JHP/eGOyrf26bhC8Def94E/4DuckkOKnB9QQ== X-Received: by 2002:aca:efd7:: with SMTP id n206-v6mr8952930oih.70.1532725433510; Fri, 27 Jul 2018 14:03:53 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:3404:0:0:0:0:0 with HTTP; Fri, 27 Jul 2018 14:03:52 -0700 (PDT) In-Reply-To: <6F48D384-B29C-41B4-83F1-B02FC2480205@amacapital.net> References: <20170208080917.24320-1-khuey@kylehuey.com> <20170208080917.24320-9-khuey@kylehuey.com> <6F48D384-B29C-41B4-83F1-B02FC2480205@amacapital.net> From: Jim Mattson Date: Fri, 27 Jul 2018 14:03:52 -0700 Message-ID: Subject: Re: [PATCH v14 8/9] KVM: x86: virtualize cpuid faulting To: Andy Lutomirski Cc: Andy Lutomirski , Kyle Huey , "Robert O'Callahan" , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , X86 ML , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Jeff Dike , Richard Weinberger , Alexander Viro , Shuah Khan , Dave Hansen , Borislav Petkov , Peter Zijlstra , Boris Ostrovsky , Len Brown , "Rafael J. Wysocki" , Dmitry Safonov , David Matlack , Nadav Amit , Andi Kleen , LKML , user-mode-linux-devel@lists.sourceforge.net, "open list:USER-MODE LINUX (UML)" , Linux FS Devel , "open list:KERNEL SELFTEST FRAMEWORK" , kvm list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 27, 2018 at 1:46 PM, Andy Lutomirski wrot= e: >> On Jul 27, 2018, at 1:28 PM, Jim Mattson wrote: >> Initializing this bit to zero helps with migration, but then if the >> CPUID faulting bits in both MSRs are set, userspace has to take pains >> to ensure that MSR_PLATFORM_INFO is restored first, or the >> MSR_MISC_FEATURES_ENABLES value will be rejected. > > The code could drop the constraint and just let the entry possibly fail i= f the MSRs are set wrong That would be an improvement, I think. >> I'm also concerned about the 0 in the "Maximum Non-Turbo Ratio" field >> feeding into someone's calculated TSC frequency. > > Hmm. I don=E2=80=99t have a good answer to that. Are there any real CPUs = that have this MSR but don=E2=80=99t have that field? No. The reason I bring this up is that a customer has code that expects to be able to derive the TSC frequency from this MSR (per Intel's instructions in SDM volume 3, section 18.7.3), and they were surprised to find that the MSR raises #GP on our platform. We're looking into cherry-picking this support from upstream as a start, but I know the customer would be unhappy to read zero from bits 15:8.