Skip to contentSkip to conversation

xen: fix two errors when debug is enabled

PATCH In review Wei Liu 3 participants 5 messages Oct 14, 2013 – Nov 25, 2013

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 xen: fix two errors when debug is enabled

This patch fixes:
1. build error in xen_pt.c when XEN_PT_LOGGING_ENABLED is defined
2. debug output format string error when DEBUG_XEN is defined

In the second case I also have the output info in consistent with the output in mapping function - that is, print start_addr instead of phys_offset.

Cc Stefano Stabellini <[email protected]>
Cc Anthony Perard <[email protected]>
---
 hw/xen/xen_pt.c |    3 ++-
 xen-all.c       |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
hw/xen/xen_pt.c +2 -1
index ca2d460..d58cb61 100644
@@ -570,7 +570,8 @@ static void xen_pt_region_update(XenPCIPassthroughState *s,
     if (args.rc) {
         XEN_PT_WARN(d, "Region: %d (addr: %#"FMT_PCIBUS
                     ", len: %#"FMT_PCIBUS") is overlapped.\n",
-                    bar, sec->offset_within_address_space, sec->size);
+                    bar, sec->offset_within_address_space,
+                    int128_get64(sec->size));
     }
 
     if (d->io_regions[bar].type & PCI_BASE_ADDRESS_SPACE_IO) {
xen-all.c +2 -2
index 9a27899..4a594bd 100644
@@ -369,8 +369,8 @@ static int xen_remove_from_physmap(XenIOState *state,
     phys_offset = physmap->phys_offset;
     size = physmap->size;
 
-    DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", from ",
-            "%"HWADDR_PRIx"\n", phys_offset, phys_offset + size, start_addr);
+    DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", at "
+            "%"HWADDR_PRIx"\n", start_addr, start_addr + size, phys_offset);
 
     size >>= TARGET_PAGE_BITS;
     start_addr >>= TARGET_PAGE_BITS;
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 4 lines · Wei Liu

This patch fixes:
1. build error in xen_pt.c when XEN_PT_LOGGING_ENABLED is defined
2. debug output format string error when DEBUG_XEN is defined

Quoted 8 lines

In the second case I also have the output info in consistent with the output in mapping function - that is, print start_addr instead of phys_offset.

Cc Stefano Stabellini <[email protected]>
Cc Anthony Perard <[email protected]>

Looks good.

Quoted 36 lines
 hw/xen/xen_pt.c |    3 ++-
 xen-all.c       |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
hw/xen/xen_pt.c +2 -1
index ca2d460..d58cb61 100644
@@ -570,7 +570,8 @@ static void xen_pt_region_update(XenPCIPassthroughState *s,
     if (args.rc) {
         XEN_PT_WARN(d, "Region: %d (addr: %#"FMT_PCIBUS
                     ", len: %#"FMT_PCIBUS") is overlapped.\n",
-                    bar, sec->offset_within_address_space, sec->size);
+                    bar, sec->offset_within_address_space,
+                    int128_get64(sec->size));
     }
 
     if (d->io_regions[bar].type & PCI_BASE_ADDRESS_SPACE_IO) {
xen-all.c +2 -2
index 9a27899..4a594bd 100644
@@ -369,8 +369,8 @@ static int xen_remove_from_physmap(XenIOState *state,
     phys_offset = physmap->phys_offset;
     size = physmap->size;
 
-    DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", from ",
-            "%"HWADDR_PRIx"\n", phys_offset, phys_offset + size, start_addr);
+    DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", at "
+            "%"HWADDR_PRIx"\n", start_addr, start_addr + size, phys_offset);
 
     size >>= TARGET_PAGE_BITS;
     start_addr >>= TARGET_PAGE_BITS;
Signature · 1 line
1.7.10.4
author
#2 lore raw
Quoted 9 lines · Stefano Stabellini
Quoted 8 lines · Wei Liu

This patch fixes:
1. build error in xen_pt.c when XEN_PT_LOGGING_ENABLED is defined
2. debug output format string error when DEBUG_XEN is defined

In the second case I also have the output info in consistent with the output in mapping function - that is, print start_addr instead of phys_offset.

Quoted 7 lines
Quoted 4 lines
Cc Stefano Stabellini <[email protected]>
Cc Anthony Perard <[email protected]>

Looks good.

I take it as an Acked-by.

I seem to have forgotten CC qemu-devel. Should I resend it to qemu-devel? Or are you going to send it via git pull?

Wei.

Quoted 37 lines
Quoted 37 lines
 hw/xen/xen_pt.c |    3 ++-
 xen-all.c       |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
hw/xen/xen_pt.c +2 -1
index ca2d460..d58cb61 100644
@@ -570,7 +570,8 @@ static void xen_pt_region_update(XenPCIPassthroughState *s,
     if (args.rc) {
         XEN_PT_WARN(d, "Region: %d (addr: %#"FMT_PCIBUS
                     ", len: %#"FMT_PCIBUS") is overlapped.\n",
-                    bar, sec->offset_within_address_space, sec->size);
+                    bar, sec->offset_within_address_space,
+                    int128_get64(sec->size));
     }
 
     if (d->io_regions[bar].type & PCI_BASE_ADDRESS_SPACE_IO) {
xen-all.c +2 -2
index 9a27899..4a594bd 100644
@@ -369,8 +369,8 @@ static int xen_remove_from_physmap(XenIOState *state,
     phys_offset = physmap->phys_offset;
     size = physmap->size;
 
-    DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", from ",
-            "%"HWADDR_PRIx"\n", phys_offset, phys_offset + size, start_addr);
+    DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", at "
+            "%"HWADDR_PRIx"\n", start_addr, start_addr + size, phys_offset);
 
     size >>= TARGET_PAGE_BITS;
     start_addr >>= TARGET_PAGE_BITS;
