From: Avi Kivity <avi@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Lucas Meneghel Rodrigues <lmr@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>,
qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] hw: Add test device for unittests execution
Date: Mon, 29 Aug 2011 08:47:55 +0300 [thread overview]
Message-ID: <4E5B280B.4090204@redhat.com> (raw)
In-Reply-To: <4E580E8E.2060200@codemonkey.ws>
On 08/27/2011 12:22 AM, Anthony Liguori wrote:
>
> I think I posted patches at some point for kvm unittests to use a
> standard UART. Was there any reason not to do use a UART?
>
No.
>> +static void test_device_exit(void *opaque, uint32_t addr, uint32_t
>> data)
>> +{
>> + exit(data);
>> +}
>
> Port 501 can do this.
Right.
>
>> +
>> +static uint32_t test_device_memsize_read(void *opaque, uint32_t addr)
>> +{
>> + return ram_size;
>> +}
>
> This can be read through fw_cfg, any reason to do PIO for this?
Legacy. We even have a fw_cfg driver in k-u-t.git.
>> +static void test_device_flush_page(void *opaque, uint32_t addr,
>> uint32_t data)
>> +{
>> + target_phys_addr_t len = 4096;
>> + void *a = cpu_physical_memory_map(data& ~0xffful,&len, 0);
>> +
>> + mprotect(a, 4096, PROT_NONE);
>> + mprotect(a, 4096, PROT_READ|PROT_WRITE);
>> + cpu_physical_memory_unmap(a, len, 0, 0);
>
> This hard codes page size (get it via sysconf).
(or getpagesize())
> I think mprotect probably isn't available on windows either.
Google thinks it is.
> Should this use MemoryRegion?
>
Yes.
Lucas, do you want to tackle these yourself? I'll help with any
questions. Otherwise I'll do it.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
next prev parent reply other threads:[~2011-08-29 5:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-26 20:04 [Qemu-devel] [PATCH] hw: Add test device for unittests execution Lucas Meneghel Rodrigues
2011-08-26 21:22 ` Anthony Liguori
2011-08-27 10:07 ` Edgar E. Iglesias
2011-08-27 16:44 ` Blue Swirl
2011-08-29 5:50 ` Avi Kivity
2011-08-29 5:47 ` Avi Kivity [this message]
2011-08-29 13:58 ` Lucas Meneghel Rodrigues
2011-08-26 22:26 ` Jan Kiszka
2011-08-29 5:52 ` Avi Kivity
2011-08-27 16:22 ` Blue Swirl
2011-08-29 5:57 ` Avi Kivity
2011-08-30 19:11 ` Blue Swirl
2011-08-30 19:36 ` Lluís
2011-08-30 19:54 ` Blue Swirl
2011-08-30 20:20 ` Lluís
-- strict thread matches above, loose matches on Subject: below --
2012-10-04 3:49 Lucas Meneghel Rodrigues
2012-10-04 4:24 ` Lucas Meneghel Rodrigues
2012-10-04 7:18 ` Paolo Bonzini
2012-10-04 8:02 ` Peter Maydell
2012-10-04 8:04 ` Paolo Bonzini
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=4E5B280B.4090204@redhat.com \
--to=avi@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=kraxel@redhat.com \
--cc=lmr@redhat.com \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).