From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MT0H5-0007qz-Tp for qemu-devel@nongnu.org; Mon, 20 Jul 2009 17:19:56 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MT0H1-0007pE-AO for qemu-devel@nongnu.org; Mon, 20 Jul 2009 17:19:55 -0400 Received: from [199.232.76.173] (port=57842 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MT0H1-0007p7-1L for qemu-devel@nongnu.org; Mon, 20 Jul 2009 17:19:51 -0400 Received: from mail-fx0-f224.google.com ([209.85.220.224]:35915) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MT0H0-00030y-Ks for qemu-devel@nongnu.org; Mon, 20 Jul 2009 17:19:50 -0400 Received: by fxm24 with SMTP id 24so1226107fxm.34 for ; Mon, 20 Jul 2009 14:19:45 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 21 Jul 2009 01:19:44 +0400 Message-ID: Subject: Re: [Qemu-devel] [PATCH, RFC] Sparc64: convert APB to qdev From: Igor Kovalenko Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Paul Brook , qemu-devel On Mon, Jul 20, 2009 at 2:26 PM, Blue Swirl wrote: > I have a problem with APB conversion to qdev. For some reason, with > the patch applied, PCI config register access changes and OpenBIOS > can't find any PCI devices. You are using pci_host_data_* which expects opaque pointer to PCIHostState, so you need to pass appropriate opaque to cpu_register_io_memory. With this small amendment I verified there are no changes to qemu.log and serial console output. Not sure if this requires sign-off :) Signed-off-by: igor.v.kovalenko@gmail.com Index: qemu-trunk/hw/apb_pci.c =================================================================== --- qemu-trunk.orig/hw/apb_pci.c +++ qemu-trunk/hw/apb_pci.c @@ -281,7 +281,7 @@ static void pci_pbm_init_device(SysBusDe sysbus_init_mmio(dev, 0x10ULL, pci_mem_config); /* mem_data */ pci_mem_data = cpu_register_io_memory(pci_apb_read, - pci_apb_write, s); + pci_apb_write, &s->host_state); sysbus_init_mmio(dev, 0x10000000ULL, pci_mem_data); } -- Kind regards, Igor V. Kovalenko