Jayakrishnan A <jksoftdevelo...@gmail.com> writes:

> Hi Team ,
>
> Seeking help on implementing sync over ivshmem shared memory , As part of 
> internal project we could able to achieve
> shared ivshmem with doorbell mechanism ,But in order to achieve shared memory 
> synchronisation we are trying to add
> atomic operation  over this shared memory area variables , Just wanted to 
> analyse whether this atomic variable between
> VMs shared memory will work as expected , If not is there any suggested way 
> ahead to implement synchronisation over
> ivshmem shared memory for threads running in multiple VMs.

Atomic accesses are properly modelled for all QEMU TCG guests that
support MTTCG using the hosts underlying atomic support. The shared
memory region ivshmem_bar2/server_bar2 are just pages shared between the
two QEMU processes so atomic accesses should behave the same way.

I'm unfamiliar with if both sides see the MMIO region but there is no
intrinsic synchronisation for MMIO regions which are terminated by a
MemoryRegionOps structure although vCPUS on the same QEMU will be
serialised by the BQL.

>
> Thanks and Regards , 
> Jayakrishnan A

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reply via email to