Re: [PATCH 04/12] KVM: x86: Replace call-back set_tsc_khz() with a common function

2015-10-06 Thread Paolo Bonzini
On 06/10/2015 06:06, Haozhong Zhang wrote: > Alternatively, it's also possible to follow David's comment to use > divq on x86_64 to keep both precision and safety. On i386, it just > falls back to above truncating approach. khz is just 32 bits, so we can do a 96/32 division. And because this

Re: [PATCH 04/12] KVM: x86: Replace call-back set_tsc_khz() with a common function

2015-10-06 Thread Haozhong Zhang
On Tue, Oct 06, 2015 at 12:40:49PM +0200, Paolo Bonzini wrote: > > > On 06/10/2015 06:06, Haozhong Zhang wrote: > > Alternatively, it's also possible to follow David's comment to use > > divq on x86_64 to keep both precision and safety. On i386, it just > > falls back to above truncating

Re: [PATCH 04/12] KVM: x86: Replace call-back set_tsc_khz() with a common function

2015-10-05 Thread Radim Krčmář
2015-09-28 13:38+0800, Haozhong Zhang: > Both VMX and SVM propagate virtual_tsc_khz in the same way, so this > patch removes the call-back set_tsc_khz() and replaces it with a common > function. > > Signed-off-by: Haozhong Zhang > --- > diff --git a/arch/x86/kvm/x86.c

Re: [PATCH 04/12] KVM: x86: Replace call-back set_tsc_khz() with a common function

2015-10-05 Thread David Matlack
On Mon, Oct 5, 2015 at 12:53 PM, Radim Krčmář wrote: > 2015-09-28 13:38+0800, Haozhong Zhang: >> Both VMX and SVM propagate virtual_tsc_khz in the same way, so this >> patch removes the call-back set_tsc_khz() and replaces it with a common >> function. >> >> Signed-off-by:

Re: [PATCH 04/12] KVM: x86: Replace call-back set_tsc_khz() with a common function

2015-10-05 Thread Haozhong Zhang
On Mon, Oct 05, 2015 at 09:53:26PM +0200, Radim Krčmář wrote: > 2015-09-28 13:38+0800, Haozhong Zhang: > > Both VMX and SVM propagate virtual_tsc_khz in the same way, so this > > patch removes the call-back set_tsc_khz() and replaces it with a common > > function. > > > > Signed-off-by: Haozhong

Re: [PATCH 04/12] KVM: x86: Replace call-back set_tsc_khz() with a common function

2015-09-28 Thread Haozhong Zhang
On Mon, Sep 28, 2015 at 08:27:02PM -0700, Eric Northup wrote: > On Sun, Sep 27, 2015 at 10:38 PM, Haozhong Zhang > wrote: > > > Both VMX and SVM propagate virtual_tsc_khz in the same way, so this > > patch removes the call-back set_tsc_khz() and replaces it with a

[PATCH 04/12] KVM: x86: Replace call-back set_tsc_khz() with a common function

2015-09-27 Thread Haozhong Zhang
Both VMX and SVM propagate virtual_tsc_khz in the same way, so this patch removes the call-back set_tsc_khz() and replaces it with a common function. Signed-off-by: Haozhong Zhang --- arch/x86/include/asm/kvm_host.h | 1 - arch/x86/kvm/svm.c | 36