qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Kovalenko <igor.v.kovalenko@gmail.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Paul Brook <paul@codesourcery.com>, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH, RFC] Sparc64: convert APB to qdev
Date: Tue, 21 Jul 2009 01:19:44 +0400	[thread overview]
Message-ID: <b2fa41d60907201419k121d5c2fr274db4fbec2cc01c@mail.gmail.com> (raw)
In-Reply-To: <f43fc5580907200326r793e4f9am2db06ce0bd7dce1b@mail.gmail.com>

On Mon, Jul 20, 2009 at 2:26 PM, Blue Swirl<blauwirbel@gmail.com> 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

  reply	other threads:[~2009-07-20 21:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-20 10:26 [Qemu-devel] [PATCH, RFC] Sparc64: convert APB to qdev Blue Swirl
2009-07-20 21:19 ` Igor Kovalenko [this message]
2009-07-21  7:45   ` Blue Swirl
2009-07-27 14:05     ` Jason Wessel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b2fa41d60907201419k121d5c2fr274db4fbec2cc01c@mail.gmail.com \
    --to=igor.v.kovalenko@gmail.com \
    --cc=blauwirbel@gmail.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).