Re: [PATCH 13/27] KVM: PPC: Magic Page Book3s support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alexander Graf wrote:
> We need to override EA as well as PA lookups for the magic page. When the guest
> tells us to project it, the magic page overrides any guest mappings.
>
> In order to reflect that, we need to hook into all the MMU layers of KVM to
> force map the magic page if necessary.
>
> Signed-off-by: Alexander Graf <agraf@xxxxxxx>
>
> v1 -> v2:
>
>   - RMO -> PAM
> ---
>  arch/powerpc/kvm/book3s.c             |    7 +++++++
>  arch/powerpc/kvm/book3s_32_mmu.c      |   16 ++++++++++++++++
>  arch/powerpc/kvm/book3s_32_mmu_host.c |   12 ++++++++++++
>  arch/powerpc/kvm/book3s_64_mmu.c      |   30 +++++++++++++++++++++++++++++-
>  arch/powerpc/kvm/book3s_64_mmu_host.c |   12 ++++++++++++
>  5 files changed, 76 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
> index 14db032..b22e608 100644
> --- a/arch/powerpc/kvm/book3s.c
> +++ b/arch/powerpc/kvm/book3s.c
> @@ -554,6 +554,13 @@ mmio:
>  
>  static int kvmppc_visible_gfn(struct kvm_vcpu *vcpu, gfn_t gfn)
>  {
> +	ulong mp_pa = vcpu->arch.magic_page_pa;
> +
> +	if (unlikely(mp_pa) &&
> +	    unlikely((mp_pa & KVM_RMO) >> PAGE_SHIFT == gfn)) {
>   

This should be KVM_PAM :(. Should I respin the whole thing or could
whoever commits this just make that trivial change?


Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux