Re: [PATCH 2/2] turn off kvmclock when resetting cpu

2010-05-07 Thread Marcelo Tosatti
On Tue, May 04, 2010 at 02:35:28PM -0400, Glauber Costa wrote: Currently, in the linux kernel, we reset kvmclock if we are rebooting into a crash kernel through kexec. The rationale, is that a new kernel won't follow the same memory addresses, and the memory where kvmclock is located in the

Re: [PATCH 2/2] turn off kvmclock when resetting cpu

2010-05-05 Thread Avi Kivity
On 05/04/2010 09:35 PM, Glauber Costa wrote: Currently, in the linux kernel, we reset kvmclock if we are rebooting into a crash kernel through kexec. The rationale, is that a new kernel won't follow the same memory addresses, and the memory where kvmclock is located in the first kernel, will be

Re: [PATCH 2/2] turn off kvmclock when resetting cpu

2010-05-05 Thread Glauber Costa
On Wed, May 05, 2010 at 10:26:43AM +0300, Avi Kivity wrote: +msr_data.info.nmsrs = n; + +return kvm_vcpu_ioctl(env, KVM_SET_MSRS,msr_data); +} + + How about a different approach? Query the supported MSRs (KVM_GET_MSR_LIST or thereabout) and reset them (with special cases for

Re: [PATCH 2/2] turn off kvmclock when resetting cpu

2010-05-05 Thread Avi Kivity
On 05/05/2010 06:24 PM, Glauber Costa wrote: On Wed, May 05, 2010 at 10:26:43AM +0300, Avi Kivity wrote: +msr_data.info.nmsrs = n; + +return kvm_vcpu_ioctl(env, KVM_SET_MSRS,msr_data); +} + + How about a different approach? Query the supported MSRs (KVM_GET_MSR_LIST or

Re: [PATCH 2/2] turn off kvmclock when resetting cpu

2010-05-05 Thread Glauber Costa
On Wed, May 05, 2010 at 06:34:22PM +0300, Avi Kivity wrote: On 05/05/2010 06:24 PM, Glauber Costa wrote: On Wed, May 05, 2010 at 10:26:43AM +0300, Avi Kivity wrote: +msr_data.info.nmsrs = n; + +return kvm_vcpu_ioctl(env, KVM_SET_MSRS,msr_data); +} + + How about a different

[PATCH 2/2] turn off kvmclock when resetting cpu

2010-05-04 Thread Glauber Costa
Currently, in the linux kernel, we reset kvmclock if we are rebooting into a crash kernel through kexec. The rationale, is that a new kernel won't follow the same memory addresses, and the memory where kvmclock is located in the first kernel, will be something else in the second one. We don't do