With the removal of the 32bit hypervisor build, host_pat is a constant value.
Drop the variable and the redundant cpu_has_pat predicate, and use a define
instead.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
/* Reload FPU state on next FPU use. */
stts();
- if (cpu_has_pat)
- wrmsrl(MSR_IA32_CR_PAT, host_pat);
+ wrmsrl(MSR_IA32_CR_PAT, XEN_MSR_PAT);
mtrr_bp_restore();
}
unsigned int hap_paddr_bits __read_mostly = 36;
unsigned int vaddr_bits __read_mostly = VADDR_BITS;
-/*
- * Default host IA32_CR_PAT value to cover all memory types.
- * BIOS usually sets it to 0x07040600070406.
- */
-u64 host_pat = 0x050100070406;
-
static unsigned int cleared_caps[NCAPINTS];
static unsigned int forced_caps[NCAPINTS];
if (opt_cpu_info)
printk("Initializing CPU#%d\n", cpu);
- if (cpu_has_pat)
- wrmsrl(MSR_IA32_CR_PAT, host_pat);
+ wrmsrl(MSR_IA32_CR_PAT, XEN_MSR_PAT);
/* Install correct page table. */
write_ptbase(current);
{
for ( j = 0; j < PAT_TYPE_NUMS; j++ )
{
- if ( pat_cr_2_paf(host_pat, j) == i )
+ if ( pat_cr_2_paf(XEN_MSR_PAT, j) == i )
{
pat_entry_tbl[i] = j;
break;
#define cpu_has_sep boot_cpu_has(X86_FEATURE_SEP)
#define cpu_has_mtrr 1
#define cpu_has_pge 1
-#define cpu_has_pat 1
#define cpu_has_pse36 boot_cpu_has(X86_FEATURE_PSE36)
#define cpu_has_clflush boot_cpu_has(X86_FEATURE_CLFLUSH)
#define cpu_has_mmx 1
X86_EFLAGS_NT|X86_EFLAGS_DF|X86_EFLAGS_IF| \
X86_EFLAGS_TF)
+/*
+ * Host IA32_CR_PAT value to cover all memory types. This is not the default
+ * MSR_PAT value, and is an ABI with PV guests.
+ */
+#define XEN_MSR_PAT 0x050100070406ul
+
#ifndef __ASSEMBLY__
struct domain;
extern void ctxt_switch_levelling(const struct vcpu *next);
extern void (*ctxt_switch_masking)(const struct vcpu *next);
-extern u64 host_pat;
extern bool_t opt_cpu_info;
extern u32 cpuid_ext_features;
extern u64 trampoline_misc_enable_off;