From: Thomas Huth <thuth@redhat.com>
To: Stephen Checkoway <stephen.checkoway@oberlin.edu>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Testing sysbus devices
Date: Mon, 18 Feb 2019 14:43:20 +0100 [thread overview]
Message-ID: <ab1a67c0-8872-6e22-fc70-946bbcabb8a1@redhat.com> (raw)
In-Reply-To: <B9D713FC-5896-4923-9788-AF7EAA9B462D@oberlin.edu>
On 18/02/2019 07.07, Stephen Checkoway wrote:
> Hi all,
>
> I've been working on some improvements to the pflash_cfi02 block device (interleaved flash devices similar to pflash_cfi01, multi-sector erase, nonuniform sector sizes, and some bug fixes and I'm planning on implementing sector erase suspend/resume commands in the near future).
>
> There appear to be no existing tests for this device and I'm unsure what the appropriate way to add tests for sysbus devices is. -device can't be used because sysbus devices aren't user-creatable (and even if they were, creating the device wouldn't be sufficient since it wouldn't connect it to the sysbus).
>
> Any suggestions would be appreciated.
I think you could use one of the machines that has a cfi02 on board. For
example: Write some random data to a temporary file. Run qemu with:
QTestState *qts;
qts = qtest_initf(" qemu-system-arm -M musicpal,accel=qtest "
"-drive if=pflash,file=%s,format=raw", filename);
Then you should be able to access the device with the qtest_read/write
functions, e.g. use "qtest_memread(qts, 0x100000000ULL, ...)" to read
the contents of the device. I haven't tried that though, that's just my
quick assumption from looking at hw/arm/musicpal.c ...
Thomas
next prev parent reply other threads:[~2019-02-18 13:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-18 6:07 [Qemu-devel] Testing sysbus devices Stephen Checkoway
2019-02-18 13:43 ` Thomas Huth [this message]
2019-02-18 16:02 ` Stephen Checkoway
2019-02-18 16:38 ` Thomas Huth
2019-02-18 18:08 ` Markus Armbruster
2019-02-18 18:31 ` Stephen Checkoway
2019-02-19 6:09 ` Markus Armbruster
2019-02-19 14:42 ` Stephen Checkoway
2019-02-19 15:28 ` Markus Armbruster
2019-02-19 16:00 ` Stephen Checkoway
2019-02-19 17:55 ` Markus Armbruster
2019-02-20 8:55 ` Laszlo Ersek
2019-02-20 10:14 ` Markus Armbruster
2019-02-21 19:57 ` Stephen Checkoway
2019-02-22 7:42 ` Markus Armbruster
2019-02-22 8:03 ` Laszlo Ersek
2019-02-22 13:31 ` Stephen Checkoway
2019-02-22 7:55 ` Laszlo Ersek
2019-02-22 13:35 ` Stephen Checkoway
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=ab1a67c0-8872-6e22-fc70-946bbcabb8a1@redhat.com \
--to=thuth@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stephen.checkoway@oberlin.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).