From patchwork Sun Jul 7 20:19:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 257410 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E8B9E2C00A0 for ; Mon, 8 Jul 2013 06:19:17 +1000 (EST) Received: from localhost ([::1]:33074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvvQR-0006HC-Ba for incoming@patchwork.ozlabs.org; Sun, 07 Jul 2013 16:19:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvvPn-00066R-KR for qemu-devel@nongnu.org; Sun, 07 Jul 2013 16:18:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvvPk-000352-TE for qemu-devel@nongnu.org; Sun, 07 Jul 2013 16:18:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvvPk-00034x-M7 for qemu-devel@nongnu.org; Sun, 07 Jul 2013 16:18:32 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r67KIWvY026933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 7 Jul 2013 16:18:32 -0400 Received: from redhat.com (vpn1-7-187.ams2.redhat.com [10.36.7.187]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id r67KIUQ5015003; Sun, 7 Jul 2013 16:18:31 -0400 Date: Sun, 7 Jul 2013 23:19:46 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1373228271-31223-5-git-send-email-mst@redhat.com> References: <1373228271-31223-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1373228271-31223-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Anthony Liguori Subject: [Qemu-devel] [PULL v4 04/18] pc_piix: cleanup init compat handling X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 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-bounces+incoming=patchwork.ozlabs.org@nongnu.org Make sure 1.4 calls 1.5, 1.3 calls 1.4 etc. This way it's enough to add enough new compat hook in a single place in piix. Signed-off-by: Michael S. Tsirkin --- hw/i386/pc_piix.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 8a18dbe..e393022 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -270,38 +270,28 @@ static void pc_init_pci_1_5(QEMUMachineInitArgs *args) static void pc_init_pci_1_4(QEMUMachineInitArgs *args) { - has_pci_info = false; has_pvpanic = false; x86_cpu_compat_set_features("n270", FEAT_1_ECX, 0, CPUID_EXT_MOVBE); - pc_init_pci(args); + pc_init_pci_1_5(args); } static void pc_init_pci_1_3(QEMUMachineInitArgs *args) { - has_pci_info = false; enable_compat_apic_id_mode(); - has_pvpanic = false; - pc_init_pci(args); + pc_init_pci_1_4(args); } /* PC machine init function for pc-1.1 to pc-1.2 */ static void pc_init_pci_1_2(QEMUMachineInitArgs *args) { - has_pci_info = false; disable_kvm_pv_eoi(); - enable_compat_apic_id_mode(); - has_pvpanic = false; - pc_init_pci(args); + pc_init_pci_1_3(args); } /* PC machine init function for pc-0.14 to pc-1.0 */ static void pc_init_pci_1_0(QEMUMachineInitArgs *args) { - has_pci_info = false; - disable_kvm_pv_eoi(); - enable_compat_apic_id_mode(); - has_pvpanic = false; - pc_init_pci(args); + pc_init_pci_1_2(args); } /* PC init function for pc-0.10 to pc-0.13, and reused by xenfv */