public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <jroedel@suse.de>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kvm@vger.kernel.org
Subject: Re: [bug report] x86/sev: Split up runtime #VC handler for correct state tracking
Date: Wed, 4 Aug 2021 14:38:35 +0200	[thread overview]
Message-ID: <YQqKS7ayK1qkmNzv@suse.de> (raw)
In-Reply-To: <20210804095725.GA8011@kili>

Hi Dan,

On Wed, Aug 04, 2021 at 12:57:25PM +0300, Dan Carpenter wrote:
> These sleeping in atomic static checker warnings come with a lot of
> caveats because the call tree is very long and it's easy to have false
> positives.
> 
> --> vc_raw_handle_exception()
>     --> vc_forward_exception()
>         --> exc_page_fault()
> 
> Page faults always sleep right?

No, page faults do no always sleep, only when IO needs to be done to
fulfill the page fault request. In this case, the page-fault handler
will never sleep, because it is called with preemption disabled. The
page-fault handler can detect this and just do nothing. The #VC handler
will return for re-fault in this case.

Hope that helps,

     Joerg


  reply	other threads:[~2021-08-04 12:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  9:57 [bug report] x86/sev: Split up runtime #VC handler for correct state tracking Dan Carpenter
2021-08-04 12:38 ` Joerg Roedel [this message]
2021-08-04 12:58   ` Dan Carpenter
2021-08-04 13:35     ` Joerg Roedel
2021-08-04 13:42       ` Dan Carpenter
2021-08-04 14:23     ` Joerg Roedel
2021-08-06  8:35       ` Dan Carpenter

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=YQqKS7ayK1qkmNzv@suse.de \
    --to=jroedel@suse.de \
    --cc=dan.carpenter@oracle.com \
    --cc=kvm@vger.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