]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86/mm: Drop is_guest_l1_slot()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 18 Apr 2017 14:49:16 +0000 (15:49 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 23 Jun 2017 14:00:37 +0000 (15:00 +0100)
No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/mm.c
xen/include/asm-x86/x86_64/page.h

index 6d57b98fae4f37e554cef8fc52b5ddc38a3607ec..8200b11500f28fe7269f841b18f2d62769c968ac 100644 (file)
@@ -1401,18 +1401,17 @@ static int alloc_l1_table(struct page_info *page)
 
     for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ )
     {
-        if ( is_guest_l1_slot(i) )
-            switch ( ret = get_page_from_l1e(pl1e[i], d, d) )
-            {
-            default:
-                goto fail;
-            case 0:
-                break;
-            case _PAGE_RW ... _PAGE_RW | PAGE_CACHE_ATTRS:
-                ASSERT(!(ret & ~(_PAGE_RW | PAGE_CACHE_ATTRS)));
-                l1e_flip_flags(pl1e[i], ret);
-                break;
-            }
+        switch ( ret = get_page_from_l1e(pl1e[i], d, d) )
+        {
+        default:
+            goto fail;
+        case 0:
+            break;
+        case _PAGE_RW ... _PAGE_RW | PAGE_CACHE_ATTRS:
+            ASSERT(!(ret & ~(_PAGE_RW | PAGE_CACHE_ATTRS)));
+            l1e_flip_flags(pl1e[i], ret);
+            break;
+        }
 
         adjust_guest_l1e(pl1e[i], d);
     }
@@ -1423,8 +1422,7 @@ static int alloc_l1_table(struct page_info *page)
  fail:
     gdprintk(XENLOG_WARNING, "Failure in alloc_l1_table: slot %#x\n", i);
     while ( i-- > 0 )
-        if ( is_guest_l1_slot(i) )
-            put_page_from_l1e(pl1e[i], d);
+        put_page_from_l1e(pl1e[i], d);
 
     unmap_domain_page(pl1e);
     return ret;
@@ -1711,8 +1709,7 @@ static void free_l1_table(struct page_info *page)
     pl1e = map_domain_page(_mfn(pfn));
 
     for ( i = 0; i < L1_PAGETABLE_ENTRIES; i++ )
-        if ( is_guest_l1_slot(i) )
-            put_page_from_l1e(pl1e[i], d);
+        put_page_from_l1e(pl1e[i], d);
 
     unmap_domain_page(pl1e);
 }
index 1fbd2c13af5ab670a1c9440c9230515adb9591f3..31ba975e3d8d89147ab4763076f659aa6628e652 100644 (file)
@@ -107,7 +107,6 @@ typedef l4_pgentry_t root_pgentry_t;
 #define l3_linear_offset(_a) (((_a) & VADDR_MASK) >> L3_PAGETABLE_SHIFT)
 #define l4_linear_offset(_a) (((_a) & VADDR_MASK) >> L4_PAGETABLE_SHIFT)
 
-#define is_guest_l1_slot(_s) (1)
 #define is_guest_l2_slot(_d, _t, _s)                   \
     ( !is_pv_32bit_domain(_d) ||                       \
       !((_t) & PGT_pae_xen_l2) ||                      \