From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753424AbbJPAy4 (ORCPT ); Thu, 15 Oct 2015 20:54:56 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:19535 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752717AbbJPAyz (ORCPT ); Thu, 15 Oct 2015 20:54:55 -0400 Message-ID: <56204AD0.7030509@huawei.com> Date: Fri, 16 Oct 2015 08:54:40 +0800 From: Jian Zhou User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Paolo Bonzini , , , , , , , , , CC: , Subject: Re: [PATCH] KVM: VMX: enable LBR virtualization References: <1444471906-8496-1-git-send-email-jianjay.zhou@huawei.com> <561BA323.7090002@huawei.com> <561BAB15.8090700@redhat.com> <561E3BDB.4080904@huawei.com> <561E3CC8.7080309@redhat.com> <561FAF51.4090101@huawei.com> <561FC028.8000006@redhat.com> In-Reply-To: <561FC028.8000006@redhat.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.19.14] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.56204ADB.008F,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: a7ade47b431b46113a0e7e26bcd56a6d Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> Does it depend on vPMU _for Linux guests_ or in general? My impression >>> is that LBR can be used by the guest independent of the PMU. >> >> I think only for Linux guests. >> >> I googled how to enable LBR on other guests(except Linux guests), >> e.g. Windows, and got no developer manuals about it. >> >> Here is an article about it: >> http://www.codeproject.com/Articles/517466/Last-branch-records- >> and-branch-tracing >> it says: >> "bit 8 of DR7 represents bit 0 of DebugCtl. This is the LBR bit." > > Don't worry about the operating system in the guest: you are just > emulating a processor feature, you do not care about anything except > what is written in the Intel SDM. > > You can use kvm-unit-tests > (https://git.kernel.org/cgit/virt/kvm/kvm-unit-tests.git/) to write a > test for your feature. There are existing tests for debugging features. ok. Regards, Jian > > >