aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/ivshmem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/ivshmem.c b/hw/ivshmem.c
index d48e5f990..36005618b 100644
--- a/hw/ivshmem.c
+++ b/hw/ivshmem.c
@@ -351,6 +351,10 @@ static void close_guest_eventfds(IVShmemState *s, int posn)
{
int i, guest_curr_max;
+ if (!ivshmem_has_feature(s, IVSHMEM_IOEVENTFD)) {
+ return;
+ }
+
guest_curr_max = s->peers[posn].nb_eventfds;
for (i = 0; i < guest_curr_max; i++) {