Avi Kivity wrote:
> On 06/15/2010 05:46 AM, Xiao Guangrong wrote:
>> Introduce gfn_to_page_atomic() and gfn_to_pfn_atomic(), those
>> functions is fast path and can used in atomic context, the later
>> patch will use those
>>
>>
>> @@ -942,6 +942,41 @@ unsigned long gfn_to_hva(struct kvm *kvm, gf
On 06/16/2010 01:51 PM, huang ying wrote:
On Tue, Jun 15, 2010 at 7:22 PM, Avi Kivity wrote:
btw, is_hwpoison_address() is racy. While it looks up the address, some
other task can unmap the page tables under us.
Andi/Huang?
One way of fixing it is get_user_pages_ptes_fast(), which also r
On Tue, Jun 15, 2010 at 7:22 PM, Avi Kivity wrote:
> btw, is_hwpoison_address() is racy. While it looks up the address, some
> other task can unmap the page tables under us.
>
> Andi/Huang?
>
> One way of fixing it is get_user_pages_ptes_fast(), which also returns the
> pte, also atomically. I w
On 06/16/2010 11:49 AM, Andi Kleen wrote:
The page is fine, the page tables are not. Another task can munmap() the
thing while is_hwpoison_address() is running.
Ok that boils down to me not seeing that source.
If it accesses the page tables yes then it's racy. But whoever
looked up the
> The page is fine, the page tables are not. Another task can munmap() the
> thing while is_hwpoison_address() is running.
Ok that boils down to me not seeing that source.
If it accesses the page tables yes then it's racy. But whoever
looked up the page tables in the first place should have
re
On 06/16/2010 10:59 AM, Andi Kleen wrote:
On Tue, Jun 15, 2010 at 02:22:06PM +0300, Avi Kivity wrote:
Too much duplication. How about putting the tail end of the function in a
common helper (with an inatomic flag)?
btw, is_hwpoison_address() is racy. While it looks up the address, some
ot
On Tue, Jun 15, 2010 at 02:22:06PM +0300, Avi Kivity wrote:
> Too much duplication. How about putting the tail end of the function in a
> common helper (with an inatomic flag)?
>
> btw, is_hwpoison_address() is racy. While it looks up the address, some
> other task can unmap the page tables und
On 06/15/2010 05:46 AM, Xiao Guangrong wrote:
Introduce gfn_to_page_atomic() and gfn_to_pfn_atomic(), those
functions is fast path and can used in atomic context, the later
patch will use those
@@ -942,6 +942,41 @@ unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn)
}
EXPORT_SYMBOL_GPL(gfn
Introduce gfn_to_page_atomic() and gfn_to_pfn_atomic(), those
functions is fast path and can used in atomic context, the later
patch will use those
Signed-off-by: Xiao Guangrong
---
arch/x86/mm/gup.c|2 +
include/linux/kvm_host.h |2 +
virt/kvm/kvm_main.c | 50