From patchwork Thu Nov 15 19:24:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 151249 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp7407702ljp; Thu, 15 Nov 2018 11:35:23 -0800 (PST) X-Google-Smtp-Source: AJdET5ch9dIk08NvLIjD+x+ZMawtpi7jkT9Xu0keekyj/dr3jgkOS77/PvLzDFYixKbPPOMTa8fO X-Received: by 2002:a37:10d4:: with SMTP id 81mr6975774qkq.19.1542310522667; Thu, 15 Nov 2018 11:35:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542310522; cv=none; d=google.com; s=arc-20160816; b=Qm5qhA5FVqruhnuP8j5J3IiAvI0wnQwhwsqPA43v+P6olF6sgYNc+RLwEQ1BtSCOka 06nmiCfWwpX6arYa2WnhcazpZQpXfArHMKO/zr+AAWlfMQr+/OoxKTbLHnPWUncco7GN 7v9uuRoqs9ADQRWgMtcUBDYD+ZvBaKgpTkMqjv7UkD/D9lGuHFI6kmbLP4odcuh5GuQw sEBDWBtrUxLflUYF5YniHBxVFJDELUYhYiZM9HhKewjjiBiwqRL/9BXco2CsaqU3ZzpF h35JqCIoPIRU6X3683c5fgPWzQCxlHJHjNvtpNa+0FUX/88Vy+YrjkmKa/HaYyguB09A xhmA== 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=cRBhv4VmvQ+OhG+OYUjMo6M15D0nY0e/wlhtzn44O6Q=; b=fqFrXcZY2A6EIEEw3kNNHzC5PLL7ZlLmj4Eri53vAn61xbRyKaThSdxX4c/P8X7IrC nIznMWkPHSBjhexTxIbXgNmEEkshSW+tULD3PO8kAmEBNXwBv8YNwLRj2Sa46Upg0e+/ ZXylsmTeWPH6ASLWIySBmEzoxBG2rcLF+CZcVa3D+ODKM37Ilo5WzTnDdUrBWMLjsMq4 5T2n1EBuwjJlTWSUpzXajIf8t95MQHPbzVsqs/tI66m+BTQXtzaoEjtaNRHXIuXYQ2h4 eywUwS/y1JIKug9gHmJ+OIirfjSERUf2JusT6O/EuxtnU9yUAY/Sa4M1CgIDD+6LHewb fsAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=OKK6iV80; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 34si3382449qvq.116.2018.11.15.11.35.22 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 15 Nov 2018 11:35:22 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=OKK6iV80; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1]:40470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNNQA-0002NO-3a for patch@linaro.org; Thu, 15 Nov 2018 14:35:22 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56234) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNNGI-0003WT-RC for qemu-devel@nongnu.org; Thu, 15 Nov 2018 14:25:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNNG9-00081z-ND for qemu-devel@nongnu.org; Thu, 15 Nov 2018 14:25:10 -0500 Received: from mail-ot1-x344.google.com ([2607:f8b0:4864:20::344]:36029) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gNNG7-000806-QP for qemu-devel@nongnu.org; Thu, 15 Nov 2018 14:25:00 -0500 Received: by mail-ot1-x344.google.com with SMTP id k98so19090368otk.3 for ; Thu, 15 Nov 2018 11:24:57 -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=cRBhv4VmvQ+OhG+OYUjMo6M15D0nY0e/wlhtzn44O6Q=; b=OKK6iV80adrP8Em5tDJT8coA6MJMPuxnLA6C6qrRO+6Mgg52lCwbkKx8kmAdZ5w/Ll cZxIedZp9zgC2UcJjSOQn+Uiw352vUvZYat/wnTgviIfPUM6fWzdNdzZJmiL+QOzZ10r U6h+IYC3B4tM0lG6mn5qn+JBpz8/0/cWTVN1+u8V4fMEoD+Ks4NqN2eDIrcPVxCEa9j4 4RN7ioF6rZKQsrAGsVIIqAA5Y0NLGsDa7nqiAbQefBXzHK7RFV20ZtmiI4RYJBuIB5eZ IbIAab6VsQWoc1/fkqNb0jiqogMZxu+Q7BYEn710SRLbFwqs0L27b1cf+i9eFlxOgZdj YuVw== 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=cRBhv4VmvQ+OhG+OYUjMo6M15D0nY0e/wlhtzn44O6Q=; b=Ktp/wk51TaLFll7ONGn7coI/GjExOPrP6n9jsXALCp/qqaPXeD6wCTF1KrdECDyQNS HMig0ja5mf21eUaliP7A/qVxX/J42n1DfB7mAssqt4CYEwhaV6x/UdVt3mGZ3TIperWN XX+DkG1oj7tXTQGlwtWlTEPR3LY/7n4LKgcjU4XELSf712sMcDfmN3yqC0GGdJfy+CuD 7eNI2veUugKaQxYvfFHFD6HkWIaf7OCR8gPEp3sQEBQjmZMo/e/WRomm2FrWkywJ4wVx 7LAfLvNfBLFPUV+3+CXtDdWLmIqqyhOwgKUCDmDOXD0o0ZcGL8UOwuqmDzBmw5T6G89E hfyA== X-Gm-Message-State: AGRZ1gL71AJcr0unBwW2/CEM8CF+8NxcSOG/T5Nbc3WIFXIgkzMBy/7X RxKS2jWPVXX5Ym0KD9XNoQ== X-Received: by 2002:a9d:43a6:: with SMTP id t38mr4554728ote.213.1542309896432; Thu, 15 Nov 2018 11:24:56 -0800 (PST) Received: from serve.minyard.net ([47.184.128.64]) by smtp.gmail.com with ESMTPSA id k19-v6sm7056220oic.45.2018.11.15.11.24.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Nov 2018 11:24:54 -0800 (PST) Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id DE41D107F; Thu, 15 Nov 2018 13:24:50 -0600 (CST) Received: by t430.minyard.net (Postfix, from userid 1000) id BBDC5301467; Thu, 15 Nov 2018 13:24:48 -0600 (CST) From: minyard@acm.org To: qemu-devel@nongnu.org Date: Thu, 15 Nov 2018 13:24:40 -0600 Message-Id: <20181115192446.17187-7-minyard@acm.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181115192446.17187-1-minyard@acm.org> References: <20181115192446.17187-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::344 Subject: [Qemu-devel] [PATCH v2 06/12] 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 , Eduardo Habkost , minyard@acm.org, "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 --- 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 cb28227cc3..3d1ccb1af1 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -443,6 +443,7 @@ static void pc_i440fx_2_12_machine_options(MachineClass *m) pc_i440fx_3_0_machine_options(m); m->is_default = 0; m->alias = NULL; + m->smbus_no_migration_support = true; SET_MACHINE_COMPAT(m, PC_COMPAT_2_12); } diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 90e88c9b28..0c6fca6a40 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -324,6 +324,7 @@ static void pc_q35_2_12_machine_options(MachineClass *m) { pc_q35_3_0_machine_options(m); m->alias = NULL; + m->smbus_no_migration_support = true; SET_MACHINE_COMPAT(m, PC_COMPAT_2_12); } diff --git a/include/hw/boards.h b/include/hw/boards.h index f82f28468b..65314fbe2a 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);