qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-devel@nongnu.org, Avi Kivity <avi@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] memory: Fix assertion for flash devices
Date: Sat, 7 Jan 2012 21:29:08 +0100	[thread overview]
Message-ID: <20120107202908.GD20302@volta.aurel32.net> (raw)
In-Reply-To: <1325934826-23870-1-git-send-email-sw@weilnetz.de>

On Sat, Jan 07, 2012 at 12:13:46PM +0100, Stefan Weil wrote:
> There is a regression since commit c5705a7728b4a6bc9e4f2d35911adbaf28042b25
> or some other recent change.
> 
> System emulation with a flash device raises an assertion in function
> qemu_ram_set_idstr because no new_block is found at the requested addr.
> 
> The address of the memory region (mr->ram_addr) is set by
> memory_region_init_rom_device:
> 
>     mr->ram_addr = qemu_ram_alloc(size, mr);
>     mr->ram_addr |= cpu_register_io_memory(mr);
> 
> The 2nd line adds a small offset to mr->ram_addr, and this offset
> makes ram_set_idstr fail with an assertion.
> 
> Masking mr->ram_addr with the target's page mask removes the small
> offset and makes flash devices work again.
> 
> Cc: Avi Kivity <avi@redhat.com>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  memory.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 

I can't confirm the patch is correct, but at least I can confirm it fix
the breakage.

Tested-by: Aurelien Jarno <aurelien@aurel32.net>

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

  reply	other threads:[~2012-01-07 20:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-07 11:13 [Qemu-devel] [PATCH] memory: Fix assertion for flash devices Stefan Weil
2012-01-07 20:29 ` Aurelien Jarno [this message]
2012-01-08 11:07 ` Avi Kivity

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=20120107202908.GD20302@volta.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=avi@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /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).