From: Muli Ben-Yehuda <muli@il.ibm.com>
To: "Han, Weidong" <weidong.han@intel.com>
Cc: "'avi@redhat.com'" <avi@redhat.com>,
"'kvm@vger.kernel.org'" <kvm@vger.kernel.org>,
"'anthony@codemonkey.ws'" <anthony@codemonkey.ws>,
Ben-Ami Yassour1 <BENAMI@il.ibm.com>,
"'amit.shah@redhat.com'" <amit.shah@redhat.com>,
"Kay, Allen M" <allen.m.kay@intel.com>
Subject: Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests
Date: Tue, 28 Oct 2008 17:32:28 +0200 [thread overview]
Message-ID: <20081028153228.GA6737@il.ibm.com> (raw)
In-Reply-To: <715D42877B251141A38726ABF5CABF2C018681F600@pdsmsx503.ccr.corp.intel.com>
On Tue, Oct 28, 2008 at 10:10:07PM +0800, Han, Weidong wrote:
> > + DEBUG("r_pio=%08x e_physbase=%08x r_virtbase=%08lx value=%08x\n",
> > + r_pio, (int)r_access->e_physbase,
> > + (unsigned long)r_access->r_virtbase, value);
>
> should be (unsigned long)r_access->u.r_virtbase
Thanks, actually it should be u.r_baseport for IO ports and there were
a number of other bogosities there too. Here's a quick incremental
patch compiled with DEBUG() enabled.
>From 9b917528647b55a1046a5a19d9e2427bb2d86db7 Mon Sep 17 00:00:00 2001
From: Muli Ben-Yehuda <muli@il.ibm.com>
Date: Tue, 28 Oct 2008 17:30:30 +0200
Subject: [PATCH 1/1] fix DEBUG statements
(thanks to Weidong Han for spotting)
Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com>
---
qemu/hw/device-assignment.c | 32 ++++++++++++++++----------------
1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
index 89b05f9..8b56599 100644
--- a/qemu/hw/device-assignment.c
+++ b/qemu/hw/device-assignment.c
@@ -63,9 +63,9 @@ static void assigned_dev_ioport_writeb(void *opaque, uint32_t addr,
AssignedDevRegion *r_access = opaque;
uint32_t r_pio = guest_to_host_ioport(r_access, addr);
- DEBUG("r_pio=%08x e_physbase=%08x r_virtbase=%08lx value=%08x\n",
+ DEBUG("r_pio=%08x e_physbase=%08x r_baseport=%08lx value=%08x\n",
r_pio, (int)r_access->e_physbase,
- (unsigned long)r_access->r_virtbase, value);
+ (unsigned long)r_access->u.r_baseport, value);
outb(value, r_pio);
}
@@ -76,9 +76,9 @@ static void assigned_dev_ioport_writew(void *opaque, uint32_t addr,
AssignedDevRegion *r_access = opaque;
uint32_t r_pio = guest_to_host_ioport(r_access, addr);
- DEBUG("r_pio=%08x e_physbase=%08x r_virtbase=%08lx value=%08x\n",
- __func__, r_pio, (int)r_access->e_physbase,
- (unsigned long)r_access->r_virtbase, value);
+ DEBUG("r_pio=%08x e_physbase=%08x r_baseport=%08lx value=%08x\n",
+ r_pio, (int)r_access->e_physbase,
+ (unsigned long)r_access->u.r_baseport, value);
outw(value, r_pio);
}
@@ -89,9 +89,9 @@ static void assigned_dev_ioport_writel(void *opaque, uint32_t addr,
AssignedDevRegion *r_access = opaque;
uint32_t r_pio = guest_to_host_ioport(r_access, addr);
- DEBUG("%s: r_pio=%08x e_physbase=%08x r_virtbase=%08lx value=%08x\n",
+ DEBUG("r_pio=%08x e_physbase=%08x r_baseport=%08lx value=%08x\n",
r_pio, (int)r_access->e_physbase,
- (unsigned long)r_access->r_virtbase, value);
+ (unsigned long)r_access->u.r_baseport, value);
outl(value, r_pio);
}
@@ -104,9 +104,9 @@ static uint32_t assigned_dev_ioport_readb(void *opaque, uint32_t addr)
value = inb(r_pio);
- DEBUG("r_pio=%08x e_physbase=%08x r_virtbase=%08lx value=%08x\n",
+ DEBUG("r_pio=%08x e_physbase=%08x r_=%08lx value=%08x\n",
r_pio, (int)r_access->e_physbase,
- (unsigned long)r_access->r_virtbase, value);
+ (unsigned long)r_access->u.r_baseport, value);
return value;
}
@@ -119,9 +119,9 @@ static uint32_t assigned_dev_ioport_readw(void *opaque, uint32_t addr)
value = inw(r_pio);
- DEBUG("r_pio=%08x e_physbase=%08x r_virtbase=%08lx value=%08x\n",
+ DEBUG("r_pio=%08x e_physbase=%08x r_baseport=%08lx value=%08x\n",
r_pio, (int)r_access->e_physbase,
- (unsigned long)r_access->r_virtbase, value);
+ (unsigned long)r_access->u.r_baseport, value);
return value;
}
@@ -134,9 +134,9 @@ static uint32_t assigned_dev_ioport_readl(void *opaque, uint32_t addr)
value = inl(r_pio);
- DEBUG("r_pio=%08x e_physbase=%08x r_virtbase=%08lx value=%08x\n",
+ DEBUG("r_pio=%08x e_physbase=%08x r_baseport=%08lx value=%08x\n",
r_pio, (int)r_access->e_physbase,
- (unsigned long)r_access->r_virtbase, value);
+ (unsigned long)r_access->u.r_baseport, value);
return value;
}
@@ -151,8 +151,8 @@ static void assigned_dev_iomem_map(PCIDevice *pci_dev, int region_num,
int first_map = (region->e_size == 0);
int ret = 0;
- DEBUG("e_phys=%08x r_virt=%x type=%d len=%08x region_num=%d \n",
- e_phys, (uint32_t)region->r_virtbase, type, e_size, region_num);
+ DEBUG("e_phys=%08x r_virt=%p type=%d len=%08x region_num=%d \n",
+ e_phys, region->u.r_virtbase, type, e_size, region_num);
region->e_physbase = e_phys;
region->e_size = e_size;
@@ -425,7 +425,7 @@ again:
rp->valid = 1;
rp->base_addr = start;
rp->size = size;
- DEBUG("region %d size %d start 0x%x type %d resource_fd %d\n",
+ DEBUG("region %d size %d start 0x%llx type %d resource_fd %d\n",
r, rp->size, start, rp->type, rp->resource_fd);
}
fclose(f);
--
1.5.6.5
next prev parent reply other threads:[~2008-10-28 15:36 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-28 10:06 [v8] Userspace patches for PCI device assignment muli
2008-10-28 10:06 ` [PATCH 1/6] device assignment: add ioctl wrappers muli
2008-10-28 10:06 ` [PATCH 2/6] device assignment: introduce pci_map_irq to get irq nr from pin number muli
2008-10-28 10:06 ` [PATCH 3/6] device assignment: introduce functions to correlate pin number and irq muli
2008-10-28 10:06 ` [PATCH 4/6] device assignment: build vtd.c for Intel IOMMU support muli
2008-10-28 10:06 ` [PATCH 5/6] device assignment: support for assigning PCI devices to guests muli
2008-10-28 10:06 ` [PATCH 6/6] device assignment: support for hot-plugging PCI devices muli
2008-10-28 14:10 ` [PATCH 5/6] device assignment: support for assigning PCI devices to guests Han, Weidong
2008-10-28 15:32 ` Muli Ben-Yehuda [this message]
[not found] ` <715D42877B251141A38726ABF5CABF2C018683D874@pdsmsx503.ccr.corp.intel.com>
2008-10-28 15:31 ` Han, Weidong
2008-10-28 15:36 ` Han, Weidong
2008-10-28 15:47 ` Muli Ben-Yehuda
2008-10-28 15:45 ` Anthony Liguori
2008-10-28 15:53 ` Muli Ben-Yehuda
2008-10-29 7:56 ` Zhang, Xiantao
2008-10-29 10:27 ` Muli Ben-Yehuda
2008-10-29 8:22 ` Han, Weidong
2008-10-29 10:25 ` Muli Ben-Yehuda
2008-10-29 10:39 ` Muli Ben-Yehuda
2008-10-28 16:55 ` Mark McLoughlin
2008-10-29 10:31 ` Muli Ben-Yehuda
2008-10-29 11:07 ` Mark McLoughlin
2008-10-29 11:15 ` Mark McLoughlin
2008-10-29 11:47 ` Muli Ben-Yehuda
2008-10-29 7:38 ` [PATCH 4/6] device assignment: build vtd.c for Intel IOMMU support Zhang, Xiantao
-- strict thread matches above, loose matches on Subject: below --
2008-10-29 10:22 [v9] Userspace patches for PCI device assignment muli
2008-10-29 10:22 ` [PATCH 1/6] device assignment: add ioctl wrappers muli
2008-10-29 10:22 ` [PATCH 2/6] device assignment: introduce pci_map_irq to get irq nr from pin number muli
2008-10-29 10:22 ` [PATCH 3/6] device assignment: introduce functions to correlate pin number and irq muli
2008-10-29 10:22 ` [PATCH 4/6] device assignment: build vtd.c for Intel IOMMU support muli
2008-10-29 10:22 ` [PATCH 5/6] device assignment: support for assigning PCI devices to guests muli
2008-10-29 12:19 [v10] Userspace patches for PCI device assignment muli
2008-10-29 12:19 ` [PATCH 1/6] device assignment: add ioctl wrappers muli
2008-10-29 12:19 ` [PATCH 2/6] device assignment: introduce pci_map_irq to get irq nr from pin number muli
2008-10-29 12:19 ` [PATCH 3/6] device assignment: introduce functions to correlate pin number and irq muli
2008-10-29 12:19 ` [PATCH 4/6] device assignment: build vtd.c for Intel IOMMU support muli
2008-10-29 12:20 ` [PATCH 5/6] device assignment: support for assigning PCI devices to guests muli
2008-10-29 12:27 ` Mark McLoughlin
2008-10-29 14:40 ` Muli Ben-Yehuda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081028153228.GA6737@il.ibm.com \
--to=muli@il.ibm.com \
--cc=BENAMI@il.ibm.com \
--cc=allen.m.kay@intel.com \
--cc=amit.shah@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=weidong.han@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox