[RFC 2/4] libvhost-user: print invalid address on vu_panic

Marc Hartmayer posted 4 patches 5 years, 7 months ago
Maintainers: David Hildenbrand <david@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Christian Borntraeger <borntraeger@de.ibm.com>, Richard Henderson <rth@twiddle.net>, Thomas Huth <thuth@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Halil Pasic <pasic@linux.ibm.com>
There is a newer version of this series
[RFC 2/4] libvhost-user: print invalid address on vu_panic
Posted by Marc Hartmayer 5 years, 7 months ago
This can be helpful for debugging.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
---
 contrib/libvhost-user/libvhost-user.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c
index d315db139606..9e8750a9dabc 100644
--- a/contrib/libvhost-user/libvhost-user.c
+++ b/contrib/libvhost-user/libvhost-user.c
@@ -2432,7 +2432,7 @@ virtqueue_map_desc(VuDev *dev,
 
         iov[num_sg].iov_base = vu_gpa_to_va(dev, &len, pa);
         if (iov[num_sg].iov_base == NULL) {
-            vu_panic(dev, "virtio: invalid address for buffers");
+            vu_panic(dev, "virtio: invalid address 0x%lx for buffers", pa);
             return;
         }
         iov[num_sg].iov_len = len;
-- 
2.25.4