p2m-pt: avoid hard-coding Xen's PAT

This makes the code much easier to understand.  No functional change
intended.  As per Andrew Cooper, the existing logic is questionable, but
this does not make it any worse.

Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Demi Marie Obenour authored and Jan Beulich committed 2022-12-15 17:03:45 +01:00
1 parent 88168c418c
commit 1ca8af08df
1 file changed
+3 -3
+3 -3
View File
@@ -99,13 +99,13 @@ static unsigned long p2m_type_to_flags(const struct p2m_domain *p2m,
return flags | P2M_BASE_FLAGS | _PAGE_RW | _PAGE_NX_BIT;
case p2m_mmio_direct:
if ( !rangeset_contains_singleton(mmio_ro_ranges, mfn_x(mfn)) )
flags |= _PAGE_RW;
flags |= _PAGE_RW | _PAGE_UCM;
else
{
flags |= _PAGE_PWT;
flags |= _PAGE_UC;
ASSERT(!level);
}
return flags | P2M_BASE_FLAGS | _PAGE_PCD;
return flags | P2M_BASE_FLAGS;
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.