On 02/13/2012 05:52 PM, Marcelo Tosatti wrote:
> > >  {
> > >+  x86_platform.restore_sched_clock_state();
> > Isn't it too early? It is scarry to say hypervisor to write to some
> > memory location and than completely replace page-tables and half of
> > cpu state in __restore_processor_state. Wouldn't that have a potential
> > of writing into a place that is not restored hv_clock and restored
> > hv_clock might still be stale?
>
> No, memory is copied in swsusp_arch_resume(), which happens
> before restore_processor_state. restore_processor_state() is only
> setting up registers and MTRR.
>

In addition, kvmclock uses physical addresses, so page table changes
don't matter.

Note we could have done this in
__save_processor_state()/__restore_processor_state() (it's just reading
and writing an MSR, like we do for MSR_IA32_MISC_ENABLE), but I think
your patch is the right way.  I'd like an ack from the x86 maintainers
though.

-- 
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to