From: Paolo Bonzini <pbonzini@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
qemu-devel@nongnu.org, lersek@redhat.com, imammedo@redhat.com,
somlo@cmu.edu, ehabkost@redhat.com, mst@redhat.com,
rjones@redhat.com, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCHv2 1/4] fw_cfg: don't map the fw_cfg IO ports in fw_cfg_io_realize()
Date: Wed, 14 Jun 2017 14:34:38 +0200 [thread overview]
Message-ID: <41757d38-5fdb-befa-e385-69cc7b02ee6f@redhat.com> (raw)
In-Reply-To: <1497302470-10776-2-git-send-email-mark.cave-ayland@ilande.co.uk>
On 12/06/2017 23:21, Mark Cave-Ayland wrote:
> As indicated by Laszlo it is a QOM bug for the realize() method to actually
> map the device. Set up the IO regions with sysbus_init_mmio() and defer
> the mapping to the caller, as already done in fw_cfg_init_mem_wide().
... sort of.
The idea is that the ISA bridge (including all the legacy I/O devices,
of which fw_cfg part) does subtractive decoding, i.e. "if nobody else
wants it, I'll take it". So that's why fw_cfg's realize() maps I/O
ports, and why the API is sysbus_add_io.
Sysbus MMIO maps a different hardware concept, where the "base" is
decoded by the SoC and forwarded to the component at that address. This
is represented by the sysbus_init_mmio/sysbus_mmio_map pair.
Documentation for this would be welcome, but sysbus.h doesn't have many
function comments. :(
Paolo
next prev parent reply other threads:[~2017-06-14 12:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-12 21:21 [Qemu-devel] [PATCHv2 0/4] fw_cfg: qdev-related tidy-ups Mark Cave-Ayland
2017-06-12 21:21 ` [Qemu-devel] [PATCHv2 1/4] fw_cfg: don't map the fw_cfg IO ports in fw_cfg_io_realize() Mark Cave-Ayland
2017-06-12 22:27 ` Laszlo Ersek
2017-06-12 23:12 ` Laszlo Ersek
2017-06-13 18:27 ` Mark Cave-Ayland
2017-06-14 12:34 ` Paolo Bonzini [this message]
2017-06-12 21:21 ` [Qemu-devel] [PATCHv2 2/4] fw_cfg: move setting of FW_CFG_VERSION_DMA bit to fw_cfg_init1() Mark Cave-Ayland
2017-06-12 22:31 ` Laszlo Ersek
2017-06-12 21:21 ` [Qemu-devel] [PATCHv2 3/4] fw_cfg: move qdev_init_nofail() from fw_cfg_init1() to callers Mark Cave-Ayland
2017-06-12 22:50 ` Laszlo Ersek
2017-06-16 9:52 ` Mark Cave-Ayland
2017-06-12 21:21 ` [Qemu-devel] [PATCHv2 4/4] fw_cfg: move QOM type defines into fw_cfg.h Mark Cave-Ayland
2017-06-12 22:52 ` Laszlo Ersek
2017-06-14 12:38 ` [Qemu-devel] [PATCHv2 0/4] fw_cfg: qdev-related tidy-ups Paolo Bonzini
2017-06-16 10:02 ` Mark Cave-Ayland
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=41757d38-5fdb-befa-e385-69cc7b02ee6f@redhat.com \
--to=pbonzini@redhat.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=lersek@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
--cc=somlo@cmu.edu \
/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).