Re: [RFC PATCH v3 2/2] add support for Hyper-V partition reference time enlightenment

2014-01-14 Thread Marcelo Tosatti
Subject: Re: [RFC PATCH v3 2/2] add support for Hyper-V partition reference time enlightenment On Sun, Dec 08, 2013 at 10:33:39PM +1100, Vadim Rozenfeld wrote: The following patch allows to activate a partition reference time enlightenment that is based on the host platform's support

Re: [RFC PATCH v3 2/2] add support for Hyper-V partition reference time enlightenment

2014-01-13 Thread Vadim Rozenfeld
- Original Message - From: Marcelo Tosatti mtosa...@redhat.com To: Vadim Rozenfeld vroze...@redhat.com Cc: kvm@vger.kernel.org, p...@dlhnet.de, pbonz...@redhat.com Sent: Thursday, December 12, 2013 6:27:00 AM Subject: Re: [RFC PATCH v3 2/2] add support for Hyper-V partition reference

Re: [RFC PATCH v3 2/2] add support for Hyper-V partition reference time enlightenment

2013-12-12 Thread Paolo Bonzini
Il 11/12/2013 20:27, Marcelo Tosatti ha scritto: + if (kvm-arch.hv_tsc_page HV_X64_MSR_TSC_REFERENCE_ENABLE) { + HV_REFERENCE_TSC_PAGE* tsc_ref; + tsc_ref = (HV_REFERENCE_TSC_PAGE*)gfn_to_hva(kvm, + kvm-arch.hv_tsc_page

Re: [RFC PATCH v3 2/2] add support for Hyper-V partition reference time enlightenment

2013-12-11 Thread Vadim Rozenfeld
On Tue, 2013-12-10 at 17:52 +0100, Paolo Bonzini wrote: Il 10/12/2013 12:23, Vadim Rozenfeld ha scritto: + if (kvm-arch.hv_tsc_page HV_X64_MSR_TSC_REFERENCE_ENABLE) { + HV_REFERENCE_TSC_PAGE* tsc_ref; + u64 curr_time;

Re: [RFC PATCH v3 2/2] add support for Hyper-V partition reference time enlightenment

2013-12-11 Thread Paolo Bonzini
Il 11/12/2013 11:58, Vadim Rozenfeld ha scritto: + curr_time = (((tsc_ref-tsc_scale 32) * native_read_tsc()) 32) + + tsc_ref-tsc_offset; + tsc_ref-tsc_offset = kvm-arch.hv_ref_time - curr_time; Why do you need

Re: [RFC PATCH v3 2/2] add support for Hyper-V partition reference time enlightenment

2013-12-11 Thread Marcelo Tosatti
On Tue, Dec 10, 2013 at 10:23:17PM +1100, Vadim Rozenfeld wrote: On Mon, 2013-12-09 at 15:32 +0100, Paolo Bonzini wrote: Il 08/12/2013 12:33, Vadim Rozenfeld ha scritto: + tsc_ref.tsc_sequence = + boot_cpu_has(X86_FEATURE_CONSTANT_TSC) ? 1 : 0; +

Re: [RFC PATCH v3 2/2] add support for Hyper-V partition reference time enlightenment

2013-12-11 Thread Marcelo Tosatti
On Sun, Dec 08, 2013 at 10:33:39PM +1100, Vadim Rozenfeld wrote: The following patch allows to activate a partition reference time enlightenment that is based on the host platform's support for an Invariant Time Stamp Counter (iTSC). v2 - v3 Handle TSC sequence, scale, and offest changing

Re: [RFC PATCH v3 2/2] add support for Hyper-V partition reference time enlightenment

2013-12-10 Thread Vadim Rozenfeld
On Mon, 2013-12-09 at 15:32 +0100, Paolo Bonzini wrote: Il 08/12/2013 12:33, Vadim Rozenfeld ha scritto: + tsc_ref.tsc_sequence = + boot_cpu_has(X86_FEATURE_CONSTANT_TSC) ? 1 : 0; + tsc_ref.tsc_scale = + ((1LL 32) /

Re: [RFC PATCH v3 2/2] add support for Hyper-V partition reference time enlightenment

2013-12-10 Thread Paolo Bonzini
Il 10/12/2013 12:23, Vadim Rozenfeld ha scritto: + if (kvm-arch.hv_tsc_page HV_X64_MSR_TSC_REFERENCE_ENABLE) { + HV_REFERENCE_TSC_PAGE* tsc_ref; + u64 curr_time; + tsc_ref = (HV_REFERENCE_TSC_PAGE*)gfn_to_hva(kvm, +

Re: [RFC PATCH v3 2/2] add support for Hyper-V partition reference time enlightenment

2013-12-09 Thread Paolo Bonzini
Il 08/12/2013 12:33, Vadim Rozenfeld ha scritto: + tsc_ref.tsc_sequence = + boot_cpu_has(X86_FEATURE_CONSTANT_TSC) ? 1 : 0; + tsc_ref.tsc_scale = + ((1LL 32) / vcpu-arch.virtual_tsc_khz) 32; + tsc_ref.tsc_offset

[RFC PATCH v3 2/2] add support for Hyper-V partition reference time enlightenment

2013-12-08 Thread Vadim Rozenfeld
The following patch allows to activate a partition reference time enlightenment that is based on the host platform's support for an Invariant Time Stamp Counter (iTSC). v2 - v3 Handle TSC sequence, scale, and offest changing during migration. --- arch/x86/include/asm/kvm_host.h | 1 +