<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/virt/kvm/async_pf.c, branch leds/master</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=leds%2Fmaster</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=leds%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2015-02-12T01:06:05Z</updated>
<entry>
<title>mm: gup: kvm use get_user_pages_unlocked</title>
<updated>2015-02-12T01:06:05Z</updated>
<author>
<name>Andrea Arcangeli</name>
<email>aarcange@redhat.com</email>
</author>
<published>2015-02-11T23:27:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0664e57ff0c68cbca012a45a38288fa277eb6795'/>
<id>urn:sha1:0664e57ff0c68cbca012a45a38288fa277eb6795</id>
<content type='text'>
Use the more generic get_user_pages_unlocked which has the additional
benefit of passing FAULT_FLAG_ALLOW_RETRY at the very first page fault
(which allows the first page fault in an unmapped area to be always able
to block indefinitely by being allowed to release the mmap_sem).

Signed-off-by: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Reviewed-by: Andres Lagar-Cavilla &lt;andreslc@google.com&gt;
Reviewed-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Peter Feiner &lt;pfeiner@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kvm: Faults which trigger IO release the mmap_sem</title>
<updated>2014-09-24T12:07:54Z</updated>
<author>
<name>Andres Lagar-Cavilla</name>
<email>andreslc@google.com</email>
</author>
<published>2014-09-17T17:51:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=234b239bea395316d7f78018c672f4a88b3cdf0d'/>
<id>urn:sha1:234b239bea395316d7f78018c672f4a88b3cdf0d</id>
<content type='text'>
When KVM handles a tdp fault it uses FOLL_NOWAIT. If the guest memory
has been swapped out or is behind a filemap, this will trigger async
readahead and return immediately. The rationale is that KVM will kick
back the guest with an "async page fault" and allow for some other
guest process to take over.

If async PFs are enabled the fault is retried asap from an async
workqueue. If not, it's retried immediately in the same code path. In
either case the retry will not relinquish the mmap semaphore and will
block on the IO. This is a bad thing, as other mmap semaphore users
now stall as a function of swap or filemap latency.

This patch ensures both the regular and async PF path re-enter the
fault allowing for the mmap semaphore to be relinquished in the case
of IO wait.

Reviewed-by: Radim Krčmář &lt;rkrcmar@redhat.com&gt;
Signed-off-by: Andres Lagar-Cavilla &lt;andreslc@google.com&gt;
Acked-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm into next</title>
<updated>2014-06-04T15:47:12Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-06-04T15:47:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b05d59dfceaea72565b1648af929b037b0f96d7f'/>
<id>urn:sha1:b05d59dfceaea72565b1648af929b037b0f96d7f</id>
<content type='text'>
Pull KVM updates from Paolo Bonzini:
 "At over 200 commits, covering almost all supported architectures, this
  was a pretty active cycle for KVM.  Changes include:

   - a lot of s390 changes: optimizations, support for migration, GDB
     support and more

   - ARM changes are pretty small: support for the PSCI 0.2 hypercall
     interface on both the guest and the host (the latter acked by
     Catalin)

   - initial POWER8 and little-endian host support

   - support for running u-boot on embedded POWER targets

   - pretty large changes to MIPS too, completing the userspace
     interface and improving the handling of virtualized timer hardware

   - for x86, a larger set of changes is scheduled for 3.17.  Still, we
     have a few emulator bugfixes and support for running nested
     fully-virtualized Xen guests (para-virtualized Xen guests have
     always worked).  And some optimizations too.

  The only missing architecture here is ia64.  It's not a coincidence
  that support for KVM on ia64 is scheduled for removal in 3.17"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (203 commits)
  KVM: add missing cleanup_srcu_struct
  KVM: PPC: Book3S PR: Rework SLB switching code
  KVM: PPC: Book3S PR: Use SLB entry 0
  KVM: PPC: Book3S HV: Fix machine check delivery to guest
  KVM: PPC: Book3S HV: Work around POWER8 performance monitor bugs
  KVM: PPC: Book3S HV: Make sure we don't miss dirty pages
  KVM: PPC: Book3S HV: Fix dirty map for hugepages
  KVM: PPC: Book3S HV: Put huge-page HPTEs in rmap chain for base address
  KVM: PPC: Book3S HV: Fix check for running inside guest in global_invalidates()
  KVM: PPC: Book3S: Move KVM_REG_PPC_WORT to an unused register number
  KVM: PPC: Book3S: Add ONE_REG register names that were missed
  KVM: PPC: Add CAP to indicate hcall fixes
  KVM: PPC: MPIC: Reset IRQ source private members
  KVM: PPC: Graciously fail broken LE hypercalls
  PPC: ePAPR: Fix hypercall on LE guest
  KVM: PPC: BOOK3S: Remove open coded make_dsisr in alignment handler
  KVM: PPC: BOOK3S: Always use the saved DAR value
  PPC: KVM: Make NX bit available with magic page
  KVM: PPC: Disable NX for old magic page using guests
  KVM: PPC: BOOK3S: HV: Add mixed page-size support for guest
  ...
</content>
</entry>
<entry>
<title>KVM: async_pf: change async_pf_execute() to use get_user_pages(tsk =&gt; NULL)</title>
<updated>2014-04-28T15:24:55Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2014-04-28T15:03:00Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e9545b9f8aeb63e05818e4b3250057260bc072aa'/>
<id>urn:sha1:e9545b9f8aeb63e05818e4b3250057260bc072aa</id>
<content type='text'>
async_pf_execute() passes tsk == current to gup(), this is doesn't
hurt but unnecessary and misleading. "tsk" is only used to account
the number of faults and current is the random workqueue thread.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Suggested-by: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: async_pf: kill the unnecessary use_mm/unuse_mm async_pf_execute()</title>
<updated>2014-04-28T15:24:25Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2014-04-21T13:25:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d72d946d0b649b79709b99b9d5cb7269fff8afaa'/>
<id>urn:sha1:d72d946d0b649b79709b99b9d5cb7269fff8afaa</id>
<content type='text'>
async_pf_execute() has no reasons to adopt apf-&gt;mm, gup(current, mm)
should work just fine even if current has another or NULL -&gt;mm.

Recently kvm_async_page_present_sync() was added insedie the "use_mm"
section, but it seems that it doesn't need current-&gt;mm too.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Reviewed-by: Andrea Arcangeli &lt;aarcange@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: async_pf: mm-&gt;mm_users can not pin apf-&gt;mm</title>
<updated>2014-04-28T11:04:46Z</updated>
<author>
<name>Oleg Nesterov</name>
<email>oleg@redhat.com</email>
</author>
<published>2014-04-21T13:26:01Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=41c22f626254b9dc0376928cae009e73d1b6a49a'/>
<id>urn:sha1:41c22f626254b9dc0376928cae009e73d1b6a49a</id>
<content type='text'>
get_user_pages(mm) is simply wrong if mm-&gt;mm_users == 0 and exit_mmap/etc
was already called (or is in progress), mm-&gt;mm_count can only pin mm-&gt;pgd
and mm_struct itself.

Change kvm_setup_async_pf/async_pf_execute to inc/dec mm-&gt;mm_users.

kvm_create_vm/kvm_destroy_vm play with -&gt;mm_count too but this case looks
fine at first glance, it seems that this -&gt;mm is only used to verify that
current-&gt;mm == kvm-&gt;mm.

Signed-off-by: Oleg Nesterov &lt;oleg@redhat.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: async_pf: Add missing call for async page present</title>
<updated>2014-02-04T03:24:05Z</updated>
<author>
<name>Dominik Dingel</name>
<email>dingel@linux.vnet.ibm.com</email>
</author>
<published>2014-01-31T13:32:46Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1179ba539541347d5427cde8bcfdaa5ead14f3aa'/>
<id>urn:sha1:1179ba539541347d5427cde8bcfdaa5ead14f3aa</id>
<content type='text'>
Commit KVM: async_pf: Provide additional direct page notification
missed the call from kvm_check_async_pf_completion to the new introduced function.

Reported-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Dominik Dingel &lt;dingel@linux.vnet.ibm.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>KVM: async_pf: Allow to wait for outstanding work</title>
<updated>2014-01-30T11:52:20Z</updated>
<author>
<name>Dominik Dingel</name>
<email>dingel@linux.vnet.ibm.com</email>
</author>
<published>2013-09-03T10:31:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9f2ceda49c6b8827c795731c204f6c2587886e2c'/>
<id>urn:sha1:9f2ceda49c6b8827c795731c204f6c2587886e2c</id>
<content type='text'>
On s390 we are not able to cancel work. Instead we will flush the work and wait for
completion.

Signed-off-by: Dominik Dingel &lt;dingel@linux.vnet.ibm.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>KVM: async_pf: Provide additional direct page notification</title>
<updated>2014-01-30T11:51:38Z</updated>
<author>
<name>Dominik Dingel</name>
<email>dingel@linux.vnet.ibm.com</email>
</author>
<published>2013-06-06T13:32:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e0ead41a6dac09f86675ce07a66e4b253a9b7bd5'/>
<id>urn:sha1:e0ead41a6dac09f86675ce07a66e4b253a9b7bd5</id>
<content type='text'>
By setting a Kconfig option, the architecture can control when
guest notifications will be presented by the apf backend.
There is the default batch mechanism, working as before, where the vcpu
thread should pull in this information.
Opposite to this, there is now the direct mechanism, that will push the
information to the guest.
This way s390 can use an already existing architecture interface.

Still the vcpu thread should call check_completion to cleanup leftovers.

Signed-off-by: Dominik Dingel &lt;dingel@linux.vnet.ibm.com&gt;
Signed-off-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
</content>
</entry>
<entry>
<title>KVM: Drop FOLL_GET in GUP when doing async page fault</title>
<updated>2013-10-15T10:43:37Z</updated>
<author>
<name>chai wen</name>
<email>chaiw.fnst@cn.fujitsu.com</email>
</author>
<published>2013-10-14T14:22:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f2e106692d5189303997ad7b96de8d8123aa5613'/>
<id>urn:sha1:f2e106692d5189303997ad7b96de8d8123aa5613</id>
<content type='text'>
Page pinning is not mandatory in kvm async page fault processing since
after async page fault event is delivered to a guest it accesses page once
again and does its own GUP.  Drop the FOLL_GET flag in GUP in async_pf
code, and do some simplifying in check/clear processing.

Suggested-by: Gleb Natapov &lt;gleb@redhat.com&gt;
Signed-off-by: Gu zheng &lt;guz.fnst@cn.fujitsu.com&gt;
Signed-off-by: chai wen &lt;chaiw.fnst@cn.fujitsu.com&gt;
Signed-off-by: Gleb Natapov &lt;gleb@redhat.com&gt;
</content>
</entry>
</feed>
