summaryrefslogtreecommitdiffstats
path: root/include/qemu
diff options
context:
space:
mode:
authorMaxim Levitsky2020-12-17 16:00:40 +0100
committerPaolo Bonzini2021-02-08 14:43:55 +0100
commite34e47eb28c0b8119be2e958450763701b38ac3a (patch)
tree93a674a4265cb19d4b4a061bd76990355fb23d5b /include/qemu
parentvirtio-scsi: don't uninitialize queues that we didn't initialize (diff)
downloadqemu-e34e47eb28c0b8119be2e958450763701b38ac3a.tar.gz
qemu-e34e47eb28c0b8119be2e958450763701b38ac3a.tar.xz
qemu-e34e47eb28c0b8119be2e958450763701b38ac3a.zip
event_notifier: handle initialization failure better
Add 'initialized' field and use it to avoid touching event notifiers which are either not initialized or if their initialization failed. This is somewhat a hack, but it seems the less intrusive way to make virtio code deal with event notifiers that failed initialization. Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Message-Id: <20201217150040.906961-4-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/event_notifier.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qemu/event_notifier.h b/include/qemu/event_notifier.h
index 3380b662f3..b79add035d 100644
--- a/include/qemu/event_notifier.h
+++ b/include/qemu/event_notifier.h
@@ -24,6 +24,7 @@ struct EventNotifier {
#else
int rfd;
int wfd;
+ bool initialized;
#endif
};