KVM: PPC: Update Book3S HV memory handling
Status from this message: Thanks, applied all to kvm-ppc-next, awaiting the one follow-up patch though.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest14 patches 4 repliesApplied
- v113 patches 0 repliesSuperseded
Patches in v3 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/14 | KVM: PPC: Make wakeups work again for Book3S HV guestsarch/ | +1 | 0 replies | |
| 2/14 | KVM: PPC: Move kvm_vcpu_ioctl_[gs]et_one_reg down to platform-specific codearch/ arch/ arch/ +2 more | +79 | 0 replies | |
| 3/14 | KVM: PPC: Keep a record of HV guest view of hashed page table entriesarch/ arch/ arch/ +1 more | +103 | 0 replies | |
| 4/14 | KVM: PPC: Keep page physical addresses in per-slot arraysarch/ arch/ arch/ +1 more | +107 | 1 reply | |
| 5/14 | KVM: PPC: Add an interface for pinning guest pages in Book3s HV guestsarch/ arch/ arch/ | +78 | 0 replies | |
| 6/14 | KVM: PPC: Make the H_ENTER hcall more reliablearch/ arch/ | +59 | 0 replies | |
| 7/14 | KVM: PPC: Only get pages when actually needed, not in prepare_memory_region()arch/ arch/ arch/ +4 more | +290 | 0 replies | |
| 8/14 | KVM: PPC: Allow use of small pages to back Book3S HV guestsarch/ arch/ arch/ +4 more | +132 | 0 replies | |
| 9/14 | KVM: PPC: Allow I/O mappings in memory slotsarch/ arch/ arch/ +1 more | +84 | 0 replies | |
| 10/14 | KVM: PPC: Maintain a doubly-linked list of guest HPTEs for each gfnarch/ arch/ arch/ | +117 | 0 replies | |
| 11/14 | KVM: PPC: Implement MMIO emulation support for Book3S HV guestsarch/ arch/ arch/ +9 more | +607 | 0 replies | |
| 12/14 | KVM: Add barriers to allow mmu_notifier_retry to be used locklesslyinclude/ virt/ | +12 | 2 replies | |
| 13/14 | KVM: PPC: Implement MMU notifiers for Book3S HV guestsarch/ arch/ arch/ +8 more | +499 | 0 replies | |
| 14/14 | KVM: PPC: Allow for read-only pages backing a Book3S HV guestarch/ arch/ arch/ +1 more | +78 | 0 replies |
Reviews trailers per patch
1 of 14 patches has a Reviewed-by or Acked-by.
| Patch | Avi Kivity |
|---|---|
| 1/14 | |
| 2/14 | |
| 3/14 | |
| 4/14 | |
| 5/14 | |
| 6/14 | |
| 7/14 | |
| 8/14 | |
| 9/14 | |
| 10/14 | |
| 11/14 | |
| 12/14 | A-b |
| 13/14 | |
| 14/14 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 00/14] KVM: PPC: Update Book3S HV memory handling
This series of patches updates the Book3S-HV KVM code that manages the guest hashed page table (HPT) to enable several things:
* MMIO emulation and MMIO pass-through
* Use of small pages (4kB or 64kB, depending on config) to back the guest memory
* Pageable guest memory - i.e. backing pages can be removed from the guest and reinstated on demand, using the MMU notifier mechanism
* Guests can be given read-only access to pages even though they think they have mapped them read/write. When they try to write to them their access is upgraded to read/write. This allows KSM to share pages between guests.
On PPC970 we have no way to get DSIs and ISIs to come to the hypervisor, so we can't do MMIO emulation or pageable guest memory. On POWER7 we set the VPM1 bit in the LPCR to make all DSIs and ISIs come to the hypervisor (host) as HDSIs or HISIs.
This code is working well in my tests. The sporadic crashes that I was seeing earlier are fixed by the second patch in the series. Somewhat to my surprise, when I implemented the last patch in the series I started to see KSM coalescing pages without any further effort on my part -- my tests were on a machine with Fedora 16 installed, and it has ksmtuned running by default.
This series is on top of Alex Graf's kvm-ppc-next branch. The first patch in my series fixes a bug in one of the patches in that branch ("KVM: PPC: booke: Improve timer register emulation").
These patches only touch arch/powerpc except for patch 12, which adds a couple of barriers to allow mmu_notifier_retry() to be used outside of the kvm->mmu_lock.
Paul.