Fix build errors when enabling extra logging with #define DEBUG_XEN and #define XEN_PT_LOGGING_ENABLED
PATCH 1/1 Fix build errors when enabling extra logging with #define DEBUG_XEN and #define XEN_PT_LOGGING_ENABLED
--- hw/xen/xen_pt.c | 2 +- xen-all.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
hw/xen/xen_pt.c +1 -1
@@ -570,7 +570,7 @@ 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 +1 -1
@@ -369,7 +369,7 @@ 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 " , +DPRINTF ("unmapping vram to %" HWADDR_PRIx" - %" HWADDR_PRIx", from " "%" HWADDR_PRIx"\n" , phys_offset, phys_offset + size, start_addr); size >>=TARGET_PAGE_BITS ;
Signature · 1 line
1.7.10.4
Quoted 12 lines · Sander Eikelenboom
Signed-off-by Sander Eikelenboom <[email protected]>--- hw/xen/xen_pt.c | 2 +- xen-all.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)hw/xen/xen_pt.c +0
-0
hw/xen/xen_pt.c static void xen_pt_region_update(XenPCIPassthroughState *s, · line 573
Quoted 5 lines
hw/xen/xen_pt.c +1
-1@@ -570,7 +570,7 @@ 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));
Why is this needed? Isn't sec->size of type uint64?
Quoted 8 lines
hw/xen/xen_pt.c +0
-0}if (d->io_regions[bar].type &PCI_BASE_ADDRESS_SPACE_IO ) {xen-all.c +0
-0
xen-all.c static int xen_remove_from_physmap(XenIOState *state, · line 373
Quoted 6 lines
xen-all.c +1
-1@@ -369,7 +369,7 @@ 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 " , +DPRINTF ("unmapping vram to %" HWADDR_PRIx" - %" HWADDR_PRIx", from " "%" HWADDR_PRIx"\n" , phys_offset, phys_offset + size, start_addr);
This is indeeded messed up. A further problem is that the information it logs doesn't match the one in xen_add_to_physmap. I have a patch in queue that fixes this hunk...
Wei.
----8<---
Quoted 1 line
From
4e9ddf67d46163aec97e7a7b5ce19bce14fbd5f0Mon Sep 17 00:00:00 2001
From: Wei Liu <[email protected]>
Date: Fri, 4 Oct 2013 20:10:14 +0100
Subject: [PATCH] xen-all.c: fix DPRINTF format string
There is an extra comma at the end of first line. Also update logging style to be consistent with xen_add_to_physmap.
--- xen-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
xen-all.c +2 -2
@@ -366,8 +366,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
Quoted 10 lines
size >>= TARGET_PAGE_BITS;Signature · 7 lines
1.7.10.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 8 lines · you
Quoted 7 lines · Sander Eikelenboom
Signed-off-by Sander Eikelenboom <[email protected]>--- hw/xen/xen_pt.c | 2 +- xen-all.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 12 lines
hw/xen/xen_pt.c static void xen_pt_region_update(XenPCIPassthroughState *s, · line 573
Quoted 10 lines
hw/xen/xen_pt.c +1
-1@@ -570,7 +570,7 @@ 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));Why is this needed? Isn't
sec->sizeof type uint64?
Nope it's uint128 since http://lists.nongnu.org/archive/html/qemu-devel/2013-06/msg03612.html
Quoted 50 lines
Quoted 8 lines
hw/xen/xen_pt.c +0
-0}if (d->io_regions[bar].type &PCI_BASE_ADDRESS_SPACE_IO ) {xen-all.c +0
-0xen-all.c static int xen_remove_from_physmap(XenIOState *state, · line 373
Quoted 6 lines
xen-all.c +1
-1@@ -369,7 +369,7 @@ 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 " , +DPRINTF ("unmapping vram to %" HWADDR_PRIx" - %" HWADDR_PRIx", from " "%" HWADDR_PRIx"\n" , phys_offset, phys_offset + size, start_addr);This is indeeded messed up. A further problem is that the information it logs doesn't match the one in
xen_add_to_physmap. I have a patch in queue that fixes this hunk...Wei.
----8<---
From4e9ddf67d46163aec97e7a7b5ce19bce14fbd5f0Mon Sep 17 00:00:00 2001
From: Wei Liu <[email protected]>
Date: Fri, 4 Oct 2013 20:10:14 +0100
Subject: [PATCH]xen-all.c: fix DPRINTF format stringThere is an extra comma at the end of first line. Also update logging style to be consistent with
xen_add_to_physmap.Signed-off-by Wei Liu <[email protected]>--- xen-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)xen-all.c +2
-2@@ -366,8 +366,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 ;
Quoted 24 lines · Sander Eikelenboom
Quoted 8 lines · you
Quoted 7 lines · Sander Eikelenboom
Signed-off-by Sander Eikelenboom <[email protected]>--- hw/xen/xen_pt.c | 2 +- xen-all.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Quoted 12 lines
hw/xen/xen_pt.c static void xen_pt_region_update(XenPCIPassthroughState *s, · line 573
Quoted 10 lines
hw/xen/xen_pt.c +1
-1@@ -570,7 +570,7 @@ 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));Why is this needed? Isn't
sec->sizeof type uint64?
Quoted 2 lines
Nope it's uint128 since http://lists.nongnu.org/archive/html/qemu-devel/2013-06/msg03612.html
Time to refresh me tree. Thanks! :-)
Wei.
Quoted 25 lines · Sander Eikelenboom
Signed-off-by Sander Eikelenboom <[email protected]>--- hw/xen/xen_pt.c | 2 +- xen-all.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)hw/xen/xen_pt.c +1
-1@@ -570,7 +570,7 @@ 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 +0
-0
xen-all.c static int xen_remove_from_physmap(XenIOState *state, · line 375
Quoted 8 lines
xen-all.c +1
-1@@ -369,7 +369,7 @@ 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 " , +DPRINTF ("unmapping vram to %" HWADDR_PRIx" - %" HWADDR_PRIx", from " "%" HWADDR_PRIx"\n" , phys_offset, phys_offset + size, start_addr); size >>=TARGET_PAGE_BITS ;
Sander, do you mind if I take the first half of your patch, combine it with my change to the above trunk to make a new patch? I find it more convenient to do it that way since your patch hasn't gone in. Of course I will keep your SoB. What do you think?
Wei.
Quoted 8 lines
Signature · 7 lines
1.7.10.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 33 lines · you
Quoted 32 lines · Sander Eikelenboom
Signed-off-by Sander Eikelenboom <[email protected]>--- hw/xen/xen_pt.c | 2 +- xen-all.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)hw/xen/xen_pt.c +1
-1@@ -570,7 +570,7 @@ 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 +1
-1@@ -369,7 +369,7 @@ 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 " , +DPRINTF ("unmapping vram to %" HWADDR_PRIx" - %" HWADDR_PRIx", from " "%" HWADDR_PRIx"\n" , phys_offset, phys_offset + size, start_addr);
Quoted 6 lines
xen-all.c static int xen_remove_from_physmap(XenIOState *state, · line 375
Quoted 1 line
xen-all.c +0
-0size >>=TARGET_PAGE_BITS ;Sander, do you mind if I take the first half of your patch, combine it with my change to the above trunk to make a new patch? I find it more convenient to do it that way since your patch hasn't gone in. Of course I will keep your SoB. What do you think?
Sure, no problem !
--
Sander
Quoted 10 lines
Wei.
Quoted 8 lines
Signature · 7 lines
1.7.10.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel