[CRIU] [PATCH 2/2] ppc64: handle transactional memory state
Laurent Dufour
ldufour at linux.vnet.ibm.com
Thu Sep 1 02:16:37 PDT 2016
On 01/09/2016 11:00, Pavel Emelyanov wrote:
> On 08/31/2016 06:52 PM, Dmitry Safonov wrote:
>> 2016-08-31 18:45 GMT+03:00 Laurent Dufour <ldufour at linux.vnet.ibm.com>:
>>> On 31/08/2016 17:17, Dmitry Safonov wrote:
>>>> 2016-08-31 17:47 GMT+03:00 Laurent Dufour <ldufour at linux.vnet.ibm.com>:
>>>>> Hi Dimirty,
>>>>>
>>>>> Thanks for your prompt review.
>>>>> I'll send a V2 soon.
>>>>
>>>> Heh, no problem. Thanks for a good work!
>>>> Unfortunately, I'm not good at Power 8 registers/arch manuals,
>>>> so can only review it from the top.
>>>>
>>>>>>> @@ -415,35 +579,60 @@ int get_task_regs(pid_t pid, user_regs_struct_t regs, CoreEntry *core)
>>>>>>> /* Resetting trap since we are now coming from user space. */
>>>>>>> regs.trap = 0;
>>>>>>>
>>>>>>> - copy_gp_regs(core->ti_ppc64->gpregs, ®s);
>>>>>>> + /* Check for Transactional Memory operation in progress.
>>>>>>> + * Until we have support of TM register's state through the ptrace API,
>>>>>>> + * we can't checkpoint process with TM operation in progress (almost
>>>>>>> + * impossible) or suspended (easy to get).
>>>>>>> + */
>>>>>>
>>>>>> And another
>>>>>>
>>>>>>> + if (MSR_TM_ACTIVE(regs.msr)) {
>>>>>>> + pr_debug("Task %d has %s TM operation at 0x%lx\n",
>>>>>>> + pid,
>>>>>>> + (regs.msr & MSR_TMS) ? "a suspended" : "an active",
>>>>>>> + regs.nip);
>>>>>>> + if (get_tm_regs(pid, core))
>>>>>>> + return -1;
>>>>>>> +
>>>>>>> + gpregs = core->ti_ppc64->tmstate->gpregs;
>>>>>>> + fpstate = &(core->ti_ppc64->tmstate->fpstate);
>>>>>>> + vrstate = &(core->ti_ppc64->tmstate->vrstate);
>>>>>>> + vsxstate = &(core->ti_ppc64->tmstate->vsxstate);
>>>>>>> + }
>>>>>>> + else {
>>>>>>
>>>>>> Reverse egyptian braces
>>>>>
>>>>> What do you mean here ?
>>>>
>>>> Heh, well, I meant excessive new line ;)
>>>> (3 here: https://blog.codinghorror.com/new-programming-jargon/ )
>>>
>>> Where are these "excessive new line" ?
>>
>> In get_task_regs():
>> + }
>> + else {
>
> Dima, thanks for catching.
>
> Laurent, no worries, I'll fix this to be
>
> + } else {
>
> myself when merging :)
Thanks Pavel, but I sent a v2 in the mean time fixing this and the
others Dimitry found.
More information about the CRIU
mailing list