From patchwork Fri Mar 8 18:20:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Auger X-Patchwork-Id: 1053644 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44GG715gTwz9sBb for ; Sat, 9 Mar 2019 05:22:05 +1100 (AEDT) Received: from localhost ([127.0.0.1]:48105 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2K8B-0000Sx-84 for incoming@patchwork.ozlabs.org; Fri, 08 Mar 2019 13:22:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2K7R-0000S7-VV for qemu-devel@nongnu.org; Fri, 08 Mar 2019 13:21:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h2K7O-0008C0-6V for qemu-devel@nongnu.org; Fri, 08 Mar 2019 13:21:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55614) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h2K7I-00088U-Hl; Fri, 08 Mar 2019 13:21:08 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 494363091752; Fri, 8 Mar 2019 18:21:07 +0000 (UTC) Received: from laptop.redhat.com (ovpn-116-102.ams2.redhat.com [10.36.116.102]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7EE15D787; Fri, 8 Mar 2019 18:20:57 +0000 (UTC) From: Eric Auger To: eric.auger.pro@gmail.com, eric.auger@redhat.com, qemu-devel@nongnu.org, qemu-arm@nongnu.org, peter.maydell@linaro.org, shameerali.kolothum.thodi@huawei.com, imammedo@redhat.com, david@redhat.com, pbonzini@redhat.com, ehabkost@redhat.com, richard.henderson@linaro.org, sbhat@linux.ibm.com, philmd@redhat.com Date: Fri, 8 Mar 2019 19:20:51 +0100 Message-Id: <20190308182053.5487-1-eric.auger@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Fri, 08 Mar 2019 18:21:07 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v4 0/2] machine: Move nvdimms state into struct MachineState 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: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" As NVDIMM support is looming for ARM and SPAPR, let's move the acpi_nvdimm_state to the generic machine struct instead of duplicating the same code in several machines. nvdimm and nvdimm-persistence become generic machine options. They become guarded by a nvdimm_supported machine class member. Best regards Eric https://github.com/eauger/qemu/tree/nvdimms_state_v4 Eric Auger (2): nvdimm: Rename AcpiNVDIMMState into NVDIMMState machine: Move nvdimms state into struct MachineState hw/acpi/nvdimm.c | 18 ++++++------ hw/core/machine.c | 65 +++++++++++++++++++++++++++++++++++++++++ hw/i386/acpi-build.c | 6 ++-- hw/i386/pc.c | 57 ++++-------------------------------- hw/i386/pc_piix.c | 4 +-- hw/i386/pc_q35.c | 4 +-- include/hw/boards.h | 2 ++ include/hw/i386/pc.h | 4 --- include/hw/mem/nvdimm.h | 10 +++---- 9 files changed, 93 insertions(+), 77 deletions(-)