Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp2100536ybg; Thu, 24 Oct 2019 04:51:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9H17LEZ7pNgAKT4bLyvWYAYS7wi/6VJr4x/S4Hi5gg/SwHM9jPwISWhfU8YNQpoT8MRo7 X-Received: by 2002:a50:8a90:: with SMTP id j16mr43747152edj.283.1571917889471; Thu, 24 Oct 2019 04:51:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571917889; cv=none; d=google.com; s=arc-20160816; b=Bt7SiaYxW2FeSDlA9ItM8+xO7QtLz279uWatPlVmQgVi7d+AA0Q//NTRAxDfYW/fmz 0Si5b5BOfZS5K9ifnr6S9J+qctDo7TsHZmuD+wWfv4DoUXBFuzpl1WEE4GQ4umCnVbO6 L54Yu8RL7flr30M9/kJXoTDZtSH47WfeZMk2yiYoloybSNXtsXLcQWJZ9M8wkUuyWyiR 3lLwOpLD8Bb4qyl4WymT0JfwIrU6VTa8ryI4e3zFPjfUNjBV0O+AS7YvShiH6GC+sdY1 HCJYh57n8SZI3Ug2V31euLbF3xblKm9OqmhFr/IEbSFLk4XglYaZnXCAUUb06+zs3Ifx O7hg== 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=pO/myx3J7kHrLEpa25DVGDw09CZzis8oLjoyxuQ8iXY=; b=KtQYP+p+R3sGAElsqUkTkAcdln/CZowEKFyAJTgi1soKx6Wf+sTP3YqdsKiD7V3xDt E0EeIyRZaRDTVOfnyfjkk4W9cplqBi5OSNUyuo/TueIGpF6pMyNzoEDG2YLGUquBRjwZ 1lsoMAx8kZilnwmJPLAcbTv+jY9q90TO772GsBjHij7bYkrnpCimptObZd8RQopFfD3w TDLJ69oZGuxwsffQZpGyQ3qc0H2XCatADjDrI9XKgjpVIk0jCZXXPYPRrCxoYKLJy59X pyrFLOeqVdu3LXWjxOGR6jUpItxHPKy8o2mt1RKJi8U/rutZxMNQ3TnckSZwVrj8vR+Y gsFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="rH/zv2bB"; 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 f12si8332584edc.1.2019.10.24.04.51.04; Thu, 24 Oct 2019 04:51:29 -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="rH/zv2bB"; 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 S1730701AbfJWRzT (ORCPT + 99 others); Wed, 23 Oct 2019 13:55:19 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:45090 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730131AbfJWRzT (ORCPT ); Wed, 23 Oct 2019 13:55:19 -0400 Received: by mail-io1-f68.google.com with SMTP id c25so25977226iot.12 for ; Wed, 23 Oct 2019 10:55:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pO/myx3J7kHrLEpa25DVGDw09CZzis8oLjoyxuQ8iXY=; b=rH/zv2bBzv28ImycCzKpsHuu8Ps9K+MRaSqhv0eBaQ/3iLs+cMzAR2Q7J8IIdjzbS1 xjEGpt52mQB+IbeLuyfJXacyyEaoZstWgGpMs/+Xvu2AN8D7AabjnsUbQlzJkATlMW72 6soo95F/DsR834TJQNiOLnP5A7F4D4FRtxhPvArLgUJ2hDyUUZSN9tTbPTDVFyjRHsx+ bUvmWlRJ/N691cAYkhE1QT2k8JPuipH4eXsJSWe6YBK58bpKBN1K2PuR+cDyjk1KLga7 sRfO8dzKDnYpEPd9X6q7qI/3SnZew/6K0OEa17iP+DntLfijtTTQ6JWyZoMmmhAWptht CsVA== 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=pO/myx3J7kHrLEpa25DVGDw09CZzis8oLjoyxuQ8iXY=; b=ebi52PnmlNvZKuAU6ZqrQepyJfLTM68dmF+hqcEZW3o3DQTyGwjCQY34usVQFDVT7f XueU3aht+Igqa6sq0smdFIkHPpum1mBZqfVRU64zNjPlp6Lsrgay0dfo2mBy3YCprVje obxXJ/YU1WJeElhL3tqVISz9vtFT6b0LjMnGzCaan4xwuTnyC8Wr+QsLqjpZxZP9mbo4 rMeAum1z9xq9fdfiN/b4+kzGKyJV7bAqZdqhIgKlOqmWpl9Omt7NPRp5NkKyQloreFtw xeiY7NaToJrliKzizpTEkByBxJ0m87BAeD53yanjEAwbgAjjCWBdY7W1TfDa/aPMrgGa +Ggw== X-Gm-Message-State: APjAAAVH4SXSG8MQR9OQI/3XDMjc/l2BUjEQ0RVXnKXLjhEuGSbprjE6 QhwcuCFx+ESwOuANYSsIXWCkgWhEtQUDL5YmWRkHEg== X-Received: by 2002:a5d:8146:: with SMTP id f6mr4908064ioo.108.1571853317840; Wed, 23 Oct 2019 10:55:17 -0700 (PDT) MIME-Version: 1.0 References: <20191021160651.49508-1-like.xu@linux.intel.com> <20191021160651.49508-4-like.xu@linux.intel.com> In-Reply-To: <20191021160651.49508-4-like.xu@linux.intel.com> From: Jim Mattson Date: Wed, 23 Oct 2019 10:55:06 -0700 Message-ID: Subject: Re: [PATCH v3 3/6] KVM: x86/vPMU: Rename pmu_ops callbacks from msr_idx to rdpmc_idx To: Like Xu Cc: Paolo Bonzini , Peter Zijlstra , kvm list , like.xu@intel.com, LKML , Sean Christopherson , Wei Wang , Kan Liang 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 Tue, Oct 22, 2019 at 1:12 AM Like Xu wrote: > > The leagcy pmu_ops->msr_idx_to_pmc is only called in kvm_pmu_rdpmc, so > this name is restrictedly limited to rdpmc_idx which could be indexed > exactly to a kvm_pmc. Let's restrict its semantic by renaming the > existing msr_idx_to_pmc to rdpmc_idx_to_pmc, and is_valid_msr_idx to > is_valid_rdpmc_idx (likewise for kvm_pmu_is_valid_msr_idx). > > Suggested-by: Paolo Bonzini > Signed-off-by: Like Xu Nit: The ECX argument to RDPMC is more than just an index (in fact, intel_is_valid_msr_idx() extracts the index from the provided ECX value), so I'd suggest s/rdpmc_idx/rdpmc_ecx/g. Reviewed-by: Jim Mattson