Signature · 1 line
1.7.10.4
#3 lore raw
Quoted 15 lines · Wei Liu
Quoted 14 lines · Stefano Stabellini
Quoted 12 lines · Wei Liu

This patch fixes:
1. build error in xen_pt.c when XEN_PT_LOGGING_ENABLED is defined
2. debug output format string error when DEBUG_XEN is defined

In the second case I also have the output info in consistent with the output in mapping function - that is, print start_addr instead of phys_offset.

Cc Stefano Stabellini <[email protected]>
Cc Anthony Perard <[email protected]>
Quoted 7 lines
Quoted 2 lines

Looks good.

I take it as an Acked-by.

I seem to have forgotten CC qemu-devel. Should I resend it to qemu-devel?

No, that's OK for this time.

Quoted 1 line

Or are you going to send it via git pull?

Yes

Quoted 39 lines
Quoted 38 lines
Quoted 38 lines

 hw/xen/xen_pt.c |    3 ++-
 xen-all.c       |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
hw/xen/xen_pt.c +2 -1
index ca2d460..d58cb61 100644
@@ -570,7 +570,8 @@ static void xen_pt_region_update(XenPCIPassthroughState *s,
     if (args.rc) {
         XEN_PT_WARN(d, "Region: %d (addr: %#"FMT_PCIBUS
                     ", len: %#"FMT_PCIBUS") is overlapped.\n",
-                    bar, sec->offset_within_address_space, sec->size);
+                    bar, sec->offset_within_address_space,
+                    int128_get64(sec->size));
     }
 
     if (d->io_regions[bar].type & PCI_BASE_ADDRESS_SPACE_IO) {
xen-all.c +2 -2
index 9a27899..4a594bd 100644
@@ -369,8 +369,8 @@ static int xen_remove_from_physmap(XenIOState *state,
     phys_offset = physmap->phys_offset;
     size = physmap->size;
 
-    DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", from ",
-            "%"HWADDR_PRIx"\n", phys_offset, phys_offset + size, start_addr);
+    DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", at "
+            "%"HWADDR_PRIx"\n", start_addr, start_addr + size, phys_offset);
 
     size >>= TARGET_PAGE_BITS;
     start_addr >>= TARGET_PAGE_BITS;
Signature · 1 line
1.7.10.4
Tested-by
#4 lore raw

Il 06/11/2013 18:20, Stefano Stabellini ha scritto:

Quoted 7 lines · Wei Liu
Quoted 6 lines · Stefano Stabellini
Quoted 5 lines · Wei Liu
Quoted 4 lines

This patch fixes:
1. build error in xen_pt.c when XEN_PT_LOGGING_ENABLED is defined
2. debug output format string error when DEBUG_XEN is defined

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

In the second case I also have the output info in consistent with the output in mapping function - that is, print start_addr instead of phys_offset.

Cc Stefano Stabellini <[email protected]>
Cc Anthony Perard <[email protected]>
Quoted 11 lines
Quoted 6 lines
Quoted 2 lines

Looks good.

I take it as an Acked-by.

I seem to have forgotten CC qemu-devel. Should I resend it to qemu-devel?

No, that's OK for this time.

Quoted 1 line

Or are you going to send it via git pull?

Yes

Seems not posted to qemu-devel and even on http://xenbits.xen.org/gitweb/?p=staging/qemu-upstream-unstable.git;a=summary for now. I did fast test of patch without finding problems, then it just seems forgotten.

Quoted 42 lines
Quoted 33 lines
Quoted 33 lines
Quoted 33 lines

  hw/xen/xen_pt.c |    3 ++-
  xen-all.c       |    4 ++--
  2 files changed, 4 insertions(+), 3 deletions(-)
hw/xen/xen_pt.c +2 -1
index ca2d460..d58cb61 100644
@@ -570,7 +570,8 @@ static void xen_pt_region_update(XenPCIPassthroughState *s,
      if (args.rc) {
          XEN_PT_WARN(d, "Region: %d (addr: %#"FMT_PCIBUS
                      ", len: %#"FMT_PCIBUS") is overlapped.\n",
-                    bar, sec->offset_within_address_space, sec->size);
+                    bar, sec->offset_within_address_space,
+                    int128_get64(sec->size));
      }
 
      if (d->io_regions[bar].type & PCI_BASE_ADDRESS_SPACE_IO) {
xen-all.c +2 -2
index 9a27899..4a594bd 100644
@@ -369,8 +369,8 @@ static int xen_remove_from_physmap(XenIOState *state,
      phys_offset = physmap->phys_offset;
      size = physmap->size;
 
-    DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", from ",
-            "%"HWADDR_PRIx"\n", phys_offset, phys_offset + size, start_addr);
+    DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", at "
+            "%"HWADDR_PRIx"\n", start_addr, start_addr + size, phys_offset);
 
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
xen-all.c +0 -0
      size >>= TARGET_PAGE_BITS;
      start_addr >>= TARGET_PAGE_BITS;
Signature · 1 line
1.7.10.4

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel