|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/8] x86/mm: Avoid hard-coding PAT in get_page_from_l1e()
This still hard-codes the assumption that the two spare values are
mapped to UC. Removing this assumption would require a more complex
patch.
Signed-off-by: Demi Marie Obenour <demi@xxxxxxxxxxxxxxxxxxxxxx>
---
xen/arch/x86/mm.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index
78b1972e4170cacccc9c37c6e64e76e66a7da87f..5d05399c3a841bf03991a3bed63df9a815c1e891
100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -961,13 +961,10 @@ get_page_from_l1e(
switch ( l1f & PAGE_CACHE_ATTRS )
{
- case 0: /* WB */
- flip |= _PAGE_PWT | _PAGE_PCD;
- break;
- case _PAGE_PWT: /* WT */
- case _PAGE_PWT | _PAGE_PAT: /* WP */
- flip |= _PAGE_PCD | (l1f & _PAGE_PAT);
- break;
+ case _PAGE_WB:
+ case _PAGE_WT:
+ case _PAGE_WP:
+ flip |= (l1f & PAGE_CACHE_ATTRS) ^ _PAGE_UC;
}
return flip;
--
Sincerely,
Demi Marie Obenour (she/her/hers)
Invisible Things Lab
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |