Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752720AbbKKPXs (ORCPT ); Wed, 11 Nov 2015 10:23:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37328 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752188AbbKKPXq (ORCPT ); Wed, 11 Nov 2015 10:23:46 -0500 Subject: Re: [PATCH v2 0/4] KVM: VMX: enable LBR virtualization To: Jian Zhou , kvm@vger.kernel.org, gleb@kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org References: <1445591718-5720-1-git-send-email-jianjay.zhou@huawei.com> Cc: herongguang.he@huawei.com, zhang.zhanghailiang@huawei.com, weidong.huang@huawei.com, peter.huangpeng@huawei.com From: Paolo Bonzini X-Enigmail-Draft-Status: N1110 Message-ID: <56435D76.7080402@redhat.com> Date: Wed, 11 Nov 2015 16:23:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1445591718-5720-1-git-send-email-jianjay.zhou@huawei.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1616 Lines: 41 On 23/10/2015 11:15, Jian Zhou wrote: > Changelog in v2: > (1) move the implementation into vmx.c > (2) migraton is supported > (3) add arrays in kvm_vcpu_arch struct to save/restore > LBR MSRs at vm exit/entry time. > (4) add a parameter of kvm_intel module to permanently > disable LBRV > (5) table of supported CPUs is reorgnized, LBRV > can be enabled or not according to the guest CPUID > > Jian Zhou (4): > KVM: X86: Add arrays to save/restore LBR MSRs > KVM: X86: LBR MSRs of supported CPU types > KVM: X86: Migration is supported > KVM: VMX: details of LBR virtualization implementation > > arch/x86/include/asm/kvm_host.h | 26 ++++- > arch/x86/include/asm/msr-index.h | 26 ++++- > arch/x86/kvm/vmx.c | 245 +++++++++++++++++++++++++++++++++++++++ > arch/x86/kvm/x86.c | 88 ++++++++++++-- > 4 files changed, 366 insertions(+), 19 deletions(-) Thanks, this looks better! The reason why it took me so long to review it, is that I wanted to understand what happens if you're running this on CPU model x but using CPU model y for the guest. I still haven't grokked that fully, so I'll apply your patches locally and play with them. In the meanwhile, feel free to send v3 with: 1) the tweak I suggested to patch 3; 2) the fix for the problem that the buildbot reported on patch 1. Paolo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/