Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp127048imj; Thu, 14 Feb 2019 16:54:14 -0800 (PST) X-Google-Smtp-Source: AHgI3IaHwn8wFiFYlJVkr7y5YWtbXMFveueGLaZapx4f8uCn22FuF5StSwqUmRBxlhqLomL4qMBY X-Received: by 2002:a63:4658:: with SMTP id v24mr6547407pgk.114.1550192054244; Thu, 14 Feb 2019 16:54:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550192054; cv=none; d=google.com; s=arc-20160816; b=YYN/VZdhEFTt2KB/85yehxlpDr36Ixvv9SQCVtguG6FISiOCpbKs5mkougmdET3ZML QUSsAc7vVbI9ATFYrGGrOxObbBlB+5y1Zw2ToqFIYLmrQoiY6aDnzvQepvt/XMghN91z PGytvzzoXcH/zzwU3ioa63wZKazskneQIZ+FFMI6dpg3bLkveWKbDhvlrfPL+5q5x/Q+ JNDiFnNWmvuKvN5qqGSAv7cfdtJxQR3Lq+GhG8LUTl0g4DJuqdch6xt5fSPXGge6oAUi /y0qST5YstlIVnZ3W9D0u3V+YA9tUP7ktqdWixn/C6xUOkHp8VAcMpQKyMSlQygL4kt+ f13g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zt/OCClEo2eTZ5e6zDsFQkE7TayrZBGeYKx/zIKKjSw=; b=N1raCo5pfp6jwlMGPthbA4GjZc0wR5EdTkZZQWB13kvC4BNDY+8bwe3/RStZCiqZ8x xwT1l0ZRwrHg/3z9pTmMsgXSmUKj/MhmrbOU1NP01oizcupeLvyDqWcBkjAvA4Ezuvei YC76/c2D3sIkZltMXoTM8HMJaMweDvrQkrfavdxYybH0pYY96xuVtC8GmWlmV926FQru 5l0PzmZPK1QocVPnrQJKmnNBo0r1//osBQFVV5gFQRAvfeVf+DYgNTgr4O6K9fGMAYAT g6ifZuc+46Hu+AZHJOoKqqveYBwY68ZXrMX6TrFNIRswEHSUlj85J1Dma8QI6GKYftji Pitw== 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 h79si3810180pfa.127.2019.02.14.16.53.58; Thu, 14 Feb 2019 16:54:14 -0800 (PST) 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 S2502702AbfBNQVz (ORCPT + 99 others); Thu, 14 Feb 2019 11:21:55 -0500 Received: from mga02.intel.com ([134.134.136.20]:2447 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391561AbfBNQVy (ORCPT ); Thu, 14 Feb 2019 11:21:54 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2019 08:21:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,369,1544515200"; d="scan'208";a="126495020" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.137]) by orsmga003.jf.intel.com with ESMTP; 14 Feb 2019 08:21:50 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id 405DF301247; Thu, 14 Feb 2019 08:21:50 -0800 (PST) Date: Thu, 14 Feb 2019 08:21:50 -0800 From: Andi Kleen To: Wei Wang Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, pbonzini@redhat.com, peterz@infradead.org, kan.liang@intel.com, mingo@redhat.com, rkrcmar@redhat.com, like.xu@intel.com, jannh@google.com, arei.gonglei@huawei.com, jmattson@google.com Subject: Re: [PATCH v5 03/12] KVM/x86: KVM_CAP_X86_GUEST_LBR Message-ID: <20190214162150.GJ16922@tassilo.jf.intel.com> References: <1550135174-5423-1-git-send-email-wei.w.wang@intel.com> <1550135174-5423-4-git-send-email-wei.w.wang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1550135174-5423-4-git-send-email-wei.w.wang@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + case KVM_CAP_X86_GUEST_LBR: > + r = -EINVAL; > + if (cap->args[0] && > + x86_perf_get_lbr_stack(&kvm->arch.lbr_stack)) { > + pr_err("Failed to enable the guest lbr feature\n"); Remove the pr_err. We don't want unprivileged users trigger unlimited kernel printk.