From patchwork Mon Nov 26 20:04:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corey Minyard X-Patchwork-Id: 152072 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp331137ljp; Mon, 26 Nov 2018 12:27:15 -0800 (PST) X-Google-Smtp-Source: AJdET5eIBjZ0jUM8uXBiFrXKcgF82HiJW1xG5bHiMWHRjGs8mMh+avWUf/KFhsz511krW/hYUAPu X-Received: by 2002:a81:99d6:: with SMTP id q205mr30729172ywg.106.1543264035579; Mon, 26 Nov 2018 12:27:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543264035; cv=none; d=google.com; s=arc-20160816; b=OnxbMGDWygWgwQwigO6EIRXX/YK4qeSx22JQfWMW2YrrOa/hbOPo8/hbWN7JLZwCU1 Kaf4eS89yujBMeQt/mYjRIa6VuDLRurEoTA2xT9k2dnKCO3k7nKNCCN5RSZ+L+HVd9Fs EG348X4JsQjEm5mIBR1fiVeAUZ/n0xlPDt3SWzmdhteGK9Q6uzEZp4lBNARAjGCYL/u8 Ma6CyPwt6dZKCIIyglKxwcsc/jswr0kbRIfBJfgHlgsCI6Hn/G+bnwW6iYCKp6YW68Ol EpL0THfy+t1VF591KiCbZ1Jnj+iT+TVxbMSrQ3HIc70OjmxM5xwJrosfuIrVOesO2ysk qdAw== 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=n61lOngJDgtWC+a1ASt3GrRo9Y8oOxyMG2MbAc03YDrCuqPfWKK7d1DJGkgQJ97v2n i/XtBZaF2zNIb7TsaTcMMPRNai+m3E+gukSLDaiuXNIRefiQFnMziZh1B6pANy7QzcsJ tGkbPEOXXtbok8FfVItEZnZx8eKftmOa5co0fuetGh0TFaeTDXkjced7O31tBu5e8m3Z SWe2+4ht6w2lGeuNS7Cbd2BUdvs10hcyLNgc9BdXUtf5Q2+MIlPbArMtUO+3w425RDA/ kCvXagND2CSpG2E5mzPzT7Cr/ykALC/Vx8lIL0h6uH7kyJL79zhxggo0adO6+QR0QaQR k/Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=EwGdpdnt; 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 h3si1097844ywj.84.2018.11.26.12.27.15 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 26 Nov 2018 12:27:15 -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=EwGdpdnt; 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]:38669 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRNTO-0003t0-Ol for patch@linaro.org; Mon, 26 Nov 2018 15:27:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53707) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRN81-0001lH-D6 for qemu-devel@nongnu.org; Mon, 26 Nov 2018 15:05:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gRN7y-0001KI-8T for qemu-devel@nongnu.org; Mon, 26 Nov 2018 15:05:09 -0500 Received: from mail-oi1-x241.google.com ([2607:f8b0:4864:20::241]:37220) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gRN7w-0001HZ-IJ for qemu-devel@nongnu.org; Mon, 26 Nov 2018 15:05:05 -0500 Received: by mail-oi1-x241.google.com with SMTP id y23so17080796oia.4 for ; Mon, 26 Nov 2018 12:04: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=EwGdpdntk4yBTZfboKslh8mB6ilvAY8ht5FUiHRNgO77KrmBoz1Tm5AKZPDl7/+o2C DLtHsyUMrw+vZivwt77A1Ek7DjP+RxwS6Ph6Df1hPs1inIULUBpq3sAJ5QMfILv4E/jv FjtBf2o4BJan5w8YLqBRRHFaosZpVNjva4VoYz5H5XrXCSez+kZyzbzy6vAWqQ+gSwe5 aq7ubm511Y9uYDouOOycMzw9RyYxHPWTvEi9to0iNWOclv/CYN7EzXQBXgAIt4o9UWTM OR+BThi5pErC1CN/opN2SvDSiOxaFWdnEpEYimqKe4h/crToeNzWh0eyvDYbQy7qZ4CO jA+A== 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=NSFWrdTZ3qOp6tfDe7s9cKb5TCzJnxh48+7fcvDwhUb9uGdS0BnOoA8Hd6DL+eCuYC Xg7XJVP4UdYKpxOL21TaOnIy+QCB38q1ktzx1Q19Sfiry8K/7Q4wMVxcGmoLs4yhInZc uAVKYA0MY/faGbDAu8SmUFnd2b6JXTYCT9iwig4LsHRGc1ZN4AoKyF0oPsXMkt7wB3N9 2lc1pnAy1r0NgehpGTn6h/sUwSSwxuFHvDHKgtJCi6m+GE6CFOhWth4l5YQWwtqsnjXD QNUL5YRiUgDFfbt8mKE5o+doOucFn2qUyZv2e9bNslX8YyPNDMurK2aloRsU4WRnNvKq Bw0Q== X-Gm-Message-State: AGRZ1gKMOB3phch9wKct/x/tqzruwp/7gl78s8cyN1qiijmgt6UDJYkT 1flo/sKZUeepkV66Sn79lw== X-Received: by 2002:aca:5587:: with SMTP id j129mr16615428oib.93.1543262697022; Mon, 26 Nov 2018 12:04:57 -0800 (PST) Received: from serve.minyard.net ([47.184.128.64]) by smtp.gmail.com with ESMTPSA id p129sm385400oif.17.2018.11.26.12.04.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 12:04:52 -0800 (PST) Received: from t430.minyard.net (t430m.minyard.net [192.168.27.3]) by serve.minyard.net (Postfix) with ESMTPA id 3AE2C1E53; Mon, 26 Nov 2018 14:04:49 -0600 (CST) Received: by t430.minyard.net (Postfix, from userid 1000) id 7BA35301469; Mon, 26 Nov 2018 14:04:46 -0600 (CST) From: minyard@acm.org To: qemu-devel@nongnu.org, "Dr . David Alan Gilbert" , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Peter Maydell Date: Mon, 26 Nov 2018 14:04:27 -0600 Message-Id: <20181126200435.23408-9-minyard@acm.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181126200435.23408-1-minyard@acm.org> References: <20181126200435.23408-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::241 Subject: [Qemu-devel] [PATCH v3 08/16] 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 , 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 --- 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 Reviewed-by: Dr. David Alan Gilbert 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);