From: Marcelo Tosatti <mtosatti@redhat.com>
To: Paul Mackerras <paulus@samba.org>
Cc: Alexander Graf <agraf@suse.de>,
kvm-ppc@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH RFC 1/2] KVM: PPC: Move kvm->arch.slot_phys into memslot.arch
Date: Mon, 27 Aug 2012 17:41:11 -0300 [thread overview]
Message-ID: <20120827204111.GB1414@amt.cnet> (raw)
In-Reply-To: <20120825124039.GF7051@bloggs.ozlabs.ibm.com>
On Sat, Aug 25, 2012 at 10:40:40PM +1000, Paul Mackerras wrote:
> Now that we have an architecture-specific field in the kvm_memory_slot
> structure, we can use it to store the array of page physical addresses
> that we need for Book3S HV KVM on PPC970 processors. This reduces the
> size of struct kvm_arch for Book3S HV, and also reduces the size of
> struct kvm_arch_memory_slot for other PPC KVM variants since the fields
> in it are now only compiled in for Book3S HV.
>
> This necessitates making the kvm_arch_create_memslot and
> kvm_arch_free_memslot operations specific to each PPC KVM variant.
> That in turn means that we now don't allocate the rmap arrays on
> Book3S PR and Book E.
>
> Since we now unpin pages and free the slot_phys array in
> kvmppc_core_free_memslot, we no longer need to do it in
> kvmppc_core_destroy_vm, since the generic code takes care to free
> all the memslots when destroying a VM.
>
> We now need the new memslot to be passed in to
> kvmppc_core_prepare_memory_region, since we need to initialize its
> arch.slot_phys member on Book3S HV.
>
> Signed-off-by: Paul Mackerras <paulus@samba.org>
> ---
> This is on top of Alex's kvm-ppc-next branch with the KVM tree's next
> branch merged in and then Marcelo's set of 3 patches on that.
>
> arch/powerpc/include/asm/kvm_host.h | 9 +--
> arch/powerpc/include/asm/kvm_ppc.h | 5 ++
> arch/powerpc/kvm/book3s_64_mmu_hv.c | 6 +-
> arch/powerpc/kvm/book3s_hv.c | 104 ++++++++++++++++++++---------------
> arch/powerpc/kvm/book3s_hv_rm_mmu.c | 2 +-
> arch/powerpc/kvm/book3s_pr.c | 12 ++++
> arch/powerpc/kvm/booke.c | 12 ++++
> arch/powerpc/kvm/powerpc.c | 13 +----
> 8 files changed, 102 insertions(+), 61 deletions(-)
Regarding generic memslot code, looks fine.
prev parent reply other threads:[~2012-08-27 20:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-25 12:40 [PATCH RFC 1/2] KVM: PPC: Move kvm->arch.slot_phys into memslot.arch Paul Mackerras
2012-08-25 12:42 ` [PATCH RFC 2/2] KVM: PPC: Book3S HV: Handle memory slot deletion and modification correctly Paul Mackerras
2012-08-27 20:41 ` Marcelo Tosatti [this message]
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=20120827204111.GB1414@amt.cnet \
--to=mtosatti@redhat.com \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=paulus@samba.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