From: Alex Williamson Subject: [PATCH] device-assignment: Add fields to VMStateDescription Date: Thu, 06 Jan 2011 23:49:36 -0700 Message-ID: <20110107064812.25215.94749.stgit@s20.home> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: alex.williamson@redhat.com, quintela@redhat.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48028 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752753Ab1AGGth (ORCPT ); Fri, 7 Jan 2011 01:49:37 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p076nbgQ032222 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 7 Jan 2011 01:49:37 -0500 Sender: kvm-owner@vger.kernel.org List-ID: If the migration destination specifies an assigned device, qemu will segfault because there is always expected to be an end marker for fields. Add to our dummy VMStateDescription to avoid this. Signed-off-by: Alex Williamson --- hw/device-assignment.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c index 8446cd4..64636ce 100644 --- a/hw/device-assignment.c +++ b/hw/device-assignment.c @@ -1689,7 +1689,10 @@ static void assigned_dev_unregister_msix_mmio(AssignedDevice *dev) } static const VMStateDescription vmstate_assigned_device = { - .name = "pci-assign" + .name = "pci-assign", + .fields = (VMStateField []) { + VMSTATE_END_OF_LIST() + } }; static void reset_assigned_device(DeviceState *dev)