Thread (4 messages) 4 messages, 3 authors, 2021-08-24

Re: [PATCH] vhost: add support for mandatory barriers

flat view

From: Vincent Whitchurch <hidden>
Date: 2021-08-24 07:23:11
Also in: kvm, lkml, virtualization

On Mon, Aug 23, 2021 at 11:19:56PM +0200, Michael S. Tsirkin wrote:
On Mon, Aug 23, 2021 at 10:14:37AM +0200, Vincent Whitchurch wrote:
quoted
vhost always uses SMP-conditional barriers, but these may not be
sufficient when vhost is used to communicate between heterogeneous
processors in an AMP configuration, especially since they're NOPs on
!SMP builds.

To solve this, use the virtio_*() barrier functions and ask them for
non-weak barriers if requested by userspace.

Signed-off-by: Vincent Whitchurch <redacted>
I am inclined to say let's (ab)use VIRTIO_F_ORDER_PLATFORM for this.
Jason what do you think?
OK, thanks, I'll look into that.
Also is the use of DMA variants really the intended thing here? Could
you point me at some examples please?
I'm using this on an ARM-based SoC.  The main processor is a Cortex-A53
(arm64) and this processor runs the virtio drivers.  The SoC also has
another processor which is a Cortex-A5 (arm32) and this processor runs
the virtio device end using vhost.  There is no coherency between these
two processors and to each other they look like any other DMA-capable
hardware.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help