From patchwork Thu Jun 20 13:10:07 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: 252911 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 8214C2C02A9 for ; Thu, 20 Jun 2013 23:11:44 +1000 (EST) Received: from localhost ([::1]:41714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpeeM-0001sM-Gs for incoming@patchwork.ozlabs.org; Thu, 20 Jun 2013 09:11:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UpecE-0007Zd-7s for qemu-devel@nongnu.org; Thu, 20 Jun 2013 09:09:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Upec7-00084y-UG for qemu-devel@nongnu.org; Thu, 20 Jun 2013 09:09:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:14077) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Upec7-00084o-N3 for qemu-devel@nongnu.org; Thu, 20 Jun 2013 09:09:23 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5KD9NrL013081 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 20 Jun 2013 09:09:23 -0400 Received: from redhat.com (vpn-200-33.tlv.redhat.com [10.35.200.33]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id r5KD9JHr024357; Thu, 20 Jun 2013 09:09:21 -0400 Date: Thu, 20 Jun 2013 16:10:07 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1371730033-5554-5-git-send-email-mst@redhat.com> References: <1371730033-5554-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1371730033-5554-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 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 04/21] 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 d87da95..234424a 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -268,38 +268,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 */