Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752615AbdGYP7Q (ORCPT ); Tue, 25 Jul 2017 11:59:16 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:48459 "EHLO out1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752144AbdGYP7P (ORCPT ); Tue, 25 Jul 2017 11:59:15 -0400 X-ME-Sender: X-Sasl-enc: A9qxCMP6gXhG5ov2fSTBJy4Re9DQUwMcE8+F2bIoJ6oi 1500998354 Date: Tue, 25 Jul 2017 12:59:11 -0300 From: Henrique de Moraes Holschuh To: Prarit Bhargava Cc: linux-kernel@vger.kernel.org, Len Brown , Len Brown Subject: Re: [PATCH] turbostat: Running on virtual machine is not supported Message-ID: <20170725155911.ihtjkz5cuwdpwoxp@khazad-dum.debian.net> References: <1500987324-507-1-git-send-email-prarit@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1500987324-507-1-git-send-email-prarit@redhat.com> X-GPG-Fingerprint1: 4096R/0x0BD9E81139CB4807: C467 A717 507B BAFE D3C1 6092 0BD9 E811 39CB 4807 User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 502 Lines: 12 On Tue, 25 Jul 2017, Prarit Bhargava wrote: > A common way of determining if the system is a virtual machine is to > search /proc/cpuinfo flags entry for "hypervisor". turbostat must output > a proper error message when found. Maybe you could output that message only if it fails to both use /dev/msr and perf *and* it is under a virtual machine? That would have better forward compatibility, maybe someday /dev/msr or perf will work inside a VM for what turbostat needs... -- Henrique Holschuh