All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ioemu: check mmap return value when mapping MSI-x table
@ 2009-01-24  4:47 Yu Zhao
  2009-01-24  4:47 ` [PATCH 2/3] ioemu: add libpci fixup to handle recent change in PCIUtils Yu Zhao
  2009-01-24  4:47 ` [PATCH 3/3] ioemu: use the sysfs interface to enable the PCI ROM Yu Zhao
  0 siblings, 2 replies; 5+ messages in thread
From: Yu Zhao @ 2009-01-24  4:47 UTC (permalink / raw)
  To: xen-devel; +Cc: Yu Zhao

Signed-off-by: Yu Zhao <yu.zhao@intel.com>
---
 hw/pt-msi.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/hw/pt-msi.c b/hw/pt-msi.c
index c515c02..4f25186 100644
--- a/hw/pt-msi.c
+++ b/hw/pt-msi.c
@@ -322,6 +322,12 @@ int pt_msix_init(struct pt_dev *dev, int pos)
     dev->msix->phys_iomem_base = mmap(0, total_entries * 16,
                           PROT_WRITE | PROT_READ, MAP_SHARED | MAP_LOCKED,
                           dev->msix->fd, dev->msix->table_base + table_off);
+    if ( dev->msix->phys_iomem_base == MAP_FAILED )
+    {
+        PT_LOG("Can't map physical MSI-X table: %s\n", strerror(errno));
+        return -1;
+    }
+
     PT_LOG("mapping physical MSI-X table to %lx\n",
            (unsigned long)dev->msix->phys_iomem_base);
     return 0;
-- 
1.5.6.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-03  2:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-24  4:47 [PATCH 1/3] ioemu: check mmap return value when mapping MSI-x table Yu Zhao
2009-01-24  4:47 ` [PATCH 2/3] ioemu: add libpci fixup to handle recent change in PCIUtils Yu Zhao
2009-01-24  4:47 ` [PATCH 3/3] ioemu: use the sysfs interface to enable the PCI ROM Yu Zhao
2009-02-03  1:05   ` Kouya Shimura
2009-02-03  2:17     ` Zhao, Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.