• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1diff --git a/hw/device-assignment.c b/hw/device-assignment.c
2index c99d986..4af9ff6 100644
3--- a/hw/device-assignment.c
4+++ b/hw/device-assignment.c
5@@ -47,7 +47,7 @@
6 #define IORESOURCE_DMA      0x00000800
7 #define IORESOURCE_PREFETCH 0x00001000  /* No side effects */
8
9-/* #define DEVICE_ASSIGNMENT_DEBUG 1 */
10+#define DEVICE_ASSIGNMENT_DEBUG 1
11
12 #ifdef DEVICE_ASSIGNMENT_DEBUG
13 #define DEBUG(fmt, ...)                                       \
14@@ -267,10 +267,10 @@ static void assigned_dev_iomem_map(PCIDevice *pci_dev, int region_num,
15     pcibus_t old_esize = region->e_size;
16     int first_map = (region->e_size == 0);
17     int ret = 0;
18-
19+#if 0
20     DEBUG("e_phys=%08x r_virt=%p type=%d len=%08x region_num=%d \n",
21           e_phys, region->u.r_virtbase, type, e_size, region_num);
22-
23+#endif
24     region->e_physbase = e_phys;
25     region->e_size = e_size;
26
27@@ -344,10 +344,10 @@ static void assigned_dev_ioport_map(PCIDevice *pci_dev, int region_num,
28
29     region->e_physbase = addr;
30     region->e_size = size;
31-
32+#if 0
33     DEBUG("e_phys=0x%x r_baseport=%x type=0x%x len=%d region_num=%d \n",
34           addr, region->u.r_baseport, type, size, region_num);
35-
36+#endif
37     if (first_map && region->region->resource_fd < 0) {
38 	struct ioperm_data *data;
39
40@@ -561,11 +561,13 @@ static int assigned_dev_register_regions(PCIRegion *io_regions,
41                 : PCI_BASE_ADDRESS_SPACE_MEMORY;
42
43             if (cur_region->size & 0xFFF) {
44+#if 0
45                 fprintf(stderr, "PCI region %d at address 0x%llx "
46                         "has size 0x%x, which is not a multiple of 4K. "
47                         "You might experience some performance hit due to that.\n",
48                         i, (unsigned long long)cur_region->base_addr,
49                         cur_region->size);
50+#endif
51                 slow_map = 1;
52             }
53
54@@ -1341,8 +1343,8 @@ static void msix_mmio_writel(void *opaque,
55     unsigned int offset = addr & 0xfff;
56     void *page = adev->msix_table_page;
57
58-    DEBUG("write to MSI-X entry table mmio offset 0x%lx, val 0x%lx\n",
59-		    addr, val);
60+    DEBUG("write to MSI-X entry table mmio offset 0x%lx, val 0x%ux\n",
61+		    (unsigned long)addr, val);
62     memcpy((void *)((char *)page + offset), &val, 4);
63 }
64
65