From patchwork Thu Jul 17 11:02:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Dovgalyuk X-Patchwork-Id: 371147 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43A20140175 for ; Thu, 17 Jul 2014 23:46:47 +1000 (EST) Received: from localhost ([::1]:44376 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7m1F-0001VH-3i for incoming@patchwork.ozlabs.org; Thu, 17 Jul 2014 09:46:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7jSy-00048k-EG for qemu-devel@nongnu.org; Thu, 17 Jul 2014 07:05:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X7jSf-0004GC-Bi for qemu-devel@nongnu.org; Thu, 17 Jul 2014 07:03:12 -0400 Received: from mail.ispras.ru ([83.149.199.45]:47372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X7jSf-0004FE-3c for qemu-devel@nongnu.org; Thu, 17 Jul 2014 07:02:53 -0400 Received: from [10.10.150.172] (unknown [80.250.189.177]) by mail.ispras.ru (Postfix) with ESMTPSA id 3E819540157; Thu, 17 Jul 2014 15:02:52 +0400 (MSK) To: qemu-devel@nongnu.org From: Pavel Dovgalyuk Date: Thu, 17 Jul 2014 15:02:55 +0400 Message-ID: <20140717110255.8352.73575.stgit@PASHA-ISP> In-Reply-To: <20140717110153.8352.80175.stgit@PASHA-ISP> References: <20140717110153.8352.80175.stgit@PASHA-ISP> User-Agent: StGit/0.16 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 83.149.199.45 X-Mailman-Approved-At: Thu, 17 Jul 2014 09:36:32 -0400 Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, pavel.dovgaluk@ispras.ru, pbonzini@redhat.com, fred.konrad@greensocs.com Subject: [Qemu-devel] [RFC PATCH v2 10/49] rtl8139: adding new fields to vmstate X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This patch adds virtual clock-dependent timers to VMState to allow correct saving and restoring the state of RTL8139 network controller. Signed-off-by: Pavel Dovgalyuk --- hw/net/rtl8139.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index 90bc5ec..992caf0 100644 --- a/hw/net/rtl8139.c +++ b/hw/net/rtl8139.c @@ -3289,7 +3289,7 @@ static void rtl8139_pre_save(void *opaque) static const VMStateDescription vmstate_rtl8139 = { .name = "rtl8139", - .version_id = 4, + .version_id = 5, .minimum_version_id = 3, .post_load = rtl8139_post_load, .pre_save = rtl8139_pre_save, @@ -3363,6 +3363,9 @@ static const VMStateDescription vmstate_rtl8139 = { VMSTATE_STRUCT(tally_counters, RTL8139State, 0, vmstate_tally_counters, RTL8139TallyCounters), + VMSTATE_TIMER_V(timer, RTL8139State, 5), + VMSTATE_INT64_V(TimerExpire, RTL8139State, 5), + VMSTATE_UINT32_V(cplus_enabled, RTL8139State, 4), VMSTATE_END_OF_LIST() },