From patchwork Wed Dec 22 10:54:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaku Yamahata X-Patchwork-Id: 76385 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D118BB7063 for ; Wed, 22 Dec 2010 22:02:11 +1100 (EST) Received: from localhost ([127.0.0.1]:39894 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PVMSM-0006ke-OE for incoming@patchwork.ozlabs.org; Wed, 22 Dec 2010 06:02:06 -0500 Received: from [140.186.70.92] (port=56314 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PVMLR-0002JH-G4 for qemu-devel@nongnu.org; Wed, 22 Dec 2010 05:54:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PVMLP-0006YF-UX for qemu-devel@nongnu.org; Wed, 22 Dec 2010 05:54:57 -0500 Received: from mail.valinux.co.jp ([210.128.90.3]:34226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PVMLP-0006XX-DS for qemu-devel@nongnu.org; Wed, 22 Dec 2010 05:54:55 -0500 Received: from ps.local.valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by mail.valinux.co.jp (Postfix) with SMTP id 5C21528011; Wed, 22 Dec 2010 19:54:51 +0900 (JST) Received: (nullmailer pid 26808 invoked by uid 1000); Wed, 22 Dec 2010 10:54:50 -0000 From: Isaku Yamahata To: qemu-devel@nongnu.org Date: Wed, 22 Dec 2010 19:54:48 +0900 Message-Id: <3f830a5003cec50cecf87f9e3c58249169edfda9.1293015085.git.yamahata@valinux.co.jp> X-Mailer: git-send-email 1.7.1.1 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: clamav-milter 0.95.2 at va-mail.local.valinux.co.jp X-Virus-Status: Clean X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: yamahata@valinux.co.jp, mst@redhat.com Subject: [Qemu-devel] [PATCH 1/3] build, pci: remove QMP dependency on core PCI code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org by introducing pci-stub.c, eliminate QMP dependency on core PCI code rquired by query-pci command. Signed-off-by: Isaku Yamahata --- Makefile.objs | 4 +--- Makefile.target | 2 ++ hw/pci-stub.c | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 hw/pci-stub.c diff --git a/Makefile.objs b/Makefile.objs index d6b3d60..c3e52c5 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -169,9 +169,7 @@ hw-obj-y = hw-obj-y += vl.o loader.o hw-obj-$(CONFIG_VIRTIO) += virtio.o virtio-console.o hw-obj-y += fw_cfg.o -# FIXME: Core PCI code and its direct dependencies are required by the -# QMP query-pci command. -hw-obj-y += pci.o pci_bridge.o +hw-obj-$(CONFIG_PCI) += pci.o pci_bridge.o hw-obj-$(CONFIG_PCI) += msix.o msi.o hw-obj-$(CONFIG_PCI) += pci_host.o pcie_host.o hw-obj-$(CONFIG_PCI) += ioh3420.o xio3130_upstream.o xio3130_downstream.o diff --git a/Makefile.target b/Makefile.target index d08f5dd..38582d4 100644 --- a/Makefile.target +++ b/Makefile.target @@ -1,6 +1,7 @@ # -*- Mode: makefile -*- GENERATED_HEADERS = config-target.h +CONFIG_NO_PCI = $(if $(subst n,,$(CONFIG_PCI)),n,y) CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y) include ../config-host.mak @@ -188,6 +189,7 @@ ifdef CONFIG_SOFTMMU obj-y = arch_init.o cpus.o monitor.o machine.o gdbstub.o balloon.o # virtio has to be here due to weird dependency between PCI and virtio-net. # need to fix this properly +obj-$(CONFIG_NO_PCI) += pci-stub.o obj-$(CONFIG_VIRTIO) += virtio-blk.o virtio-balloon.o virtio-net.o virtio-serial-bus.o obj-$(CONFIG_VIRTIO_PCI) += virtio-pci.o obj-y += vhost_net.o diff --git a/hw/pci-stub.c b/hw/pci-stub.c new file mode 100644 index 0000000..674591d --- /dev/null +++ b/hw/pci-stub.c @@ -0,0 +1,37 @@ +/* + * PCI stubs for plathome that doesn't support pci bus. + * + * Copyright (c) 2010 Isaku Yamahata + * VA Linux Systems Japan K.K. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, see . + */ + +#include "monitor.h" +#include "pci.h" + +static void pci_error_message(Monitor *mon) +{ + monitor_printf(mon, "PCI devices not supported\n"); +} + +void do_pci_info(Monitor *mon, QObject **ret_data) +{ + pci_error_message(mon); +} + +void do_pci_info_print(Monitor *mon, const QObject *data) +{ + pci_error_message(mon); +}