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: 10699131 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9202415A7 for ; Mon, 26 Nov 2018 20:26:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83DE82A27B for ; Mon, 26 Nov 2018 20:26:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77EFA2A336; Mon, 26 Nov 2018 20:26:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1EA582A332 for ; Mon, 26 Nov 2018 20:26:04 +0000 (UTC) Received: from localhost ([::1]:38669 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gRNSE-0003t0-Gp for patchwork-qemu-devel@patchwork.kernel.org; Mon, 26 Nov 2018 15:26:02 -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-Google-Smtp-Source: AJdET5e+i4o9AGWdTPD/0oHC70OIwtQLcXhRuGaVSuf9JHPy/ejHny1cT0EXKHdqJZrs5C0rNz7gBw== 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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(+) 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);