linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Alexander Graf <agraf@suse.de>
Cc: linuxppc-dev@ozlabs.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org
Subject: [PATCH v3 00/14] KVM: PPC: Update Book3S HV memory handling
Date: Tue, 13 Dec 2011 09:23:48 +1100	[thread overview]
Message-ID: <20111212222347.GA18868@bloggs.ozlabs.ibm.com> (raw)

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.

             reply	other threads:[~2011-12-12 22:23 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-12 22:23 Paul Mackerras [this message]
2011-12-12 22:24 ` [PATCH v3 01/14] KVM: PPC: Make wakeups work again for Book3S HV guests Paul Mackerras
2011-12-12 22:26 ` [PATCH v3 02/14] KVM: PPC: Move kvm_vcpu_ioctl_[gs]et_one_reg down to platform-specific code Paul Mackerras
2011-12-12 22:27 ` [PATCH v3 03/14] KVM: PPC: Keep a record of HV guest view of hashed page table entries Paul Mackerras
2011-12-12 22:28 ` [PATCH v3 04/14] KVM: PPC: Keep page physical addresses in per-slot arrays Paul Mackerras
2011-12-19 15:10   ` Alexander Graf
2011-12-12 22:28 ` [PATCH v3 05/14] KVM: PPC: Add an interface for pinning guest pages in Book3s HV guests Paul Mackerras
2011-12-12 22:30 ` [PATCH v3 06/14] KVM: PPC: Make the H_ENTER hcall more reliable Paul Mackerras
2011-12-12 22:31 ` [PATCH v3 07/14] KVM: PPC: Only get pages when actually needed, not in prepare_memory_region() Paul Mackerras
2011-12-12 22:31 ` [PATCH v3 08/14] KVM: PPC: Allow use of small pages to back Book3S HV guests Paul Mackerras
2011-12-12 22:32 ` [PATCH v3 09/14] KVM: PPC: Allow I/O mappings in memory slots Paul Mackerras
2011-12-12 22:33 ` [PATCH v3 10/14] KVM: PPC: Maintain a doubly-linked list of guest HPTEs for each gfn Paul Mackerras
2011-12-12 22:36 ` [PATCH v3 11/14] KVM: PPC: Implement MMIO emulation support for Book3S HV guests Paul Mackerras
2011-12-12 22:37 ` [PATCH v3 12/14] KVM: Add barriers to allow mmu_notifier_retry to be used locklessly Paul Mackerras
2011-12-19 17:18   ` Alexander Graf
2011-12-19 17:21     ` Avi Kivity
2011-12-12 22:38 ` [PATCH v3 13/14] KVM: PPC: Implement MMU notifiers for Book3S HV guests Paul Mackerras
2011-12-12 22:38 ` [PATCH v3 14/14] KVM: PPC: Allow for read-only pages backing a Book3S HV guest Paul Mackerras
2011-12-19 17:39 ` [PATCH v3 00/14] KVM: PPC: Update Book3S HV memory handling Alexander Graf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111212222347.GA18868@bloggs.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).