From: Peter Maydell <peter.maydell@linaro.org>
To: Xiang Zheng <zhengxiang9@huawei.com>
Cc: "Laurent Vivier" <lvivier@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Laszlo Ersek" <lersek@redhat.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
qemu-arm <qemu-arm@nongnu.org>,
"Gerd Hoffmann" <kraxel@redhat.com>,
wanghaibin.wang@huawei.com, "Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH 1/5] tests: fw_cfg: Rename pc_fw_cfg_* to fw_cfg_*
Date: Tue, 3 Dec 2019 12:34:30 +0000 [thread overview]
Message-ID: <CAFEAcA_TbC2haopmmbLChuE1bxA2KV74fximNu5kQ1pQB9VmYA@mail.gmail.com> (raw)
In-Reply-To: <20191203122753.19792-2-zhengxiang9@huawei.com>
On Tue, 3 Dec 2019 at 12:29, Xiang Zheng <zhengxiang9@huawei.com> wrote:
>
> Rename pc_fw_cfg_* to fw_cfg_* to make them common for other
> architectures so that we can run fw_cfg tests on aarch64.
>
> Signed-off-by: Xiang Zheng <zhengxiang9@huawei.com>
> -static inline QFWCFG *pc_fw_cfg_init(QTestState *qts)
> +static inline QFWCFG *fw_cfg_init(QTestState *qts)
> {
> - return io_fw_cfg_init(qts, 0x510);
> + const char *arch = qtest_get_arch();
> +
> + if (!strcmp(arch, "aarch64")) {
> + return mm_fw_cfg_init(qts, 0x09020000);
> + } else {
> + return io_fw_cfg_init(qts, 0x510);
> + }
Presence and address of the fw_cfg device depends
on the machine type, not the architecture, so is
it possible to write this so that it varies by
machine type, rather than by guest arch ?
There should also presumably be a fallback path
for "fw_cfg not present here", I suppose.
thanks
-- PMM
next prev parent reply other threads:[~2019-12-03 12:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-03 12:27 [PATCH 0/5] tests: Enable fw_cfg tests on AArch64 Xiang Zheng
2019-12-03 12:27 ` [PATCH 1/5] tests: fw_cfg: Rename pc_fw_cfg_* to fw_cfg_* Xiang Zheng
2019-12-03 12:34 ` Peter Maydell [this message]
2019-12-04 6:13 ` Xiang Zheng
2019-12-03 12:27 ` [PATCH 2/5] tests: fw_cfg: Support read/write of fw_cfg registers on aarch64 Xiang Zheng
2019-12-03 12:27 ` [PATCH 3/5] tests: fw_cfg: Use virt as default machine in fw_cfg-test.c Xiang Zheng
2019-12-03 12:27 ` [PATCH 4/5] hw/arm/virt: Add FW_CFG_RAM_SIZE and FW_CFG_MAX_CPUS into fw_cfg Xiang Zheng
2019-12-03 12:32 ` Peter Maydell
2019-12-04 6:14 ` Xiang Zheng
2019-12-03 12:27 ` [PATCH 5/5] tests: Enable fw_cfg test on aarch64 Xiang Zheng
2019-12-03 13:01 ` [PATCH 0/5] tests: Enable fw_cfg tests on AArch64 Thomas Huth
2019-12-04 6:18 ` Xiang Zheng
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=CAFEAcA_TbC2haopmmbLChuE1bxA2KV74fximNu5kQ1pQB9VmYA@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=kraxel@redhat.com \
--cc=lersek@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=wanghaibin.wang@huawei.com \
--cc=zhengxiang9@huawei.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 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).