Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp614086ybt; Wed, 8 Jul 2020 07:41:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/Ht7Hz6GfV4/kfUVsY41xmMfGD9je2eSgpHC5mdZG6QPixoInFF88Z0np96Zc8wHJhYgC X-Received: by 2002:a17:906:4c41:: with SMTP id d1mr52521634ejw.463.1594219261002; Wed, 08 Jul 2020 07:41:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594219260; cv=none; d=google.com; s=arc-20160816; b=Js4N1PBfHEVSddUm8C4Rbov22Mos5enPEVP5+SZ9IMWNZUiTTCugtNBA61ayawnNHs Vg6bmGRwPn6F3wZI2L2uszLmfgrncLfLdPy+zhUxZ33r5W1P/zHImaW7a7UI1J7rrMOu /GvIovPmUZXKVUB/+flzk0+aYKKeF1KW2MjgZf7SwAHbLflkVwEoBu818X/CEiGR4mOb lLwLmhTRFGJ0zXu7ydAO0lWSApdpyQfVQxM708e02D1jdgA8RJiiSEiIgTicPomazLAa tgnQ1KDS13h836imY+PakE1EmBBOFbdyI9u/+EcohZKDYUIJJXbtRjMJdPDUIbx2aQ0X whtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject:reply-to :ironport-sdr:ironport-sdr; bh=zgLrbocdU/Kj52X0atffsjS3nq8CVB0o3vgFQXmFwYk=; b=fgW5Z3dKpViKEKaNXek+SMUIlVHwzpFVD5lNawmox/fH/PQlDoN1AFbssgawaVYQC3 rkqpgBP5jSJOi+hr/0OiAmDpjoCkE6pyGiiF9XdWePDs2NO46uZ+OvBTGACiGQIePJgv OCkUKa1VPfiSjSzznnIq9n94BOXpnuxntVw7v37JOe+fV43250X5KgSCTMgOz+C8fhNY HcIflLZVLMWtWAzzllXMOlbDQHvRrlMB3VQJKzlkiVPnBC8jAclmhaVqLXTybDBdxQpE X7qBDPNDBAfZzxDpZECQ7lugl5Nzpa8CE2+DTZYSLYsIIbz9o/BXdIf6q06KS99TVKtI pdlA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d25si4428eja.521.2020.07.08.07.40.36; Wed, 08 Jul 2020 07:41:00 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729871AbgGHOiI (ORCPT + 99 others); Wed, 8 Jul 2020 10:38:08 -0400 Received: from mga14.intel.com ([192.55.52.115]:46429 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729468AbgGHOiH (ORCPT ); Wed, 8 Jul 2020 10:38:07 -0400 IronPort-SDR: cuzTBBI8lx7ijv8/XLOF3IkCXqxC/qaqwm60VrGzFZELVDheibtR2FselNOSFBVTSLjBdOXKDP 91XXTE11MWkg== X-IronPort-AV: E=McAfee;i="6000,8403,9675"; a="146878729" X-IronPort-AV: E=Sophos;i="5.75,327,1589266800"; d="scan'208";a="146878729" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jul 2020 07:38:06 -0700 IronPort-SDR: q/6Fm8SieqlGqdux/lIR8JIg46GkcYtv5bKNgrkwJ9vimlib/sktAWycnltSE/ylTOCNQKFcRc S3T+mPPtOvnQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,327,1589266800"; d="scan'208";a="322956464" Received: from likexu-mobl1.ccr.corp.intel.com (HELO [10.255.31.237]) ([10.255.31.237]) by FMSMGA003.fm.intel.com with ESMTP; 08 Jul 2020 07:38:03 -0700 Reply-To: like.xu@intel.com Subject: Re: [PATCH v12 06/11] KVM: vmx/pmu: Expose LBR to guest via MSR_IA32_PERF_CAPABILITIES To: Andi Kleen , Like Xu Cc: Paolo Bonzini , Peter Zijlstra , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , wei.w.wang@intel.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <20200613080958.132489-1-like.xu@linux.intel.com> <20200613080958.132489-7-like.xu@linux.intel.com> <20200708133646.GM3448022@tassilo.jf.intel.com> From: "Xu, Like" Organization: Intel OTC Message-ID: Date: Wed, 8 Jul 2020 22:38:02 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200708133646.GM3448022@tassilo.jf.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/7/8 21:36, Andi Kleen wrote: >> + /* >> + * As a first step, a guest could only enable LBR feature if its cpu >> + * model is the same as the host because the LBR registers would >> + * be pass-through to the guest and they're model specific. >> + */ >> + if (boot_cpu_data.x86_model != guest_cpuid_model(vcpu)) >> + return false; > Could we relax this in a followon patch? (after this series is merged) Sure, there would be a follow-on patch to relax this check after it's merged. > > It's enough of the perf cap LBR version matches, don't need full model > number match. I assume you are referring to the LBR_FMT value in the perf_capabilities. > This would require a way to configure the LBR version > from qemu. Sure, I may propose this configuration in the QEMU community. > > This would allow more flexibility, for example migration from > Icelake to Skylake and vice versa. Yes, we need this flexibility to cover as many platforms as possible. Thanks, Like Xu > > -Andi