[Question] How to testing SDEI client driver

Paolo Bonzini pbonzini at redhat.com
Fri Jul 10 05:38:12 EDT 2020


On 10/07/20 11:08, Gavin Shan wrote:
> Ok, thanks for the information, which makes thing much more clear.
> So SDEI_EVENT_COMPLETE/AND_RESUME is issued depending if current
> process can be rescheduled. I think it's Paolo's idea?

Yes. :)

>> The problem is invoking this whole thing when the guest can't do 
>> anything about it, because it can't schedule(). You can't know this
>> from outside the guest.
> 
> Yes, the interrupted process can't call schedule() before 
> SDEI_EVENT_COMPLETE at least because the SDEI event handler has to
> finish as quick as possible.
> 
> [...] we might figure out one
> way to insert the schedule() by the SDEI event handler.

I think you could do smp_send_reschedule(smp_processor_id()) before
invoking SDEI_EVENT_COMPLETE_AND_RESUME.  As James said, after the
hypervisor processes SDEI_EVENT_COMPLETE_AND_RESUME the exit will be
through the reschedule interrupt.

Instead if the hypervisor sees SDEI_EVENT_COMPLETE it will wait for
synchronous page-in to complete, remove the async page fault from its
data structures, and resume execution.

Paolo




More information about the linux-arm-kernel mailing list