Re: [PATCH 2/2] reset mce registers of the given VCPU or all VCPUs with mce command.

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

 



Hi, Huang-san

(2010/11/25 14:55), Huang Ying wrote:
> On Thu, 2010-11-25 at 09:20 +0800, Jin Dongming wrote:
>> --- a/monitor.c
>> +++ b/monitor.c
>> @@ -60,6 +60,7 @@
>>  #include "trace.h"
>>  #endif
>>  #include "qemu-kvm.h"
>> +#include "kvm_x86.h"
>>  
>>  //#define DEBUG
>>  //#define DEBUG_COMPLETION
>> @@ -2277,7 +2278,19 @@ static void do_inject_mce(Monitor *mon, const QDict *qdict)
>>  #endif
>>  
>>      for (cenv = first_cpu; cenv != NULL; cenv = cenv->next_cpu) {
>> -        if (cenv->cpu_index == cpu_index && cenv->mcg_cap) {
>> +        if (!cenv->mcg_cap)
>> +            continue;
>> +
>> +#if defined(KVM_CAP_MCE)
>> +        if (!status && !mcg_status) {
>> +            if (cenv->cpu_index == cpu_index || broadcast)
>> +                kvm_inject_x86_mce(cenv, 0, 0, 0, 0, 0, 0);
>> +
>> +            continue;
>> +        }
>> +#endif
>> +
>> +        if (cenv->cpu_index == cpu_index) {
>>              cpu_inject_x86_mce(cenv, bank, status, mcg_status, addr, misc);
>>  #if defined(KVM_CAP_MCE)
>>              if (broadcast)
> 
> Are you sure there is no test cases that require the Machine Check
> registers not cleared? I have had a test case before that injects
> another MCE when MCIP in MCGSTATUS is set to check whether system will
> go reset.
> 
> It may be better to clear MC registers in an explicit mode.
MC registers could be cleared in Guest OS with APL. So I will cancel this patch.

I will resend the patch for broadcast option.

Best Regards,
Jin Dongming
> 
> Best Regards,
> Huang Ying
> 
> 
> --
> 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
> 
> 


--
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