blob: 5a1ab1250a056f26b395357abb4baf9222fb2c84 [file] [log] [blame]
Alexander Graf77419092010-06-30 15:18:45 +02001/*
2 * Copyright (C) 2010 SUSE Linux Products GmbH. All rights reserved.
3 *
4 * Authors:
5 * Alexander Graf <agraf@suse.de>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License, version 2, as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#include <linux/kvm_host.h>
22#include <linux/hash.h>
23#include <linux/slab.h>
24
25#include <asm/kvm_ppc.h>
26#include <asm/kvm_book3s.h>
27#include <asm/machdep.h>
28#include <asm/mmu_context.h>
29#include <asm/hw_irq.h>
30
Aneesh Kumar K.V72c12532013-10-07 22:17:57 +053031#include "trace_pr.h"
Paul Mackerrasc4befc52011-06-29 00:17:33 +000032
Alexander Graf77419092010-06-30 15:18:45 +020033#define PTE_SIZE 12
34
Alexander Graf77419092010-06-30 15:18:45 +020035static struct kmem_cache *hpte_cache;
36
37static inline u64 kvmppc_mmu_hash_pte(u64 eaddr)
38{
39 return hash_64(eaddr >> PTE_SIZE, HPTEG_HASH_BITS_PTE);
40}
41
Alexander Graf2d27fc52010-07-29 15:04:19 +020042static inline u64 kvmppc_mmu_hash_pte_long(u64 eaddr)
43{
44 return hash_64((eaddr & 0x0ffff000) >> PTE_SIZE,
45 HPTEG_HASH_BITS_PTE_LONG);
46}
47
Alexander Graf77419092010-06-30 15:18:45 +020048static inline u64 kvmppc_mmu_hash_vpte(u64 vpage)
49{
50 return hash_64(vpage & 0xfffffffffULL, HPTEG_HASH_BITS_VPTE);
51}
52
53static inline u64 kvmppc_mmu_hash_vpte_long(u64 vpage)
54{
55 return hash_64((vpage & 0xffffff000ULL) >> 12,
56 HPTEG_HASH_BITS_VPTE_LONG);
57}
58
Paul Mackerrasa4a0f252013-09-20 14:52:44 +100059#ifdef CONFIG_PPC_BOOK3S_64
60static inline u64 kvmppc_mmu_hash_vpte_64k(u64 vpage)
61{
62 return hash_64((vpage & 0xffffffff0ULL) >> 4,
63 HPTEG_HASH_BITS_VPTE_64K);
64}
65#endif
66
Alexander Graf77419092010-06-30 15:18:45 +020067void kvmppc_mmu_hpte_cache_map(struct kvm_vcpu *vcpu, struct hpte_cache *pte)
68{
69 u64 index;
Paul Mackerrasc4befc52011-06-29 00:17:33 +000070 struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu);
Alexander Graf77419092010-06-30 15:18:45 +020071
Alexander Graf4c4eea72010-08-02 12:51:07 +020072 trace_kvm_book3s_mmu_map(pte);
73
Paul Mackerrasc4befc52011-06-29 00:17:33 +000074 spin_lock(&vcpu3s->mmu_lock);
Alexander Graf2e0908a2010-07-29 15:04:17 +020075
Alexander Graf77419092010-06-30 15:18:45 +020076 /* Add to ePTE list */
77 index = kvmppc_mmu_hash_pte(pte->pte.eaddr);
Paul Mackerrasc4befc52011-06-29 00:17:33 +000078 hlist_add_head_rcu(&pte->list_pte, &vcpu3s->hpte_hash_pte[index]);
Alexander Graf77419092010-06-30 15:18:45 +020079
Alexander Graf2d27fc52010-07-29 15:04:19 +020080 /* Add to ePTE_long list */
81 index = kvmppc_mmu_hash_pte_long(pte->pte.eaddr);
82 hlist_add_head_rcu(&pte->list_pte_long,
Paul Mackerrasc4befc52011-06-29 00:17:33 +000083 &vcpu3s->hpte_hash_pte_long[index]);
Alexander Graf2d27fc52010-07-29 15:04:19 +020084
Alexander Graf77419092010-06-30 15:18:45 +020085 /* Add to vPTE list */
86 index = kvmppc_mmu_hash_vpte(pte->pte.vpage);
Paul Mackerrasc4befc52011-06-29 00:17:33 +000087 hlist_add_head_rcu(&pte->list_vpte, &vcpu3s->hpte_hash_vpte[index]);
Alexander Graf77419092010-06-30 15:18:45 +020088
89 /* Add to vPTE_long list */
90 index = kvmppc_mmu_hash_vpte_long(pte->pte.vpage);
Alexander Graf2e0908a2010-07-29 15:04:17 +020091 hlist_add_head_rcu(&pte->list_vpte_long,
Paul Mackerrasc4befc52011-06-29 00:17:33 +000092 &vcpu3s->hpte_hash_vpte_long[index]);
Alexander Graf2e0908a2010-07-29 15:04:17 +020093
Paul Mackerrasa4a0f252013-09-20 14:52:44 +100094#ifdef CONFIG_PPC_BOOK3S_64
95 /* Add to vPTE_64k list */
96 index = kvmppc_mmu_hash_vpte_64k(pte->pte.vpage);
97 hlist_add_head_rcu(&pte->list_vpte_64k,
98 &vcpu3s->hpte_hash_vpte_64k[index]);
99#endif
100
Paul Mackerrasd78bca72013-09-20 14:52:52 +1000101 vcpu3s->hpte_cache_count++;
102
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000103 spin_unlock(&vcpu3s->mmu_lock);
Alexander Graf2e0908a2010-07-29 15:04:17 +0200104}
105
106static void free_pte_rcu(struct rcu_head *head)
107{
108 struct hpte_cache *pte = container_of(head, struct hpte_cache, rcu_head);
109 kmem_cache_free(hpte_cache, pte);
Alexander Graf77419092010-06-30 15:18:45 +0200110}
111
112static void invalidate_pte(struct kvm_vcpu *vcpu, struct hpte_cache *pte)
113{
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000114 struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu);
115
Alexander Graf8696ee42010-08-02 12:55:19 +0200116 trace_kvm_book3s_mmu_invalidate(pte);
Alexander Graf77419092010-06-30 15:18:45 +0200117
118 /* Different for 32 and 64 bit */
119 kvmppc_mmu_invalidate_pte(vcpu, pte);
120
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000121 spin_lock(&vcpu3s->mmu_lock);
Alexander Graf2e0908a2010-07-29 15:04:17 +0200122
Alexander Grafe7c1d142010-08-02 21:24:48 +0200123 /* pte already invalidated in between? */
124 if (hlist_unhashed(&pte->list_pte)) {
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000125 spin_unlock(&vcpu3s->mmu_lock);
Alexander Grafe7c1d142010-08-02 21:24:48 +0200126 return;
127 }
128
Alexander Graf2e0908a2010-07-29 15:04:17 +0200129 hlist_del_init_rcu(&pte->list_pte);
Alexander Graf2d27fc52010-07-29 15:04:19 +0200130 hlist_del_init_rcu(&pte->list_pte_long);
Alexander Graf2e0908a2010-07-29 15:04:17 +0200131 hlist_del_init_rcu(&pte->list_vpte);
132 hlist_del_init_rcu(&pte->list_vpte_long);
Paul Mackerrasa4a0f252013-09-20 14:52:44 +1000133#ifdef CONFIG_PPC_BOOK3S_64
134 hlist_del_init_rcu(&pte->list_vpte_64k);
135#endif
Paul Mackerrasd78bca72013-09-20 14:52:52 +1000136 vcpu3s->hpte_cache_count--;
Alexander Graf2e0908a2010-07-29 15:04:17 +0200137
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000138 spin_unlock(&vcpu3s->mmu_lock);
Alexander Grafe7c1d142010-08-02 21:24:48 +0200139
Alexander Graf2e0908a2010-07-29 15:04:17 +0200140 call_rcu(&pte->rcu_head, free_pte_rcu);
Alexander Graf77419092010-06-30 15:18:45 +0200141}
142
143static void kvmppc_mmu_pte_flush_all(struct kvm_vcpu *vcpu)
144{
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000145 struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu);
Alexander Graf77419092010-06-30 15:18:45 +0200146 struct hpte_cache *pte;
Alexander Graf77419092010-06-30 15:18:45 +0200147 int i;
148
Alexander Graf2e0908a2010-07-29 15:04:17 +0200149 rcu_read_lock();
150
Alexander Graf77419092010-06-30 15:18:45 +0200151 for (i = 0; i < HPTEG_HASH_NUM_VPTE_LONG; i++) {
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000152 struct hlist_head *list = &vcpu3s->hpte_hash_vpte_long[i];
Alexander Graf77419092010-06-30 15:18:45 +0200153
Sasha Levinb67bfe02013-02-27 17:06:00 -0800154 hlist_for_each_entry_rcu(pte, list, list_vpte_long)
Alexander Graf77419092010-06-30 15:18:45 +0200155 invalidate_pte(vcpu, pte);
156 }
Alexander Graf2e0908a2010-07-29 15:04:17 +0200157
158 rcu_read_unlock();
Alexander Graf77419092010-06-30 15:18:45 +0200159}
160
161static void kvmppc_mmu_pte_flush_page(struct kvm_vcpu *vcpu, ulong guest_ea)
162{
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000163 struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu);
Alexander Graf77419092010-06-30 15:18:45 +0200164 struct hlist_head *list;
Alexander Graf77419092010-06-30 15:18:45 +0200165 struct hpte_cache *pte;
166
167 /* Find the list of entries in the map */
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000168 list = &vcpu3s->hpte_hash_pte[kvmppc_mmu_hash_pte(guest_ea)];
Alexander Graf77419092010-06-30 15:18:45 +0200169
Alexander Graf2e0908a2010-07-29 15:04:17 +0200170 rcu_read_lock();
171
Alexander Graf77419092010-06-30 15:18:45 +0200172 /* Check the list for matching entries and invalidate */
Sasha Levinb67bfe02013-02-27 17:06:00 -0800173 hlist_for_each_entry_rcu(pte, list, list_pte)
Alexander Graf77419092010-06-30 15:18:45 +0200174 if ((pte->pte.eaddr & ~0xfffUL) == guest_ea)
175 invalidate_pte(vcpu, pte);
Alexander Graf2e0908a2010-07-29 15:04:17 +0200176
177 rcu_read_unlock();
Alexander Graf77419092010-06-30 15:18:45 +0200178}
179
Alexander Graf2d27fc52010-07-29 15:04:19 +0200180static void kvmppc_mmu_pte_flush_long(struct kvm_vcpu *vcpu, ulong guest_ea)
181{
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000182 struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu);
Alexander Graf2d27fc52010-07-29 15:04:19 +0200183 struct hlist_head *list;
Alexander Graf2d27fc52010-07-29 15:04:19 +0200184 struct hpte_cache *pte;
185
186 /* Find the list of entries in the map */
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000187 list = &vcpu3s->hpte_hash_pte_long[
Alexander Graf2d27fc52010-07-29 15:04:19 +0200188 kvmppc_mmu_hash_pte_long(guest_ea)];
189
190 rcu_read_lock();
191
192 /* Check the list for matching entries and invalidate */
Sasha Levinb67bfe02013-02-27 17:06:00 -0800193 hlist_for_each_entry_rcu(pte, list, list_pte_long)
Alexander Graf2d27fc52010-07-29 15:04:19 +0200194 if ((pte->pte.eaddr & 0x0ffff000UL) == guest_ea)
195 invalidate_pte(vcpu, pte);
196
197 rcu_read_unlock();
198}
199
Alexander Graf77419092010-06-30 15:18:45 +0200200void kvmppc_mmu_pte_flush(struct kvm_vcpu *vcpu, ulong guest_ea, ulong ea_mask)
201{
Alexander Grafc60b4cf2010-08-02 13:40:30 +0200202 trace_kvm_book3s_mmu_flush("", vcpu, guest_ea, ea_mask);
Alexander Graf77419092010-06-30 15:18:45 +0200203 guest_ea &= ea_mask;
204
205 switch (ea_mask) {
206 case ~0xfffUL:
207 kvmppc_mmu_pte_flush_page(vcpu, guest_ea);
208 break;
209 case 0x0ffff000:
Alexander Graf2d27fc52010-07-29 15:04:19 +0200210 kvmppc_mmu_pte_flush_long(vcpu, guest_ea);
Alexander Graf77419092010-06-30 15:18:45 +0200211 break;
212 case 0:
213 /* Doing a complete flush -> start from scratch */
214 kvmppc_mmu_pte_flush_all(vcpu);
215 break;
216 default:
217 WARN_ON(1);
218 break;
219 }
220}
221
222/* Flush with mask 0xfffffffff */
223static void kvmppc_mmu_pte_vflush_short(struct kvm_vcpu *vcpu, u64 guest_vp)
224{
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000225 struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu);
Alexander Graf77419092010-06-30 15:18:45 +0200226 struct hlist_head *list;
Alexander Graf77419092010-06-30 15:18:45 +0200227 struct hpte_cache *pte;
228 u64 vp_mask = 0xfffffffffULL;
229
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000230 list = &vcpu3s->hpte_hash_vpte[kvmppc_mmu_hash_vpte(guest_vp)];
Alexander Graf77419092010-06-30 15:18:45 +0200231
Alexander Graf2e0908a2010-07-29 15:04:17 +0200232 rcu_read_lock();
233
Alexander Graf77419092010-06-30 15:18:45 +0200234 /* Check the list for matching entries and invalidate */
Sasha Levinb67bfe02013-02-27 17:06:00 -0800235 hlist_for_each_entry_rcu(pte, list, list_vpte)
Alexander Graf77419092010-06-30 15:18:45 +0200236 if ((pte->pte.vpage & vp_mask) == guest_vp)
237 invalidate_pte(vcpu, pte);
Alexander Graf2e0908a2010-07-29 15:04:17 +0200238
239 rcu_read_unlock();
Alexander Graf77419092010-06-30 15:18:45 +0200240}
241
Paul Mackerrasa4a0f252013-09-20 14:52:44 +1000242#ifdef CONFIG_PPC_BOOK3S_64
243/* Flush with mask 0xffffffff0 */
244static void kvmppc_mmu_pte_vflush_64k(struct kvm_vcpu *vcpu, u64 guest_vp)
245{
246 struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu);
247 struct hlist_head *list;
248 struct hpte_cache *pte;
249 u64 vp_mask = 0xffffffff0ULL;
250
251 list = &vcpu3s->hpte_hash_vpte_64k[
252 kvmppc_mmu_hash_vpte_64k(guest_vp)];
253
254 rcu_read_lock();
255
256 /* Check the list for matching entries and invalidate */
257 hlist_for_each_entry_rcu(pte, list, list_vpte_64k)
258 if ((pte->pte.vpage & vp_mask) == guest_vp)
259 invalidate_pte(vcpu, pte);
260
261 rcu_read_unlock();
262}
263#endif
264
Alexander Graf77419092010-06-30 15:18:45 +0200265/* Flush with mask 0xffffff000 */
266static void kvmppc_mmu_pte_vflush_long(struct kvm_vcpu *vcpu, u64 guest_vp)
267{
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000268 struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu);
Alexander Graf77419092010-06-30 15:18:45 +0200269 struct hlist_head *list;
Alexander Graf77419092010-06-30 15:18:45 +0200270 struct hpte_cache *pte;
271 u64 vp_mask = 0xffffff000ULL;
272
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000273 list = &vcpu3s->hpte_hash_vpte_long[
Alexander Graf77419092010-06-30 15:18:45 +0200274 kvmppc_mmu_hash_vpte_long(guest_vp)];
275
Alexander Graf2e0908a2010-07-29 15:04:17 +0200276 rcu_read_lock();
277
Alexander Graf77419092010-06-30 15:18:45 +0200278 /* Check the list for matching entries and invalidate */
Sasha Levinb67bfe02013-02-27 17:06:00 -0800279 hlist_for_each_entry_rcu(pte, list, list_vpte_long)
Alexander Graf77419092010-06-30 15:18:45 +0200280 if ((pte->pte.vpage & vp_mask) == guest_vp)
281 invalidate_pte(vcpu, pte);
Alexander Graf2e0908a2010-07-29 15:04:17 +0200282
283 rcu_read_unlock();
Alexander Graf77419092010-06-30 15:18:45 +0200284}
285
286void kvmppc_mmu_pte_vflush(struct kvm_vcpu *vcpu, u64 guest_vp, u64 vp_mask)
287{
Alexander Grafc60b4cf2010-08-02 13:40:30 +0200288 trace_kvm_book3s_mmu_flush("v", vcpu, guest_vp, vp_mask);
Alexander Graf77419092010-06-30 15:18:45 +0200289 guest_vp &= vp_mask;
290
291 switch(vp_mask) {
292 case 0xfffffffffULL:
293 kvmppc_mmu_pte_vflush_short(vcpu, guest_vp);
294 break;
Paul Mackerrasa4a0f252013-09-20 14:52:44 +1000295#ifdef CONFIG_PPC_BOOK3S_64
296 case 0xffffffff0ULL:
297 kvmppc_mmu_pte_vflush_64k(vcpu, guest_vp);
298 break;
299#endif
Alexander Graf77419092010-06-30 15:18:45 +0200300 case 0xffffff000ULL:
301 kvmppc_mmu_pte_vflush_long(vcpu, guest_vp);
302 break;
303 default:
304 WARN_ON(1);
305 return;
306 }
307}
308
309void kvmppc_mmu_pte_pflush(struct kvm_vcpu *vcpu, ulong pa_start, ulong pa_end)
310{
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000311 struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu);
Alexander Graf77419092010-06-30 15:18:45 +0200312 struct hpte_cache *pte;
313 int i;
314
Alexander Grafc60b4cf2010-08-02 13:40:30 +0200315 trace_kvm_book3s_mmu_flush("p", vcpu, pa_start, pa_end);
Alexander Graf77419092010-06-30 15:18:45 +0200316
Alexander Graf2e0908a2010-07-29 15:04:17 +0200317 rcu_read_lock();
318
Alexander Graf77419092010-06-30 15:18:45 +0200319 for (i = 0; i < HPTEG_HASH_NUM_VPTE_LONG; i++) {
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000320 struct hlist_head *list = &vcpu3s->hpte_hash_vpte_long[i];
Alexander Graf77419092010-06-30 15:18:45 +0200321
Sasha Levinb67bfe02013-02-27 17:06:00 -0800322 hlist_for_each_entry_rcu(pte, list, list_vpte_long)
Alexander Graf77419092010-06-30 15:18:45 +0200323 if ((pte->pte.raddr >= pa_start) &&
324 (pte->pte.raddr < pa_end))
325 invalidate_pte(vcpu, pte);
326 }
Alexander Graf2e0908a2010-07-29 15:04:17 +0200327
328 rcu_read_unlock();
Alexander Graf77419092010-06-30 15:18:45 +0200329}
330
331struct hpte_cache *kvmppc_mmu_hpte_cache_next(struct kvm_vcpu *vcpu)
332{
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000333 struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu);
Alexander Graf77419092010-06-30 15:18:45 +0200334 struct hpte_cache *pte;
335
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000336 if (vcpu3s->hpte_cache_count == HPTEG_CACHE_NUM)
Alexander Graf77419092010-06-30 15:18:45 +0200337 kvmppc_mmu_pte_flush_all(vcpu);
338
Paul Mackerrasd78bca72013-09-20 14:52:52 +1000339 pte = kmem_cache_zalloc(hpte_cache, GFP_KERNEL);
340
Alexander Graf77419092010-06-30 15:18:45 +0200341 return pte;
342}
343
Paul Mackerrasd78bca72013-09-20 14:52:52 +1000344void kvmppc_mmu_hpte_cache_free(struct hpte_cache *pte)
345{
346 kmem_cache_free(hpte_cache, pte);
347}
348
Alexander Graf77419092010-06-30 15:18:45 +0200349void kvmppc_mmu_hpte_destroy(struct kvm_vcpu *vcpu)
350{
351 kvmppc_mmu_pte_flush(vcpu, 0, 0);
352}
353
354static void kvmppc_mmu_hpte_init_hash(struct hlist_head *hash_list, int len)
355{
356 int i;
357
358 for (i = 0; i < len; i++)
359 INIT_HLIST_HEAD(&hash_list[i]);
360}
361
362int kvmppc_mmu_hpte_init(struct kvm_vcpu *vcpu)
363{
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000364 struct kvmppc_vcpu_book3s *vcpu3s = to_book3s(vcpu);
Alexander Graf77419092010-06-30 15:18:45 +0200365
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000366 /* init hpte lookup hashes */
367 kvmppc_mmu_hpte_init_hash(vcpu3s->hpte_hash_pte,
368 ARRAY_SIZE(vcpu3s->hpte_hash_pte));
369 kvmppc_mmu_hpte_init_hash(vcpu3s->hpte_hash_pte_long,
370 ARRAY_SIZE(vcpu3s->hpte_hash_pte_long));
371 kvmppc_mmu_hpte_init_hash(vcpu3s->hpte_hash_vpte,
372 ARRAY_SIZE(vcpu3s->hpte_hash_vpte));
373 kvmppc_mmu_hpte_init_hash(vcpu3s->hpte_hash_vpte_long,
374 ARRAY_SIZE(vcpu3s->hpte_hash_vpte_long));
Paul Mackerrasa4a0f252013-09-20 14:52:44 +1000375#ifdef CONFIG_PPC_BOOK3S_64
376 kvmppc_mmu_hpte_init_hash(vcpu3s->hpte_hash_vpte_64k,
377 ARRAY_SIZE(vcpu3s->hpte_hash_vpte_64k));
378#endif
Paul Mackerrasc4befc52011-06-29 00:17:33 +0000379
380 spin_lock_init(&vcpu3s->mmu_lock);
Alexander Graf2e0908a2010-07-29 15:04:17 +0200381
Alexander Graf77419092010-06-30 15:18:45 +0200382 return 0;
383}
384
385int kvmppc_mmu_hpte_sysinit(void)
386{
387 /* init hpte slab cache */
388 hpte_cache = kmem_cache_create("kvm-spt", sizeof(struct hpte_cache),
389 sizeof(struct hpte_cache), 0, NULL);
390
391 return 0;
392}
393
394void kvmppc_mmu_hpte_sysexit(void)
395{
396 kmem_cache_destroy(hpte_cache);
397}