Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1235272pxj; Wed, 19 May 2021 01:09:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwB0fB8rSqKFo81NF9zUrSfK1dgQxXN3NEm1FrgFcV/JSvZMT8vxQD9bBVpP23VG+7+38vq X-Received: by 2002:a05:6402:30b0:: with SMTP id df16mr12679781edb.85.1621411767702; Wed, 19 May 2021 01:09:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621411767; cv=none; d=google.com; s=arc-20160816; b=OywLb3EKTP0+dFPmBxthVr5mZjUNxrnBRQ2zdmDOxWUcVDYuzrQYKygGJMdkKkIjyw g2Zf5/P1zqunxKXPK+ybr2GRTvkrEaAgxh2HDPMZrohqi37ZCq8ZfUbtMjjwN1vEeFbP Iho3WO0eawb5aRYd3vYFtUI3x+GR8/JH4L7e7C2fYcBxz2Pp72IO6yzGq9ZdwMAUZeXj UVLjibtvmXEn4uV5OnDORFdEcY+7NS9urgpGyN/+enf3ENH0Nuo9TXMnW8ncrLHp6ZJQ A+OV3vCPseeurRti+/TK8cgz1naHAjHW03LbYRcLiBorCOM8fV63oiBx4U/MTxc2Nugj Vr1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IiCjvzkKhIVpXfcqTma6XBTadoGCsobxQeAd+7dQ/rc=; b=kSvkBgbciGOrk92brJW7N8K+o8qNAo5/FvoaMxFz7DU+zRD6gePMFrq34HXIwvO4p/ WnMuA01DQwYQRqIaqFd++OBdG1LWX80FXXTNger3uEYqAD/BJK1XezhAjAlfum6MUz/L or6JAboxoqMlItXAdA9n9iWyuYH1Nl4iWe1qf/QYK3etVctQj4koNYL6cyzrSsiKdSIG 72wN14xl/5CBN19b8X3y4NHQD19r9an8htgfyjxpAfRIhNbF+N81vwtzlSUwM2sXOlpb tmi0DuzZ4c8lblgVUof1YWqzzgAtD9Gm18VW5mTD8f79Xg79B0CRICnOfUdJhf3kRjvO 6Fsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=EUNJGMY3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id lf27si12860885ejc.495.2021.05.19.01.09.04; Wed, 19 May 2021 01:09:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=EUNJGMY3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S238133AbhEQVUX (ORCPT + 99 others); Mon, 17 May 2021 17:20:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238011AbhEQVUW (ORCPT ); Mon, 17 May 2021 17:20:22 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACB63C061756 for ; Mon, 17 May 2021 14:19:05 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id pf4-20020a17090b1d84b029015ccffe0f2eso361673pjb.0 for ; Mon, 17 May 2021 14:19:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=IiCjvzkKhIVpXfcqTma6XBTadoGCsobxQeAd+7dQ/rc=; b=EUNJGMY3jn/+w09Csc6utD9z60HC+TthiEUoAHeVLA1iMWtEcRRg64d+U4mdvbCh/x 45P3zw1blfCY/UQ/rVNJAsfra5gBFTDT7Eh1eVy4TXOOzkf+yYHHP0BfdOHBEXQV6YIh PY0Pj/H3mL9jDs7Xw1MXnDHrSsomo8UehMmi0VBuPK4O7+39IrX3mSz6ZUzQCusaOa7M QBnkz34ifDw+1lIZRZ8vzK2jxEucfqhY+49oFvTYptKaYH1bV0AG/RT2mRGZPW2WAuuh q+kwyOjP/58fDTlB6C60dFOcPRFdLRcGDCUxupB0ribDE5s+hEb6+N8uDgkLCVApO4Ha j1oA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=IiCjvzkKhIVpXfcqTma6XBTadoGCsobxQeAd+7dQ/rc=; b=KVX4ta/q8RWmF5SWpfbM0OaiXmjJCK/vK3HQb9LNqm0YuQzJju3Ej4bMDPvik0nx8X UIDdh8faHNJIxtojYy/JZNSpwdS2bjV8qnQHJgS3IqCZw9PpNHbmJxQy0KS7CPl667fm cKm5K2opYRP6VYTB9Kk3IFAehny5YXLgMBRT+PkvqlUsNbmdK81Fw2eFTfombiBzeG11 xhuXoP5xKN6n6rv5GyH0ulsfsFI++ypuTPqEfFqQojx8x9HwxcVsKyU/MpUy/qe6ZqCt v2WWP4HQQLEn714voXSlhVCi425Uz3n6tYqf+EdrH9ImaT5ECYn6wVSOg0JJUxeqMzHc dmNQ== X-Gm-Message-State: AOAM533+PIsU5bX1imTBolMcf1nyfQOBschHiIaKYT3tMn3bPP8EBQR8 Oilp7njhdaEm8tHnXtOAAD4U9A== X-Received: by 2002:a17:902:b947:b029:ec:b04d:c8a2 with SMTP id h7-20020a170902b947b02900ecb04dc8a2mr521720pls.2.1621286345120; Mon, 17 May 2021 14:19:05 -0700 (PDT) Received: from google.com (240.111.247.35.bc.googleusercontent.com. [35.247.111.240]) by smtp.gmail.com with ESMTPSA id n9sm11463934pgt.35.2021.05.17.14.19.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 May 2021 14:19:04 -0700 (PDT) Date: Mon, 17 May 2021 21:19:00 +0000 From: Sean Christopherson To: Venkatesh Srinivas Cc: "Xu, Like" , Peter Zijlstra , Paolo Bonzini , Borislav Petkov , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , weijiang.yang@intel.com, Kan Liang , ak@linux.intel.com, wei.w.wang@intel.com, Stephane Eranian , liuxiangdong5@huawei.com, linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, Yao Yuan , Like Xu Subject: Re: [PATCH v6 04/16] KVM: x86/pmu: Set MSR_IA32_MISC_ENABLE_EMON bit when vPMU is enabled Message-ID: References: <20210511024214.280733-1-like.xu@linux.intel.com> <20210511024214.280733-5-like.xu@linux.intel.com> <5ef2215b-1c43-fc8a-42ef-46c22e093f40@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 17, 2021, Venkatesh Srinivas wrote: > Should this bit be conditional on the host having it set? No need, KVM advertises the architectural PMU to userspace iff hardware itself has an architecture PMU. Userspace is free to lie to its guests so long as doing so doesn't put KVM at risk.