diff options
author | David Vrabel <david.vrabel@citrix.com> | 2014-06-02 12:53:06 -0400 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2014-06-05 09:23:16 -0400 |
commit | 562658f3dc7c95c4a918841731e3e91c9fced4d3 (patch) | |
tree | 3b3cb25bb44f75b69be625214a91fcc08487a892 /arch | |
parent | abacaadc4144a8849782cc0917a624a7114ffbb1 (diff) |
Revert "xen/pvh: Update E820 to work with PVH (v2)"
This reverts commit 9103bb0f8240b2a55aac3ff7ecba9c7dcf66b08b.
Now than xen_memory_setup() is not called for auto-translated guests,
we can remove this commit.
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Tested-by: Roger Pau Monné <roger.pau@citrix.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/xen/setup.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index 37cfbfacd59a..bdd22ece586f 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <xen/interface/memory.h> | 27 | #include <xen/interface/memory.h> |
28 | #include <xen/interface/physdev.h> | 28 | #include <xen/interface/physdev.h> |
29 | #include <xen/features.h> | 29 | #include <xen/features.h> |
30 | #include "mmu.h" | ||
31 | #include "xen-ops.h" | 30 | #include "xen-ops.h" |
32 | #include "vdso.h" | 31 | #include "vdso.h" |
33 | 32 | ||
@@ -82,9 +81,6 @@ static void __init xen_add_extra_mem(u64 start, u64 size) | |||
82 | 81 | ||
83 | memblock_reserve(start, size); | 82 | memblock_reserve(start, size); |
84 | 83 | ||
85 | if (xen_feature(XENFEAT_auto_translated_physmap)) | ||
86 | return; | ||
87 | |||
88 | xen_max_p2m_pfn = PFN_DOWN(start + size); | 84 | xen_max_p2m_pfn = PFN_DOWN(start + size); |
89 | for (pfn = PFN_DOWN(start); pfn < xen_max_p2m_pfn; pfn++) { | 85 | for (pfn = PFN_DOWN(start); pfn < xen_max_p2m_pfn; pfn++) { |
90 | unsigned long mfn = pfn_to_mfn(pfn); | 86 | unsigned long mfn = pfn_to_mfn(pfn); |
@@ -107,7 +103,6 @@ static unsigned long __init xen_do_chunk(unsigned long start, | |||
107 | .domid = DOMID_SELF | 103 | .domid = DOMID_SELF |
108 | }; | 104 | }; |
109 | unsigned long len = 0; | 105 | unsigned long len = 0; |
110 | int xlated_phys = xen_feature(XENFEAT_auto_translated_physmap); | ||
111 | unsigned long pfn; | 106 | unsigned long pfn; |
112 | int ret; | 107 | int ret; |
113 | 108 | ||
@@ -121,7 +116,7 @@ static unsigned long __init xen_do_chunk(unsigned long start, | |||
121 | continue; | 116 | continue; |
122 | frame = mfn; | 117 | frame = mfn; |
123 | } else { | 118 | } else { |
124 | if (!xlated_phys && mfn != INVALID_P2M_ENTRY) | 119 | if (mfn != INVALID_P2M_ENTRY) |
125 | continue; | 120 | continue; |
126 | frame = pfn; | 121 | frame = pfn; |
127 | } | 122 | } |
@@ -159,13 +154,6 @@ static unsigned long __init xen_do_chunk(unsigned long start, | |||
159 | static unsigned long __init xen_release_chunk(unsigned long start, | 154 | static unsigned long __init xen_release_chunk(unsigned long start, |
160 | unsigned long end) | 155 | unsigned long end) |
161 | { | 156 | { |
162 | /* | ||
163 | * Xen already ballooned out the E820 non RAM regions for us | ||
164 | * and set them up properly in EPT. | ||
165 | */ | ||
166 | if (xen_feature(XENFEAT_auto_translated_physmap)) | ||
167 | return end - start; | ||
168 | |||
169 | return xen_do_chunk(start, end, true); | 157 | return xen_do_chunk(start, end, true); |
170 | } | 158 | } |
171 | 159 | ||
@@ -234,13 +222,7 @@ static void __init xen_set_identity_and_release_chunk( | |||
234 | * (except for the ISA region which must be 1:1 mapped) to | 222 | * (except for the ISA region which must be 1:1 mapped) to |
235 | * release the refcounts (in Xen) on the original frames. | 223 | * release the refcounts (in Xen) on the original frames. |
236 | */ | 224 | */ |
237 | 225 | for (pfn = start_pfn; pfn <= max_pfn_mapped && pfn < end_pfn; pfn++) { | |
238 | /* | ||
239 | * PVH E820 matches the hypervisor's P2M which means we need to | ||
240 | * account for the proper values of *release and *identity. | ||
241 | */ | ||
242 | for (pfn = start_pfn; !xen_feature(XENFEAT_auto_translated_physmap) && | ||
243 | pfn <= max_pfn_mapped && pfn < end_pfn; pfn++) { | ||
244 | pte_t pte = __pte_ma(0); | 226 | pte_t pte = __pte_ma(0); |
245 | 227 | ||
246 | if (pfn < PFN_UP(ISA_END_ADDRESS)) | 228 | if (pfn < PFN_UP(ISA_END_ADDRESS)) |