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

2010-01-06 Thread Avi Kivity
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++],

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

2010-01-06 Thread Huang Ying
On Wed, 2010-01-06 at 16:03 +0800, Avi Kivity wrote: 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++],

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

2010-01-06 Thread Huang Ying
On Tue, 2010-01-05 at 18:44 +0800, Andi Kleen wrote: --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -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++],

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

2010-01-06 Thread Marcelo Tosatti
On Wed, Jan 06, 2010 at 04:17:42PM +0800, Huang Ying wrote: On Wed, 2010-01-06 at 16:03 +0800, Avi Kivity wrote: 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,

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

2010-01-05 Thread Huang Ying
Now, if we inject a fatal MCE into guest OS, for example Linux, Linux will go panic and then reboot. But if we inject another MCE now, system will reset directly instead of go panic firstly, because MCG_STATUS.MCIP is set to 1 and not cleared after reboot. This is does not follow the behavior in

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

2010-01-05 Thread Andi Kleen
--- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -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++],

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

2010-01-05 Thread Avi Kivity
On 01/05/2010 10:34 AM, Huang Ying wrote: Now, if we inject a fatal MCE into guest OS, for example Linux, Linux will go panic and then reboot. But if we inject another MCE now, system will reset directly instead of go panic firstly, because MCG_STATUS.MCIP is set to 1 and not cleared after

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

2010-01-05 Thread Huang Ying
Hi, Avi, On Tue, 2010-01-05 at 18:50 +0800, Avi Kivity wrote: On 01/05/2010 10:34 AM, Huang Ying wrote: Now, if we inject a fatal MCE into guest OS, for example Linux, Linux will go panic and then reboot. But if we inject another MCE now, system will reset directly instead of go panic