From: Paolo Bonzini <pbonzini@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Oleksii Shevchuk <alxchk@gmail.com>,
qemu-devel Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] qemu git (f03d07d46) / e100 / sending large packets causes SIGABRT
Date: Mon, 29 Jul 2013 12:53:18 +0200 [thread overview]
Message-ID: <51F6499E.3090306@redhat.com> (raw)
In-Reply-To: <20130729085008.GE26410@stefanha-thinkpad.redhat.com>
Il 29/07/2013 10:50, Stefan Hajnoczi ha scritto:
> There are only a few bytes remaining: len=0x3. The abort(3) comes from address_space_rw():
>
> if (!memory_access_is_direct(mr, is_write)) {
> /* I/O case */
> l = memory_access_size(mr, l, addr1);
> switch (l) {
> case 8:
> ...
> case 4:
> ...
> case 2:
> ...
> case 1:
> ...
> default:
> abort(); <-- we abort here
> }
>
> Paolo: Do you know how the memory API is supposed to work here?
The problem is introduced by commit 2332616 (exec: Support 64-bit
operations in address_space_rw, 2013-07-08). Before that commit,
memory_access_size would only return 1/2/4. The following should help:
diff --git a/exec.c b/exec.c
index 7997002..7686c15 100644
--- a/exec.c
+++ b/exec.c
@@ -1922,6 +1922,9 @@ static int memory_access_size(MemoryRegion *mr,
unsigned l, hwaddr addr)
if (l > access_size_max) {
l = access_size_max;
}
+ if (l & (l - 1)) {
+ l = 1 << (qemu_fls(l) - 1);
+ }
return l;
}
Paolo
next prev parent reply other threads:[~2013-07-29 10:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-24 10:17 [Qemu-devel] qemu git (f03d07d46) / e100 / sending large packets causes SIGABRT Oleksii Shevchuk
2013-07-29 8:50 ` Stefan Hajnoczi
2013-07-29 10:53 ` Paolo Bonzini [this message]
2013-07-29 11:40 ` Stefan Hajnoczi
2013-07-29 12:03 ` Oleksii Shevchuk
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=51F6499E.3090306@redhat.com \
--to=pbonzini@redhat.com \
--cc=alxchk@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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 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.