linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Gavin Shan <gshan@redhat.com>, James Morse <james.morse@arm.com>
Cc: mark.rutland@arm.com, maz@kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [Question] How to testing SDEI client driver
Date: Fri, 10 Jul 2020 11:38:12 +0200	[thread overview]
Message-ID: <098f56da-bcb9-42e6-10cc-f1df90f28ec1@redhat.com> (raw)
In-Reply-To: <0698199d-c84c-c923-e665-e09d5b83ba66@redhat.com>

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-07-10  9:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30  5:17 [Question] How to testing SDEI client driver Gavin Shan
2020-07-01 11:57 ` James Morse
2020-07-03  0:26   ` Gavin Shan
2020-07-08 16:11     ` James Morse
2020-07-08 16:49       ` Paolo Bonzini
2020-07-09  5:33         ` Gavin Shan
2020-07-09 18:31           ` James Morse
2020-07-10  9:08             ` Gavin Shan
2020-07-10  9:38               ` Paolo Bonzini [this message]
2020-07-09 18:30         ` James Morse
2020-07-09 18:50           ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=098f56da-bcb9-42e6-10cc-f1df90f28ec1@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=gshan@redhat.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).