Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp2045658ybg; Fri, 5 Jun 2020 04:18:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLsx5zrG2/rdT+TohGiTbFCRKMKWsgTavXW5tBD++Mzu4IB/aEQRJ2mrLek85fYANpx+O/ X-Received: by 2002:a05:6402:1486:: with SMTP id e6mr8441150edv.99.1591355907168; Fri, 05 Jun 2020 04:18:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591355907; cv=none; d=google.com; s=arc-20160816; b=dAjZG6PF9VfFAsc+JhneI5f4rSj90ovd55W+Xsmpp/xL/Y/H6ymdfaFyJ0tV3aKOaZ e9Q9TOEh2gbXnMa4/IJ1uWAQBpU8piTfNGi9w+h1CpXgRqQdoYbi2sQwedxIQZcOOW8H azZiJEvIEvc7pvLT2rglYXhaRgZpDE32AkStyQrgootUPqb0f+IXTH36V3v5AezWji+A j8Wn+c7omMpclqFIz7+pxiihkgoEtlSBmowt1Jp1LLBThPm5RWBSoard8Ti2pVLs/tXZ ysYTc4C2EJ6O7YRwN0GTRTmgK9FqMBf8ZAwIv4EfJufd8T98s2qH1upvmBjStPVs9PFi sF0Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=I8a2f7F+3vcKM6ztM/s5dArCF02jWdgvQcQyvf03Ew0=; b=kKTDxHtxWab22pUw7xE4ZfOxvBYNMo6gaKmxjU0JP+XaD6H0+najulNcJ0njW5P0p2 o4livmJNS5fvhyttLUatULPsT41hp7pac+K4F01tnyxXo6RXGjpoLNu/crAXAPmPtlpS wnmweEypI0EXCR3fKdk9onOzJFBQCpMijJZxwsjNzIBVHkc1VZYip4Fu+WfxdOtHR/Wm BZKjCBLnMu5lDDPNw4Wp888de9oX2kqHiIrx/GY+h6qGlG3MTOmhDZ93b3zf/zqYCIvL 5+ze52bdMEAvYx9brRZ+2qMK+PPI/8lCgRLlOyIJ2L71ZlZBOsg8RPVQ7ok7m9f15SXD 0/hA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=It7x1aur; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mf5si3585214ejb.186.2020.06.05.04.18.04; Fri, 05 Jun 2020 04:18: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=@redhat.com header.s=mimecast20190719 header.b=It7x1aur; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726809AbgFELP7 (ORCPT + 99 others); Fri, 5 Jun 2020 07:15:59 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:38264 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726465AbgFELP6 (ORCPT ); Fri, 5 Jun 2020 07:15:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591355757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=I8a2f7F+3vcKM6ztM/s5dArCF02jWdgvQcQyvf03Ew0=; b=It7x1aurSz7sqSBEFlTeOvv4g6OA/D+B1Oz5hIOro/lTp+uwYOCDZ4UeKJOUZ2EzEHLP+x ZunuzfhzXqwVsR0SJva1SnmqNc+KTVIOUgxjhMGVT9+V9PFuihmVAu4tiwR435AcVayW+5 nhFYVp0J+NDYM+k2tWAE/dJa554WxMk= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-135-TD5crfOYM5Sor3dcPbqebw-1; Fri, 05 Jun 2020 07:15:55 -0400 X-MC-Unique: TD5crfOYM5Sor3dcPbqebw-1 Received: by mail-wm1-f71.google.com with SMTP id p24so2900093wmc.1 for ; Fri, 05 Jun 2020 04:15:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=I8a2f7F+3vcKM6ztM/s5dArCF02jWdgvQcQyvf03Ew0=; b=bgGH5O3UnT2Y1RbS2rv7i5t/1h2W7SqPOJnFnwub2F6HehdcbjzneXqXrwdbO2AiDY 0XjuBKluXFFGH5ZPQTDM2vOzNuJ3ZLWvoA7GliKm3zAhTVXrpgX7fV2NxldNExNz4Q6i hXbXu9/KMGDmNr3CqkbfcdQA/sOqS0/bR/bS0JbR8rHgK+g38RwCWsgbamQYqbo3Taw0 DQCUf+uybrveoXYkXX6McLTDxJKO5mPcZ3lYyVCT/w6jRB+nrQC8+1cuWKcLU+RpARM9 N+UWvuwcw6dg0xiqoKjipJGenCgyKhfZvv9QRtbDBg61NKweNqGmh9Q1HX8eKTbkphT6 RF7A== X-Gm-Message-State: AOAM533SYyjHiAztOK8F1PuJ6nGYKxBeP18Z+sdlVBJJ3aN0tj8yiiGl 7sJMGVrAcuvsqNOfJxf+0gGMRxxaFCmngCY3uOKy5hTMi9xgT1d+exFev0bGBYPSSEcQw/KwlCx M4yBKvLgCeqXfiRc5XpkTJYbD X-Received: by 2002:a7b:c951:: with SMTP id i17mr2133195wml.44.1591355754775; Fri, 05 Jun 2020 04:15:54 -0700 (PDT) X-Received: by 2002:a7b:c951:: with SMTP id i17mr2133161wml.44.1591355754512; Fri, 05 Jun 2020 04:15:54 -0700 (PDT) Received: from [192.168.178.58] ([151.20.243.176]) by smtp.gmail.com with ESMTPSA id q1sm10556883wmc.12.2020.06.05.04.15.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Jun 2020 04:15:53 -0700 (PDT) Subject: =?UTF-8?B?UmU6IOetlOWkjTog562U5aSNOiBbUEFUQ0hdW3Y2XSBLVk06IFg4Njog?= =?UTF-8?Q?support_APERF/MPERF_registers?= To: "Li,Rongqing" , Like Xu , "like.xu@intel.com" Cc: "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "x86@kernel.org" , "hpa@zytor.com" , "bp@alien8.de" , "mingo@redhat.com" , "tglx@linutronix.de" , "jmattson@google.com" , "wanpengli@tencent.com" , "vkuznets@redhat.com" , "sean.j.christopherson@intel.com" , "xiaoyao.li@intel.com" , "wei.huang2@amd.com" References: <1591321466-2046-1-git-send-email-lirongqing@baidu.com> <3a88bd63-ff51-ad70-d92e-893660c63bca@linux.intel.com> From: Paolo Bonzini Message-ID: Date: Fri, 5 Jun 2020 13:15:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/06/20 11:41, Li,Rongqing wrote: >> >> As you said, "Pass-though: it is only suitable for KVM_HINTS_REALTIME", which >> means, KVM needs to make sure the kvm->arch.aperfmperf_mode value could >> "only" be set to KVM_APERFMPERF_PT when the check >> kvm_para_has_hint(KVM_HINTS_REALTIME) is passed. >> > pining vcpu can ensure that guest get correct mperf/aperf, but a user > has the choice to not pin, at that condition, do not think it is bug, this wants to say Also, userspace can also pin without exposing KVM_HINTS_REALTIME. So it's better not to check. Paolo