On Wed, Aug 15, 2012 at 11:05:57PM +0900, OGAWA Hirofumi wrote: > > If !CONFIG_KVM_GUEST, kvm_smp_prepare_boot_cpu() is not defined. So, > kvm_register_clock("primary cpu clock") in kvm_smp_prepare_boot_cpu() > is not called. > > The detail of problem is hv_clock percpu usage. hv_clock is percpu > variable, but kvmclock_init() is called _before_ initializing percpu > area, and doesn't update address after initialized percpu area. > > So, host kvm modify the memory area _before_ initializing percpu. This > became the cause of strange memory corruption on guest OS. > > > This fixes it by adding kvm_smp_prepare_boot_cpu(). [we might be > better to kill the usage before percpu initialization.] > > Signed-off-by: OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx> The distinction between CONFIG_KVM_CLOCK and CONFIG_KVM_GUEST is not so clear anymore, as this bug demonstrates. There is no point in having a separate config option, therefore i propose to merge the two (see other reply) instead. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html