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: 10822373 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 599CE13B5 for ; Wed, 20 Feb 2019 15:31:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4284E2ECAE for ; Wed, 20 Feb 2019 15:31:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 40D082ECAF; Wed, 20 Feb 2019 15:31:26 +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=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C7D2B2ECA4 for ; Wed, 20 Feb 2019 15:31:25 +0000 (UTC) Received: from localhost ([127.0.0.1]:40934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwTqG-0005nk-VV for patchwork-qemu-devel@patchwork.kernel.org; Wed, 20 Feb 2019 10:31:25 -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-Google-Smtp-Source: AHgI3IaP7zt1JmNpLZqNn4vY0nV7s50stbebir+phfVJiaBzX+W6brcCD1PVDogaT6Imm5/TDRG2kg== 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+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 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);