From patchwork Wed Feb 20 13:59:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 158816 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp5058586jaa; Wed, 20 Feb 2019 07:33:10 -0800 (PST) X-Google-Smtp-Source: AHgI3IZrH0djBHqHxim/ejT+Kdds+9Cohayo+T+q0B3F68ODxIk6m2+HIJmcJV0TgcTa+d2228+S X-Received: by 2002:a25:2d6e:: with SMTP id s46mr29368410ybe.503.1550676790142; Wed, 20 Feb 2019 07:33:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550676790; cv=none; d=google.com; s=arc-20160816; b=A5XLGtbWJh5Mu66JZNKy4s7szNY3KBQx5G/r/8QsVMgeb7pYg5vB/SR3JhpLtNaOoi xyajGPRHJWOs8H9xvb4uhvXuPSJldjekYH7Wh8fqpDrL18gNDnWM0cpHQyQdTmVGoOhx TZpIMU3Ph2MifN40vnpD4e15fEyMNJ2rf4M1xLko8cgOMgfmWCwzakWrskZwofRWCnj2 5iD9uKIWeuQPppCeFU1pXnSwqMLabAD7cNS6o2PeSt16Byx/mcvL/xY0n18/vwafRkVB 8dnSr4b7hU88waQ1jwrr9IUqK5GbuWiqgzeNmsebd/8KfiroXeHVZAlFvskc5tqsi6zO ZlPg== 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=VTOzNq/I/y0IaO+bg2mnNH4We+Bf8EBkQhlDviyiWMY=; b=bR4qdnAjjFlqQfACETYnO/sNu3hgvu5V8XT2deIoEo/bsI65wkGe+vmu0ej3wZLc8h MBab4dgE1hb4+iFTJnhyJDgmYAxg1bJDD5dqn1BntV3Fg5VQJnUKDuESCxwVqESvjUld spXjIkV1/b+s9cp46D8+NgBu4XmwGgqTQxQdqGr1EoLgigT+04s6YNSa9X2rqXlmcYdc ejkgVK2BIVzhd4p6wMnFAv0l9XGPTyphTV+W5h+nY4dxKSS0GB5j5VAVYVdk1Qi8Opwl ZzfIARDyz5glj1hYLNqq5apcKI5DtT+AHIHXAnabk7bGdlIu7NKmwivv1xdl9GZXbSvM SRRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Nup3nK6E; 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 x84si11552856ywa.79.2019.02.20.07.33.10 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 20 Feb 2019 07:33:10 -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=Nup3nK6E; 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]:40934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwTrx-0005nk-HK for patch@linaro.org; Wed, 20 Feb 2019 10:33:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwTlk-0001Y1-Vu for qemu-devel@nongnu.org; Wed, 20 Feb 2019 10:26:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwTlf-0008Iz-Nm for qemu-devel@nongnu.org; Wed, 20 Feb 2019 10:26:42 -0500 Received: from mail-ot1-x341.google.com ([2607:f8b0:4864:20::341]:36095) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gwTlb-00089j-QV for qemu-devel@nongnu.org; Wed, 20 Feb 2019 10:26:37 -0500 Received: by mail-ot1-x341.google.com with SMTP id v62so31907311otb.3 for ; Wed, 20 Feb 2019 07:26:15 -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=VTOzNq/I/y0IaO+bg2mnNH4We+Bf8EBkQhlDviyiWMY=; b=Nup3nK6EgWgPHq10CiqRSCcOewJlqUTV3afc755LBxx9Pd8L65TBr5pK0gKQ2K3wrM rTzhnAzOJ8n/zhgDu78/1uovT3YUZGmXyreClS++dRzuL2f2ioUHfeWh2CkSQ5blNsWg sT3VT6fcgKKpLFxv6xo7LQSK/DTgPd7t0q0OYpV5AJfuYQEa5FXVnvoWkSZXJhNzDEJz w6ma/+o5XvWUKkI6lfnESv/U8BWePTlfL07uYyBscKQ9BlCeWkHNrlliXbGaEWipykAx tfxY3rnJCNin+ZpCU4XB3fukjBf8xDCQdUNjuP6dHH3Sw+zqi4if2/8L3HAaoiIdsKYM 9+FA== 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=VTOzNq/I/y0IaO+bg2mnNH4We+Bf8EBkQhlDviyiWMY=; b=I/SKo3VFwGJLybeB0SqBsVsZE5oB6oTbmEIV4p6cpDOZ5zQW+/O4UG0tFvDNxyxG+s BYGk5ozNOr/DeIGqLjZ57LL5Pc3rOR3oXkHMLdILO/23gAU6Ez5y+z2j4aGtMRjii3lx jElVMhBhmUdAeQjZntB1hyTRtTNPYium/W+dPUggwbBq5zd6e1n9xny4X5BrRBnuaw3r ltuTCGcNre6s8ao1TMm/XOwMvs7cdSw++YOplAseK6ci10FodJQCTAOnCi5LFI0MFe7A Oloys1iuEeVtIWUCqteGmWbTnKovDuWVEw9RiKEy1iNO5vkp9tLFE9B/uJWf0XXRF1fv usUg== X-Gm-Message-State: AHQUAuZsZyc1uvLK5w9EWicF4OnRAACUi80+qekY8guDaU13pCzJ1JKK CPtFSmahQ5CsUCtts9IqS8I3BuwOuQ== X-Received: by 2002:a9d:5e02:: with SMTP id d2mr16181419oti.327.1550671216296; Wed, 20 Feb 2019 06:00:16 -0800 (PST) Received: from serve.minyard.net ([47.184.128.64]) by smtp.gmail.com with ESMTPSA id w18sm6432962otp.70.2019.02.20.06.00.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Feb 2019 06:00:12 -0800 (PST) Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id 7539E1808FA; Wed, 20 Feb 2019 14:00:10 +0000 (UTC) Received: by t430.minyard.net (Postfix, from userid 1000) id 44AF6302A62; Wed, 20 Feb 2019 08:00:09 -0600 (CST) From: minyard@acm.org To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 07:59:47 -0600 Message-Id: <20190220135956.22589-11-minyard@acm.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190220135956.22589-1-minyard@acm.org> References: <20190220135956.22589-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::341 Subject: [Qemu-devel] [PATCH 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" , "Dr . David Alan Gilbert" , 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..3bead1143f 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -442,6 +442,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; compat_props_add(m->compat_props, hw_compat_3_1, hw_compat_3_1_len); compat_props_add(m->compat_props, pc_compat_3_1, pc_compat_3_1_len); diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 1689885cac..f24ee74cc5 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -378,6 +378,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; compat_props_add(m->compat_props, hw_compat_3_1, hw_compat_3_1_len); compat_props_add(m->compat_props, pc_compat_3_1, pc_compat_3_1_len); 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);