From patchwork Sun May 9 16:42:09 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 52003 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D6F75B7D40 for ; Mon, 10 May 2010 02:46:50 +1000 (EST) Received: from localhost ([127.0.0.1]:42560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OB9eQ-0006NY-TD for incoming@patchwork.ozlabs.org; Sun, 09 May 2010 12:46:46 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1OB9du-0006NT-Hq for qemu-devel@nongnu.org; Sun, 09 May 2010 12:46:14 -0400 Received: from [140.186.70.92] (port=40830 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OB9ds-0006N3-8o for qemu-devel@nongnu.org; Sun, 09 May 2010 12:46:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OB9dq-000837-PQ for qemu-devel@nongnu.org; Sun, 09 May 2010 12:46:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28176) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OB9dq-00082w-GU for qemu-devel@nongnu.org; Sun, 09 May 2010 12:46:10 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o49Gk7N9011737 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 9 May 2010 12:46:07 -0400 Received: from redhat.com (vpn1-6-177.ams2.redhat.com [10.36.6.177]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id o49Gk5N2000785; Sun, 9 May 2010 12:46:06 -0400 Date: Sun, 9 May 2010 19:42:09 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org, Anthony Liguori , dlstevens@us.ibm.com Message-ID: <20100509164209.GA20658@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH] virtio: invoke set_features on load X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org After migration, vhost was not getting features acked because set_features callback was never invoked. The fix is just to invoke that callback. Reported-by: David L Stevens Signed-off-by: Michael S. Tsirkin Tested-by: David L Stevens --- David, a tested-by tag would be appreciated. hw/virtio.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index 5d686f0..74c450d 100644 --- a/hw/virtio.c +++ b/hw/virtio.c @@ -692,6 +692,8 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f) features, supported_features); return -1; } + if (vdev->set_features) + vdev->set_features(vdev, features); vdev->guest_features = features; vdev->config_len = qemu_get_be32(f); qemu_get_buffer(f, vdev->config, vdev->config_len);