From patchwork Thu Feb 28 18:17:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 159410 Delivered-To: patch@linaro.org Received: by 2002:ac9:18c7:0:0:0:0:0 with SMTP id i7csp979666oce; Thu, 28 Feb 2019 10:24:20 -0800 (PST) X-Google-Smtp-Source: APXvYqz15h/3OAAvX0VcoMwW8L0FLeCIBXQuOhAeR0UKacvj+xk+xrp1NOPnS/60LYgPPZuOf0H7 X-Received: by 2002:a5b:f4a:: with SMTP id y10mr771602ybr.322.1551378260712; Thu, 28 Feb 2019 10:24:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551378260; cv=none; d=google.com; s=arc-20160816; b=TTgQxj63omvLESN95y+Ywd+XxWXYZX5Pks8Z/hJu55J6dH2n3Tp9zvlkStyVSMZORO ZACYvSNvll8sf6QYZs5uOa22zXiJl3hHP0iH54dPcuXTkQyssMuCTTyfrmCPCO00dq2X pSnOSSoZZ1/ApMhpAnyfDxd+ih6/wbXXgSYDUJEIoJoNeV5JLiWRWNyVIWm2+TxzZ0zf 9sQIDkI1A0bXfcUg65Y7CY8qTCREi9LslsMkjvuF74zPShfjR6Fttz7s8oub2EvEZ0RX w5ZIz7++gZuO+G3Px7s7kdR4UdgbKxRSaNzishIf7Ap7KwB4CeFPMmoWkt2Gu1hRKKQf GuVg== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=EwSqbdRnTzTl3dmEwc+GEA5GXiTvpVaCpm03V40SbgQ=; b=o2k2NTBar4tq3e+82DWNc6ZBWcLFNjdPM8wZjzuLVEnHI9bVBNnicG9MJr2O+DKmpP vH/A+TFy1FGixJwU67/Bqu0andJKfv7b4N8oXyKrzsBB1nzqB6YPdKafuraPc4D5lpXp ycMfl+TutCS33wxr9R8CEKjN88o+G9vIx/IADHb3B3F4pJR5A2Qmk+2/pwuq+xmrHVAt uxzIsVvPSYe1Cjt3EZdJ+gJhBdfsaCP83Tcmz39otDW3owWNGUP9NjdDgLEQJyT4swz+ 2oVj8djqs6n7K7e9C9R68UjiGZcUtNGGQpBLzgd/Ty5jOp06aJcPyFF24XkKMpJnv3gk OUbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b="h/f4yUDl"; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l12si10773577ybp.102.2019.02.28.10.24.20 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 28 Feb 2019 10:24:20 -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=fail header.i=@gmail.com header.s=20161025 header.b="h/f4yUDl"; 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" Received: from localhost ([127.0.0.1]:44568 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzQM0-00052A-5f for patch@linaro.org; Thu, 28 Feb 2019 13:24:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzQFk-0000Yu-8R for qemu-devel@nongnu.org; Thu, 28 Feb 2019 13:18:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzQFV-0002H7-2l for qemu-devel@nongnu.org; Thu, 28 Feb 2019 13:17:52 -0500 Received: from mail-oi1-x243.google.com ([2607:f8b0:4864:20::243]:33098) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gzQFU-0002Br-PY for qemu-devel@nongnu.org; Thu, 28 Feb 2019 13:17:37 -0500 Received: by mail-oi1-x243.google.com with SMTP id z14so17318475oid.0 for ; Thu, 28 Feb 2019 10:17:24 -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; bh=EwSqbdRnTzTl3dmEwc+GEA5GXiTvpVaCpm03V40SbgQ=; b=h/f4yUDlskoACyDV1GLxPBrEm2BVPSuVNYy5ur5DR7k9CrUHbAHIdyBLjtHnsVjUxy o7H+ubD/8Ve5HNkhVR4a3I7fi+oc3rqFNYCgqmS4DgoQtaG/6+aB8gzrDQU4/J1AqCUe ieaBtay4Cd1H03mJEuqnalv12IWJQG5SXGMZplIlO+bQeKUWddYtQl8qe4kFktqAKQH0 dGPij+j4A57ZyN0ClhCfNPBS842xKkJAWBNxj0ivPdijfKY5n7lKr3pQk+A0oYaCO/p4 ZdNV1v2qRATpIbOk3IZojVX7rCLg2aoJx5WQfshedyQE9TaOHUAc2ePoBO8GhrXXtr0y weoA== 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; bh=EwSqbdRnTzTl3dmEwc+GEA5GXiTvpVaCpm03V40SbgQ=; b=DF09YYM/e3gDcQRVc9uMzl5r7AlaDCqIrWwDpdTDoFxqdg+zq1ZmusqSdG11/q3uck uhfmjhsFuie/nuE2N4QnCYjvl/9wFsZJLn1I/+EncSCjvr4crih9i3w6Hc6yFmjUiOwx 8vfoOgbO6icomXcmOwD7AzUWlJ1ufALEBU27v7N51h2jF6dBca5xes3cSHFRNhCrJf8B ZVfa6erw6qpsVOxlXpKrT+uwDiH0NM47l+4vLToR4RedpqzFbNz9f28hRYO4uLerFoZ5 gGrIWkokDd5P+KA3OdTuvoSRxOaYRwYgFq6UqV0zxdl9tom3te7JY/EWWwnCVJD2dmpy p/dA== X-Gm-Message-State: APjAAAXonglujilvTreC+8KO7Orhqy/fYZgFy7xLwml+0M2+PH2kbDp7 0uBW2WG0PS6GANqNRF3Ivw== X-Received: by 2002:aca:60c1:: with SMTP id u184mr667831oib.45.1551377843814; Thu, 28 Feb 2019 10:17:23 -0800 (PST) Received: from serve.minyard.net (serve.minyard.net. [2001:470:b8f6:1b::1]) by smtp.gmail.com with ESMTPSA id y19sm7513960oih.42.2019.02.28.10.17.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Feb 2019 10:17:17 -0800 (PST) Received: from t430.minyard.net (unknown [IPv6:2001:470:b8f6:1b:b89e:c7bf:12ab:ad14]) by serve.minyard.net (Postfix) with ESMTPA id 26FF01808FA; Thu, 28 Feb 2019 18:17:14 +0000 (UTC) Received: by t430.minyard.net (Postfix, from userid 1000) id 1729B3028D0; Thu, 28 Feb 2019 12:17:14 -0600 (CST) From: minyard@acm.org To: Peter Maydell Date: Thu, 28 Feb 2019 12:17:01 -0600 Message-Id: <20190228181710.2477-11-minyard@acm.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190228181710.2477-1-minyard@acm.org> References: <20190228181710.2477-1-minyard@acm.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::243 Subject: [Qemu-devel] [PULL 10/19] boards.h: Ignore migration for SMBus devices on older machines X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corey Minyard , QEMU Developers , minyard@acm.org, Eduardo Habkost Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Corey Minyard Migration capability is being added for pm_smbus and SMBus devices. This change will allow backwards compatibility to be kept when migrating back to an old qemu version. Add a bool to the machine class tho keep smbus migration from happening. Future changes will use this. Signed-off-by: Corey Minyard Cc: Eduardo Habkost Cc: Marcel Apfelbaum Reviewed-by: Dr. David Alan Gilbert --- hw/i386/pc_piix.c | 1 + hw/i386/pc_q35.c | 1 + include/hw/boards.h | 1 + 3 files changed, 3 insertions(+) -- 2.17.1 diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 3e9037a19a..8770ecada9 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -444,6 +444,7 @@ static void pc_i440fx_3_1_machine_options(MachineClass *m) pc_i440fx_4_0_machine_options(m); m->is_default = 0; + m->smbus_no_migration_support = true; m->alias = NULL; pcmc->pvh_enabled = false; compat_props_add(m->compat_props, hw_compat_3_1, hw_compat_3_1_len); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 503eeb46f5..cfb9043e12 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -380,6 +380,7 @@ static void pc_q35_3_1_machine_options(MachineClass *m) pc_q35_4_0_machine_options(m); m->default_kernel_irqchip_split = false; + m->smbus_no_migration_support = true; m->alias = NULL; pcmc->pvh_enabled = false; compat_props_add(m->compat_props, hw_compat_3_1, hw_compat_3_1_len); diff --git a/include/hw/boards.h b/include/hw/boards.h index 05f9f45c3d..21212f0859 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -206,6 +206,7 @@ struct MachineClass { void (*numa_auto_assign_ram)(MachineClass *mc, NodeInfo *nodes, int nb_nodes, ram_addr_t size); bool ignore_boot_device_suffixes; + bool smbus_no_migration_support; HotplugHandler *(*get_hotplug_handler)(MachineState *machine, DeviceState *dev);