qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <andreas.faerber@web.de>
To: Avi Kivity <avi@redhat.com>
Cc: qemu-devel Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Memory read/write issues
Date: Sun, 27 Nov 2011 23:16:01 +0100	[thread overview]
Message-ID: <4ED2B6A1.7000102@web.de> (raw)
In-Reply-To: <4ED2465E.9010709@redhat.com>

Am 27.11.2011 15:17, schrieb Avi Kivity:
> On 11/27/2011 04:07 PM, Andreas Färber wrote:
>> Thanks a lot! You were right, setting TARGET_PAGE_BITS to 8 solves this
>> issue.
>>
>> I'd still like to fix this subpage case for others' benefit. Do you have
>> any pointer where I should set breakpoints / review code?
> 
> The subpage code (scheduled for demolition in 1.1) lives in exec.c.  See
> subpage_init() and subpage_register().  I'd start with enabling
> DEBUG_SUBPAGE, fixing all the build errors, and looking at the output of
> subpage_readlen() and subpage_writelen().

With these hints I've figured out what's actually happening here:

subpage_writelen() is reading a wrong index 2 == IO_MEM_UNASSIGNED from
subpage_t and performing an unassigned memory write, confirmed by
DEBUG_UNASSIGNED.

In subpage_register(), we're taking the (memory & ~TARGET_PAGE_MASK) ==
IO_MEM_RAM path and setting IO_MEM_UNASSIGNED in subpage_t.

Will investigate further tomorrow.

Andreas

      reply	other threads:[~2011-11-27 22:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23 23:59 [Qemu-devel] Initializing PC from memory on reset? Andreas Färber
2011-11-24  7:47 ` Peter Maydell
2011-11-24 21:24   ` Andreas Färber
2011-11-25 16:25 ` [Qemu-devel] Memory read/write issues (was: Initializing PC from memory on reset?) Andreas Färber
2011-11-27  8:32   ` [Qemu-devel] Memory read/write issues Avi Kivity
2011-11-27 14:07     ` Andreas Färber
2011-11-27 14:17       ` Avi Kivity
2011-11-27 22:16         ` Andreas Färber [this message]

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=4ED2B6A1.7000102@web.de \
    --to=andreas.faerber@web.de \
    --cc=avi@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).