Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp60310yba; Mon, 20 May 2019 05:02:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqzfuypkMX3jZggTfgKD27LkDCas6XeW6KTOe35ScBqI9aRG6Id+VcvdefqvwEexQSgKckfT X-Received: by 2002:a63:130d:: with SMTP id i13mr75006644pgl.396.1558353750372; Mon, 20 May 2019 05:02:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558353750; cv=none; d=google.com; s=arc-20160816; b=nCBnaqNRzEEMc9PlhUN1hzVVkFE/rNiB5wYLJsKCtSIEVYK0NVKZpezZ1DKTFoYRqz 1K2WSQiKUplwc7uRuE6jw6u79pXmGrVKiLfF06INn+cbA3yudvV+WVvslY4mU2OhtWUw fNQ2dURdCUURrUjle/J/E8eMaYYpAwy/UPLokqEUVP/3fgOTUzvGS4DGbMeAS8ZWJVV1 C286/oTsfMmXj1DGpm2Cm8OGRSOa3aomglDWjHlspBo7HftOFfPMP17YOZ235S5+S4lM GDDx38gw3A5R4aYsAS6k9CFR+bQH1IpnOBRCazUopQOq61H+7c3cYSg1LJQ3q0qgqGen ObyQ== 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 :in-reply-to:references:mime-version:dkim-signature; bh=onzwvJLUNwe0tWvgSEunaBZym2f6MEvnymYOXu8PZTc=; b=gmn0s5H3ZjEUJ1lkh7VvaEMbhBrN/gueNx/h/saqx0TSlMCpGDIJV+vv3TH7lpJymQ 8ExZYv14Hyclb3Pe2zJ02x2jql3Pm3zZDxLrnfq627JjtAYqnJ/67jLQqM7zBo6RDAB5 iFLzLa3Iy3iA86bfmuBj35XK0hZpgnSLTH3yRoce+27Hx4xeJPtCnmLY3c2yyn4ytIh/ V9kytgOY4y3kDBsJB38SohwBCueg37HzGzM8BWC/+CqUcVx88vK4cGR2m+vLQYFHdDi8 MVmegCoWozHJr6Z3wEqXea9yJpm3kfzvhayw6eElcibwdDMkOmoUY7CCySg6i+6lYVB8 dLoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XPSutS1f; 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 o1si17936015pld.142.2019.05.20.05.02.10; Mon, 20 May 2019 05:02:30 -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=XPSutS1f; 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 S1732792AbfETL3K (ORCPT + 99 others); Mon, 20 May 2019 07:29:10 -0400 Received: from mail-oi1-f196.google.com ([209.85.167.196]:37011 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732780AbfETL3K (ORCPT ); Mon, 20 May 2019 07:29:10 -0400 Received: by mail-oi1-f196.google.com with SMTP id f4so9697838oib.4; Mon, 20 May 2019 04:29:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=onzwvJLUNwe0tWvgSEunaBZym2f6MEvnymYOXu8PZTc=; b=XPSutS1fgOBzduwfcEdvoMGN7eiR5RjYzCc3yVB6O62+sh9qZtnHqPbKK7C7w2Qfsm YHZN8gE9DvpmyRlGYqfyIrR/5vi2eWgYBYLnOCfOmnTX9k/DDu4ZikWREC+ooX7R4foK rNPfpqatFV2CnZwzyYsPe6Ekhv0U+9jYsINQBP3tuCIuWcvK2kv9R9Bhg4nDzy39cEIA ZMSw+SuOr5X1LCquO7l1HDanelknIXzGmCw2c6dLp7uhguE0SrTOUV544f8o1+JssRXT KIV184MzsSyVUUAdrpqS4o7AbUTpyfD3B5aS73454ajKJQROcYHyMbkD1ogvAx5ACZcs hLCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=onzwvJLUNwe0tWvgSEunaBZym2f6MEvnymYOXu8PZTc=; b=DhFsXWnyWKYGTaATPecwpRx+FJ2uix5srA4UrwbyXo63jtg0z3B6YciC95wp46lL9y eh6201jVX5gO4OjUhC9vfBMMbMMuB6U4TDTsaS+qUqpo2TNlyQZ9FHIUQoSUM1Dcy5cc aikaZwGm9gp0qWMx5HkgNgH1/zC6jkvg0Pm6qPRusPp58sGJezDJCqW3xT6SSCwRcYEf RBkXQLCkIyDbbqbEYJO/gEXSsfD2NCN8AIC+NcNRcH3pd5p6eyX0IVgSOJjD93N5emYq 3ZAnF/HNqv5Sk0Li21YGwoRZmPOq1biBU1dlnuQGBWwp2vqaznHLft0vz55UlTyh48bh ALAA== X-Gm-Message-State: APjAAAV/8W092Pp0YkUtT2odDKPHdsKIllpHONOGB5NBuXRUZ4N3oICl 6ophnbwU0dxuxeiiylrpOaNX4jVD+rP1q7tBUvs= X-Received: by 2002:aca:bf83:: with SMTP id p125mr22591298oif.47.1558351750026; Mon, 20 May 2019 04:29:10 -0700 (PDT) MIME-Version: 1.0 References: <1558082990-7822-1-git-send-email-wanpengli@tencent.com> <7787e0cb-2c46-b5b5-94ea-72c061ea0235@redhat.com> In-Reply-To: <7787e0cb-2c46-b5b5-94ea-72c061ea0235@redhat.com> From: Wanpeng Li Date: Mon, 20 May 2019 19:29:01 +0800 Message-ID: Subject: Re: [PATCH 1/4] KVM: x86: Disable intercept for CORE cstate read To: Paolo Bonzini Cc: LKML , kvm , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Sean Christopherson , Liran Alon 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 On Mon, 20 May 2019 at 18:30, Paolo Bonzini wrote: > > On 17/05/19 10:49, Wanpeng Li wrote: > > From: Wanpeng Li > > > > Allow guest reads CORE cstate when exposing host CPU power management capabilities > > to the guest. PKG cstate is restricted to avoid a guest to get the whole package > > information in multi-tenant scenario. > > Hmm, I am not sure about this. I can see why it can be useful to run > turbostat in the guest, but is it a good idea to share it with the Yeah. > guest, since it counts from machine reset rather than from VM reset? I also saw amazon expose these in their nitro c5 instance. > > Maybe it could use a separate bit for KVM_CAP_X86_DISABLE_EXITS? It could be. Regards, Wanpeng Li