From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751622AbbCLBPa (ORCPT ); Wed, 11 Mar 2015 21:15:30 -0400 Received: from ozlabs.org ([103.22.144.67]:42327 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750957AbbCLBP1 (ORCPT ); Wed, 11 Mar 2015 21:15:27 -0400 From: Rusty Russell To: Ohad Ben-Cohen , "Michael S. Tsirkin" Cc: "linux-kernel\@vger.kernel.org" , virtualization , "kvm\@vger.kernel.org" , qemu-devel@nongnu.org Subject: Re: [PATCH] virtio_rpmsg: set DRIVER_OK before using device In-Reply-To: References: <1425754898-32707-1-git-send-email-mst@redhat.com> <20150309084101.GC22567@redhat.com> User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Thu, 12 Mar 2015 11:35:49 +1030 Message-ID: <877funxbwy.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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.