diff options
Diffstat (limited to '0028-x86-EPT-drop-questionable-mfn_valid-from-epte_get_en.patch')
-rw-r--r-- | 0028-x86-EPT-drop-questionable-mfn_valid-from-epte_get_en.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/0028-x86-EPT-drop-questionable-mfn_valid-from-epte_get_en.patch b/0028-x86-EPT-drop-questionable-mfn_valid-from-epte_get_en.patch new file mode 100644 index 0000000..ee495d4 --- /dev/null +++ b/0028-x86-EPT-drop-questionable-mfn_valid-from-epte_get_en.patch @@ -0,0 +1,47 @@ +From 3b777c2ce4ea8cf67b79a5496e51201145606798 Mon Sep 17 00:00:00 2001 +From: Jan Beulich <jbeulich@suse.com> +Date: Wed, 26 Jun 2024 13:40:35 +0200 +Subject: [PATCH 28/56] x86/EPT: drop questionable mfn_valid() from + epte_get_entry_emt() +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +mfn_valid() is RAM-focused; it will often return false for MMIO. Yet +access to actual MMIO space should not generally be restricted to UC +only; especially video frame buffer accesses are unduly affected by such +a restriction. + +Since, as of 777c71d31325 ("x86/EPT: avoid marking non-present entries +for re-configuring"), the function won't be called with INVALID_MFN or, +worse, truncated forms thereof anymore, we call fully drop that check. + +Fixes: 81fd0d3ca4b2 ("x86/hvm: simplify 'mmio_direct' check in epte_get_entry_emt()") +Signed-off-by: Jan Beulich <jbeulich@suse.com> +Reviewed-by: Roger Pau Monné <roger.pau@citrix.com> +master commit: 4fdd8d75566fdad06667a79ec0ce6f43cc466c54 +master date: 2024-06-13 16:55:22 +0200 +--- + xen/arch/x86/mm/p2m-ept.c | 6 ------ + 1 file changed, 6 deletions(-) + +diff --git a/xen/arch/x86/mm/p2m-ept.c b/xen/arch/x86/mm/p2m-ept.c +index 641d61b350..d325424e97 100644 +--- a/xen/arch/x86/mm/p2m-ept.c ++++ b/xen/arch/x86/mm/p2m-ept.c +@@ -500,12 +500,6 @@ int epte_get_entry_emt(struct domain *d, gfn_t gfn, mfn_t mfn, + return -1; + } + +- if ( !mfn_valid(mfn) ) +- { +- *ipat = true; +- return X86_MT_UC; +- } +- + /* + * Conditional must be kept in sync with the code in + * {iomem,ioports}_{permit,deny}_access(). +-- +2.45.2 + |