linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Bharath Vedartham <linux.bhar@gmail.com>
To: pbonzini@redhat.com, rkrcmar@redhat.com
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, khalid.aziz@oracle.com
Subject: [Question-kvm] Can hva_to_pfn_fast be executed in interrupt context?
Date: Wed, 14 Aug 2019 00:44:35 +0530	[thread overview]
Message-ID: <20190813191435.GB10228@bharath12345-Inspiron-5559> (raw)

Hi all,

I was looking at the function hva_to_pfn_fast(in virt/kvm/kvm_main) which is 
executed in an atomic context(even in non-atomic context, since
hva_to_pfn_fast is much faster than hva_to_pfn_slow).

My question is can this be executed in an interrupt context? 

The motivation for this question is that in an interrupt context, we cannot
assume "current" to be the task_struct of the process of interest.
__get_user_pages_fast assume current->mm when walking the process page
tables. 

So if this function hva_to_pfn_fast can be executed in an
interrupt context, it would not be safe to retrive the pfn with
__get_user_pages_fast. 

Thoughts on this?

Thank you
Bharath


             reply	other threads:[~2019-08-13 19:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13 19:14 Bharath Vedartham [this message]
2019-08-13 20:17 ` [Question-kvm] Can hva_to_pfn_fast be executed in interrupt context? Paolo Bonzini
2019-08-15 17:18   ` Bharath Vedartham
2019-08-15 18:26     ` Paolo Bonzini
2019-08-20 16:08       ` Bharath Vedartham

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=20190813191435.GB10228@bharath12345-Inspiron-5559 \
    --to=linux.bhar@gmail.com \
    --cc=khalid.aziz@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pbonzini@redhat.com \
    --cc=rkrcmar@redhat.com \
    /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).