From patchwork Sun Jun 26 13:39:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 102053 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EAF0DB6F7F for ; Sun, 26 Jun 2011 23:44:23 +1000 (EST) Received: from localhost ([::1]:38926 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QapdK-0001Xn-QY for incoming@patchwork.ozlabs.org; Sun, 26 Jun 2011 09:44:19 -0400 Received: from eggs.gnu.org ([140.186.70.92]:57122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QapZ1-00016A-5P for qemu-devel@nongnu.org; Sun, 26 Jun 2011 09:39:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QapYz-0006kT-Un for qemu-devel@nongnu.org; Sun, 26 Jun 2011 09:39:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61235) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QapYz-0006kF-Ah for qemu-devel@nongnu.org; Sun, 26 Jun 2011 09:39:49 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p5QDdjfA018932 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 26 Jun 2011 09:39:45 -0400 Received: from redhat.com (vpn-202-163.tlv.redhat.com [10.35.202.163]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with SMTP id p5QDdfXf007300; Sun, 26 Jun 2011 09:39:42 -0400 Date: Sun, 26 Jun 2011 16:39:56 +0300 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <20110626133956.GA7902@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Cc: Anthony PERARD , Steven Smith , Alexander Graf , Stefano Stabellini Subject: [Qemu-devel] [PATCH] xen: move to new pci initializers 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 move ids to pci info structure Signed-off-by: Michael S. Tsirkin Untested. --- hw/xen_platform.c | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/xen_platform.c b/hw/xen_platform.c index 9a01735..f43e175 100644 --- a/hw/xen_platform.c +++ b/hw/xen_platform.c @@ -290,18 +290,10 @@ static int xen_platform_initfn(PCIDevice *dev) pci_conf = d->pci_dev.config; - pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_XEN); - pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_XEN_PLATFORM); - pci_set_word(pci_conf + PCI_SUBSYSTEM_VENDOR_ID, PCI_VENDOR_ID_XEN); - pci_set_word(pci_conf + PCI_SUBSYSTEM_ID, PCI_DEVICE_ID_XEN_PLATFORM); - pci_set_word(pci_conf + PCI_COMMAND, PCI_COMMAND_IO | PCI_COMMAND_MEMORY); - pci_config_set_revision(pci_conf, 1); pci_config_set_prog_interface(pci_conf, 0); - pci_config_set_class(pci_conf, PCI_CLASS_OTHERS << 8 | 0x80); - pci_conf[PCI_INTERRUPT_PIN] = 1; pci_register_bar(&d->pci_dev, 0, 0x100, @@ -330,6 +322,13 @@ static PCIDeviceInfo xen_platform_info = { .qdev.size = sizeof(PCIXenPlatformState), .qdev.vmsd = &vmstate_xen_platform, .qdev.reset = platform_reset, + + .vendor_id = PCI_VENDOR_ID_XEN, + .device_id = PCI_DEVICE_ID_XEN_PLATFORM, + .class_id = PCI_CLASS_OTHERS << 8 | 0x80, + .subsystem_vendor_id = PCI_VENDOR_ID_XEN, + .subsystem_id = PCI_DEVICE_ID_XEN_PLATFORM, + .revision = 1, }; static void xen_platform_register(void)