diff mbox series

[2/2] savevm: Disallow devices being legacy and iterable at the same time

Message ID e6994f3d2d7f78ddf46bf22c9483fe718aae217b.1687430098.git.lukasstraub2@web.de (mailing list archive)
State New, archived
Headers show
Series [1/2] vfio: Don't be a iterable and legacy device at the same time | expand

Commit Message

Lukas Straub June 22, 2023, 11:22 a.m. UTC
Signed-off-by: Lukas Straub <lukasstraub2@web.de>
---
 migration/savevm.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/migration/savevm.c b/migration/savevm.c
index 5986f852b2..8d3cf7d675 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -774,6 +774,8 @@  int register_savevm_live(const char *idstr,
         se->is_ram = 1;
     }
 
+    assert(!(se->ops->save_setup && se->ops->save_state));
+
     pstrcat(se->idstr, sizeof(se->idstr), idstr);
 
     if (instance_id == VMSTATE_INSTANCE_ID_ANY) {