qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfio/container: set error on cpr failure
@ 2025-08-13 14:17 Steve Sistare
  2025-08-13 15:05 ` Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Steve Sistare @ 2025-08-13 14:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Alex Williamson, Cedric Le Goater, Zhenzhong Duan, Steve Sistare

Set an error message if vfio_cpr_ram_discard_register_listener fails so
the fail label gets a valid error object.

Reported-by: Cédric Le Goater <clg@redhat.com>
Fixes: eba1f657cbb1 ("vfio/container: recover from unmap-all-vaddr failure")
Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
---
 hw/vfio/listener.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/vfio/listener.c b/hw/vfio/listener.c
index f498e23..5ebafaa 100644
--- a/hw/vfio/listener.c
+++ b/hw/vfio/listener.c
@@ -574,6 +574,9 @@ void vfio_container_region_add(VFIOContainerBase *bcontainer,
             vfio_ram_discard_register_listener(bcontainer, section);
         } else if (!vfio_cpr_ram_discard_register_listener(bcontainer,
                                                            section)) {
+            error_setg(&err,
+                       "vfio_cpr_ram_discard_register_listener for %s failed",
+                       memory_region_name(section->mr));
             goto fail;
         }
         return;
-- 
1.8.3.1



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

end of thread, other threads:[~2025-09-08 14:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-13 14:17 [PATCH] vfio/container: set error on cpr failure Steve Sistare
2025-08-13 15:05 ` Philippe Mathieu-Daudé
2025-08-14  3:21 ` Duan, Zhenzhong
2025-09-08 14:15 ` Cédric Le Goater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).