From patchwork Fri Jan 15 20:12:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 363762 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp177879jap; Fri, 15 Jan 2021 12:22:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQEA6rsMFo5JqMRPQqw9Z0HQcoNcuKBnB3s69LXQ3Es9tIEE/fnagaxC4+JzQXYB8Tb5ug X-Received: by 2002:a25:4d05:: with SMTP id a5mr19999244ybb.429.1610742126941; Fri, 15 Jan 2021 12:22:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610742126; cv=none; d=google.com; s=arc-20160816; b=03cxZeJAf0m6dlQDZ+S7YmdOVnaMMcdcuAJg+7fY/JmoGCHCDNiGqmo7sKhYtq8oQH lB950zIkJm7FeKTszKyUMfP8P96y6ps4hvf3tlA7+8b3Xf39YK/08MT5EOWYnMAWsmim Vel2XARqzNDKST7RlMhL3wKdugM9OfFYqQnkm4IJZVLw1klDhUXZWuvcbQfyPyvuDdBV IYIVhl6Ovz8RqJEl1KDNYDK5nX7BUMR3tPVYcqN0tp0mppgxZZhKLOPcHF+jvYdZ1x2g fovxliUVa+FVb2l0XEKyGcf5Em74ygmIy/a7Gp9fhwnjUcNRor4rmOcMxy6AYOm6LHML G8uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=Dg8m2zopNi5seDJ3Lmhy2PyjbDdEnmQIoHpz7Tv3WJ0=; b=YYpTJSoW584EcggIPlbssyHxU+H+/70eLPlCtuHz3rtWzOL3TClrOYXDgMHmg/xmOm CezM7Yb+DMr6Lq8V57jQlPvWiCOMwOJY4GUbCr0kwSRZZIGeolBPrAOy1urF5yVMPSS4 8oDDI+368jxoowKBPBPkgvvDZr2gkA4G9+Ov0mJQ35OLS2OJJMjrRXSHeX0ze58V6NoI BgSHEp1/6QYcCI8wHELUNYSAWBm+JcGc0Q31l8goHkuOPWcdUDJZ8AD+IVekiwx2UgS3 KgAq1XQkamYSr0YIYvlAYs+nO1j+wZp3LCHw3lbEtlRuzHpnw3FsVmBp8ReWy6GNDDgg 6Xog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=An9KiHFN; 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 j63si8701343ybb.463.2021.01.15.12.22.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Jan 2021 12:22:06 -0800 (PST) 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=An9KiHFN; 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]:43668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l0Vbi-00075k-D1 for patch@linaro.org; Fri, 15 Jan 2021 15:22:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47770) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l0VSJ-00061D-4n for qemu-devel@nongnu.org; Fri, 15 Jan 2021 15:12:23 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:39605) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l0VSH-0008KT-G4 for qemu-devel@nongnu.org; Fri, 15 Jan 2021 15:12:22 -0500 Received: by mail-wr1-x42c.google.com with SMTP id c5so10489855wrp.6 for ; Fri, 15 Jan 2021 12:12:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Dg8m2zopNi5seDJ3Lmhy2PyjbDdEnmQIoHpz7Tv3WJ0=; b=An9KiHFNFETVmRotcwHqKM+RF+JovbGf2v9i085a+6hxTkNGR6ruM83Joq8QEuWxWu qpX54O7tszG32oU6D59VDPkFQbJSb6te+bELwZwbU/LWiEAvtZ6c8RuvOHXW9Gh4q5n6 jOCCdlnqG90l2ckHRbaldMOYBPS9Z5enEYBXNefM8MfpWlHUINoELvmJ3jzfzKlChZN+ mtXMCMrJmp6gJcxhOynRbG7/aM0pTxQKaKiiffa6Noo733vwDfnTZJbm4fdjoRAbzBix IqK4515OpETRlmLloLPo+cUswdDGtTTpPw/Kqcn4JETBD3KZj1rG3m29IGSQKq+BZwKk ppPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Dg8m2zopNi5seDJ3Lmhy2PyjbDdEnmQIoHpz7Tv3WJ0=; b=KK3qmDihRY2DPqA84peBdu5Kp1oIK298bA3EOCGFiFzEcZkzKPwWv+PaM3p5hC7/tO AiJtwJdbrIn2X2Cvo9b7UAJS8IfU9s9aClNO2p5cpHQrDm3iSgDBNsrx0cx21Fg0Eb+U Is4V/tXolDC68ZRfQnrImhTmZTky2EFFeIv6LqEnP6YxoG/tmdmPYssq0vS/c7+CULah laXjQM4XZpr16qGa6A0Ab6J6TcJEXwnDluERUSjZh80mg9RkBIqLxjSFigjhjjLCIBdq eRkwCRIMgt//WpOpT+GA+jATueDkm115yOsOH03Ismj2fJv9lpjUIY8jeabyKmRxt7RB Z/vw== X-Gm-Message-State: AOAM5330YEWSf0kqUXtMg3ZtOVZkLw1t5022+1z3EiKszD1W5n6vvOL4 fG23Ay/frcE8THc/pqSL75ow2q07IyLlrA== X-Received: by 2002:a5d:6d06:: with SMTP id e6mr15033769wrq.425.1610741539913; Fri, 15 Jan 2021 12:12:19 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id b3sm10353807wrn.70.2021.01.15.12.12.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 12:12:19 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PATCH 10/11] hw/m68k/next-cube: Add vmstate for NeXTPC device Date: Fri, 15 Jan 2021 20:12:05 +0000 Message-Id: <20210115201206.17347-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115201206.17347-1-peter.maydell@linaro.org> References: <20210115201206.17347-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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 autolearn=ham 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: Thomas Huth , Laurent Vivier Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Add the vmstate for the new NeXTPC devic; this is in theory a migration compatibility break, but this machine doesn't have working migration currently anyway. Signed-off-by: Peter Maydell --- hw/m68k/next-cube.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) -- 2.20.1 Acked-by: Thomas Huth diff --git a/hw/m68k/next-cube.c b/hw/m68k/next-cube.c index dd0a2a5aea0..9eb1e31752b 100644 --- a/hw/m68k/next-cube.c +++ b/hw/m68k/next-cube.c @@ -28,6 +28,7 @@ #include "qapi/error.h" #include "ui/console.h" #include "target/m68k/cpu.h" +#include "migration/vmstate.h" /* #define DEBUG_NEXT */ #ifdef DEBUG_NEXT @@ -890,6 +891,37 @@ static Property next_pc_properties[] = { DEFINE_PROP_END_OF_LIST(), }; +static const VMStateDescription next_rtc_vmstate = { + .name = "next-rtc", + .version_id = 1, + .minimum_version_id = 1, + .fields = (VMStateField[]) { + VMSTATE_UINT8_ARRAY(ram, NextRtc, 32), + VMSTATE_UINT8(command, NextRtc), + VMSTATE_UINT8(value, NextRtc), + VMSTATE_UINT8(status, NextRtc), + VMSTATE_UINT8(control, NextRtc), + VMSTATE_UINT8(retval, NextRtc), + VMSTATE_END_OF_LIST() + }, +}; + +static const VMStateDescription next_pc_vmstate = { + .name = "next-pc", + .version_id = 1, + .minimum_version_id = 1, + .fields = (VMStateField[]) { + VMSTATE_UINT32(scr1, NeXTPC), + VMSTATE_UINT32(scr2, NeXTPC), + VMSTATE_UINT32(int_mask, NeXTPC), + VMSTATE_UINT32(int_status, NeXTPC), + VMSTATE_UINT8(scsi_csr_1, NeXTPC), + VMSTATE_UINT8(scsi_csr_2, NeXTPC), + VMSTATE_STRUCT(rtc, NeXTPC, 0, next_rtc_vmstate, NextRtc), + VMSTATE_END_OF_LIST() + }, +}; + static void next_pc_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); @@ -898,7 +930,7 @@ static void next_pc_class_init(ObjectClass *klass, void *data) dc->realize = next_pc_realize; dc->reset = next_pc_reset; device_class_set_props(dc, next_pc_properties); - /* We will add the VMState in a later commit */ + dc->vmsd = &next_pc_vmstate; } static const TypeInfo next_pc_info = {