From patchwork Sun Jan 17 19:24:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 12025705 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 C6560C433E6 for ; Sun, 17 Jan 2021 19:36:48 +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 7C888207B5 for ; Sun, 17 Jan 2021 19:36:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C888207B5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:40556 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1Dqx-0001Uz-Ja for qemu-devel@archiver.kernel.org; Sun, 17 Jan 2021 14:36:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1DhB-0000KT-RQ; Sun, 17 Jan 2021 14:26:42 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:55547) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1DhA-0005cM-Fc; Sun, 17 Jan 2021 14:26:41 -0500 Received: by mail-wm1-x32b.google.com with SMTP id c124so11719241wma.5; Sun, 17 Jan 2021 11:26:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D/vhGf9tYrzI/+Qv47CWtkJxcBt3ZEhYVSaLznm82dE=; b=dDIS/7Ww+gYmBQD8IMElHJNn7JWSXIxRghqGgbo8cMyxwhw8p/6ubLO11lw+vm1ZQ2 UqqHLYgUegb0abI5GEcwCObm3ghvemj1qkIY9BWUUpsuc3nBY1fIR/5egA46QCzJpq35 YJQclTTYuUqdvZXRJdbSN3tn56EW9NfesLJaMLMXDaPPkk39A5cak7kHtnv/DJmGiEIe BCYLb69WO7aLof7gZKSu2Dgs5ZiWtWGYEGSU7MrLm1rf16ioj+u7Ckxh8gVoPGHA3trD tVed2SiZPpXpVTRpAdMFFkMSRsdt48VTaXD9guI/2L+4SqYbTEd8DbKlwJwfL6cijqzk wmgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=D/vhGf9tYrzI/+Qv47CWtkJxcBt3ZEhYVSaLznm82dE=; b=LhSVJ5HiIoV5l9Srbs5EPezIrD9Z31JYO+BaXj/NMMD+sErx2eCq4ARbuR5jykyG18 aHHKSyV4AULcULswq4COUcU8B6RXWzpyJbEeUyD+u+dcMzYcoauDM7TQgLO1MSddtNOm 4Y6YAY0837/a5iEl/agriIHXDzqe7PeZTCDgY9P3Zk/NFrcDdEoX1yVS85otYsY8FNop G3AFgSZiihD6jQ2Ia44NXkZLIdzW/+lz/VHeNpGkiuCv7pS1GFItSFSuY4/ROiCxjMPd D8+3wBgOwnRP9Fv8QW2Rr4fAziRPa1qS2f6Gg+IpFG5NDBI3lrNOSUKOekrPdFapOsbB eQew== X-Gm-Message-State: AOAM532Ven8f5L4zXl2b7k0x8S+cpOSBIGlFaGsq8CJhROb2BIqeeiG3 8VFDFHlehOgPi9kcru0V5Kc= X-Google-Smtp-Source: ABdhPJzIcaeD79hTA/Hun2LIAf5jPVodgZiUbtt9nKaY6Exb5IX56l+RDcFbxAto+c8yERamWN+R+w== X-Received: by 2002:a05:600c:255:: with SMTP id 21mr17520686wmj.69.1610911599053; Sun, 17 Jan 2021 11:26:39 -0800 (PST) Received: from localhost.localdomain (13.red-83-57-169.dynamicip.rima-tde.net. [83.57.169.13]) by smtp.gmail.com with ESMTPSA id j7sm21720217wmb.40.2021.01.17.11.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jan 2021 11:26:38 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: "Dr. David Alan Gilbert" , qemu-devel@nongnu.org Subject: [RFC PATCH v2 20/20] migration/vmstate: Simplify vmstate for user-mode CPU Date: Sun, 17 Jan 2021 20:24:46 +0100 Message-Id: <20210117192446.23753-21-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210117192446.23753-1-f4bug@amsat.org> References: <20210117192446.23753-1-f4bug@amsat.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?utf-8?q?Daniel_P=2E_Berrang?= =?utf-8?q?=C3=A9?= , Eduardo Habkost , Juan Quintela , Andrew Jeffery , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Mark Cave-Ayland , Joel Stanley , Andrew Baumann , Subbaraya Sundeep , Laurent Vivier , qemu-arm@nongnu.org, =?utf-8?q?C=C3=A9d?= =?utf-8?q?ric_Le_Goater?= , Paolo Bonzini , Artyom Tarasenko , Gerd Hoffmann Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" User-mode wants an empty vmstate for the CPUs. We can use the generic vmstate_no_state_to_migrate object which is the same. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 2 +- include/migration/vmstate.h | 3 --- stubs/vmstate.c | 9 --------- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index c79a58db9b9..01e75cc7403 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -1132,7 +1132,7 @@ bool target_words_bigendian(void); #ifdef CONFIG_SOFTMMU extern const VMStateDescription vmstate_cpu_common; #else -#define vmstate_cpu_common vmstate_user_mode_cpu_dummy +#define vmstate_cpu_common vmstate_no_state_to_migrate #endif #define VMSTATE_CPU() { \ diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index 50559598eac..dfe20b5caa1 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -194,9 +194,6 @@ struct VMStateDescription { const VMStateDescription **subsections; }; -#if defined(CONFIG_USER_ONLY) -extern const VMStateDescription vmstate_user_mode_cpu_dummy; -#endif extern const VMStateDescription vmstate_no_state_to_migrate; extern const VMStateInfo vmstate_info_bool; diff --git a/stubs/vmstate.c b/stubs/vmstate.c index 1d0e03e233b..c360a929f60 100644 --- a/stubs/vmstate.c +++ b/stubs/vmstate.c @@ -1,15 +1,6 @@ #include "qemu/osdep.h" #include "migration/vmstate.h" -#if defined(CONFIG_USER_ONLY) -const VMStateDescription vmstate_user_mode_cpu_dummy = { - .name = "cpu_common_user", - .fields = (VMStateField[]) { - VMSTATE_END_OF_LIST() - }, -}; -#endif - const VMStateDescription vmstate_no_state_to_migrate = { .name = "empty-state", .fields = (VMStateField[]) {