[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen staging] x86/nEPT: ditch nept_sp_entry()



commit f5536cd68bc93038d963f0a970a0b6fc2013bcd1
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Fri Dec 6 11:01:18 2019 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Dec 6 11:01:18 2019 +0100

    x86/nEPT: ditch nept_sp_entry()
    
    It's bogusly non-static. It making the call sites actually less easy to
    read, and there being another open-coded use in the file - let's just
    get rid of it.
    
    Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx>
---
 xen/arch/x86/mm/hap/nested_ept.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/xen/arch/x86/mm/hap/nested_ept.c b/xen/arch/x86/mm/hap/nested_ept.c
index 1738df69f6..5424595e60 100644
--- a/xen/arch/x86/mm/hap/nested_ept.c
+++ b/xen/arch/x86/mm/hap/nested_ept.c
@@ -54,11 +54,6 @@
 #define NEPT_2M_ENTRY_FLAG (1 << 10)
 #define NEPT_4K_ENTRY_FLAG (1 << 9)
 
-bool_t nept_sp_entry(ept_entry_t e)
-{
-    return !!(e.sp);
-}
-
 static bool_t nept_rsv_bits_check(ept_entry_t e, uint32_t level)
 {
     uint64_t rsv_bits = EPT_MUST_RSV_BITS;
@@ -68,7 +63,7 @@ static bool_t nept_rsv_bits_check(ept_entry_t e, uint32_t 
level)
     case 1:
         break;
     case 2 ... 3:
-        if ( nept_sp_entry(e) )
+        if ( e.sp )
             rsv_bits |=  ((1ull << (9 * (level - 1))) - 1) << PAGE_SHIFT;
         else
             rsv_bits |= EPTE_EMT_MASK | EPTE_IGMT_MASK;
@@ -181,7 +176,7 @@ nept_walk_tables(struct vcpu *v, unsigned long l2ga, 
ept_walk_t *gw)
         if ( nept_misconfiguration_check(gw->lxe[lvl], lvl) )
             goto misconfig_err;
 
-        if ( (lvl == 2 || lvl == 3) && nept_sp_entry(gw->lxe[lvl]) )
+        if ( (lvl == 2 || lvl == 3) && gw->lxe[lvl].sp )
         {
             /* Generate a fake l1 table entry so callers don't all
              * have to understand superpages. */
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.