From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 10814C433FF for ; Wed, 7 Aug 2019 14:55:04 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0FC921E6C for ; Wed, 7 Aug 2019 14:55:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="OLa1kq5U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0FC921E6C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:42140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvNLD-0006Wo-6W for qemu-devel@archiver.kernel.org; Wed, 07 Aug 2019 10:55:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45937) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hvNKf-0005oU-NM for qemu-devel@nongnu.org; Wed, 07 Aug 2019 10:54:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hvNKe-0002Lc-I8 for qemu-devel@nongnu.org; Wed, 07 Aug 2019 10:54:29 -0400 Received: from mail-ot1-x342.google.com ([2607:f8b0:4864:20::342]:40267) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hvNKe-0002L2-Ce for qemu-devel@nongnu.org; Wed, 07 Aug 2019 10:54:28 -0400 Received: by mail-ot1-x342.google.com with SMTP id l15so48157853oth.7 for ; Wed, 07 Aug 2019 07:54:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GQlSHR/U9j1ba3vM8/+lHn5288KTWqRCzbe8FSYgNqI=; b=OLa1kq5UQPM+B7AynEJLkel/GGLoRaxLCe35doii/kF6gsPcV1FUZkY46N0FGLd6F+ Jjdw1srkzFJ+Hh6SBWimnPNYQrHq6YaWYoEnJbLSlmtwuBeCtOckXUMyNwcmbStPxp+t RAI63y5dJmYlAzpYVuW6MtgefB7YuysoiOsAaCu1IrtBxjJdApBHGTOsw9uRzm/4pgaE H6CtGwyVGR0p9C/hug1Mf7zHmCXMHmoclRSoBra2nG0PvIxfUjs9yX2c4LqNQmJ/kcgP asHcxUq9gU6BS3tNjs2dEoXf2VXiNvferauevg19M3vxpzd5l9HiWvRLo94cuadBcdHq 3J9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=GQlSHR/U9j1ba3vM8/+lHn5288KTWqRCzbe8FSYgNqI=; b=IOIVRXoq3PV3Cgaugoq1wjlnWEy8HMxMIF2YWTEw8s9xXmRg4kFwaovTyECTIuA6uc ksWXOGS0HT3NuoQ0qXnKyEszdOz4VCpHJI68lQT1/7PYCdrxIXyv4p/YY9Jb44VdJABe 4wILsMV3ZZsFjb9TPIVrFeAEwXbGwJFwt3p55i4OHz/FPTLd6TYAYxkXch/pvR3QjLAJ FSHTBEK+2TbBLApfeQ7WUucgH2DokXdU6sN/TieGadMdTtAEcbFJbKDJAIeD4Vk4r/6j ufEPRptAEML5A2e705bkdrMHPF0GLT6FapN/B1IrI3paxS+BrW4lZ+W0fekA0cHEwqXj ME0Q== X-Gm-Message-State: APjAAAXCJok3GrBjuKSukP+6GysJKpWXtnLXcgD+UK2K66e3J55mILTv ciyq2vyi/PGTojkNjsozredr87jg8CI5+YiuxppMDg== X-Google-Smtp-Source: APXvYqwrcIDTR5AmcleadMT7kko/6Dwtnl+uKo+a2hk9sA+IJ2/U0tv3zk4eJGIJpfjFniet0iFS4r9Bd1Uj6rR1EbM= X-Received: by 2002:a05:6830:1653:: with SMTP id h19mr8591931otr.232.1565189667703; Wed, 07 Aug 2019 07:54:27 -0700 (PDT) MIME-Version: 1.0 References: <20190729145654.14644-1-damien.hedde@greensocs.com> <20190729145654.14644-7-damien.hedde@greensocs.com> In-Reply-To: <20190729145654.14644-7-damien.hedde@greensocs.com> From: Peter Maydell Date: Wed, 7 Aug 2019 15:54:16 +0100 Message-ID: To: Damien Hedde Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::342 Subject: Re: [Qemu-devel] [PATCH v3 06/33] add the vmstate description for device reset state X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Collin Walling , Dmitry Fleytman , "Michael S. Tsirkin" , Mark Cave-Ayland , QEMU Developers , Gerd Hoffmann , Edgar Iglesias , Hannes Reinecke , Qemu-block , David Hildenbrand , Halil Pasic , Christian Borntraeger , =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= , Richard Henderson , Thomas Huth , Eduardo Habkost , Alistair Francis , qemu-s390x , qemu-arm , =?UTF-8?Q?C=C3=A9dric_Le_Goater?= , John Snow , David Gibson , "Daniel P. Berrange" , Cornelia Huck , Mark Burton , qemu-ppc , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Mon, 29 Jul 2019 at 15:58, Damien Hedde wrote: > > It contains the resetting counter and cold flag status. > > At this point, migration of bus reset related state (counter and cold/warm > flag) is handled by parent device. This done using the post_load > function in the vmsd subsection. > > This is last point allow to add an initial support of migration with part of > qdev/qbus tree in reset state under the following condition: > + time-lasting reset are asserted on Device only > > Note that if this condition is not respected, migration will succeed and > no failure will occurs. The only impact is that the resetting counter > of a bus may lower afer a migration. > > Signed-off-by: Damien Hedde > +const struct VMStateDescription device_vmstate_reset = { > + .name = "device_reset", > + .version_id = 0, > + .minimum_version_id = 0, > + .needed = device_vmstate_reset_needed, > + .post_load = device_vmstate_reset_post_load, > + .fields = (VMStateField[]) { > + VMSTATE_UINT32(resetting, DeviceState), > + VMSTATE_BOOL(reset_is_cold, DeviceState), > + VMSTATE_END_OF_LIST() > + }, > +}; > - Forgot to ask -- why don't we migrate the hold_needed flags? thanks -- PMM