Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2334845ybi; Thu, 18 Jul 2019 06:54:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxk6dRYDim+O7S5ZL6cU3VrWMbTemgkZFvBDVC8siD50BJ9g90G8lH7jCodYPZe4tZURgoK X-Received: by 2002:a63:c1c:: with SMTP id b28mr15720767pgl.354.1563458048895; Thu, 18 Jul 2019 06:54:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563458048; cv=none; d=google.com; s=arc-20160816; b=nzZf3Dgk4h74p5/A/x6tWC/lEPjCX0RvvHx9mM1hc9x1i3qY+304a+JOQiDTFxWq/b tNA2k4h5oraPJf3e7xeOr1NN9t6BdWAcwM8SNBy1hbD4I22+VWGyBsJko+tlMGcJQ1BA pZNkIrloNcs59CLI0IYSE1mnc8xKEO69jT57wZ9F8AW9aVta0m5s3MCbXOIJQPHURXWS cL2+CX7JLq29VMM+ZA4RYYBwUWtsz9lr8+gGUgMsdFEgqsm/tg6uGjBC8Ae/HXiXyWor 095bs1ZUcmLV/g6oQL4V3e0MGlidT1MdWxN9M0vhDDQqclTFuHV4u26BtCgDgXRwe7tR OyUg== 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:openpgp:from:references:cc:to:subject; bh=2defXGb6i7e6Mhp08ZGJPyYpwSINwFXbDxPiExwBqLw=; b=W+6vDvdNPPo6Vl2zWDg60WYr5EOfxxqgWN9TpkteJg+rm2NzO4iEM6sGTL6CbbU3xr HgtsEozXNFWGplFMHpAy80jCQkdDFrKWx72suNbEs0+Ntd1KfDQAjQUIJz4PL3NgWCmR 59IgpiYW1PZSQBWXArWEu9HfDvYWOUzZZk8F5pP0OiPQWIPQADt8GataB2QJI9JHIvo9 ZMO6fLZrFbeIjfP9d3zJFNi34oPcajwQHvriBSZWBWJ9Yc1Jg7hud/HaUE8j7XmbTMsn YVOuc/5NMsVgaex888u4bQ56lGE6l/UD9gB86lmOa4n470Z+da7ZchZXFj6fg5PZBxUo yxKQ== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1si1134920plr.405.2019.07.18.06.53.51; Thu, 18 Jul 2019 06:54:08 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390391AbfGRNw5 (ORCPT + 99 others); Thu, 18 Jul 2019 09:52:57 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:46664 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727791AbfGRNw5 (ORCPT ); Thu, 18 Jul 2019 09:52:57 -0400 Received: by mail-wr1-f66.google.com with SMTP id z1so28767254wru.13 for ; Thu, 18 Jul 2019 06:52: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:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=2defXGb6i7e6Mhp08ZGJPyYpwSINwFXbDxPiExwBqLw=; b=CMJHMbnau61zLAZQXPOJ5T5SnDYuskeGreQc8/uFEn9bNmAy4BUIyUbKS6x5vktaoS //FWIOHpPUJxqpCxktLeJgBpqf3WJtJvS2byDoZIRixBtxFC8SM0c/QZQcXxlvaTdIfK o/OBiKQYgNmE72eJtJL5/sQZYwe/slRBd/9wms4ggoohAVpmhLWxbd/HPgJZQLSK/Fui tKkh437xiApEe4vkD8ZkBGaVkfSV0PGE3LtWCvm3zszjMIQiu33BxK17gss9ZK/R6ZcF SWVMeOxTL4pxV1yMbfXF0nUknLKYz2E6YHA/FShF7KmriDwOnNMVvBgLfELUPd3FuhU2 s1Pg== X-Gm-Message-State: APjAAAVKZPrjSjvGSkxyd9uPOa89mJNu5c9GYlnZL/pBUfk64b96E3vm ryAir16+lo/s07QV5ynOndmv+c5MoCHH5Q== X-Received: by 2002:adf:f186:: with SMTP id h6mr37752268wro.274.1563457975062; Thu, 18 Jul 2019 06:52:55 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:e427:3beb:1110:dda2? ([2001:b07:6468:f312:e427:3beb:1110:dda2]) by smtp.gmail.com with ESMTPSA id r123sm24558962wme.7.2019.07.18.06.52.54 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jul 2019 06:52:54 -0700 (PDT) Subject: Re: [PATCH v2] KVM: x86/vPMU: refine kvm_pmu err msg when event creation failed To: Like Xu , Avi Kivity Cc: Joe Perches , kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190718053514.59742-1-like.xu@linux.intel.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: <3d1d84a0-7c63-e470-a1d1-b32f56e52f74@redhat.com> Date: Thu, 18 Jul 2019 15:52:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20190718053514.59742-1-like.xu@linux.intel.com> 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 18/07/19 07:35, Like Xu wrote: > 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 may not > limit the number of occurrences but not in a spamming style. > > Suggested-by: Joe Perches > 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..cedaa01ceb6f 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_ratelimited("kvm_pmu: event creation failed %ld for pmc->idx = %d\n", > + PTR_ERR(event), pmc->idx); > return; > } > > Queued, thanks. Paolo