aboutsummaryrefslogtreecommitdiff
path: root/hw/remote
diff options
context:
space:
mode:
authorJagannathan Raman <jag.raman@oracle.com>2023-05-17 11:26:18 -0400
committerJagannathan Raman <jag.raman@oracle.com>2023-06-07 10:21:16 -0400
commitc14547580484e40e95e98332a7341da0e46ba2c4 (patch)
tree578a5bfe874940d7030b99166840b075eedc93f8 /hw/remote
parentf5e6786de4815751b0a3d2235c760361f228ea48 (diff)
downloadqemu-c14547580484e40e95e98332a7341da0e46ba2c4.zip
qemu-c14547580484e40e95e98332a7341da0e46ba2c4.tar.gz
qemu-c14547580484e40e95e98332a7341da0e46ba2c4.tar.bz2
vfio-user: update comments
Clarify the behavior of TYPE_VFU_OBJECT when TYPE_REMOTE_MACHINE enables the auto-shutdown property. Also, add notes to VFU_OBJECT_ERROR. Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'hw/remote')
-rw-r--r--hw/remote/vfio-user-obj.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/hw/remote/vfio-user-obj.c b/hw/remote/vfio-user-obj.c
index 88ffafc..8b10c32 100644
--- a/hw/remote/vfio-user-obj.c
+++ b/hw/remote/vfio-user-obj.c
@@ -30,6 +30,11 @@
*
* notes - x-vfio-user-server could block IO and monitor during the
* initialization phase.
+ *
+ * When x-remote machine has the auto-shutdown property
+ * enabled (default), x-vfio-user-server terminates after the last
+ * client disconnects. Otherwise, it will continue running until
+ * explicitly killed.
*/
#include "qemu/osdep.h"
@@ -61,9 +66,12 @@
OBJECT_DECLARE_TYPE(VfuObject, VfuObjectClass, VFU_OBJECT)
/**
- * VFU_OBJECT_ERROR - reports an error message. If auto_shutdown
- * is set, it aborts the machine on error. Otherwise, it logs an
- * error message without aborting.
+ * VFU_OBJECT_ERROR - reports an error message.
+ *
+ * If auto_shutdown is set, it aborts the machine on error. Otherwise,
+ * it logs an error message without aborting. auto_shutdown is disabled
+ * when the server serves clients from multiple VMs; as such, an error
+ * from one VM shouldn't be able to disrupt other VM's services.
*/
#define VFU_OBJECT_ERROR(o, fmt, ...) \
{ \