Re: [PATCH 5/5] arm/arm64: KVM: Don't panic on failure to properly reset system registers

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

 



On 30/01/2019 15:36, Andrew Jones wrote:
> On Wed, Jan 30, 2019 at 10:56:19AM +0000, Marc Zyngier wrote:
>> On 29/01/2019 16:33, Andrew Jones wrote:

[...]

>> If we only get halfway through resetting, then we'll get a warn splat,
>>> complete with a backtrace, for each register. Should we do something
>>> like the following instead?
>>>
>>>   for (num = 1; num < NR_SYS_REGS; num++)
>>>      if (__vcpu_sys_reg(vcpu, num) == 0x4242424242424242)
>>>         failed++;
>>>   WARN(failed, "Didn't reset %d system registers", failed);
>>
>> And doing so we'd loose the important bit of information, which is the
>> position in the table that doesn't get initialized.
>>
>> The vcpu reset issue is rare enough that nobody noticed it yet (I only
>> reproduced it twice), and having it to scream 200 times is not really a
>> concern. What I want to catch is the case where someone has added a new
>> sysreg in the table, and has failed to provide a working init function.
> 
> OK, Christoffer also said that information was useful. Would any following
> registers also be useful? Or should it be something like
> 
>   for (num = 1; num < NR_SYS_REGS; num++) {
>        WARN(__vcpu_sys_reg(vcpu, num) == 0x4242424242424242,
>             "Didn't reset __vcpu_sys_reg(%zi)\n", num);
>        break;
>    }
> 
> to ensure the first one, the most important one, is there, and that it
> doesn't get pushed out of the buffer by hundreds of more lines?

Fair enough.

	M.
-- 
Jazz is not dead. It just smells funny...
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux