diff options
author | Ian.Campbell@xensource.com <Ian.Campbell@xensource.com> | 2006-02-01 20:12:51 +0000 |
---|---|---|
committer | Ian.Campbell@xensource.com <Ian.Campbell@xensource.com> | 2006-02-01 20:12:51 +0000 |
commit | 03d6c7737567e3a1d37cf26fdbcfd6e9bab2033f (patch) | |
tree | 7392e35a97503cd4d1e5720c0c9abf08372c0f4e /linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-2level.h | |
parent | 5361e93da794854ab01c0158e98db822cc31cfce (diff) | |
download | xen-03d6c7737567e3a1d37cf26fdbcfd6e9bab2033f.tar.gz xen-03d6c7737567e3a1d37cf26fdbcfd6e9bab2033f.tar.bz2 xen-03d6c7737567e3a1d37cf26fdbcfd6e9bab2033f.zip |
Add new feature XENFEAT_auto_translated_physmap.
This feature causes the guest OS to ignore the P2M and M2P tables and
to assume that P==M.
Signed-off-by: Ian Campbell <Ian.Campbell@XenSource.com>
Diffstat (limited to 'linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-2level.h')
-rw-r--r-- | linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-2level.h | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-2level.h b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-2level.h index 99a57bbd6f..224e2e3c95 100644 --- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-2level.h +++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-2level.h @@ -39,35 +39,8 @@ #define ptep_get_and_clear(mm,addr,xp) __pte_ma(xchg(&(xp)->pte_low, 0)) #define pte_same(a, b) ((a).pte_low == (b).pte_low) -/* - * We detect special mappings in one of two ways: - * 1. If the MFN is an I/O page then Xen will set the m2p entry - * to be outside our maximum possible pseudophys range. - * 2. If the MFN belongs to a different domain then we will certainly - * not have MFN in our p2m table. Conversely, if the page is ours, - * then we'll have p2m(m2p(MFN))==MFN. - * If we detect a special mapping then it doesn't have a 'struct page'. - * We force !pfn_valid() by returning an out-of-range pointer. - * - * NB. These checks require that, for any MFN that is not in our reservation, - * there is no PFN such that p2m(PFN) == MFN. Otherwise we can get confused if - * we are foreign-mapping the MFN, and the other domain as m2p(MFN) == PFN. - * Yikes! Various places must poke in INVALID_P2M_ENTRY for safety. - * - * NB2. When deliberately mapping foreign pages into the p2m table, you *must* - * use FOREIGN_FRAME(). This will cause pte_pfn() to choke on it, as we - * require. In all the cases we care about, the FOREIGN_FRAME bit is - * masked (e.g., pfn_to_mfn()) so behaviour there is correct. - */ #define pte_mfn(_pte) ((_pte).pte_low >> PAGE_SHIFT) -#define pte_pfn(_pte) \ -({ \ - unsigned long mfn = pte_mfn(_pte); \ - unsigned long pfn = mfn_to_pfn(mfn); \ - if ((pfn >= max_mapnr) || (phys_to_machine_mapping[pfn] != mfn))\ - pfn = max_mapnr; /* special: force !pfn_valid() */ \ - pfn; \ -}) +#define pte_pfn(_pte) mfn_to_local_pfn(pte_mfn(_pte)) #define pte_page(_pte) pfn_to_page(pte_pfn(_pte)) |