Skip to content

Commit

Permalink
core: ivshmem: Notify remote about state change on cell removal
Browse files Browse the repository at this point in the history
Removing one peer cell has the implicit effect of resetting its state to
0. Signal this change via an interrupt as well.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  • Loading branch information
jan-kiszka committed Dec 5, 2016
1 parent c65edaf commit e4fe53a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hypervisor/ivshmem.c
Expand Up @@ -309,10 +309,13 @@ static void ivshmem_disconnect_cell(struct ivshmem_data *iv, int cellnum)
struct ivshmem_endpoint *remote = &iv->eps[(cellnum + 1) % 2];
struct ivshmem_endpoint *ive = &iv->eps[cellnum];

remote->remote = NULL;
memory_barrier();
arch_ivshmem_write_doorbell(ive);

ive->device->ivshmem_endpoint = NULL;
ive->device = NULL;
ive->remote = NULL;
remote->remote = NULL;
}

/**
Expand Down

0 comments on commit e4fe53a

Please sign in to comment.