linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [Question-kvm] Can hva_to_pfn_fast be executed in interrupt context?
@ 2019-08-13 19:14 Bharath Vedartham
  2019-08-13 20:17 ` Paolo Bonzini
  0 siblings, 1 reply; 5+ messages in thread
From: Bharath Vedartham @ 2019-08-13 19:14 UTC (permalink / raw)
  To: pbonzini, rkrcmar; +Cc: kvm, linux-kernel, linux-mm, khalid.aziz

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-08-20 16:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13 19:14 [Question-kvm] Can hva_to_pfn_fast be executed in interrupt context? Bharath Vedartham
2019-08-13 20:17 ` Paolo Bonzini
2019-08-15 17:18   ` Bharath Vedartham
2019-08-15 18:26     ` Paolo Bonzini
2019-08-20 16:08       ` Bharath Vedartham

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).