Lines Matching refs:mfn
59 extern bool set_phys_to_machine(unsigned long pfn, unsigned long mfn);
60 extern bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn);
125 * - pfn_to_mfn() returns either INVALID_P2M_ENTRY or the mfn. No indicator
135 unsigned long mfn;
138 mfn = xen_p2m_addr[pfn];
144 if (unlikely(mfn == INVALID_P2M_ENTRY))
147 return mfn;
158 unsigned long mfn;
168 mfn = __pfn_to_mfn(pfn);
170 if (mfn != INVALID_P2M_ENTRY)
171 mfn &= ~(FOREIGN_FRAME_BIT | IDENTITY_FRAME_BIT);
173 return mfn;
184 static inline unsigned long mfn_to_pfn_no_overrides(unsigned long mfn)
189 if (unlikely(mfn >= machine_to_phys_nr))
197 ret = xen_safe_read_ulong(&machine_to_phys_mapping[mfn], &pfn);
204 static inline unsigned long mfn_to_pfn(unsigned long mfn)
214 return mfn;
216 pfn = mfn_to_pfn_no_overrides(mfn);
217 if (__pfn_to_mfn(pfn) != mfn)
221 * pfn is ~0 if there are no entries in the m2p for mfn or the
222 * entry doesn't map back to the mfn.
224 if (pfn == ~0 && __pfn_to_mfn(mfn) == IDENTITY_FRAME(mfn))
225 pfn = mfn;
283 static inline unsigned long bfn_to_local_pfn(unsigned long mfn)
288 return mfn;
290 pfn = mfn_to_pfn(mfn);
291 if (__pfn_to_mfn(pfn) != mfn)