From nobody Sat Apr 11 20:01:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1775075392; cv=none; d=zohomail.com; s=zohoarc; b=jiLkD4Z9HB5uqoA1/JP2GEHD/Xuhwei8TljS2fGOgPJkZGsSrevP8AwXVuQvkU4ejaPljNRc5BgTGhTtYbcoy1a3oJFIEsmtmWtniwGMM5YS6wb6jk+EGfmtAw5bG6uz3VoRnIlVEn0sC8bzsnSOc3ZrwpBuNKxH8fJeQ98xek8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1775075392; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=cqb2TTAmwxd+RL4JJIo+I7R0mtstkhAmAVuvztaMFd0=; b=nHpEv4uAEQgcpmai63oIbD7NUuPqgTcJQ2KFu5SOi2/UiIeg1fFI9Iwdt1/khaEIPC9sONRZ147axnYaCbEIDg8MYOEOJL69x4/arx/W0ep1cBtrtPpsErPT/Gz2+QjRKzreHI0yXpf/0fUu0g+LqLiQ8c4YqAFrcdJO8W9U5uQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1775075392777775.9196941097481; Wed, 1 Apr 2026 13:29:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w82BS-0004M9-WF; Wed, 01 Apr 2026 16:29:03 -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 1w82BP-0004Je-Hn for qemu-devel@nongnu.org; Wed, 01 Apr 2026 16:28:59 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1w82BO-00038s-3y for qemu-devel@nongnu.org; Wed, 01 Apr 2026 16:28:59 -0400 Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-616-ix3nJF6WMPmRrwySbQqqCA-1; Wed, 01 Apr 2026 16:28:55 -0400 Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-8cfbfac0e05so34139685a.1 for ; Wed, 01 Apr 2026 13:28:55 -0700 (PDT) Received: from x1.com ([142.189.10.167]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8d2a548a4efsm68194085a.8.2026.04.01.13.28.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2026 13:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1775075337; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cqb2TTAmwxd+RL4JJIo+I7R0mtstkhAmAVuvztaMFd0=; b=CUXxlMo3FldXypWKTn+6dF8lfTzlzKHAbAq0grzJu0ALELNg9FBeh+hst94BlXxLq8SUCB K0QRVuYppJxtCjoU2Euv7Ic3nRKCnJZC1dnZnYjVflnhfuMKU8DgAqV3UbPxBEWaQ5zqU2 YR8+8Ldeyc1aEbpOi7jgJUFwgndfUr8= X-MC-Unique: ix3nJF6WMPmRrwySbQqqCA-1 X-Mimecast-MFC-AGG-ID: ix3nJF6WMPmRrwySbQqqCA_1775075335 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1775075334; x=1775680134; darn=nongnu.org; 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=cqb2TTAmwxd+RL4JJIo+I7R0mtstkhAmAVuvztaMFd0=; b=Mcvy7cnQ3zyd1MJfEnoRCY34XCZVZLY9j/8K8xTqxMQiO5QfLVXPEd0qMCZuD7TMwk 3DPFsOBp6cfhZhhY/XmWVI2zMhU277EYU0sB9/IDwcg3J3jwD9J1Akw9mXUMFcKL1Dvz eV21shIOwrnDcGjaA48Rx0szNVy8dxG6fLEKgPd6aqnlftCBJ2rI/xgYUGGh6NF2Qtyi AlCnLhMLuxn1os/pEPClbyI9AX5IX3gY7V1puIsALcHhRCDimB2nprYjVZre6eM9E0Ck 8xSlo+3uDCpGhh/oUMM6md+67c95oef+OXcGSgvNRitqxLdAeYQ6gSpIQzBVnH2GKGv4 j5Qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775075334; x=1775680134; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=cqb2TTAmwxd+RL4JJIo+I7R0mtstkhAmAVuvztaMFd0=; b=EUYKvos3D+CrHsdicTiJB3zt2+O9Lws30vwsQnbTFt0TSF1biqOFkmitrSSc651P71 VowJgYF9qsoqKevCiEUyboym6i9lc6uI/4X29LwROINR/fqvk84Y2RVlW9/aXPXzzNTk Kyr+wKpTMoT82ptZ2vsORhPNBFwaAiGBx3dv9HD2c6terbfV4c79ygT66KXgaPUuGRtv IqVOtr0rFpJQPlVOIEvgeQfPBsAGyZFbjxIhOh5p+NgVsrGbWk+qXtz4IGIY5WrK0OKF HqpEvxzlAWlAav7JF9woO+QHf/eI7E6qeqRT+DRjZMkCLoNANw3UoxKVXdWcQO662ed0 ZyTg== X-Gm-Message-State: AOJu0YxzRsF6ABtlfxufgxLtx+w54Oxwv4Wi2bD3s4ujcgAseprO+Qyk 4AHNJAW0VzYGB2weOouFxbjiCWSfGVUZViiOTmOQfXR0vNsvxRc2Q+xDwrgSXvtF6jRQnMcKBma bVMf/wD16AMM3wa/9h+OLH6oozSvBuFuAGec/nYUcCWeOvy15R2Rng7+pQ6Ua6uqHaOaUHtJaaU LRl2rc9AE/1RqYAz8NVI8El+Am9okbhyAU0A1SNA== X-Gm-Gg: ATEYQzxfcvSQix+11BAFf9FqaW2OUxCUp0HxoPtwF7CQuRXQOlqlROMd8svckeKHFqP uwqsymXC5JrsWcXYHcudcHXyXceFu0w1N3TzKx7deZk077pYKIwWLQfNq/V0V00QT+6iTBLPuEl 9SJcgb3M2Bhlo7DM3mTI/PBMHiEkrazvUt57/0vgACnxrLeeBae5QX+Sl4SIQy8153L6fo8ljQK MIGI5m4SawqhIpSJpLK5+N+MjHHqHU6wjWUeHZpjVrOFiAr398dssS0GWkfi4TnXOOs4ADJCuK9 VdQAg0NYJFVFUmssD+syo6fwf3g3St6KYuR6bCIxzAfSIXdCp4P+2YApJS4l2sYafvRkKJjS/Oy Kv2GH5go5EM7lzeQoiWOU1PQpqyZc97soUou7RS5cIWA= X-Received: by 2002:a05:620a:d83:b0:8cf:d0bd:bc8c with SMTP id af79cd13be357-8d1aa3bf9admr1212628785a.12.1775075334356; Wed, 01 Apr 2026 13:28:54 -0700 (PDT) X-Received: by 2002:a05:620a:d83:b0:8cf:d0bd:bc8c with SMTP id af79cd13be357-8d1aa3bf9admr1212625185a.12.1775075333687; Wed, 01 Apr 2026 13:28:53 -0700 (PDT) From: Peter Xu To: qemu-devel@nongnu.org Cc: Juraj Marcin , Alexander Mikhalitsyn , Fabiano Rosas , Peter Xu , Alexander Mikhalitsyn , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 05/11] vmstate: Rename VMS_NULLPTR_MARKER to VMS_MARKER_PTR_NULL Date: Wed, 1 Apr 2026 16:28:38 -0400 Message-ID: <20260401202844.673494-6-peterx@redhat.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20260401202844.673494-1-peterx@redhat.com> References: <20260401202844.673494-1-peterx@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=1, RCVD_IN_VALIDITY_RPBL_BLOCKED=1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1775075394509154100 Prepare for a new MARKER for non-NULL pointer. Reviewed-by: Alexander Mikhalitsyn Reviewed-by: Fabiano Rosas Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Peter Xu --- include/migration/vmstate.h | 2 +- migration/vmstate-types.c | 4 ++-- tests/unit/test-vmstate.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 350e62a55a..7396e38531 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -283,7 +283,7 @@ extern const VMStateInfo vmstate_info_uint64; extern const VMStateInfo vmstate_info_fd; =20 /** Put this in the stream when migrating a null pointer.*/ -#define VMS_NULLPTR_MARKER (0x30U) /* '0' */ +#define VMS_MARKER_PTR_NULL (0x30U) /* '0' */ extern const VMStateInfo vmstate_info_nullptr; =20 extern const VMStateInfo vmstate_info_cpudouble; diff --git a/migration/vmstate-types.c b/migration/vmstate-types.c index 23f3433696..7622cf8f01 100644 --- a/migration/vmstate-types.c +++ b/migration/vmstate-types.c @@ -363,7 +363,7 @@ static bool load_nullptr(QEMUFile *f, void *pv, size_t = size, const VMStateField *field, Error **errp) =20 { - if (qemu_get_byte(f) =3D=3D VMS_NULLPTR_MARKER) { + if (qemu_get_byte(f) =3D=3D VMS_MARKER_PTR_NULL) { return true; } =20 @@ -377,7 +377,7 @@ static bool save_nullptr(QEMUFile *f, void *pv, size_t = size, =20 { if (pv =3D=3D NULL) { - qemu_put_byte(f, VMS_NULLPTR_MARKER); + qemu_put_byte(f, VMS_MARKER_PTR_NULL); return true; } =20 diff --git a/tests/unit/test-vmstate.c b/tests/unit/test-vmstate.c index 6a42cc1a4e..dae15786aa 100644 --- a/tests/unit/test-vmstate.c +++ b/tests/unit/test-vmstate.c @@ -620,7 +620,7 @@ static void test_arr_ptr_str_no0_load(void) =20 static uint8_t wire_arr_ptr_0[] =3D { 0x00, 0x00, 0x00, 0x00, - VMS_NULLPTR_MARKER, + VMS_MARKER_PTR_NULL, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, QEMU_VM_EOF --=20 2.50.1