From patchwork Mon Jun 19 17:14:34 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: 694093 Delivered-To: patch@linaro.org Received: by 2002:a5d:4d91:0:0:0:0:0 with SMTP id b17csp2477057wru; Mon, 19 Jun 2023 10:15:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7pw2bapKylTy2wa+xFGMvz7xKMoZzo3ro6hB2IW2TKs3+nhlpBgewxYsYsTbgYEqHdcAYG X-Received: by 2002:a05:620a:1a26:b0:762:29ff:228f with SMTP id bk38-20020a05620a1a2600b0076229ff228fmr11357656qkb.23.1687194954808; Mon, 19 Jun 2023 10:15:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687194954; cv=none; d=google.com; s=arc-20160816; b=wDf8ASdnm3GNmrCKNFMumzmldG/Aj4PbhswszBVe8g01cqXXR8uuA/GxWf9ZK3T4PS CL/BNBz8yWI5Fk/VZeRUJYyC9KfHvlYgQxbZp68W4QcpT3/Dh93i12K6B7zzGFH0uEY4 L/oLy+RnwDVM3Gesh81ynRffOpDNYu21yyAFMkEAoaEFL2KYH8tUqmxaNZowNjsjobzC 5HQpvjCPXA4YZW+1WFcbN45SKK1x6v4xzbSDbxAlZC6CpH5d5N3Yh6ux3R5Nah1jbnGr L0/lHfKCteebnfmbM06GHsPOOL6/cEE7I09UM6J2Mrr4i0NzObd5boKb+uy1UlTHrBQW s3hw== 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=XAzDJYHeZ3egsdpPxn+zZy7ksHc4V1jiKHsxofssT6o=; b=BWlVfQnaO2OLAWDurFCcmy6RHRo3+Vyb1sYFtIhpN30MOoJ+4wZ9HwG5nre8lx8riR gnq6Vq6kVYVja/IvE3E+wnddRQxn0ThGP5qGWM9zrV9I53MZCNJbhlqgdFB1CDv33Qz/ LhK75gGoDEct3C2sfqHcBpZsV+BbOXdK8fLJOmcdL48ojoErcPFS4R5bXAsQ6cKKAyzA qGz/5FsFYiL1hgkgOBR0Xb6W1Uq2ZxWTuNHVBtNwBjH6VWcnf6VpqvH2N1NB1dAJcOGy Ufp4CgdmeSDU2/UFoj65D4CvKtzdrd0yFdgL0EH/GBENfRm51g6BBCe3YotvFPDuQ73z Q6nA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PX92BXvx; 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 n15-20020ae9c30f000000b0076250115d65si109926qkg.437.2023.06.19.10.15.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 19 Jun 2023 10:15:54 -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=PX92BXvx; 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 1qBISl-0003Mk-3F; Mon, 19 Jun 2023 13:14:47 -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 1qBISh-0003Ja-MN for qemu-devel@nongnu.org; Mon, 19 Jun 2023 13:14:43 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qBISf-00024t-Cx for qemu-devel@nongnu.org; Mon, 19 Jun 2023 13:14:43 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3f900cd3f96so24777645e9.2 for ; Mon, 19 Jun 2023 10:14:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687194879; x=1689786879; 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=XAzDJYHeZ3egsdpPxn+zZy7ksHc4V1jiKHsxofssT6o=; b=PX92BXvxsydR26vi7/30yy9Ru+EgAhrexq/R58MkhqGZQ67Cq5LJjN9khjSL4EVu1V Vumb0c5eJoc41bCXFcuUMQYbikdnQ8/a0asfS1Jb6bZX9ItHOj/WvFO+Ya4xLQHBssIZ FMwa0rQs8HhtV8/rHJBKAbWCgq8gNYyJRVSwdyrGPvYon31ObQerdwXi88lXptEyjJCH mdyPrpECKnwEKOcR8hNfCokWkBj0fUb9OvqpdKn0RH+U5ycnViDegKdyakOh8G+7Nli8 AmQEHFlL1+VBmAdBNj2GIcYD3Rw8BuKrpq58FcVgjSr7ec5V7r5d566CNrs//1ettuNK 2fcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687194879; x=1689786879; 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=XAzDJYHeZ3egsdpPxn+zZy7ksHc4V1jiKHsxofssT6o=; b=iECefbOD5Cn+axk3aiIX8a2BvoKpxBP570e4Gw6u+DBAJS4+7LYN6rgCRHp3bmC6Ph LEH3ivF1EHYdmhEpASBp0fHaflzKlqEIlO6U2iks9ABA/nY0yqMVIQ0WTRzDhyxGDb75 gxIWVCCn4BQFXG1HhlB5JN39xnYU5AW60ZunCExlrDPEXSgJIdjr6NmacLnzuMjJQP/f taLBruq7orU75M5ga63az/42ibvFcWdQXDFlnRn5wp0USj9K2lqNiISWx/f29yq55Wpk 4ES1uu5gyl7okrQNjGc7n8qaQdBMibLZwaje0jBV8UQmTvZGH6TCGJ0IGaCR6UtIDSKf 0N5w== X-Gm-Message-State: AC+VfDw2044ZkFL7yPdRzdqir1tscheZkQIcP0uZrlojzFLSS7LAXJGi ztlY+Eh3wWm8PAZjru5tB0gaNA== X-Received: by 2002:a7b:cb87:0:b0:3f7:e4d7:4469 with SMTP id m7-20020a7bcb87000000b003f7e4d74469mr7283058wmi.41.1687194879501; Mon, 19 Jun 2023 10:14:39 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id k4-20020a05600c0b4400b003f727764b10sm296549wmr.4.2023.06.19.10.14.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jun 2023 10:14:38 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 969C31FFBD; Mon, 19 Jun 2023 18:14:37 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Paolo Bonzini , Markus Armbruster , Peter Xu , Mark Cave-Ayland , Peter Maydell , Juan Quintela , Richard Henderson , Leonardo Bras , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH 2/5] include/migration: mark vmstate_register() as a legacy function Date: Mon, 19 Jun 2023 18:14:34 +0100 Message-Id: <20230619171437.357374-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230619171437.357374-1-alex.bennee@linaro.org> References: <20230619171437.357374-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32e.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. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Peter Xu Reviewed-by: Juan Quintela --- include/migration/vmstate.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 084f5e784a..35579b2c1f 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -1209,7 +1209,14 @@ 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)