Revert "KVM: PPC: Add support for explicit HIOR setting"

This reverts commit a15bd354f083f20f257db450488db52ac27df439.

It exceeded the padding on the SREGS struct, rendering the ABI
backwards-incompatible.

Conflicts:

arch/powerpc/kvm/powerpc.c
include/linux/kvm.h

Signed-off-by: Avi Kivity <avi@redhat.com>

authored by Alexander Graf and committed by Avi Kivity bb75c627 e7fc6f93

+2 -24
-8
arch/powerpc/include/asm/kvm.h
··· 149 149 #define KVM_SREGS_E_UPDATE_DBSR (1 << 3) 150 150 151 151 /* 152 - * Book3S special bits to indicate contents in the struct by maintaining 153 - * backwards compatibility with older structs. If adding a new field, 154 - * please make sure to add a flag for that new field */ 155 - #define KVM_SREGS_S_HIOR (1 << 0) 156 - 157 - /* 158 152 * In KVM_SET_SREGS, reserved/pad fields must be left untouched from a 159 153 * previous KVM_GET_REGS. 160 154 * ··· 173 179 __u64 ibat[8]; 174 180 __u64 dbat[8]; 175 181 } ppc32; 176 - __u64 flags; /* KVM_SREGS_S_ */ 177 - __u64 hior; 178 182 } s; 179 183 struct { 180 184 union {
-2
arch/powerpc/include/asm/kvm_book3s.h
··· 90 90 #endif 91 91 int context_id[SID_CONTEXTS]; 92 92 93 - bool hior_sregs; /* HIOR is set by SREGS, not PVR */ 94 - 95 93 struct hlist_head hpte_hash_pte[HPTEG_HASH_NUM_PTE]; 96 94 struct hlist_head hpte_hash_pte_long[HPTEG_HASH_NUM_PTE_LONG]; 97 95 struct hlist_head hpte_hash_vpte[HPTEG_HASH_NUM_VPTE];
+2 -12
arch/powerpc/kvm/book3s_pr.c
··· 151 151 #ifdef CONFIG_PPC_BOOK3S_64 152 152 if ((pvr >= 0x330000) && (pvr < 0x70330000)) { 153 153 kvmppc_mmu_book3s_64_init(vcpu); 154 - if (!to_book3s(vcpu)->hior_sregs) 155 - to_book3s(vcpu)->hior = 0xfff00000; 154 + to_book3s(vcpu)->hior = 0xfff00000; 156 155 to_book3s(vcpu)->msr_mask = 0xffffffffffffffffULL; 157 156 vcpu->arch.cpu_type = KVM_CPU_3S_64; 158 157 } else 159 158 #endif 160 159 { 161 160 kvmppc_mmu_book3s_32_init(vcpu); 162 - if (!to_book3s(vcpu)->hior_sregs) 163 - to_book3s(vcpu)->hior = 0; 161 + to_book3s(vcpu)->hior = 0; 164 162 to_book3s(vcpu)->msr_mask = 0xffffffffULL; 165 163 vcpu->arch.cpu_type = KVM_CPU_3S_32; 166 164 } ··· 795 797 } 796 798 } 797 799 798 - if (sregs->u.s.flags & KVM_SREGS_S_HIOR) 799 - sregs->u.s.hior = to_book3s(vcpu)->hior; 800 - 801 800 return 0; 802 801 } 803 802 ··· 830 835 831 836 /* Flush the MMU after messing with the segments */ 832 837 kvmppc_mmu_pte_flush(vcpu, 0, 0); 833 - 834 - if (sregs->u.s.flags & KVM_SREGS_S_HIOR) { 835 - to_book3s(vcpu)->hior_sregs = true; 836 - to_book3s(vcpu)->hior = sregs->u.s.hior; 837 - } 838 838 839 839 return 0; 840 840 }
-1
arch/powerpc/kvm/powerpc.c
··· 208 208 case KVM_CAP_PPC_BOOKE_SREGS: 209 209 #else 210 210 case KVM_CAP_PPC_SEGSTATE: 211 - case KVM_CAP_PPC_HIOR: 212 211 case KVM_CAP_PPC_PAPR: 213 212 #endif 214 213 case KVM_CAP_PPC_UNSET_IRQ:
-1
include/linux/kvm.h
··· 555 555 #define KVM_CAP_PPC_SMT 64 556 556 #define KVM_CAP_PPC_RMA 65 557 557 #define KVM_CAP_MAX_VCPUS 66 /* returns max vcpus per vm */ 558 - #define KVM_CAP_PPC_HIOR 67 559 558 #define KVM_CAP_PPC_PAPR 68 560 559 #define KVM_CAP_S390_GMAP 71 561 560