Re: [PATCH] x86, kvm: Handle PFNs outside of kernel reach when touching GPTEs

2017-04-18 Thread Paolo Bonzini
On 17/04/2017 13:26, Xiao Guangrong wrote: >> > > Sounds reasonable, however it is incomplete so far as there are some > code paths still do not support non-page backend memory, e.g, > emulator_cmpxchg_emulated(). > > I would suggest to unify the code introduced in this patch with existing > hv

Re: [PATCH] x86, kvm: Handle PFNs outside of kernel reach when touching GPTEs

2017-04-17 Thread Xiao Guangrong
On 04/12/2017 09:16 PM, Sironi, Filippo wrote: Thanks for taking the time and sorry for the delay. On 6. Apr 2017, at 16:22, Radim Krčmář wrote: 2017-04-05 15:07+0200, Filippo Sironi: cmpxchg_gpte() calls get_user_pages_fast() to retrieve the number of pages and the respective struct pages

[PATCH] x86, kvm: Handle PFNs outside of kernel reach when touching GPTEs

2017-04-13 Thread Filippo Sironi
cmpxchg_gpte() calls get_user_pages_fast() to retrieve the number of pages and the respective struct pages for mapping in the kernel virtual address space. This doesn't work if get_user_pages_fast() is invoked with a userspace virtual address that's backed by PFNs outside of kernel reach (e.g., whe

Re: [PATCH] x86, kvm: Handle PFNs outside of kernel reach when touching GPTEs

2017-04-12 Thread Sironi, Filippo
Thanks for taking the time and sorry for the delay. > On 6. Apr 2017, at 16:22, Radim Krčmář wrote: > > 2017-04-05 15:07+0200, Filippo Sironi: >> cmpxchg_gpte() calls get_user_pages_fast() to retrieve the number of >> pages and the respective struct pages for mapping in the kernel virtual >> add

Re: [PATCH] x86, kvm: Handle PFNs outside of kernel reach when touching GPTEs

2017-04-06 Thread Radim Krčmář
2017-04-05 15:07+0200, Filippo Sironi: > cmpxchg_gpte() calls get_user_pages_fast() to retrieve the number of > pages and the respective struct pages for mapping in the kernel virtual > address space. > This doesn't work if get_user_pages_fast() is invoked with a userspace > virtual address that's

[PATCH] x86, kvm: Handle PFNs outside of kernel reach when touching GPTEs

2017-04-05 Thread Filippo Sironi
cmpxchg_gpte() calls get_user_pages_fast() to retrieve the number of pages and the respective struct pages for mapping in the kernel virtual address space. This doesn't work if get_user_pages_fast() is invoked with a userspace virtual address that's backed by PFNs outside of kernel reach (e.g., whe