for_each_domain(d)
{
- if ( !(is_hvm_domain(d) && d->arch.hvm_domain.hap_enabled) )
+ if ( !hap_enabled(d) )
continue;
p2m = p2m_get_hostp2m(d);
#include <xen/sched.h>
/* Auditing of memory sharing code? */
-#define MEM_SHARING_AUDIT 0
+#define MEM_SHARING_AUDIT 0
#if MEM_SHARING_AUDIT
static void mem_sharing_audit(void);
# define mem_sharing_audit() do {} while(0)
#endif /* MEM_SHARING_AUDIT */
-
-#define hap_enabled(d) \
- (is_hvm_domain(d) && paging_mode_hap(d))
#define mem_sharing_enabled(d) \
(is_hvm_domain(d) && (d)->arch.hvm_domain.mem_sharing_enabled)
-
+
#undef mfn_to_page
#define mfn_to_page(_m) __mfn_to_page(mfn_x(_m))
#undef mfn_valid
p2m->get_entry_current = p2m_gfn_to_mfn_current;
p2m->change_entry_type_global = p2m_change_type_global;
- if ( is_hvm_domain(d) && d->arch.hvm_domain.hap_enabled &&
- (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) )
+ if ( hap_enabled(d) && (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) )
ept_p2m_init(d);
return 0;
#include <xen/numa.h>
#include <xsm/xsm.h>
-#define hap_enabled(d) (is_hvm_domain(d) && (d)->arch.hvm_domain.hap_enabled)
-
/* Printouts */
#define PAGING_PRINTK(_f, _a...) \
debugtrace_printk("pg: %s(): " _f, __func__, ##_a)
};
};
+#define hap_enabled(d) ((d)->arch.hvm_domain.hap_enabled)
+
#endif /* __ASM_X86_HVM_DOMAIN_H__ */