qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/5] vhost: enable for all targets


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 0/5] vhost: enable for all targets
Date: Tue, 27 Nov 2018 18:00:25 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

On 27/11/18 17:27, Michael S. Tsirkin wrote:
> On Tue, Nov 27, 2018 at 10:04:59AM +0100, Paolo Bonzini wrote:
>> On 26/11/18 23:43, Michael S. Tsirkin wrote:
>>> On Mon, Nov 26, 2018 at 02:20:38PM +0100, Paolo Bonzini wrote:
>>>> vhost does not have to be supported only if KVM is present, in fact
>>>> vhost-user does not even need any kind of kernel support.  This series
>>>> changes this.  The rationale is that, when vhost-user-test.c will be
>>>> converted to qgraph, it will be able to test vhost-user support
>>>> for virtio-mmio backend even on x86.
>>>
>>> The reason for limiting it to KVM was very simple:
>>> it has the same set of problems with ordering
>>> as mttcg.
>>>
>>> So I guess it's fine but I think we must then limit it
>>> to when tcg emits fence instructions.
>>>
>>> Otherwise we'll get subtle race conditions.
>>
>> Got it, I'll take a look.  However, right now you _can_ use vhost with
>> tcg as long as e.g. qemu-system-x86_64 is compiled with KVM support, so
>> this patch is not changing anything in this respect; the bug is
>> independent of this series.
> 
> Well qemu built with KVM implies host architecture == guest
> architecture, right? That should ensure race conditions do not happen in
> a very hacky way.

It's not enough, event_idx requires smp_mb and single-threaded TCG does
not emit them.  It is enough for smp_rmb/smp_wmb however, that makes sense.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]