From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsoQB-0008US-Kx for qemu-devel@nongnu.org; Thu, 14 May 2015 04:23:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsoQ8-0002zg-EM for qemu-devel@nongnu.org; Thu, 14 May 2015 04:23:11 -0400 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:35258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsoQ8-0002yn-7Y for qemu-devel@nongnu.org; Thu, 14 May 2015 04:23:08 -0400 Received: by wicmx19 with SMTP id mx19so6553245wic.0 for ; Thu, 14 May 2015 01:23:07 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <55545B63.80309@redhat.com> Date: Thu, 14 May 2015 10:22:59 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1431528122-50960-1-git-send-email-cornelia.huck@de.ibm.com> <1431528122-50960-2-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1431528122-50960-2-git-send-email-cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 1/1] virtio: migrate config_vector List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , qemu-devel@nongnu.org Cc: borntraeger@de.ibm.com, jjherne@linux.vnet.ibm.com, mst@redhat.com On 13/05/2015 16:42, Cornelia Huck wrote: > +static bool virtio_device_confvec_needed(void *opaque) > +{ > + VirtIODevice *vdev = opaque; > + BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); > + VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(qbus); > + > + return k->needs_confvec ? > + k->needs_confvec(qbus->parent) : > + (vdev->config_vector != VIRTIO_NO_VECTOR); > +} This can call k->needs_confvec unconditionally, if the default implementation is moved to a separate function. Paolo