From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH kvm-unit-tests] x86: tsc: add test for RDTSCP Date: Fri, 13 Nov 2015 10:23:46 +0100 Message-ID: <5645AC22.2020204@redhat.com> References: <1447326772-27521-1-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm To: Wanpeng Li Return-path: Received: from mail-wm0-f53.google.com ([74.125.82.53]:32849 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752717AbbKMJXv (ORCPT ); Fri, 13 Nov 2015 04:23:51 -0500 Received: by wmec201 with SMTP id c201so71760771wme.0 for ; Fri, 13 Nov 2015 01:23:49 -0800 (PST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 13/11/2015 02:48, Wanpeng Li wrote: > > diff --git a/x86/unittests.cfg b/x86/unittests.cfg > > index ac652fc..fd7e9b2 100644 > > --- a/x86/unittests.cfg > > +++ b/x86/unittests.cfg > > @@ -114,6 +114,7 @@ file = sieve.flat > > > > [tsc] > > file = tsc.flat > > +extra_params = -cpu kvm64,+rdtscp > > > > [tsc_adjust] > > file = tsc_adjust.flat > > When I run cpuid tool in a real linux guest, the rdtscp, tsc_adjust, > tsc deadline timer are present, however, kvm-unit-tests always report > these features are not detected, what is the issue here? Your guest is probably run with some "-cpu" option, while kvm-unit-tests' x86/run script doesn't add any. This is why I needed the extra_params line above. Paolo