[PATCH v3 14/18] cxl: Support to flash a new image on the adapter from a guest

christophe lombard clombard at linux.vnet.ibm.com
Tue Feb 16 21:47:43 AEDT 2016


> Excerpts from christophe lombard's message of 2016-02-16 07:53:54 +1100:
>>>> +void cxl_guest_reload_module(struct cxl *adapter)
>>>> +{
>>>> +    struct platform_device *pdev;
>>>> +    int afu;
>>>> +
>>>> +    for (afu = 0; afu < adapter->slices; afu++)
>>>> +        cxl_guest_remove_afu(adapter->afu[afu]);
>>> Should we possibly have done this part earlier?
>>>
>>> I'd think it should be done before any operation that might lead to us
>>> resetting the card. Probably the safest thing is to do it when the first
>>> chunk is handed to the kernel so we can make sure it's safe, and return
>>> -EBUSY if any of the AFUs are still in use.
>> Not necessary. PowerVM - phyp - refuses any type of action when an operation
>> of download/validation is in progress. The reverse is true as well.
> I was more thinking about what could happen in the short window between
> when phyp resets the card and is potentially accepting new operations
> and when we remove the old AFUs from Linux - could anything bad happen
> if someone e.g. did an attach at that moment and Linux still had
> outdated info left over from the previous AFU?
>
> Cheers,
> -Ian

You are absolutely right on this point. A short window could exist.
We have to change our current design.

Thanks for your feedback.

Christophe



More information about the Linuxppc-dev mailing list