Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-27 Thread Vadim Rozenfeld
On Fri, 2013-05-24 at 16:41 -0300, Marcelo Tosatti wrote: On Fri, May 24, 2013 at 06:11:16AM -0400, Vadim Rozenfeld wrote: Is there a better option? If setting TscSequence to zero makes Windows fall back to the MSR this is a better option. +1 This is why MS has two different

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-24 Thread Vadim Rozenfeld
- Original Message - From: Marcelo Tosatti mtosa...@redhat.com To: Gleb Natapov g...@redhat.com Cc: Peter Lieven p...@dlhnet.de, Vadim Rozenfeld vroze...@redhat.com, kvm@vger.kernel.org, p...@dlh.net Sent: Thursday, May 23, 2013 11:35:59 PM Subject: Re: [RFC PATCH v2 2/2] add support

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-24 Thread Vadim Rozenfeld
- Original Message - From: Marcelo Tosatti mtosa...@redhat.com To: Vadim Rozenfeld vroze...@redhat.com Cc: kvm@vger.kernel.org, g...@redhat.com, p...@dlh.net Sent: Thursday, May 23, 2013 11:47:46 PM Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC On Thu, May 23

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-24 Thread Vadim Rozenfeld
- Original Message - From: Gleb Natapov g...@redhat.com To: Marcelo Tosatti mtosa...@redhat.com Cc: Vadim Rozenfeld vroze...@redhat.com, kvm@vger.kernel.org, p...@dlh.net Sent: Friday, May 24, 2013 1:31:10 AM Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC On Thu

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-24 Thread Vadim Rozenfeld
- Original Message - From: Paolo Bonzini pbonz...@redhat.com To: Vadim Rozenfeld vroze...@redhat.com Cc: kvm@vger.kernel.org, g...@redhat.com, mtosa...@redhat.com, p...@dlh.net Sent: Friday, May 24, 2013 2:44:50 AM Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC Il

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-24 Thread Marcelo Tosatti
On Fri, May 24, 2013 at 06:11:16AM -0400, Vadim Rozenfeld wrote: Is there a better option? If setting TscSequence to zero makes Windows fall back to the MSR this is a better option. +1 This is why MS has two different mechanisms: iTSC as a primary, reference counters as a fall-back.

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Peter Lieven
, May 22, 2013 10:50:46 AM Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC On Sun, May 19, 2013 at 05:06:37PM +1000, 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 v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Gleb Natapov
, p...@dlh.net Sent: Wednesday, May 22, 2013 10:50:46 AM Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC On Sun, May 19, 2013 at 05:06:37PM +1000, Vadim Rozenfeld wrote: The following patch allows to activate a partition reference time enlightenment that is based

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Gleb Natapov
: kvm@vger.kernel.org, g...@redhat.com, p...@dlh.net Sent: Wednesday, May 22, 2013 10:50:46 AM Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC On Sun, May 19, 2013 at 05:06:37PM +1000, Vadim Rozenfeld wrote: The following patch allows to activate a partition reference time

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Vadim Rozenfeld
- Original Message - From: Marcelo Tosatti mtosa...@redhat.com To: Vadim Rozenfeld vroze...@redhat.com Cc: kvm@vger.kernel.org, g...@redhat.com, p...@dlh.net Sent: Thursday, May 23, 2013 7:23:30 AM Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC On Wed, May 22

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Vadim Rozenfeld
: Wednesday, May 22, 2013 10:50:46 AM Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC On Sun, May 19, 2013 at 05:06:37PM +1000, 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 v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Peter Lieven
: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC On 22.05.2013 23:23, Marcelo Tosatti wrote: On Wed, May 22, 2013 at 03:22:55AM -0400, Vadim Rozenfeld wrote: - Original Message - From: Marcelo Tosatti mtosa...@redhat.com To: Vadim Rozenfeld vroze...@redhat.com Cc: kvm

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Gleb Natapov
, p...@dlh.net Sent: Thursday, May 23, 2013 4:18:55 PM Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC On 22.05.2013 23:23, Marcelo Tosatti wrote: On Wed, May 22, 2013 at 03:22:55AM -0400, Vadim Rozenfeld wrote: - Original Message - From: Marcelo Tosatti

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Vadim Rozenfeld
Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC On 22.05.2013 23:23, Marcelo Tosatti wrote: On Wed, May 22, 2013 at 03:22:55AM -0400, Vadim Rozenfeld wrote: - Original Message - From: Marcelo Tosatti mtosa...@redhat.com To: Vadim Rozenfeld vroze...@redhat.com

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Marcelo Tosatti
On Thu, May 23, 2013 at 12:13:16PM +0300, Gleb Natapov wrote: Reference TSC during Save and Restore and Migration To address migration scenarios to physical platforms that do not support iTSC, the TscSequence field is used. In the event that a guest partition is migrated from an

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Marcelo Tosatti
On Thu, May 23, 2013 at 08:21:29AM -0400, Vadim Rozenfeld wrote: @@ -1848,6 +1847,11 @@ static int set_msr_hyperv_pw(struct kvm_vcpu *vcpu, u32 msr, u64 data) HV_X64_MSR_TSC_REFERENCE_ADDRESS_SHIFT); if (kvm_is_error_hva(addr))

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Marcelo Tosatti
On Thu, May 23, 2013 at 12:12:29PM +0300, Gleb Natapov wrote: To address migration scenarios to physical platforms that do not support iTSC, the TscSequence field is used. In the event that a guest partition is migrated from an iTSC capable host to a non-iTSC capable host, the hypervisor

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Gleb Natapov
On Thu, May 23, 2013 at 10:35:59AM -0300, Marcelo Tosatti wrote: On Thu, May 23, 2013 at 12:13:16PM +0300, Gleb Natapov wrote: Reference TSC during Save and Restore and Migration To address migration scenarios to physical platforms that do not support iTSC, the TscSequence field

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Gleb Natapov
On Thu, May 23, 2013 at 10:53:38AM -0300, Marcelo Tosatti wrote: On Thu, May 23, 2013 at 12:12:29PM +0300, Gleb Natapov wrote: To address migration scenarios to physical platforms that do not support iTSC, the TscSequence field is used. In the event that a guest partition is migrated

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-23 Thread Paolo Bonzini
Il 19/05/2013 09:06, Vadim Rozenfeld ha scritto: 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). NOTE: This code will survive migration due to lack of VM stop/resume

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-22 Thread Vadim Rozenfeld
- Original Message - From: Marcelo Tosatti mtosa...@redhat.com To: Vadim Rozenfeld vroze...@redhat.com Cc: kvm@vger.kernel.org, g...@redhat.com, p...@dlh.net Sent: Wednesday, May 22, 2013 10:50:46 AM Subject: Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC On Sun, May 19

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-22 Thread Marcelo Tosatti
: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC On Sun, May 19, 2013 at 05:06:37PM +1000, 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

Re: [RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-21 Thread Marcelo Tosatti
On Sun, May 19, 2013 at 05:06:37PM +1000, 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). NOTE: This code will survive migration due to lack of VM

[RFC PATCH v2 2/2] add support for Hyper-V invariant TSC

2013-05-19 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). NOTE: This code will survive migration due to lack of VM stop/resume handlers, when offset, scale and sequence should be