All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Yongbok Kim <yongbok.kim@mips.com>, Paul Burton <paul.burton@mips.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Edgar Iglesias <edgar.iglesias@xilinx.com>
Subject: Re: [Qemu-devel] [PULL v2 7/8] hw: xilinx-pcie: Add support for Xilinx AXI PCIe Controller
Date: Mon, 4 Jun 2018 11:29:47 +0100	[thread overview]
Message-ID: <CAFEAcA8NehifKn7wsmLgUqiYNHwczzrXGnUcTvx-AbLM=_LeMQ@mail.gmail.com> (raw)
In-Reply-To: <1487722868-9111-8-git-send-email-yongbok.kim@imgtec.com>

On 22 February 2017 at 00:21, Yongbok Kim <yongbok.kim@imgtec.com> wrote:
> From: Paul Burton <paul.burton@imgtec.com>
>
> Add support for emulating the Xilinx AXI Root Port Bridge for PCI
> Express as described by Xilinx' PG055 document. This is a PCIe
> controller that can be used with certain series of Xilinx FPGAs, and is
> used on the MIPS Boston board which will make use of this code.
>
> Signed-off-by: Paul Burton <paul.burton@imgtec.com>
> [yongbok.kim@imgtec.com:
>   removed returning on !level,
>   updated IRQ connection with GPIO logic,
>   moved xilinx_pcie_init() to boston.c
>   replaced stw_le_p() with pci_set_word()
>   and other cosmetic changes]
> Signed-off-by: Yongbok Kim <yongbok.kim@imgtec.com>
> ---

> +static void xilinx_pcie_host_realize(DeviceState *dev, Error **errp)
> +{
> +    PCIHostState *pci = PCI_HOST_BRIDGE(dev);
> +    XilinxPCIEHost *s = XILINX_PCIE_HOST(dev);
> +    SysBusDevice *sbd = SYS_BUS_DEVICE(dev);
> +    PCIExpressHost *pex = PCIE_HOST_BRIDGE(dev);
> +
> +    snprintf(s->name, sizeof(s->name), "pcie%u", s->bus_nr);
> +
> +    /* PCI configuration space */
> +    pcie_host_mmcfg_init(pex, s->cfg_size);
> +
> +    /* MMIO region */
> +    memory_region_init(&s->mmio, OBJECT(s), "mmio", UINT64_MAX);
> +    memory_region_set_enabled(&s->mmio, false);
> +
> +    /* dummy I/O region */
> +    memory_region_init_ram(&s->io, OBJECT(s), "io", 16, NULL);
> +    memory_region_set_enabled(&s->io, false);

Hi; I was looking at the code for this PCI controller as
part of identifying RAM memory regions that don't migrate
their contents, and this looks kind of odd. Can you explain
why this is using a RAM region for the PCI bus's IO memory
space? None of our other PCI controller models do this, so
I suspect this is a bug. (The effect would be that PCI IO
accesses to addresses which don't have a PCI BAR mapped there
will behave as reads-as-written, which seems pretty unlikely
to be what the hardware does.)

What is the intended semantics for PCI IO accesses with this
controller? (It seems to only be used with the MIPS boston
board model.)

thanks
-- PMM

  reply	other threads:[~2018-06-04 10:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-22  0:21 [Qemu-devel] [PULL v2 0/8] target-mips queue Yongbok Kim
2017-02-22  0:21 ` [Qemu-devel] [PULL v2 1/8] hw/mips_cmgcr: allow GCR base to be moved Yongbok Kim
2017-02-22  0:21 ` [Qemu-devel] [PULL v2 2/8] hw/mips_gictimer: provide API for retrieving frequency Yongbok Kim
2017-02-22  0:21 ` [Qemu-devel] [PULL v2 3/8] hw/mips_gic: Update pin state on mask changes Yongbok Kim
2017-02-22  0:21 ` [Qemu-devel] [PULL v2 4/8] target-mips: Provide function to test if a CPU supports an ISA Yongbok Kim
2017-02-22  0:21 ` [Qemu-devel] [PULL v2 5/8] dtc: Update requirement to v1.4.2 Yongbok Kim
2017-02-22  0:21 ` [Qemu-devel] [PULL v2 6/8] loader: Support Flattened Image Trees (FIT images) Yongbok Kim
2017-02-22  0:21 ` [Qemu-devel] [PULL v2 7/8] hw: xilinx-pcie: Add support for Xilinx AXI PCIe Controller Yongbok Kim
2018-06-04 10:29   ` Peter Maydell [this message]
2018-06-06 20:23     ` Paul Burton
2018-06-06 21:58       ` Peter Maydell
2017-02-22  0:21 ` [Qemu-devel] [PULL v2 8/8] hw/mips: MIPS Boston board support Yongbok Kim
2017-02-23 18:09   ` Peter Maydell
2017-02-24  0:25     ` Yongbok Kim
2017-02-24 10:13       ` Peter Maydell
2017-02-23 12:46 ` [Qemu-devel] [PULL v2 0/8] target-mips queue Peter Maydell
2017-03-16 15:03   ` Peter Maydell
2017-03-16 16:25     ` Yongbok Kim
2017-03-16 16:28       ` Peter Maydell

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='CAFEAcA8NehifKn7wsmLgUqiYNHwczzrXGnUcTvx-AbLM=_LeMQ@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=edgar.iglesias@xilinx.com \
    --cc=paul.burton@mips.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yongbok.kim@mips.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.