Re: [BUGFIX] MCE: Fix bug of IA32_MCG_STATUS after system reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/06/2010 09:05 AM, Huang Ying wrote:
@@ -1015,6 +1015,7 @@ void kvm_arch_load_regs(CPUState *env)
   #endif
       set_msr_entry(&msrs[n++], MSR_KVM_SYSTEM_TIME,  env->system_time_msr);
       set_msr_entry(&msrs[n++], MSR_KVM_WALL_CLOCK,  env->wall_clock_msr);
+    set_msr_entry(&msrs[n++], MSR_MCG_STATUS, 0);


Not sure why you reset this in kvm_arch_load_regs().  Shouldn't this be
in the cpu reset code?
I found kvm_arch_load_regs() is called by kvm_arch_cpu_reset(), which is
called by qemu_kvm_system_reset(). It is not in cpu reset path?

It is, but it is also called from many other places, which could cause this msr to be zeroed.

A better solution is to allocate it a field in CPUState, load and save it in kvm_arch_*_regs, and zero it during reset.

--
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux