Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751923AbdG1Lya (ORCPT ); Fri, 28 Jul 2017 07:54:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42602 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751071AbdG1Ly3 (ORCPT ); Fri, 28 Jul 2017 07:54:29 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2CBCC31BE48 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=prarit@redhat.com Subject: Re: [PATCH] turbostat: Running on virtual machine is not supported To: Len Brown , Henrique de Moraes Holschuh References: <1500987324-507-1-git-send-email-prarit@redhat.com> <20170725155911.ihtjkz5cuwdpwoxp@khazad-dum.debian.net> Cc: "linux-kernel@vger.kernel.org" , Len Brown , "linux-pm@vger.kernel.org" From: Prarit Bhargava Message-ID: <8aa1f7ec-1d21-f027-f4c4-7c3d8e88b8d2@redhat.com> Date: Fri, 28 Jul 2017 07:54:27 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 28 Jul 2017 11:54:29 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1079 Lines: 38 On 07/26/2017 11:09 PM, Len Brown wrote: > Henrique, > > I like your suggestion, thanks! > > BTW. let's discuss (and patch) turbostat on linux-pm, rather than on lkml. > > thanks, > -Len > > > On Tue, Jul 25, 2017 at 11:59 AM, Henrique de Moraes Holschuh > wrote: >> 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... To answer Len's previous question: I was wrong in my description. perf does work (mostly) under virt. So this would only be for the msr code. I'll post a v2 to linux-pm, and take Henrique's suggestion to only trigger on an msr read failure. P. >> >> -- >> Henrique Holschuh > > >