From patchwork Mon Jan 28 17:54:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 156837 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3726038jaa; Mon, 28 Jan 2019 10:11:09 -0800 (PST) X-Google-Smtp-Source: ALg8bN727XdgGxp31LG0VCqp5RqXoh4DJ8ek+VCEulx21GJwEPh1l5GL1gDT0Zg0I/QnGw3EA2cy X-Received: by 2002:adf:8421:: with SMTP id 30mr23434836wrf.153.1548699069371; Mon, 28 Jan 2019 10:11:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548699069; cv=none; d=google.com; s=arc-20160816; b=UWd3S5GWDKr1Wa1rbaGTcmgJ2u8KRqCVGRp9vlwSKxyPLXsgjaNTdj827TldbytoCM ixiZMH4dMiA0YpsTumfmQ5JvQwVdxmYk4aSjtbZOioTiVxDaaHzZbs0wJXwTafNHGLuI CQDAORC0SbrO6yFIVN6toBrQbCuO2ExZqvQvGFGv3HiORPTmGEP0b4j9HUY8TNRhordp SJ2RBZswomtviyXAuKaCVIuRAEkQzBPtUjXO4xL4HGm5KbG8oqCXYKkvJEX9e6IfBQMf c28fETY93DMC/ihkC8c61B0FPbhuz0EBZc/oN7HDPIAT2A6swopxWer9/0G+mzG6H+cL 4Ydw== 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=l40kzKz9JkmeTlxEE6dSQ+1ie3pa28hzwK8gTnRGwPg=; b=faB64uQuzept4LxVEFwm/cPF3m2f/TpBXjkDcy2NLwRbtwdrDPm3p6+L8Kn3k89XgT E/Y5/Ef3Hzi/e00yXhoUQtFrOitAsq2SetI9TKhg/LGTQEKmP2W+T3jctNzKMThJJ0I4 wLhRln7ZlAjN8ioIowi7orq5GJhL6HPracsBoUDlNb0WJZqLomsMnL6gd2pGpZATXrUC tIE9CWePCkCycd1WSnyN/T589/DCEI3cGwd9olDW3rRC4uPLI0o2rUb+TIiITBPiMk85 YEDU+BrnDLccE9Fsn8xnppZgQdHd/w14dp2mwSpAOmuUw73WhGAcA2uDQB4rww8LCgqm DLrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=IEPu7eA0; 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 m6si61325055wrp.29.2019.01.28.10.11.09 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 28 Jan 2019 10:11:09 -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=IEPu7eA0; 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]:36308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goBNE-0001Wq-7i for patch@linaro.org; Mon, 28 Jan 2019 13:11:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37045) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goBEC-0003Db-FW for qemu-devel@nongnu.org; Mon, 28 Jan 2019 13:01:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goB8V-0005ug-Ka for qemu-devel@nongnu.org; Mon, 28 Jan 2019 12:56:05 -0500 Received: from mail-io1-xd43.google.com ([2607:f8b0:4864:20::d43]:42314) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1goB8V-0005ZL-Dg for qemu-devel@nongnu.org; Mon, 28 Jan 2019 12:55:55 -0500 Received: by mail-io1-xd43.google.com with SMTP id x6so14214373ioa.9 for ; Mon, 28 Jan 2019 09:55:21 -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=l40kzKz9JkmeTlxEE6dSQ+1ie3pa28hzwK8gTnRGwPg=; b=IEPu7eA03x72+0UE/cJWjQwiqAmdpmxsWsl7Zvd8zrwBSsJbc4SvK7IM+y7gwyts5C hiI+wWLorIhd6it1Sj4IZ4+kS1SAhdG5wL4ZYlGjZMZH62urw/zRCSTsxIJVHa5yD6+P 1/d10QQ+Pd8CXi/lyMD/5uufjIS2K1Ysz10DJdhHO+5i10orQTmJUDMvujra+XONX0kQ D2DF278iVuNXVe9FR2ZvHzjue4F/4v/1pN5uSyiEp91PIjErl0E1o55KDkxS0irHd3iH Zd1GWs20Hpb934yvXJO+4dPeA+nUmeoRbNETB8RWyBM26t3ieZAuPdnzR9p5LHiVHMzS XtLg== 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=l40kzKz9JkmeTlxEE6dSQ+1ie3pa28hzwK8gTnRGwPg=; b=eIrWqkwqHyt2rcJmdxusczUp8zYdandPJjkz6o/Gk4L1WL9YHqW4suEDWpSLmXi/5m OCTNlCq7Ra2SkrWfhZrIEDdsZclYiaTazaipwyM47N/ofqjO/DcBHkGOPZAvpY4AZTRI 9UHBiMhA21VULhXI4qm/cEGeFPCyNJT0glwtM4LkDu0NKiY9TVVuPz19I1WRWjJdXuOd OFvdHo3x/rw2frXgIsjJmPZhYuvgj+vmaaxTEEPotYsZnuMgNPF1D+LJWbYI06jXwIUR tNIr3PO4g6rzGdHPM7EE+opXJ5sa0Uuw25s1SJ8teoU5IUPi+QSoj7fdTTY3rW05jMaZ sVzA== X-Gm-Message-State: AJcUukfhbkcsABuDG2FrUMKwYs8Wo7xPbKxINo/LWeC7KOyLjmndweue ymntUCDDCHQzwYu1kOsB8Q== X-Received: by 2002:a5d:81c3:: with SMTP id t3mr14317023iol.93.1548698120430; Mon, 28 Jan 2019 09:55:20 -0800 (PST) Received: from serve.minyard.net ([47.184.128.64]) by smtp.gmail.com with ESMTPSA id p20sm14065538ioh.0.2019.01.28.09.55.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Jan 2019 09:55:16 -0800 (PST) Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id 42E2CB5D; Mon, 28 Jan 2019 11:55:13 -0600 (CST) Received: by t430.minyard.net (Postfix, from userid 1000) id 7017E301160; Mon, 28 Jan 2019 11:55:08 -0600 (CST) From: minyard@acm.org To: qemu-devel@nongnu.org, "Dr . David Alan Gilbert" Date: Mon, 28 Jan 2019 11:54:49 -0600 Message-Id: <20190128175458.27255-11-minyard@acm.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190128175458.27255-1-minyard@acm.org> References: <20190128175458.27255-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::d43 Subject: [Qemu-devel] [PATCH v4 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: Peter Maydell , Eduardo Habkost , Corey Minyard , Corey Minyard , "Michael S . Tsirkin" , Paolo Bonzini 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 6ba163ccbb..a8331b82f2 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -431,6 +431,7 @@ static void pc_i440fx_machine_options(MachineClass *m) static void pc_i440fx_4_0_machine_options(MachineClass *m) { pc_i440fx_machine_options(m); + m->smbus_no_migration_support = true; m->alias = "pc"; m->is_default = 1; } diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 1689885cac..bafc73b2d9 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -368,6 +368,7 @@ static void pc_q35_machine_options(MachineClass *m) static void pc_q35_4_0_machine_options(MachineClass *m) { pc_q35_machine_options(m); + m->smbus_no_migration_support = true; m->alias = "q35"; } diff --git a/include/hw/boards.h b/include/hw/boards.h index 02f114085f..e7f7b85008 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -207,6 +207,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);