qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Xiang Zheng <zhengxiang9@huawei.com>
To: Peter Maydell <peter.maydell@linaro.org>
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: Wed, 4 Dec 2019 14:13:53 +0800	[thread overview]
Message-ID: <76a92f2e-bf55-77e1-7691-30d76298aeca@huawei.com> (raw)
In-Reply-To: <CAFEAcA_TbC2haopmmbLChuE1bxA2KV74fximNu5kQ1pQB9VmYA@mail.gmail.com>



On 2019/12/3 20:34, Peter Maydell wrote:
> 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.
> 

Yes, "0x09020000" is the address of the fw_cfg device on virt machine, I
should have noticed it. I will have a try for varying the addresses
by machine type.

-- 

Thanks,
Xiang



  reply	other threads:[~2019-12-04  7:01 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
2019-12-04  6:13     ` Xiang Zheng [this message]
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=76a92f2e-bf55-77e1-7691-30d76298aeca@huawei.com \
    --to=zhengxiang9@huawei.com \
    --cc=kraxel@redhat.com \
    --cc=lersek@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wanghaibin.wang@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).