public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Suraj Jitindar Singh <sjitindarsingh@gmail.com>, kvm-ppc@vger.kernel.org
Cc: aik@ozlabs.ru, linuxppc-dev@lists.ozlabs.org,
	sjitindarsingh@gmail.com, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: PPC: Book3S PR: Set hflag to indicate that POWER9 supports 1T segments
Date: Fri, 07 Dec 2018 22:08:20 +1100	[thread overview]
Message-ID: <871s6tlhln.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20181207034326.3564-2-sjitindarsingh@gmail.com>

Suraj Jitindar Singh <sjitindarsingh@gmail.com> writes:

> When booting a kvm-pr guest on a POWER9 machine the following message is
> observed:
> "qemu-system-ppc64: KVM does not support 1TiB segments which guest expects"
>
> This is because the guest is expecting to be able to use 1T segments
> however we don't indicate support for it. This is because we don't set
> the BOOK3S_HFLAG_MULTI_PGSIZE flag in the hflags in kvmppc_set_pvr_pr()
> on POWER9.
>
> POWER9 does indeed have support for 1T segments, so add a case for
> POWER9 to the switch statement to ensure it is set.

If this just checked mmu_has_feature(MMU_FTR_1T_SEGMENT) it would have
been right in this case, and we'd also never have to update it in
future.

Any reason not to?

cheers

> diff --git a/arch/powerpc/kvm/book3s_pr.c b/arch/powerpc/kvm/book3s_pr.c
> index 4efd65d9e828..82840160c606 100644
> --- a/arch/powerpc/kvm/book3s_pr.c
> +++ b/arch/powerpc/kvm/book3s_pr.c
> @@ -587,6 +587,7 @@ void kvmppc_set_pvr_pr(struct kvm_vcpu *vcpu, u32 pvr)
>  	case PVR_POWER8:
>  	case PVR_POWER8E:
>  	case PVR_POWER8NVL:
> +	case PVR_POWER9:
>  		vcpu->arch.hflags |= BOOK3S_HFLAG_MULTI_PGSIZE |
>  			BOOK3S_HFLAG_NEW_TLBIE;
>  		break;
> -- 
> 2.13.6

  reply	other threads:[~2018-12-07 11:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-07  3:43 [PATCH 0/8] KVM: PPC: Implement passthrough of emulated devices for nested guests Suraj Jitindar Singh
2018-12-07  3:43 ` [PATCH] KVM: PPC: Book3S PR: Set hflag to indicate that POWER9 supports 1T segments Suraj Jitindar Singh
2018-12-07 11:08   ` Michael Ellerman [this message]
2018-12-07 11:42     ` Paul Mackerras
2018-12-18  1:00   ` Paul Mackerras
2018-12-07  3:43 ` [PATCH 1/8] KVM: PPC: Only report KVM_CAP_SPAPR_TCE_VFIO on powernv machines Suraj Jitindar Singh
2018-12-07  3:43 ` [PATCH 2/8] KVM: PPC: Book3S HV: Add function kvmhv_vcpu_is_radix() Suraj Jitindar Singh
2018-12-07  3:43 ` [PATCH 3/8] KVM: PPC: Book3S HV: Implement functions to access quadrants 1 & 2 Suraj Jitindar Singh
2018-12-07  3:43 ` [PATCH 4/8] KVM: PPC: Add load_from_eaddr and store_to_eaddr to the kvmppc_ops struct Suraj Jitindar Singh
2018-12-07  3:43 ` [PATCH 5/8] KVM: PPC: Update kvmppc_st and kvmppc_ld to use quadrants Suraj Jitindar Singh
2018-12-07  3:43 ` [PATCH 6/8] KVM: PPC: Book3S HV: Allow passthrough of an emulated device to an L2 guest Suraj Jitindar Singh
2018-12-07  3:43 ` [PATCH 7/8] KVM: PPC: Introduce new hcall H_COPY_TOFROM_GUEST to access quadrants 1 & 2 Suraj Jitindar Singh
2018-12-07  3:43 ` [PATCH 8/8] KVM: PPC: Book3S HV: Allow passthrough of an emulated device to an L3 guest Suraj Jitindar Singh
2018-12-07  3:45 ` [PATCH 0/8] KVM: PPC: Implement passthrough of emulated devices for nested guests Suraj Jitindar Singh

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=871s6tlhln.fsf@concordia.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=aik@ozlabs.ru \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=sjitindarsingh@gmail.com \
    /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