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: 10684939 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 7E149109C for ; Thu, 15 Nov 2018 19:33:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 700442C8FD for ; Thu, 15 Nov 2018 19:33:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 623442CE9C; Thu, 15 Nov 2018 19:33:44 +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 F22E6288BD for ; Thu, 15 Nov 2018 19:33:43 +0000 (UTC) Received: from localhost ([::1]:40470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNNOZ-0002NO-5o for patchwork-qemu-devel@patchwork.kernel.org; Thu, 15 Nov 2018 14:33:43 -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-Google-Smtp-Source: AJdET5fTsCl0fiBxU3YTu3PEFYzS/BWqHaYjpxtLMtcP7aZ5kwPeU1Iv011EpEgRmR6O3HTQfY4kMA== 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+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 --- 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);