Merge tag 'powerpc-4.6-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[linux/fpc-iii.git] / arch / powerpc / kvm / book3s_64_mmu.c
blobb9131aa1aedf0d9430a80867582f19aa2dc941f0
1 /*
2 * This program is free software; you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License, version 2, as
4 * published by the Free Software Foundation.
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 * GNU General Public License for more details.
11 * You should have received a copy of the GNU General Public License
12 * along with this program; if not, write to the Free Software
13 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15 * Copyright SUSE Linux Products GmbH 2009
17 * Authors: Alexander Graf <agraf@suse.de>
20 #include <linux/types.h>
21 #include <linux/string.h>
22 #include <linux/kvm.h>
23 #include <linux/kvm_host.h>
24 #include <linux/highmem.h>
26 #include <asm/tlbflush.h>
27 #include <asm/kvm_ppc.h>
28 #include <asm/kvm_book3s.h>
29 #include <asm/book3s/64/mmu-hash.h>
31 /* #define DEBUG_MMU */
33 #ifdef DEBUG_MMU
34 #define dprintk(X...) printk(KERN_INFO X)
35 #else
36 #define dprintk(X...) do { } while(0)
37 #endif
39 static void kvmppc_mmu_book3s_64_reset_msr(struct kvm_vcpu *vcpu)
41 kvmppc_set_msr(vcpu, vcpu->arch.intr_msr);
44 static struct kvmppc_slb *kvmppc_mmu_book3s_64_find_slbe(
45 struct kvm_vcpu *vcpu,
46 gva_t eaddr)
48 int i;
49 u64 esid = GET_ESID(eaddr);
50 u64 esid_1t = GET_ESID_1T(eaddr);
52 for (i = 0; i < vcpu->arch.slb_nr; i++) {
53 u64 cmp_esid = esid;
55 if (!vcpu->arch.slb[i].valid)
56 continue;
58 if (vcpu->arch.slb[i].tb)
59 cmp_esid = esid_1t;
61 if (vcpu->arch.slb[i].esid == cmp_esid)
62 return &vcpu->arch.slb[i];
65 dprintk("KVM: No SLB entry found for 0x%lx [%llx | %llx]\n",
66 eaddr, esid, esid_1t);
67 for (i = 0; i < vcpu->arch.slb_nr; i++) {
68 if (vcpu->arch.slb[i].vsid)
69 dprintk(" %d: %c%c%c %llx %llx\n", i,
70 vcpu->arch.slb[i].valid ? 'v' : ' ',
71 vcpu->arch.slb[i].large ? 'l' : ' ',
72 vcpu->arch.slb[i].tb ? 't' : ' ',
73 vcpu->arch.slb[i].esid,
74 vcpu->arch.slb[i].vsid);
77 return NULL;
80 static int kvmppc_slb_sid_shift(struct kvmppc_slb *slbe)
82 return slbe->tb ? SID_SHIFT_1T : SID_SHIFT;
85 static u64 kvmppc_slb_offset_mask(struct kvmppc_slb *slbe)
87 return (1ul << kvmppc_slb_sid_shift(slbe)) - 1;
90 static u64 kvmppc_slb_calc_vpn(struct kvmppc_slb *slb, gva_t eaddr)
92 eaddr &= kvmppc_slb_offset_mask(slb);
94 return (eaddr >> VPN_SHIFT) |
95 ((slb->vsid) << (kvmppc_slb_sid_shift(slb) - VPN_SHIFT));
98 static u64 kvmppc_mmu_book3s_64_ea_to_vp(struct kvm_vcpu *vcpu, gva_t eaddr,
99 bool data)
101 struct kvmppc_slb *slb;
103 slb = kvmppc_mmu_book3s_64_find_slbe(vcpu, eaddr);
104 if (!slb)
105 return 0;
107 return kvmppc_slb_calc_vpn(slb, eaddr);
110 static int mmu_pagesize(int mmu_pg)
112 switch (mmu_pg) {
113 case MMU_PAGE_64K:
114 return 16;
115 case MMU_PAGE_16M:
116 return 24;
118 return 12;
121 static int kvmppc_mmu_book3s_64_get_pagesize(struct kvmppc_slb *slbe)
123 return mmu_pagesize(slbe->base_page_size);
126 static u32 kvmppc_mmu_book3s_64_get_page(struct kvmppc_slb *slbe, gva_t eaddr)
128 int p = kvmppc_mmu_book3s_64_get_pagesize(slbe);
130 return ((eaddr & kvmppc_slb_offset_mask(slbe)) >> p);
133 static hva_t kvmppc_mmu_book3s_64_get_pteg(struct kvm_vcpu *vcpu,
134 struct kvmppc_slb *slbe, gva_t eaddr,
135 bool second)
137 struct kvmppc_vcpu_book3s *vcpu_book3s = to_book3s(vcpu);
138 u64 hash, pteg, htabsize;
139 u32 ssize;
140 hva_t r;
141 u64 vpn;
143 htabsize = ((1 << ((vcpu_book3s->sdr1 & 0x1f) + 11)) - 1);
145 vpn = kvmppc_slb_calc_vpn(slbe, eaddr);
146 ssize = slbe->tb ? MMU_SEGSIZE_1T : MMU_SEGSIZE_256M;
147 hash = hpt_hash(vpn, kvmppc_mmu_book3s_64_get_pagesize(slbe), ssize);
148 if (second)
149 hash = ~hash;
150 hash &= ((1ULL << 39ULL) - 1ULL);
151 hash &= htabsize;
152 hash <<= 7ULL;
154 pteg = vcpu_book3s->sdr1 & 0xfffffffffffc0000ULL;
155 pteg |= hash;
157 dprintk("MMU: page=0x%x sdr1=0x%llx pteg=0x%llx vsid=0x%llx\n",
158 page, vcpu_book3s->sdr1, pteg, slbe->vsid);
160 /* When running a PAPR guest, SDR1 contains a HVA address instead
161 of a GPA */
162 if (vcpu->arch.papr_enabled)
163 r = pteg;
164 else
165 r = gfn_to_hva(vcpu->kvm, pteg >> PAGE_SHIFT);
167 if (kvm_is_error_hva(r))
168 return r;
169 return r | (pteg & ~PAGE_MASK);
172 static u64 kvmppc_mmu_book3s_64_get_avpn(struct kvmppc_slb *slbe, gva_t eaddr)
174 int p = kvmppc_mmu_book3s_64_get_pagesize(slbe);
175 u64 avpn;
177 avpn = kvmppc_mmu_book3s_64_get_page(slbe, eaddr);
178 avpn |= slbe->vsid << (kvmppc_slb_sid_shift(slbe) - p);
180 if (p < 16)
181 avpn >>= ((80 - p) - 56) - 8; /* 16 - p */
182 else
183 avpn <<= p - 16;
185 return avpn;
189 * Return page size encoded in the second word of a HPTE, or
190 * -1 for an invalid encoding for the base page size indicated by
191 * the SLB entry. This doesn't handle mixed pagesize segments yet.
193 static int decode_pagesize(struct kvmppc_slb *slbe, u64 r)
195 switch (slbe->base_page_size) {
196 case MMU_PAGE_64K:
197 if ((r & 0xf000) == 0x1000)
198 return MMU_PAGE_64K;
199 break;
200 case MMU_PAGE_16M:
201 if ((r & 0xff000) == 0)
202 return MMU_PAGE_16M;
203 break;
205 return -1;
208 static int kvmppc_mmu_book3s_64_xlate(struct kvm_vcpu *vcpu, gva_t eaddr,
209 struct kvmppc_pte *gpte, bool data,
210 bool iswrite)
212 struct kvmppc_slb *slbe;
213 hva_t ptegp;
214 u64 pteg[16];
215 u64 avpn = 0;
216 u64 v, r;
217 u64 v_val, v_mask;
218 u64 eaddr_mask;
219 int i;
220 u8 pp, key = 0;
221 bool found = false;
222 bool second = false;
223 int pgsize;
224 ulong mp_ea = vcpu->arch.magic_page_ea;
226 /* Magic page override */
227 if (unlikely(mp_ea) &&
228 unlikely((eaddr & ~0xfffULL) == (mp_ea & ~0xfffULL)) &&
229 !(kvmppc_get_msr(vcpu) & MSR_PR)) {
230 gpte->eaddr = eaddr;
231 gpte->vpage = kvmppc_mmu_book3s_64_ea_to_vp(vcpu, eaddr, data);
232 gpte->raddr = vcpu->arch.magic_page_pa | (gpte->raddr & 0xfff);
233 gpte->raddr &= KVM_PAM;
234 gpte->may_execute = true;
235 gpte->may_read = true;
236 gpte->may_write = true;
237 gpte->page_size = MMU_PAGE_4K;
239 return 0;
242 slbe = kvmppc_mmu_book3s_64_find_slbe(vcpu, eaddr);
243 if (!slbe)
244 goto no_seg_found;
246 avpn = kvmppc_mmu_book3s_64_get_avpn(slbe, eaddr);
247 v_val = avpn & HPTE_V_AVPN;
249 if (slbe->tb)
250 v_val |= SLB_VSID_B_1T;
251 if (slbe->large)
252 v_val |= HPTE_V_LARGE;
253 v_val |= HPTE_V_VALID;
255 v_mask = SLB_VSID_B | HPTE_V_AVPN | HPTE_V_LARGE | HPTE_V_VALID |
256 HPTE_V_SECONDARY;
258 pgsize = slbe->large ? MMU_PAGE_16M : MMU_PAGE_4K;
260 mutex_lock(&vcpu->kvm->arch.hpt_mutex);
262 do_second:
263 ptegp = kvmppc_mmu_book3s_64_get_pteg(vcpu, slbe, eaddr, second);
264 if (kvm_is_error_hva(ptegp))
265 goto no_page_found;
267 if(copy_from_user(pteg, (void __user *)ptegp, sizeof(pteg))) {
268 printk(KERN_ERR "KVM can't copy data from 0x%lx!\n", ptegp);
269 goto no_page_found;
272 if ((kvmppc_get_msr(vcpu) & MSR_PR) && slbe->Kp)
273 key = 4;
274 else if (!(kvmppc_get_msr(vcpu) & MSR_PR) && slbe->Ks)
275 key = 4;
277 for (i=0; i<16; i+=2) {
278 u64 pte0 = be64_to_cpu(pteg[i]);
279 u64 pte1 = be64_to_cpu(pteg[i + 1]);
281 /* Check all relevant fields of 1st dword */
282 if ((pte0 & v_mask) == v_val) {
283 /* If large page bit is set, check pgsize encoding */
284 if (slbe->large &&
285 (vcpu->arch.hflags & BOOK3S_HFLAG_MULTI_PGSIZE)) {
286 pgsize = decode_pagesize(slbe, pte1);
287 if (pgsize < 0)
288 continue;
290 found = true;
291 break;
295 if (!found) {
296 if (second)
297 goto no_page_found;
298 v_val |= HPTE_V_SECONDARY;
299 second = true;
300 goto do_second;
303 v = be64_to_cpu(pteg[i]);
304 r = be64_to_cpu(pteg[i+1]);
305 pp = (r & HPTE_R_PP) | key;
306 if (r & HPTE_R_PP0)
307 pp |= 8;
309 gpte->eaddr = eaddr;
310 gpte->vpage = kvmppc_mmu_book3s_64_ea_to_vp(vcpu, eaddr, data);
312 eaddr_mask = (1ull << mmu_pagesize(pgsize)) - 1;
313 gpte->raddr = (r & HPTE_R_RPN & ~eaddr_mask) | (eaddr & eaddr_mask);
314 gpte->page_size = pgsize;
315 gpte->may_execute = ((r & HPTE_R_N) ? false : true);
316 if (unlikely(vcpu->arch.disable_kernel_nx) &&
317 !(kvmppc_get_msr(vcpu) & MSR_PR))
318 gpte->may_execute = true;
319 gpte->may_read = false;
320 gpte->may_write = false;
322 switch (pp) {
323 case 0:
324 case 1:
325 case 2:
326 case 6:
327 gpte->may_write = true;
328 /* fall through */
329 case 3:
330 case 5:
331 case 7:
332 case 10:
333 gpte->may_read = true;
334 break;
337 dprintk("KVM MMU: Translated 0x%lx [0x%llx] -> 0x%llx "
338 "-> 0x%lx\n",
339 eaddr, avpn, gpte->vpage, gpte->raddr);
341 /* Update PTE R and C bits, so the guest's swapper knows we used the
342 * page */
343 if (gpte->may_read && !(r & HPTE_R_R)) {
345 * Set the accessed flag.
346 * We have to write this back with a single byte write
347 * because another vcpu may be accessing this on
348 * non-PAPR platforms such as mac99, and this is
349 * what real hardware does.
351 char __user *addr = (char __user *) (ptegp + (i + 1) * sizeof(u64));
352 r |= HPTE_R_R;
353 put_user(r >> 8, addr + 6);
355 if (iswrite && gpte->may_write && !(r & HPTE_R_C)) {
356 /* Set the dirty flag */
357 /* Use a single byte write */
358 char __user *addr = (char __user *) (ptegp + (i + 1) * sizeof(u64));
359 r |= HPTE_R_C;
360 put_user(r, addr + 7);
363 mutex_unlock(&vcpu->kvm->arch.hpt_mutex);
365 if (!gpte->may_read || (iswrite && !gpte->may_write))
366 return -EPERM;
367 return 0;
369 no_page_found:
370 mutex_unlock(&vcpu->kvm->arch.hpt_mutex);
371 return -ENOENT;
373 no_seg_found:
374 dprintk("KVM MMU: Trigger segment fault\n");
375 return -EINVAL;
378 static void kvmppc_mmu_book3s_64_slbmte(struct kvm_vcpu *vcpu, u64 rs, u64 rb)
380 u64 esid, esid_1t;
381 int slb_nr;
382 struct kvmppc_slb *slbe;
384 dprintk("KVM MMU: slbmte(0x%llx, 0x%llx)\n", rs, rb);
386 esid = GET_ESID(rb);
387 esid_1t = GET_ESID_1T(rb);
388 slb_nr = rb & 0xfff;
390 if (slb_nr > vcpu->arch.slb_nr)
391 return;
393 slbe = &vcpu->arch.slb[slb_nr];
395 slbe->large = (rs & SLB_VSID_L) ? 1 : 0;
396 slbe->tb = (rs & SLB_VSID_B_1T) ? 1 : 0;
397 slbe->esid = slbe->tb ? esid_1t : esid;
398 slbe->vsid = (rs & ~SLB_VSID_B) >> (kvmppc_slb_sid_shift(slbe) - 16);
399 slbe->valid = (rb & SLB_ESID_V) ? 1 : 0;
400 slbe->Ks = (rs & SLB_VSID_KS) ? 1 : 0;
401 slbe->Kp = (rs & SLB_VSID_KP) ? 1 : 0;
402 slbe->nx = (rs & SLB_VSID_N) ? 1 : 0;
403 slbe->class = (rs & SLB_VSID_C) ? 1 : 0;
405 slbe->base_page_size = MMU_PAGE_4K;
406 if (slbe->large) {
407 if (vcpu->arch.hflags & BOOK3S_HFLAG_MULTI_PGSIZE) {
408 switch (rs & SLB_VSID_LP) {
409 case SLB_VSID_LP_00:
410 slbe->base_page_size = MMU_PAGE_16M;
411 break;
412 case SLB_VSID_LP_01:
413 slbe->base_page_size = MMU_PAGE_64K;
414 break;
416 } else
417 slbe->base_page_size = MMU_PAGE_16M;
420 slbe->orige = rb & (ESID_MASK | SLB_ESID_V);
421 slbe->origv = rs;
423 /* Map the new segment */
424 kvmppc_mmu_map_segment(vcpu, esid << SID_SHIFT);
427 static u64 kvmppc_mmu_book3s_64_slbmfee(struct kvm_vcpu *vcpu, u64 slb_nr)
429 struct kvmppc_slb *slbe;
431 if (slb_nr > vcpu->arch.slb_nr)
432 return 0;
434 slbe = &vcpu->arch.slb[slb_nr];
436 return slbe->orige;
439 static u64 kvmppc_mmu_book3s_64_slbmfev(struct kvm_vcpu *vcpu, u64 slb_nr)
441 struct kvmppc_slb *slbe;
443 if (slb_nr > vcpu->arch.slb_nr)
444 return 0;
446 slbe = &vcpu->arch.slb[slb_nr];
448 return slbe->origv;
451 static void kvmppc_mmu_book3s_64_slbie(struct kvm_vcpu *vcpu, u64 ea)
453 struct kvmppc_slb *slbe;
454 u64 seg_size;
456 dprintk("KVM MMU: slbie(0x%llx)\n", ea);
458 slbe = kvmppc_mmu_book3s_64_find_slbe(vcpu, ea);
460 if (!slbe)
461 return;
463 dprintk("KVM MMU: slbie(0x%llx, 0x%llx)\n", ea, slbe->esid);
465 slbe->valid = false;
466 slbe->orige = 0;
467 slbe->origv = 0;
469 seg_size = 1ull << kvmppc_slb_sid_shift(slbe);
470 kvmppc_mmu_flush_segment(vcpu, ea & ~(seg_size - 1), seg_size);
473 static void kvmppc_mmu_book3s_64_slbia(struct kvm_vcpu *vcpu)
475 int i;
477 dprintk("KVM MMU: slbia()\n");
479 for (i = 1; i < vcpu->arch.slb_nr; i++) {
480 vcpu->arch.slb[i].valid = false;
481 vcpu->arch.slb[i].orige = 0;
482 vcpu->arch.slb[i].origv = 0;
485 if (kvmppc_get_msr(vcpu) & MSR_IR) {
486 kvmppc_mmu_flush_segments(vcpu);
487 kvmppc_mmu_map_segment(vcpu, kvmppc_get_pc(vcpu));
491 static void kvmppc_mmu_book3s_64_mtsrin(struct kvm_vcpu *vcpu, u32 srnum,
492 ulong value)
494 u64 rb = 0, rs = 0;
497 * According to Book3 2.01 mtsrin is implemented as:
499 * The SLB entry specified by (RB)32:35 is loaded from register
500 * RS, as follows.
502 * SLBE Bit Source SLB Field
504 * 0:31 0x0000_0000 ESID-0:31
505 * 32:35 (RB)32:35 ESID-32:35
506 * 36 0b1 V
507 * 37:61 0x00_0000|| 0b0 VSID-0:24
508 * 62:88 (RS)37:63 VSID-25:51
509 * 89:91 (RS)33:35 Ks Kp N
510 * 92 (RS)36 L ((RS)36 must be 0b0)
511 * 93 0b0 C
514 dprintk("KVM MMU: mtsrin(0x%x, 0x%lx)\n", srnum, value);
516 /* ESID = srnum */
517 rb |= (srnum & 0xf) << 28;
518 /* Set the valid bit */
519 rb |= 1 << 27;
520 /* Index = ESID */
521 rb |= srnum;
523 /* VSID = VSID */
524 rs |= (value & 0xfffffff) << 12;
525 /* flags = flags */
526 rs |= ((value >> 28) & 0x7) << 9;
528 kvmppc_mmu_book3s_64_slbmte(vcpu, rs, rb);
531 static void kvmppc_mmu_book3s_64_tlbie(struct kvm_vcpu *vcpu, ulong va,
532 bool large)
534 u64 mask = 0xFFFFFFFFFULL;
535 long i;
536 struct kvm_vcpu *v;
538 dprintk("KVM MMU: tlbie(0x%lx)\n", va);
541 * The tlbie instruction changed behaviour starting with
542 * POWER6. POWER6 and later don't have the large page flag
543 * in the instruction but in the RB value, along with bits
544 * indicating page and segment sizes.
546 if (vcpu->arch.hflags & BOOK3S_HFLAG_NEW_TLBIE) {
547 /* POWER6 or later */
548 if (va & 1) { /* L bit */
549 if ((va & 0xf000) == 0x1000)
550 mask = 0xFFFFFFFF0ULL; /* 64k page */
551 else
552 mask = 0xFFFFFF000ULL; /* 16M page */
554 } else {
555 /* older processors, e.g. PPC970 */
556 if (large)
557 mask = 0xFFFFFF000ULL;
559 /* flush this VA on all vcpus */
560 kvm_for_each_vcpu(i, v, vcpu->kvm)
561 kvmppc_mmu_pte_vflush(v, va >> 12, mask);
564 #ifdef CONFIG_PPC_64K_PAGES
565 static int segment_contains_magic_page(struct kvm_vcpu *vcpu, ulong esid)
567 ulong mp_ea = vcpu->arch.magic_page_ea;
569 return mp_ea && !(kvmppc_get_msr(vcpu) & MSR_PR) &&
570 (mp_ea >> SID_SHIFT) == esid;
572 #endif
574 static int kvmppc_mmu_book3s_64_esid_to_vsid(struct kvm_vcpu *vcpu, ulong esid,
575 u64 *vsid)
577 ulong ea = esid << SID_SHIFT;
578 struct kvmppc_slb *slb;
579 u64 gvsid = esid;
580 ulong mp_ea = vcpu->arch.magic_page_ea;
581 int pagesize = MMU_PAGE_64K;
582 u64 msr = kvmppc_get_msr(vcpu);
584 if (msr & (MSR_DR|MSR_IR)) {
585 slb = kvmppc_mmu_book3s_64_find_slbe(vcpu, ea);
586 if (slb) {
587 gvsid = slb->vsid;
588 pagesize = slb->base_page_size;
589 if (slb->tb) {
590 gvsid <<= SID_SHIFT_1T - SID_SHIFT;
591 gvsid |= esid & ((1ul << (SID_SHIFT_1T - SID_SHIFT)) - 1);
592 gvsid |= VSID_1T;
597 switch (msr & (MSR_DR|MSR_IR)) {
598 case 0:
599 gvsid = VSID_REAL | esid;
600 break;
601 case MSR_IR:
602 gvsid |= VSID_REAL_IR;
603 break;
604 case MSR_DR:
605 gvsid |= VSID_REAL_DR;
606 break;
607 case MSR_DR|MSR_IR:
608 if (!slb)
609 goto no_slb;
611 break;
612 default:
613 BUG();
614 break;
617 #ifdef CONFIG_PPC_64K_PAGES
619 * Mark this as a 64k segment if the host is using
620 * 64k pages, the host MMU supports 64k pages and
621 * the guest segment page size is >= 64k,
622 * but not if this segment contains the magic page.
624 if (pagesize >= MMU_PAGE_64K &&
625 mmu_psize_defs[MMU_PAGE_64K].shift &&
626 !segment_contains_magic_page(vcpu, esid))
627 gvsid |= VSID_64K;
628 #endif
630 if (kvmppc_get_msr(vcpu) & MSR_PR)
631 gvsid |= VSID_PR;
633 *vsid = gvsid;
634 return 0;
636 no_slb:
637 /* Catch magic page case */
638 if (unlikely(mp_ea) &&
639 unlikely(esid == (mp_ea >> SID_SHIFT)) &&
640 !(kvmppc_get_msr(vcpu) & MSR_PR)) {
641 *vsid = VSID_REAL | esid;
642 return 0;
645 return -EINVAL;
648 static bool kvmppc_mmu_book3s_64_is_dcbz32(struct kvm_vcpu *vcpu)
650 return (to_book3s(vcpu)->hid[5] & 0x80);
653 void kvmppc_mmu_book3s_64_init(struct kvm_vcpu *vcpu)
655 struct kvmppc_mmu *mmu = &vcpu->arch.mmu;
657 mmu->mfsrin = NULL;
658 mmu->mtsrin = kvmppc_mmu_book3s_64_mtsrin;
659 mmu->slbmte = kvmppc_mmu_book3s_64_slbmte;
660 mmu->slbmfee = kvmppc_mmu_book3s_64_slbmfee;
661 mmu->slbmfev = kvmppc_mmu_book3s_64_slbmfev;
662 mmu->slbie = kvmppc_mmu_book3s_64_slbie;
663 mmu->slbia = kvmppc_mmu_book3s_64_slbia;
664 mmu->xlate = kvmppc_mmu_book3s_64_xlate;
665 mmu->reset_msr = kvmppc_mmu_book3s_64_reset_msr;
666 mmu->tlbie = kvmppc_mmu_book3s_64_tlbie;
667 mmu->esid_to_vsid = kvmppc_mmu_book3s_64_esid_to_vsid;
668 mmu->ea_to_vp = kvmppc_mmu_book3s_64_ea_to_vp;
669 mmu->is_dcbz32 = kvmppc_mmu_book3s_64_is_dcbz32;
671 vcpu->arch.hflags |= BOOK3S_HFLAG_SLB;