From patchwork Mon Jul 3 13:44:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 698716 Delivered-To: patch@linaro.org Received: by 2002:adf:fcc5:0:0:0:0:0 with SMTP id f5csp1768069wrs; Mon, 3 Jul 2023 07:04:36 -0700 (PDT) X-Google-Smtp-Source: APBJJlFH5LCrx60z1cdaObL2Q3vWmFYiWfWI039f4dre8GxX1eK8BujJ974LXyoeV3PYJhCUYlwF X-Received: by 2002:a7b:cd0b:0:b0:3fb:d1db:5454 with SMTP id f11-20020a7bcd0b000000b003fbd1db5454mr4865623wmj.35.1688393076267; Mon, 03 Jul 2023 07:04:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688393076; cv=none; d=google.com; s=arc-20160816; b=yBX9W7WREWXUatrhNb/Pbc/oCLdffUYsfatLmihklDJZzaykY+4UWvv6a6xtofVfzJ EGZkxJQpmRZ/mCDwcuv3wXIz632iQ8V6lGlD5e2L6Y7VYHFvW+HKUOjlE10GLc9dolnu nin9FmJM0FKXXjhvC/gDQjn/aGm0WukXYtkibTNgpi9jF6zPiHVyetqGuRCIIU6FRxkH efC+WdIzic1PPyywup5blkaClar3JrEDGwvjbCcMUkXqPCqvhLawsGvnqG4yVDZDj4Ls vwgUhvyKZh3bNbaKNi7BvOGLMHwjQFBnj965ChLw5jJx8N7+0ffVN9/UAtryNapBrNEh FStQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cQkmXVVKUzbF6+OR87LtMoCxllrcwffkoSGo6NXeAog=; fh=C4nBcyabfogjfietTpwNYf444hhAP25h4cKmWJxWOBI=; b=UIbPxaHTllsllfBQAaBN6q8PPX+B7z6BmaJDiHMr/DMx+eYN92rBFkcW/Wk6o1jvmi vjism29Jx+V03TMYDjE/oBFnNjzEw2zMAMKhGr6mpVM9/ghknthiy6aCjb+jkNuCUY5s 254gga01eCfyOcF4ltB3q8m+jysEvQIIJLrRCiBiy5YU/TltEgYBA/OJ86aEWRuvHsbL 68HQcuyKuOzbhIvxUXXJuvwy8lV3IrymG4LGjGtsphVUhnIylH5dTOSrNVyWUMuNobxk jEzhABPVCfzbqirFWJO8zYWn88Yu5crNwbi9W8eDWFW9DRdpfKaP5MPHsSqep+Go3AnS P2XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lLSmml+L; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l8-20020adfe588000000b0031438462cb9si1241312wrm.156.2023.07.03.07.04.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jul 2023 07:04:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lLSmml+L; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGK9R-0005f0-2R; Mon, 03 Jul 2023 10:03:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qGK9P-0005eU-4t for qemu-devel@nongnu.org; Mon, 03 Jul 2023 10:03:35 -0400 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qGK9J-000323-Pe for qemu-devel@nongnu.org; Mon, 03 Jul 2023 10:03:34 -0400 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-313f1085ac2so4988460f8f.1 for ; Mon, 03 Jul 2023 07:03:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1688393008; x=1690985008; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cQkmXVVKUzbF6+OR87LtMoCxllrcwffkoSGo6NXeAog=; b=lLSmml+LsUgmELhfHKlmBppLRPcP+ic8+Q0VsAjN/fXF8OMrGnJacgSpSX0Ysfckfk cdOur8Znhv4V0NMMQrnbyE4haN+N9mtNa8aq/2us83TitQe5Ds99Zfvik0uTVIa8OUPO 1sXryrHVoKsHhvpoFbrISNOuE+dLk2ADZRzpWgsfRX/M2fioWynULeK9mIkPle5ogci2 fezhuK6rpxTKlTV9CPQtmW/BPQXz+fTNsP+WMne+VRepBb//Y2X+cXrjcc2uQ2PVlugP IgycS4GSov2dqz90qy+wEOsNuSb32ZymiRuvHarBaZEd5QgUvoNCeolHWPowvGsPUwsq 06fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688393008; x=1690985008; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cQkmXVVKUzbF6+OR87LtMoCxllrcwffkoSGo6NXeAog=; b=RpHbb/hQipQJ73PeVK3n4PZgwVTBZaS5NZDTxrS2MXWsUomuJoo3ncLxpRoGHrPnVi LrtfbLcCaKTMSpw3aRBqnrPD8tu2NXthGOtzRehzXzyFztZSZ/vk/9ar81evaLWPbFmh LTVERBqj1AIINkcGowgzcx2whSQ/jWjWjnN6P2Q1YYlAJlx64cX+02aaf1prV83YFA5i Jtj2QNWKuOc2NS9y5CausIGJY/HcStZ7Q1wxhKdkYowTpyUQXu4aKdINiEwy5Qp2WFqy skMhZfgue08r2k+zKKcEvurXwPK2tf6HS5CBspNadvCzZhlokM8G9teJvqQ8HD7NnWmY cdbg== X-Gm-Message-State: ABy/qLbdg1CEm9qkQ7nG30igLYtnJjC6mxGtWgtmCKPRND5busIfOTyz ezWf8yroKxSPI5un62GvmfvmLA== X-Received: by 2002:a5d:58d8:0:b0:313:ee2e:dae1 with SMTP id o24-20020a5d58d8000000b00313ee2edae1mr7762605wrf.18.1688393007868; Mon, 03 Jul 2023 07:03:27 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id c8-20020adfed88000000b0031433443265sm4194573wro.53.2023.07.03.07.03.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jul 2023 07:03:27 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8CDEC1FFC0; Mon, 3 Jul 2023 14:44:30 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: richard.henderson@linaro.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Juan Quintela , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Xu , Leonardo Bras Subject: [PULL 23/38] include/migration: mark vmstate_register() as a legacy function Date: Mon, 3 Jul 2023 14:44:12 +0100 Message-Id: <20230703134427.1389440-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230703134427.1389440-1-alex.bennee@linaro.org> References: <20230703134427.1389440-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Mention that QOM-ified devices already have support for registering the description. Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Peter Xu Signed-off-by: Alex Bennée Message-Id: <20230630180423.558337-24-alex.bennee@linaro.org> diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 084f5e784a..d1b8abe08d 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -1209,7 +1209,15 @@ int vmstate_register_with_alias_id(VMStateIf *obj, uint32_t instance_id, int required_for_version, Error **errp); -/* Returns: 0 on success, -1 on failure */ +/** + * vmstate_register() - legacy function to register state + * serialisation description + * + * New code shouldn't be using this function as QOM-ified devices have + * dc->vmsd to store the serialisation description. + * + * Returns: 0 on success, -1 on failure + */ static inline int vmstate_register(VMStateIf *obj, int instance_id, const VMStateDescription *vmsd, void *opaque)