Lines Matching +full:guest +full:- +full:index +full:- +full:bits

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2008-2011 Freescale Semiconductor, Inc. All rights reserved.
13 * Copyright IBM Corp. 2007-2008
20 #include <asm/nohash/mmu-e500.h>
37 /* bits [6-5] MAS2_X1 and MAS2_X0 and [4-0] bits for WIMGE */
60 /* Unmodified copy of the guest's TLB -- shared with host userspace. */
66 /* KVM internal information associated with each guest TLB entry */
106 /* This geometry is the legacy default -- can be overridden by userspace */
114 #define tlbsel_of(index) ((index) >> 16) argument
115 #define esel_of(index) ((index) & 0xFFFF) argument
153 return (tlbe->mas1 >> 7) & 0x1f; in get_tlb_size()
158 return tlbe->mas2 & MAS2_EPN; in get_tlb_eaddr()
170 return get_tlb_eaddr(tlbe) + bytes - 1; in get_tlb_end()
175 return tlbe->mas7_3 & ~0xfffULL; in get_tlb_raddr()
181 return (tlbe->mas1 >> 16) & 0xff; in get_tlb_tid()
187 return (tlbe->mas1 >> 12) & 0x1; in get_tlb_ts()
193 return (tlbe->mas1 >> 31) & 0x1; in get_tlb_v()
199 return (tlbe->mas1 >> 30) & 0x1; in get_tlb_iprot()
205 return (tlbe->mas1 & MAS1_TSIZE_MASK) >> MAS1_TSIZE_SHIFT; in get_tlb_tsize()
210 return vcpu->arch.pid & 0xff; in get_cur_pid()
215 return !!(vcpu->arch.shared->msr & (MSR_IS | MSR_DS)); in get_cur_as()
220 return !!(vcpu->arch.shared->msr & MSR_PR); in get_cur_pr()
225 return (vcpu->arch.shared->mas6 >> 16) & 0xff; in get_cur_spid()
230 return vcpu->arch.shared->mas6 & 0x1; in get_cur_sas()
236 * Manual says that tlbsel has 2 bits wide. in get_tlb_tlbsel()
239 return (vcpu->arch.shared->mas0 >> 28) & 0x1; in get_tlb_tlbsel()
244 return vcpu->arch.shared->mas0 & 0xfff; in get_tlb_nv_bit()
249 return (vcpu->arch.shared->mas0 >> 16) & 0xfff; in get_tlb_esel_bit()
261 /* Does it match current guest AS? */ in tlbe_is_host_safe()
263 if (get_tlb_ts(tlbe) != !!(vcpu->arch.shared->msr & MSR_IS)) in tlbe_is_host_safe()
268 if (!gfn_to_memslot(vcpu->kvm, gpa >> PAGE_SHIFT)) in tlbe_is_host_safe()
278 int offset = vcpu_e500->gtlb_offset[tlbsel]; in get_entry()
279 return &vcpu_e500->gtlb_arch[offset + entry]; in get_entry()
289 #define get_tlb_sts(gtlbe) (gtlbe->mas1 & MAS1_TS)
307 return get_thread_specific_lpid(vcpu->kvm->arch.lpid); in get_lpid()
316 unsigned int tidseld = (vcpu->arch.shared->mas4 >> 16) & 0xf; in get_tlbmiss_tid()
318 return vcpu_e500->pid[tidseld]; in get_tlbmiss_tid()
321 /* Force TS=1 for all guest mappings. */
331 has_ftr = ((vcpu->arch.mmucfg & MMUCFG_MAVN) == MMUCFG_MAVN_V2); in has_feature()