Re: [Qemu-devel] [PATCH] Inter-VM shared memory PCI device

Jamie Lokier
2010-03-09T19:00:37Z

Paul Brook wrote:
> > However, coherence could be made host-type-independent by the host
> > mapping and unampping pages, so that each page is only mapped into one
> > guest (or guest CPU) at a time. Just like some clustering filesystems
> > do to maintain coherence.
>
> You're assuming that a TLB flush implies a write barrier, and a TLB miss
> implies a read barrier. I'd be surprised if this were true in general.

The host driver itself can issue full barriers at the same time as it
maps pages on TLB miss, and would probably have to interrupt the
guest's SMP KVM threads to insert a full barrier when broadcasting a
TLB flush on unmap.

-- Jamie