From: Paolo Bonzini <pbonzini@redhat.com>
To: Andrey Smirnov <andrew.smirnov@gmail.com>, qemu-devel@nongnu.org
Cc: "Peter Crosthwaite" <crosthwaite.peter@gmail.com>,
"Richard Henderson" <rth@twiddle.net>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>,
"Hervé Poussineau" <hpoussin@reactos.org>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Leon Alrae" <leon.alrae@imgtec.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Luiz Capitulino" <lcapitulino@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Marcelo Tosatti" <mtosatti@redhat.com>,
"Alexander Graf" <agraf@suse.de>,
"David Gibson" <david@gibson.dropbear.id.au>,
"Christian Borntraeger" <borntraeger@de.ibm.com>,
"Cornelia Huck" <cornelia.huck@de.ibm.com>,
"Max Filippov" <jcmvbkbc@gmail.com>,
"open list:PReP" <qemu-ppc@nongnu.org>,
"open list:ARM" <qemu-arm@nongnu.org>,
"open list:X86" <kvm@vger.kernel.org>
Subject: Re: [Qemu-devel] [RFC PATCH] exec: Support non-direct memory writes in cpu_memory_rw_debug
Date: Wed, 29 Jun 2016 17:55:37 +0200 [thread overview]
Message-ID: <daa5a9d7-bc26-71ab-cc74-c3a6f0f8787b@redhat.com> (raw)
In-Reply-To: <1467150268-11038-2-git-send-email-andrew.smirnov@gmail.com>
On 28/06/2016 23:44, Andrey Smirnov wrote:
> Add code to support writing to memory mapped peripherals via
> cpu_memory_rw_debug(). The code of that function already supports
> reading from such memory regions, so this commit makes that
> functionality "symmetric".
It's not entirely symmetric however, as you cannot write to the MMIO
registers of romd devices. Is this correct? So I'll leave to others
the review of whether the functionality is appropriate. Regarding the code:
> @@ -2621,7 +2625,7 @@ static MemTxResult address_space_write_continue(AddressSpace *as, hwaddr addr,
> }
>
> MemTxResult address_space_write(AddressSpace *as, hwaddr addr, MemTxAttrs attrs,
> - const uint8_t *buf, int len)
> + const uint8_t *buf, int len, bool force)
I would prefer to leave this API as is, and instead add a new API such
as address_space_write_debug or address_space_program. It's okay to add
the "force" argument to address_space_write_continue.
>
> +typedef enum {
> + MEMTX_READ,
> + MEMTX_WRITE,
> + MEMTX_PROGRAM,
> +} MemTxType;
This needs comments. If you go with address_space_write_debug, rename
MEMTX_PROGRAM to MEMTX_WRITE_DEBUG.
Thanks,
Paolo
next prev parent reply other threads:[~2016-06-29 15:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-28 21:44 [Qemu-devel] [RFC PATCH] armv7m_nvic: Use qemu_get_cpu(0) instead of current_cpu Andrey Smirnov
2016-06-28 21:44 ` [Qemu-devel] [RFC PATCH] exec: Support non-direct memory writes in cpu_memory_rw_debug Andrey Smirnov
2016-06-29 15:55 ` Paolo Bonzini [this message]
2016-06-30 18:21 ` Andrey Smirnov
2016-06-30 14:06 ` Peter Maydell
2016-06-30 18:24 ` Andrey Smirnov
2016-06-30 13:54 ` [Qemu-devel] [RFC PATCH] armv7m_nvic: Use qemu_get_cpu(0) instead of current_cpu 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=daa5a9d7-bc26-71ab-cc74-c3a6f0f8787b@redhat.com \
--to=pbonzini@redhat.com \
--cc=agraf@suse.de \
--cc=andrew.smirnov@gmail.com \
--cc=armbru@redhat.com \
--cc=aurelien@aurel32.net \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=crosthwaite.peter@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=ehabkost@redhat.com \
--cc=hpoussin@reactos.org \
--cc=jcmvbkbc@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=lcapitulino@redhat.com \
--cc=leon.alrae@imgtec.com \
--cc=mst@redhat.com \
--cc=mtosatti@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/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).