From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [PATCH] virtio_rpmsg: set DRIVER_OK before using device Date: Thu, 12 Mar 2015 11:35:49 +1030 Message-ID: <877funxbwy.fsf@rustcorp.com.au> References: <1425754898-32707-1-git-send-email-mst@redhat.com> <20150309084101.GC22567@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org To: Ohad Ben-Cohen , "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , virtualization List-Id: virtualization@lists.linuxfoundation.org Ohad Ben-Cohen writes: > On Mon, Mar 9, 2015 at 10:41 AM, Michael S. Tsirkin wrote: >> On Sat, Mar 07, 2015 at 08:06:56PM +0100, Michael S. Tsirkin wrote: >>> virtio spec requires that all drivers set DRIVER_OK >>> before using devices. While rpmsg isn't yet >>> included in the virtio 1 spec, previous spec versions >>> also required this. >>> >>> virtio rpmsg violates this rule: is calls kick >>> before setting DRIVER_OK. >>> >>> The fix isn't trivial since simply calling virtio_device_ready earlier >>> would mean we might get an interrupt in parallel with adding buffers. >>> >>> Instead, split kick out to prepare+notify calls. prepare before >>> virtio_device_ready - when we know we won't get interrupts. notify right >>> afterwards. >>> >>> Signed-off-by: Michael S. Tsirkin >>> --- >> >> Ohad, can you review and ack pls? > > Sure, > > Acked-by: Ohad Ben-Cohen Applied. Thanks, Rusty.