From: Uri Lublin <uril@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/4] memory: cache min/max_access_size
Date: Thu, 05 Dec 2013 14:19:36 +0200 [thread overview]
Message-ID: <52A06F58.2070005@redhat.com> (raw)
In-Reply-To: <1385995228-19585-1-git-send-email-pbonzini@redhat.com>
On 12/02/2013 04:40 PM, Paolo Bonzini wrote:
> This will simplify the code in the next patch.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> include/exec/memory.h | 2 ++
> memory.c | 27 +++++++++++----------------
> 2 files changed, 13 insertions(+), 16 deletions(-)
>
>
> typedef struct MemoryListener MemoryListener;
> diff --git a/memory.c b/memory.c
> index 28f6449..56e54aa 100644
> --- a/memory.c
> +++ b/memory.c
> @@ -443,8 +443,6 @@ static void memory_region_write_accessor(MemoryRegion *mr,
> static void access_with_adjusted_size(hwaddr addr,
> uint64_t *value,
> unsigned size,
> - unsigned access_size_min,
> - unsigned access_size_max,
> void (*access)(MemoryRegion *mr,
> hwaddr addr,
> uint64_t *value,
> @@ -457,15 +455,8 @@ static void access_with_adjusted_size(hwaddr addr,
> unsigned access_size;
> unsigned i;
>
> - if (!access_size_min) {
> - access_size_min = 1;
> - }
> - if (!access_size_max) {
> - access_size_max = 4;
> - }
> -
> /* FIXME: support unaligned access? */
> - access_size = MAX(MIN(size, access_size_max), access_size_min);
> + access_size = MAX(MIN(size, mr->min_access_size), mr->min_access_size);
Hi Paolo,
Here it should be mr->max_access_size
[ btw, MAX(MIN(a,b), b) = b ]
Regards,
Uri.
next prev parent reply other threads:[~2013-12-05 12:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-02 14:23 [Qemu-devel] [PATCH 0/4] speedup memory dispatch Paolo Bonzini
2013-12-02 14:40 ` [Qemu-devel] [PATCH 1/4] memory: cache min/max_access_size Paolo Bonzini
2013-12-05 12:19 ` Uri Lublin [this message]
2013-12-05 12:20 ` Paolo Bonzini
2013-12-02 14:40 ` [Qemu-devel] [PATCH 2/4] memory: streamline common case for memory dispatch Paolo Bonzini
2013-12-02 14:40 ` [Qemu-devel] [PATCH 3/4] memory: hoist coalesced MMIO flush Paolo Bonzini
2013-12-02 14:40 ` [Qemu-devel] [PATCH 4/4] memory: small tweaks Paolo Bonzini
2013-12-10 11:55 ` [Qemu-devel] [PATCH 0/4] speedup memory dispatch Marcel Apfelbaum
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=52A06F58.2070005@redhat.com \
--to=uril@redhat.com \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.