pc, xen: make PAT support optional (for xen)

front
cinap_lenrek 2020-05-31 14:32:19 +02:00
parent 5cd7f7b0ec
commit 30bf1c45ca
1 changed files with 2 additions and 0 deletions

View File

@ -882,12 +882,14 @@ cpuidentify(void)
rdmsr(0x01, &mct);
}
#ifdef PATWC
/* IA32_PAT write combining */
if((m->cpuiddx & Pat) != 0 && rdmsr(0x277, &pat) != -1){
pat &= ~(255LL<<(PATWC*8));
pat |= 1LL<<(PATWC*8); /* WC */
wrmsr(0x277, pat);
}
#endif
if(m->cpuiddx & Mtrr)
mtrrsync();