From: "Emilio G. Cota" <cota@braap.org>
To: Darrell Leinwand <darrell.leinwand@psware.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Bad icount read when running qemu-system-ppc64 and mfspr atbu guest instruction
Date: Wed, 11 Apr 2018 18:17:42 -0400 [thread overview]
Message-ID: <20180411221742.GA27538@flamenco> (raw)
In-Reply-To: <222EDB99-2ED5-4CCB-B550-7A02BC4BDC7F@psware.com>
On Wed, Apr 11, 2018 at 18:18:18 +0000, Darrell Leinwand wrote:
> Hi,
>
> When I enable icount using an e5500 core I get an exit with “Bad icount read” when the guest software executes a load atbu command.
>
> It looks like in qemu/accel/tcg/cpu_exec.c:166 sets can_do_io false when using icount.
> cpu->can_do_io = !use_icount;
> ret = tcg_qemu_tb_exec(env, tb_ptr);
> cpu->can_do_io = 1;
>
> Since can_do_io is set to false there and the cpu_get_icount_raw() function checks that flag qemu/cpus.c:260:
> if (!cpu->can_do_io) {
> fprintf(stderr, "Bad icount read\n");
> exit(1);
> }
>
> The load_atbu function will always fail. I commented out the !use_icount and set it to a 1 in cpu_exec.c and it continues and seems to run normally, but I am not sure what side effects while running icount that could have since it may allow actual IO to occur while translation is happening.
Can you reproduce with the current master, i.e. 38e83a71d02 ?
A few patches have very recently been merged that might fix
your problem.
If master is still broken and it used to work in the past for you,
it would be useful if you could bisect this to point out the commit
that broke this.
Thanks,
Emilio
next prev parent reply other threads:[~2018-04-11 22:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 18:18 [Qemu-devel] Bad icount read when running qemu-system-ppc64 and mfspr atbu guest instruction Darrell Leinwand
2018-04-11 22:17 ` Emilio G. Cota [this message]
2018-04-11 23:39 ` Richard Henderson
2018-04-12 2:37 ` Darrell Leinwand
2018-04-12 20:44 ` Richard Henderson
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=20180411221742.GA27538@flamenco \
--to=cota@braap.org \
--cc=darrell.leinwand@psware.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).