[Xen-devel] [PATCH] x86: make it clear range is inclusive when printing e820 range

Wei Liu posted 1 patch 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/xen tags/patchew/20200206121024.21803-1-wl@xen.org
xen/arch/x86/e820.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

[Xen-devel] [PATCH] x86: make it clear range is inclusive when printing e820 range

Posted by Wei Liu 2 weeks ago
Change the format string to use "[,]" and subtract 1 from the end.

Signed-off-by: Wei Liu <wl@xen.org>
---
 xen/arch/x86/e820.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c
index 160f029edd..c9dc52c768 100644
--- a/xen/arch/x86/e820.c
+++ b/xen/arch/x86/e820.c
@@ -92,9 +92,9 @@ static void __init print_e820_memory_map(struct e820entry *map, unsigned int ent
     unsigned int i;
 
     for (i = 0; i < entries; i++) {
-        printk(" %016Lx - %016Lx ",
+        printk(" [%016Lx, %016Lx] ",
                (unsigned long long)(map[i].addr),
-               (unsigned long long)(map[i].addr + map[i].size));
+               (unsigned long long)(map[i].addr + map[i].size) - 1);
         switch (map[i].type) {
         case E820_RAM:
             printk("(usable)\n");
-- 
2.20.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] x86: make it clear range is inclusive when printing e820 range

Posted by Jan Beulich 2 weeks ago
On 06.02.2020 13:10, Wei Liu wrote:
> Change the format string to use "[,]" and subtract 1 from the end.
> 
> Signed-off-by: Wei Liu <wl@xen.org>

Acked-by: Jan Beulich <jbeulich@suse.com>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel