Skip to contentSkip to conversation

Fix compile errors when enabling Xen debug logging.

PATCH Superseded Sander Eikelenboom 2 participants 7 messages Dec 13, 2012 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 1Tj6Gv-00030a-73

#1 lore raw

PATCH 1/1 Fix compile errors when enabling Xen debug logging.

---
 hw/xen_pt.c |    4 ++--
 xen-all.c   |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
hw/xen_pt.c +2 -2
index 7a3846e..ca42a14 100644
@@ -671,7 +671,7 @@ static int xen_pt_initfn(PCIDevice *d)
     s->is_virtfn = s->real_device.is_virtfn;
     if (s->is_virtfn) {
         XEN_PT_LOG(d, "%04x:%02x:%02x.%d is a SR-IOV Virtual Function\n",
-                   s->real_device.domain, bus, slot, func);
+                   s->real_device.domain, s->real_device.bus, s->real_device.dev, s->real_device.func);
     }
 
     /* Initialize virtualized PCI configuration (Extended 256 Bytes) */
@@ -752,7 +752,7 @@ out:
     memory_listener_register(&s->memory_listener, &address_space_memory);
     memory_listener_register(&s->io_listener, &address_space_io);
     XEN_PT_LOG(d, "Real physical device %02x:%02x.%d registered successfuly!\n",
-               bus, slot, func);
+               s->hostaddr.bus, s->hostaddr.slot, s->hostaddr.function);
 
     return 0;
 }
xen-all.c +2 -2
index 046cc2a..d225b9d 100644
@@ -292,7 +292,7 @@ static int xen_add_to_physmap(XenIOState *state,
     return -1;
 
 go_physmap:
-    DPRINTF("mapping vram to %llx - %llx\n", start_addr, start_addr + size);
+    DPRINTF("mapping vram to %"PRI_xen_pfn" - %"PRI_xen_pfn"\n", start_addr, start_addr + size);
 
     pfn = phys_offset >> TARGET_PAGE_BITS;
     start_gpfn = start_addr >> TARGET_PAGE_BITS;
@@ -365,7 +365,7 @@ static int xen_remove_from_physmap(XenIOState *state,
     phys_offset = physmap->phys_offset;
     size = physmap->size;
 
-    DPRINTF("unmapping vram to %llx - %llx, from %llx\n",
+    DPRINTF("unmapping vram to %"PRI_xen_pfn" - %"PRI_xen_pfn", from %"PRI_xen_pfn"\n",
             phys_offset, phys_offset + size, start_addr);
 
     size >>= TARGET_PAGE_BITS;
Signature · 1 line
1.7.2.5
#2 lore raw
Quoted 1 line · Sander Eikelenboom

please wrap around the lines > 80 characters.

Quoted 31 lines
 hw/xen_pt.c |    4 ++--
 xen-all.c   |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
hw/xen_pt.c +2 -2
index 7a3846e..ca42a14 100644
@@ -671,7 +671,7 @@ static int xen_pt_initfn(PCIDevice *d)
     s->is_virtfn = s->real_device.is_virtfn;
     if (s->is_virtfn) {
         XEN_PT_LOG(d, "%04x:%02x:%02x.%d is a SR-IOV Virtual Function\n",
-                   s->real_device.domain, bus, slot, func);
+                   s->real_device.domain, s->real_device.bus, s->real_device.dev, s->real_device.func);
     }
 
     /* Initialize virtualized PCI configuration (Extended 256 Bytes) */
@@ -752,7 +752,7 @@ out:
     memory_listener_register(&s->memory_listener, &address_space_memory);
     memory_listener_register(&s->io_listener, &address_space_io);
     XEN_PT_LOG(d, "Real physical device %02x:%02x.%d registered successfuly!\n",
-               bus, slot, func);
+               s->hostaddr.bus, s->hostaddr.slot, s->hostaddr.function);
 
     return 0;
 }
xen-all.c +0 -0
index 046cc2a..d225b9d 100644

xen-all.c static int xen_add_to_physmap(XenIOState *state, · line 295

Quoted 5 lines
xen-all.c +1 -1
@@ -292,7 +292,7 @@ static int xen_add_to_physmap(XenIOState *state,
     return -1;
 
 go_physmap:
-    DPRINTF("mapping vram to %llx - %llx\n", start_addr, start_addr + size);
+    DPRINTF("mapping vram to %"PRI_xen_pfn" - %"PRI_xen_pfn"\n", start_addr, start_addr + size);

given that start_addr and size are hwaddr, these should be HWADDR_PRIx

xen-all.c static int xen_remove_from_physmap(XenIOState *state, · line 369

Quoted 9 lines
xen-all.c +1 -1
     pfn = phys_offset >> TARGET_PAGE_BITS;
     start_gpfn = start_addr >> TARGET_PAGE_BITS;
@@ -365,7 +365,7 @@ static int xen_remove_from_physmap(XenIOState *state,
     phys_offset = physmap->phys_offset;
     size = physmap->size;
 
-    DPRINTF("unmapping vram to %llx - %llx, from %llx\n",
+    DPRINTF("unmapping vram to %"PRI_xen_pfn" - %"PRI_xen_pfn", from %"PRI_xen_pfn"\n",
             phys_offset, phys_offset + size, start_addr);

same here

#3 lore raw
In reply to Sander Eikelenboom
Quoted 1 line · Sander Eikelenboom

please wrap around the lines > 80 characters.

Quoted 31 lines
 hw/xen_pt.c |    4 ++--
 xen-all.c   |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
hw/xen_pt.c +2 -2
index 7a3846e..ca42a14 100644
@@ -671,7 +671,7 @@ static int xen_pt_initfn(PCIDevice *d)
     s->is_virtfn = s->real_device.is_virtfn;
     if (s->is_virtfn) {
         XEN_PT_LOG(d, "%04x:%02x:%02x.%d is a SR-IOV Virtual Function\n",
-                   s->real_device.domain, bus, slot, func);
+                   s->real_device.domain, s->real_device.bus, s->real_device.dev, s->real_device.func);
     }
 
     /* Initialize virtualized PCI configuration (Extended 256 Bytes) */
@@ -752,7 +752,7 @@ out:
     memory_listener_register(&s->memory_listener, &address_space_memory);
     memory_listener_register(&s->io_listener, &address_space_io);
     XEN_PT_LOG(d, "Real physical device %02x:%02x.%d registered successfuly!\n",
-               bus, slot, func);
+               s->hostaddr.bus, s->hostaddr.slot, s->hostaddr.function);
 
     return 0;
 }
xen-all.c +0 -0
index 046cc2a..d225b9d 100644

xen-all.c static int xen_add_to_physmap(XenIOState *state, · line 295

Quoted 5 lines
xen-all.c +1 -1
@@ -292,7 +292,7 @@ static int xen_add_to_physmap(XenIOState *state,
     return -1;
 
 go_physmap:
-    DPRINTF("mapping vram to %llx - %llx\n", start_addr, start_addr + size);
+    DPRINTF("mapping vram to %"PRI_xen_pfn" - %"PRI_xen_pfn"\n", start_addr, start_addr + size);

given that start_addr and size are hwaddr, these should be HWADDR_PRIx

xen-all.c static int xen_remove_from_physmap(XenIOState *state, · line 369

Quoted 9 lines
xen-all.c +1 -1
     pfn = phys_offset >> TARGET_PAGE_BITS;
     start_gpfn = start_addr >> TARGET_PAGE_BITS;
@@ -365,7 +365,7 @@ static int xen_remove_from_physmap(XenIOState *state,
     phys_offset = physmap->phys_offset;
     size = physmap->size;
 
-    DPRINTF("unmapping vram to %llx - %llx, from %llx\n",
+    DPRINTF("unmapping vram to %"PRI_xen_pfn" - %"PRI_xen_pfn", from %"PRI_xen_pfn"\n",
             phys_offset, phys_offset + size, start_addr);

same here

#4 lore raw

PATCH v2 1/1 Fix compile errors when enabling Xen debug logging.

Fix compile errors when enabling Xen debug logging.

v2:
- Wrap around > 80 characters
- Use %"HWADDR_PRIx" format for hwaddr

Sander Eikelenboom (1):
Fix compile errors when enabling Xen debug logging.

 hw/xen_pt.c |    5 +++--
 xen-all.c   |    7 ++++---
 2 files changed, 7 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.2.5
#5 lore raw

PATCH v2 1/1 Fix compile errors when enabling Xen debug logging.

In reply to Stefano Stabellini

v2:
- Wrap around > 80 characters
- Use %"HWADDR_PRIx" format for hwaddr

---
 hw/xen_pt.c |    5 +++--
 xen-all.c   |    7 ++++---
 2 files changed, 7 insertions(+), 5 deletions(-)
hw/xen_pt.c +3 -2
index 7a3846e..7aae826 100644
@@ -671,7 +671,8 @@ static int xen_pt_initfn(PCIDevice *d)
     s->is_virtfn = s->real_device.is_virtfn;
     if (s->is_virtfn) {
         XEN_PT_LOG(d, "%04x:%02x:%02x.%d is a SR-IOV Virtual Function\n",
-                   s->real_device.domain, bus, slot, func);
+                   s->real_device.domain, s->real_device.bus,
+                   s->real_device.dev, s->real_device.func);
     }
 
     /* Initialize virtualized PCI configuration (Extended 256 Bytes) */
@@ -752,7 +753,7 @@ out:
     memory_listener_register(&s->memory_listener, &address_space_memory);
     memory_listener_register(&s->io_listener, &address_space_io);
     XEN_PT_LOG(d, "Real physical device %02x:%02x.%d registered successfuly!\n",
-               bus, slot, func);
+               s->hostaddr.bus, s->hostaddr.slot, s->hostaddr.function);
 
     return 0;
 }
xen-all.c +4 -3
index 046cc2a..d0142bd 100644
@@ -292,7 +292,8 @@ static int xen_add_to_physmap(XenIOState *state,
     return -1;
 
 go_physmap:
-    DPRINTF("mapping vram to %llx - %llx\n", start_addr, start_addr + size);
+    DPRINTF("mapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx"\n",
+            start_addr, start_addr + size);
 
     pfn = phys_offset >> TARGET_PAGE_BITS;
     start_gpfn = start_addr >> TARGET_PAGE_BITS;
@@ -365,8 +366,8 @@ static int xen_remove_from_physmap(XenIOState *state,
     phys_offset = physmap->phys_offset;
     size = physmap->size;
 
-    DPRINTF("unmapping vram to %llx - %llx, from %llx\n",
-            phys_offset, phys_offset + size, start_addr);
+    DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", from ",
+            "%"HWADDR_PRIx"\n", phys_offset, phys_offset + size, start_addr);
 
     size >>= TARGET_PAGE_BITS;
     start_addr >>= TARGET_PAGE_BITS;
Signature · 1 line
1.7.2.5
Acked-by on v2 1/1
#6 lore raw
Quoted 5 lines · Sander Eikelenboom

v2:
- Wrap around > 80 characters
- Use %"HWADDR_PRIx" format for hwaddr

Quoted 55 lines
 hw/xen_pt.c |    5 +++--
 xen-all.c   |    7 ++++---
 2 files changed, 7 insertions(+), 5 deletions(-)
hw/xen_pt.c +3 -2
index 7a3846e..7aae826 100644
@@ -671,7 +671,8 @@ static int xen_pt_initfn(PCIDevice *d)
     s->is_virtfn = s->real_device.is_virtfn;
     if (s->is_virtfn) {
         XEN_PT_LOG(d, "%04x:%02x:%02x.%d is a SR-IOV Virtual Function\n",
-                   s->real_device.domain, bus, slot, func);
+                   s->real_device.domain, s->real_device.bus,
+                   s->real_device.dev, s->real_device.func);
     }
 
     /* Initialize virtualized PCI configuration (Extended 256 Bytes) */
@@ -752,7 +753,7 @@ out:
     memory_listener_register(&s->memory_listener, &address_space_memory);
     memory_listener_register(&s->io_listener, &address_space_io);
     XEN_PT_LOG(d, "Real physical device %02x:%02x.%d registered successfuly!\n",
-               bus, slot, func);
+               s->hostaddr.bus, s->hostaddr.slot, s->hostaddr.function);
 
     return 0;
 }
xen-all.c +4 -3
index 046cc2a..d0142bd 100644
@@ -292,7 +292,8 @@ static int xen_add_to_physmap(XenIOState *state,
     return -1;
 
 go_physmap:
-    DPRINTF("mapping vram to %llx - %llx\n", start_addr, start_addr + size);
+    DPRINTF("mapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx"\n",
+            start_addr, start_addr + size);
 
     pfn = phys_offset >> TARGET_PAGE_BITS;
     start_gpfn = start_addr >> TARGET_PAGE_BITS;
@@ -365,8 +366,8 @@ static int xen_remove_from_physmap(XenIOState *state,
     phys_offset = physmap->phys_offset;
     size = physmap->size;
 
-    DPRINTF("unmapping vram to %llx - %llx, from %llx\n",
-            phys_offset, phys_offset + size, start_addr);
+    DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", from ",
+            "%"HWADDR_PRIx"\n", phys_offset, phys_offset + size, start_addr);
 
     size >>= TARGET_PAGE_BITS;
     start_addr >>= TARGET_PAGE_BITS;
Signature · 1 line
1.7.2.5
Acked-by on v2 1/1
#7 lore raw
In reply to Sander Eikelenboom
Quoted 5 lines · Sander Eikelenboom

v2:
- Wrap around > 80 characters
- Use %"HWADDR_PRIx" format for hwaddr

Quoted 55 lines
 hw/xen_pt.c |    5 +++--
 xen-all.c   |    7 ++++---
 2 files changed, 7 insertions(+), 5 deletions(-)
hw/xen_pt.c +3 -2
index 7a3846e..7aae826 100644
@@ -671,7 +671,8 @@ static int xen_pt_initfn(PCIDevice *d)
     s->is_virtfn = s->real_device.is_virtfn;
     if (s->is_virtfn) {
         XEN_PT_LOG(d, "%04x:%02x:%02x.%d is a SR-IOV Virtual Function\n",
-                   s->real_device.domain, bus, slot, func);
+                   s->real_device.domain, s->real_device.bus,
+                   s->real_device.dev, s->real_device.func);
     }
 
     /* Initialize virtualized PCI configuration (Extended 256 Bytes) */
@@ -752,7 +753,7 @@ out:
     memory_listener_register(&s->memory_listener, &address_space_memory);
     memory_listener_register(&s->io_listener, &address_space_io);
     XEN_PT_LOG(d, "Real physical device %02x:%02x.%d registered successfuly!\n",
-               bus, slot, func);
+               s->hostaddr.bus, s->hostaddr.slot, s->hostaddr.function);
 
     return 0;
 }
xen-all.c +4 -3
index 046cc2a..d0142bd 100644
@@ -292,7 +292,8 @@ static int xen_add_to_physmap(XenIOState *state,
     return -1;
 
 go_physmap:
-    DPRINTF("mapping vram to %llx - %llx\n", start_addr, start_addr + size);
+    DPRINTF("mapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx"\n",
+            start_addr, start_addr + size);
 
     pfn = phys_offset >> TARGET_PAGE_BITS;
     start_gpfn = start_addr >> TARGET_PAGE_BITS;
@@ -365,8 +366,8 @@ static int xen_remove_from_physmap(XenIOState *state,
     phys_offset = physmap->phys_offset;
     size = physmap->size;
 
-    DPRINTF("unmapping vram to %llx - %llx, from %llx\n",
-            phys_offset, phys_offset + size, start_addr);
+    DPRINTF("unmapping vram to %"HWADDR_PRIx" - %"HWADDR_PRIx", from ",
+            "%"HWADDR_PRIx"\n", phys_offset, phys_offset + size, start_addr);
 
     size >>= TARGET_PAGE_BITS;
     start_addr >>= TARGET_PAGE_BITS;
Signature · 1 line
1.7.2.5