powerpc/mm/radix: GR field got removed in ISA 3.0B
Subsystems (2)
PATCH 1/1 powerpc/mm/radix: GR field got removed in ISA 3.0B
The bit position is now marked reserved. Hence don't set the bit to 1.
Signed-off-by Aneesh Kumar K.V <[email protected]>
--- 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(-)
arch/powerpc/include/asm/book3s/64/mmu.h +0 -1
@@ -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
arch/powerpc/kvm/book3s_hv.c +1 -5
@@ -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 ; -/* Process table size field must be reasonable, i.e. <= 24 */ if ((cfg->process_table &PRTS_MASK ) >24 )return -EINVAL ;
arch/powerpc/mm/pgtable-radix.c +1 -1
@@ -25,7 +25,7 @@static int native_register_process_table (unsigned long base,unsigned long pg_sz,unsigned long table_size) { -unsigned long patb1 = base | table_size |PATB_GR ; +unsigned long patb1 = base | table_size; partition_tb->patb1 =cpu_to_be64 (patb1);return 0 ;
Signature · 1 line
2.7.4
Quoted 35 lines · Aneesh Kumar K.V
The bit position is now marked reserved. Hence don't set the bit to 1.
Signed-off-by Aneesh Kumar K.V <[email protected]>--- 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(-)arch/powerpc/include/asm/book3s/64/mmu.h +0
-1@@ -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 0x0ffffffffffff000ULarch/powerpc/kvm/book3s_hv.c +1
-1@@ -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);
arch/powerpc/kvm/book3s_hv.c static int kvmhv_configure_mmu(struct kvm *kvm, struct kvm_ppc_mmuv3_cfg *cfg) · line 3846
Quoted 7 lines
arch/powerpc/kvm/book3s_hv.c +0
-4@@ -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.