aboutsummaryrefslogtreecommitdiffstats
path: root/main/xen/0001-x86-mm-Refactor-map_pages_to_xen-to-have-only-a-sing.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/xen/0001-x86-mm-Refactor-map_pages_to_xen-to-have-only-a-sing.patch')
-rw-r--r--main/xen/0001-x86-mm-Refactor-map_pages_to_xen-to-have-only-a-sing.patch94
1 files changed, 0 insertions, 94 deletions
diff --git a/main/xen/0001-x86-mm-Refactor-map_pages_to_xen-to-have-only-a-sing.patch b/main/xen/0001-x86-mm-Refactor-map_pages_to_xen-to-have-only-a-sing.patch
deleted file mode 100644
index 847c34a77cc..00000000000
--- a/main/xen/0001-x86-mm-Refactor-map_pages_to_xen-to-have-only-a-sing.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From e9c5a9ee5e2e888f8bb05cf0a353ed635300abe3 Mon Sep 17 00:00:00 2001
-From: Wei Liu <wei.liu2@citrix.com>
-Date: Sat, 11 Jan 2020 21:57:41 +0000
-Subject: [PATCH 1/3] x86/mm: Refactor map_pages_to_xen to have only a single
- exit path
-
-We will soon need to perform clean-ups before returning.
-
-No functional change.
-
-This is part of XSA-345.
-
-Reported-by: Hongyan Xia <hongyxia@amazon.com>
-Signed-off-by: Wei Liu <wei.liu2@citrix.com>
-Signed-off-by: Hongyan Xia <hongyxia@amazon.com>
-Signed-off-by: George Dunlap <george.dunlap@citrix.com>
-Acked-by: Jan Beulich <jbeulich@suse.com>
----
- xen/arch/x86/mm.c | 17 +++++++++++------
- 1 file changed, 11 insertions(+), 6 deletions(-)
-
-diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
-index 82bc676553..03f6e6aa62 100644
---- a/xen/arch/x86/mm.c
-+++ b/xen/arch/x86/mm.c
-@@ -5088,6 +5088,7 @@ int map_pages_to_xen(
- l2_pgentry_t *pl2e, ol2e;
- l1_pgentry_t *pl1e, ol1e;
- unsigned int i;
-+ int rc = -ENOMEM;
-
- #define flush_flags(oldf) do { \
- unsigned int o_ = (oldf); \
-@@ -5108,7 +5109,8 @@ int map_pages_to_xen(
- l3_pgentry_t ol3e, *pl3e = virt_to_xen_l3e(virt);
-
- if ( !pl3e )
-- return -ENOMEM;
-+ goto out;
-+
- ol3e = *pl3e;
-
- if ( cpu_has_page1gb &&
-@@ -5198,7 +5200,7 @@ int map_pages_to_xen(
-
- l2t = alloc_xen_pagetable();
- if ( l2t == NULL )
-- return -ENOMEM;
-+ goto out;
-
- for ( i = 0; i < L2_PAGETABLE_ENTRIES; i++ )
- l2e_write(l2t + i,
-@@ -5227,7 +5229,7 @@ int map_pages_to_xen(
-
- pl2e = virt_to_xen_l2e(virt);
- if ( !pl2e )
-- return -ENOMEM;
-+ goto out;
-
- if ( ((((virt >> PAGE_SHIFT) | mfn_x(mfn)) &
- ((1u << PAGETABLE_ORDER) - 1)) == 0) &&
-@@ -5271,7 +5273,7 @@ int map_pages_to_xen(
- {
- pl1e = virt_to_xen_l1e(virt);
- if ( pl1e == NULL )
-- return -ENOMEM;
-+ goto out;
- }
- else if ( l2e_get_flags(*pl2e) & _PAGE_PSE )
- {
-@@ -5299,7 +5301,7 @@ int map_pages_to_xen(
-
- l1t = alloc_xen_pagetable();
- if ( l1t == NULL )
-- return -ENOMEM;
-+ goto out;
-
- for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ )
- l1e_write(&l1t[i],
-@@ -5445,7 +5447,10 @@ int map_pages_to_xen(
-
- #undef flush_flags
-
-- return 0;
-+ rc = 0;
-+
-+ out:
-+ return rc;
- }
-
- int populate_pt_range(unsigned long virt, unsigned long nr_mfns)
---
-2.25.1
-