From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Biweekly KVM Test report, kernel 0c7771... userspace 1223a0... Date: Mon, 30 Mar 2009 18:02:16 +0300 Message-ID: <49D0DEF8.60907@redhat.com> References: <0463F45F3606F4428ED35AC8C709F92E121F6A48@pdsmsx502.ccr.corp.intel.com> <49D06FCE.7030002@redhat.com> <20090330111756.GC26627@amit-x200.pnq.redhat.com> <49D0CF39.50009@redhat.com> <20090330144831.GA372@amit-x200.pnq.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Xu, Jiajun" , "'kvm@vger.kernel.org'" To: Amit Shah Return-path: Received: from mx2.redhat.com ([66.187.237.31]:36869 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751520AbZC3PCT (ORCPT ); Mon, 30 Mar 2009 11:02:19 -0400 In-Reply-To: <20090330144831.GA372@amit-x200.pnq.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Amit Shah wrote: >> >>> /* >>> * Check whether the Architectural PerfMon supports >>> * Unhalted Core Cycles Event or not. >>> * NOTE: Corresponding bit = 0 in ebx indicates event present. >>> */ >>> cpuid(10, &(eax.full), &ebx, &unused, &unused); >>> if ((eax.split.mask_length < >>> (ARCH_PERFMON_UNHALTED_CORE_CYCLES_INDEX+1)) || >>> (ebx & ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT)) >>> return 0; >>> >>> >> So I think it can be done. >> > > Only if the guest kernel (or module accessing those registers) look at > the cpuid output, right? I checked this for the Kaspersky AV on Windows, > the crash bug I was solving and that program doesn't seem to check > cpuid. > The only way to solve all possible cases is to implement the performance counters MSRs. That's not going to happen in a hurry, we're looking at making the known cases work. > RHEL 5.3 is based on 2.6.18 and this patch appears to have entered in > 2.6.21. I saw this on 5.3 as well. > The snippet I quoted came from RHEL 5.3. It checks cpuid so we should be able to make it fail gracefully. -- error compiling committee.c: too many arguments to function