Re: [PATCH] KVM: VMX: enable LBR virtualization

2015-10-15 Thread Jian Zhou
On 2015/10/14 19:30, Paolo Bonzini wrote: On 14/10/2015 13:26, Jian Zhou wrote: On 12/10/2015 20:44, Paolo Bonzini wrote: In addition, the MSR numbers may differ between the guest and the host, because it is possible to emulate e.g. a Core CPU on a Core 2 CPU. So I recommend against using

Re: [PATCH] KVM: VMX: enable LBR virtualization

2015-10-15 Thread Paolo Bonzini
On 15/10/2015 15:51, Jian Zhou wrote: > > > On 2015/10/14 19:30, Paolo Bonzini wrote: >> >> >> On 14/10/2015 13:26, Jian Zhou wrote: >>> On 12/10/2015 20:44, Paolo Bonzini wrote: In addition, the MSR numbers may differ between the guest and the host, because it is possible to emulate

Re: [PATCH] KVM: VMX: enable LBR virtualization

2015-10-15 Thread Jian Zhou
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.

Re: [PATCH] KVM: VMX: enable LBR virtualization

2015-10-14 Thread Jian Zhou
On 12/10/2015 20:44, Paolo Bonzini wrote: On 12/10/2015 14:10, Jian Zhou wrote: ping... I think your expectations for review RTT are a bit too optimistic. I have only worked 4 hours since you posted the patch... But it was on my list anyway, so let's do it. Thank for Paolo's time to

Re: [PATCH] KVM: VMX: enable LBR virtualization

2015-10-14 Thread Paolo Bonzini
On 14/10/2015 13:26, Jian Zhou wrote: > On 12/10/2015 20:44, Paolo Bonzini wrote: >> In addition, the MSR numbers may differ between the guest and the host, >> because it is possible to emulate e.g. a Core CPU on a Core 2 CPU. So I >> recommend against using the atomic switch mechanism for the

Re: [PATCH] KVM: VMX: enable LBR virtualization

2015-10-12 Thread Jian Zhou
ping... > Using vmx msr store/load mechanism and msr intercept bitmap > to implement LBR virtualization. > > Signed-off-by: Jian Zhou > Signed-off-by: Stephen He > > diff --git a/arch/x86/include/asm/kvm_host.h

Re: [PATCH] KVM: VMX: enable LBR virtualization

2015-10-12 Thread Paolo Bonzini
On 12/10/2015 14:10, Jian Zhou wrote: > ping... I think your expectations for review RTT are a bit too optimistic. I have only worked 4 hours since you posted the patch... But it was on my list anyway, so let's do it. First of all, you should move the implementation entirely into vmx.c,

[PATCH] KVM: VMX: enable LBR virtualization

2015-10-10 Thread Jian Zhou
Using vmx msr store/load mechanism and msr intercept bitmap to implement LBR virtualization. Signed-off-by: Jian Zhou Signed-off-by: Stephen He diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index