From: Paul Mackerras <paulus@ozlabs.org>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: benh@kernel.crashing.org, mpe@ellerman.id.au,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/mm/radix: GR field got removed in ISA 3.0B
Date: Thu, 22 Jun 2017 15:22:36 +1000 [thread overview]
Message-ID: <20170622052236.GA25486@fergus.ozlabs.ibm.com> (raw)
In-Reply-To: <1498022412-30339-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>
On Wed, Jun 21, 2017 at 10:50:12AM +0530, Aneesh Kumar K.V wrote:
> The bit position is now marked reserved. Hence don't set the bit to 1.
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
> arch/powerpc/include/asm/book3s/64/mmu.h | 1 -
> arch/powerpc/kvm/book3s_hv.c | 6 +-----
> arch/powerpc/mm/pgtable-radix.c | 2 +-
> 3 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
> index 77529a3e3811..e28ce2793e7d 100644
> --- a/arch/powerpc/include/asm/book3s/64/mmu.h
> +++ b/arch/powerpc/include/asm/book3s/64/mmu.h
> @@ -55,7 +55,6 @@ extern struct patb_entry *partition_tb;
> #define RPDS_MASK 0x1f /* root page dir. size field */
>
> /* Bits in patb1 field */
> -#define PATB_GR (1UL << 63) /* guest uses radix; must match HR */
> #define PRTS_MASK 0x1f /* process table size field */
> #define PRTB_MASK 0x0ffffffffffff000UL
>
> diff --git a/arch/powerpc/kvm/book3s_hv.c b/arch/powerpc/kvm/book3s_hv.c
> index 42b7a4fd57d9..657729a433f9 100644
> --- a/arch/powerpc/kvm/book3s_hv.c
> +++ b/arch/powerpc/kvm/book3s_hv.c
> @@ -3185,7 +3185,7 @@ static void kvmppc_setup_partition_table(struct kvm *kvm)
> } else {
> dw0 = PATB_HR | radix__get_tree_size() |
> __pa(kvm->arch.pgtable) | RADIX_PGD_INDEX_SIZE;
> - dw1 = PATB_GR | kvm->arch.process_table;
> + dw1 = kvm->arch.process_table;
> }
>
> mmu_partition_table_set_entry(kvm->arch.lpid, dw0, dw1);
> @@ -3840,10 +3840,6 @@ static int kvmhv_configure_mmu(struct kvm *kvm, struct kvm_ppc_mmuv3_cfg *cfg)
> if (radix != kvm_is_radix(kvm))
> return -EINVAL;
>
> - /* GR (guest radix) bit in process_table field must match */
> - if (!!(cfg->process_table & PATB_GR) != radix)
> - return -EINVAL;
> -
It's OK to take out the check, but we should also clear the GR bit,
and preferably any other reserved bits, before we put the value into
the partition table.
Paul.
prev parent reply other threads:[~2017-06-22 5:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-21 5:20 [PATCH] powerpc/mm/radix: GR field got removed in ISA 3.0B Aneesh Kumar K.V
2017-06-22 5:22 ` Paul Mackerras [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=20170622052236.GA25486@fergus.ozlabs.ibm.com \
--to=paulus@ozlabs.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/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).