Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1782738ybi; Wed, 17 Jul 2019 21:55:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzavjdQtBwxovbjyVuiCm+dfmLAJSGpUzwY7ZrgisUTyXy7EJ7JoiPRA4x4mhQ2RxGl8DTg X-Received: by 2002:a17:90a:d997:: with SMTP id d23mr46647594pjv.84.1563425736831; Wed, 17 Jul 2019 21:55:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563425736; cv=none; d=google.com; s=arc-20160816; b=b9l0TY8jGzH9cvu5+1bIk/5o9LAgsiBoiOz/YlrU1l2aApN0JGB24eDt3rL4511wGe 9C/U07mV9IG0PIoeAdmZwJMMzKZ6rGHGR7LhCEF1+e9za40ajllmM2cg9/muX9inybuN bgL9TrKqrTN9QJ48fe3d/mk0CLvCHxJnTKIeNRoO1bYXP9FNDgMCAESdrSRlr6z1fb51 94BX4TBi8rhKrtWAeovL6wkGeoQUomObpW0SkKmfJq9Mctc5moDCQjV3kP2c8RyPfxOc AveVxdV5zK+amsSdnJWeGDuCddL118mcRmGAJU6Q4uzcN26iswrCTUBzjwa/1NE7Dfh5 /94g== 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:mime-version :message-id:date:subject:cc:to:from; bh=QqRYDOz1krnngcZ1jmtC8IPfmYIAVb8icH8cZf5yujA=; b=yKsz+eEcPXy40QC+B6x6ptcrOcr1oIpG68zNXRYpakSM+9Ie93hOYspGC3mS3bdRTn YYxTgf4SqAQa3TWadl8YzDM4jCFvcBufo5sBVdMZlYMJQO7P2IyfC276Pc3kJgWZ0EIA ixu7yGeztmSPnkYwhkXjEnnIxFgkJK92iKSx9wsXlyDYlBaOSy68BP98vb1+JJBdWix/ X5WCO2R/Ds4iRXcIcTrn590RGmazRVyjBOpFxSgo0gVF/ozJ1TZ2h/5VXNK7tEvtj0YI Cjf2d8ITFty2IFj8/D1q7LYn/7pYs9mWnDWlAaZ9xtDXKOvrxeeBl4rs1UU/xF7BOiV4 tGrg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l9si1675914pgm.43.2019.07.17.21.55.06; Wed, 17 Jul 2019 21:55:36 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726557AbfGREwX (ORCPT + 99 others); Thu, 18 Jul 2019 00:52:23 -0400 Received: from mga02.intel.com ([134.134.136.20]:62079 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbfGREwX (ORCPT ); Thu, 18 Jul 2019 00:52:23 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2019 21:52:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,276,1559545200"; d="scan'208";a="179130169" Received: from likexu-e5-2699-v4.sh.intel.com ([10.239.48.159]) by orsmga002.jf.intel.com with ESMTP; 17 Jul 2019 21:52:20 -0700 From: Like Xu To: Paolo Bonzini Cc: kvm@vger.kernel.org, Gleb Natapov , like.xu@linux.inetl.com, linux-kernel@vger.kernel.org Subject: [PATCH] KVM: x86/vPMU: refine kvm_pmu err msg when event creation failed Date: Thu, 18 Jul 2019 12:49:14 +0800 Message-Id: <20190718044914.35631-1-like.xu@linux.intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If a perf_event creation fails due to any reason of the host perf subsystem, it has no chance to log the corresponding event for guest which may cause abnormal sampling data in guest result. In debug mode, this message helps to understand the state of vPMC and we should not limit the number of occurrences. Signed-off-by: Like Xu --- arch/x86/kvm/pmu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c index aa5a2597305a..259ada8d6db6 100644 --- a/arch/x86/kvm/pmu.c +++ b/arch/x86/kvm/pmu.c @@ -131,8 +131,8 @@ static void pmc_reprogram_counter(struct kvm_pmc *pmc, u32 type, intr ? kvm_perf_overflow_intr : kvm_perf_overflow, pmc); if (IS_ERR(event)) { - printk_once("kvm_pmu: event creation failed %ld\n", - PTR_ERR(event)); + pr_debug("kvm_pmu: event creation failed %ld\n for pmc->idx = %d", + PTR_ERR(event), pmc->idx); return; } -- 2.21.0