]> xenbits.xensource.com Git - people/dwmw2/xen.git/commitdiff
x86: provide stub for memory_type_changed
authorWei Liu <wei.liu2@citrix.com>
Sun, 26 Aug 2018 12:19:38 +0000 (13:19 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 28 Aug 2018 09:49:02 +0000 (10:49 +0100)
Jan indicated that for PV guests the memory type is not changed, for
HVM guests memory_type_changed is needed for EPT's effective memory
type calculation.  This means memory_type_changed is HVM only.

Provide a stub to minimise code churn.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/include/asm-x86/mtrr.h

index 7edcb94479b0d63f205cc0535f776714da1b1ede..4be704cb6a295bcce1218be6cc911603d5706ad1 100644 (file)
@@ -92,7 +92,12 @@ extern bool_t mtrr_fix_range_msr_set(struct domain *, struct mtrr_state *,
                                      uint32_t row, uint64_t msr_content);
 extern bool_t mtrr_def_type_msr_set(struct domain *, struct mtrr_state *,
                                     uint64_t msr_content);
+#ifdef CONFIG_HVM
 extern void memory_type_changed(struct domain *);
+#else
+static inline void memory_type_changed(struct domain *d) {}
+#endif
+
 extern bool_t pat_msr_set(uint64_t *pat, uint64_t msr);
 
 bool is_var_mtrr_overlapped(const struct mtrr_state *m);