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

[Xen-changelog] [xen master] x86/srat: fix the end pfn check in valid_numa_range()



commit 722648676751fda39086f54d961640f88174360b
Author:     Haozhong Zhang <haozhong.zhang@xxxxxxxxx>
AuthorDate: Mon Feb 12 09:44:23 2018 +0800
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon Feb 12 11:08:33 2018 +0000

    x86/srat: fix the end pfn check in valid_numa_range()
    
    ... and fix the coding style on fly.
    
    valid_numa_range(..., epfn << PAGE_SHIFT, ...) and its only caller
    memory_add(..., epfn, pxm) interpret epfn inconsistently. The former
    interprets epfn as the last pfn, while the latter interprets it as the
    last pfn plus one. Fix this inconsistency in valid_numa_range(), since
    most of other places use the latter interpretation.
    
    Signed-off-by: Haozhong Zhang <haozhong.zhang@xxxxxxxxx>
    Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/srat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c
index 528ec71..49d04b8 100644
--- a/xen/arch/x86/srat.c
+++ b/xen/arch/x86/srat.c
@@ -110,8 +110,8 @@ int valid_numa_range(u64 start, u64 end, nodeid_t node)
        for (i = 0; i < num_node_memblks; i++) {
                struct node *nd = &node_memblk_range[i];
 
-               if (nd->start <= start && nd->end > end &&
-                       memblk_nodeid[i] == node )
+               if (nd->start <= start && nd->end >= end &&
+                       memblk_nodeid[i] == node)
                        return 1;
        }
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
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®.