All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Filippov <jcmvbkbc@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Pavel Dovgalyuk <dovgaluk@ispras.ru>,
	Pavel Dovgaluk <Pavel.Dovgaluk@ispras.ru>,
	qemu-devel <qemu-devel@nongnu.org>, Alex Bligh <alex@alex.org.uk>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] implementing architectural timers using QEMU timers
Date: Tue, 10 Jan 2017 10:51:04 -0800	[thread overview]
Message-ID: <CAMo8BfKTqxnR=ONdAfD1pWiGhsVOG5TiuS+0uRgAZWSCOuX3Ow@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-6-_5S+0YzoJA9twdiPBYOsLPFwq5zT+uoxFpbmfVJKQ@mail.gmail.com>

On Tue, Jan 10, 2017 at 10:47 AM, Peter Maydell
<peter.maydell@linaro.org> wrote:
> On 10 January 2017 at 18:39, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> Ok, looks like what happens in my case is that instruction that
>> sets CCOMPARE and thus changes remaining icount does not
>> cause exit from the cpu_exec. So merely ending TB on
>> QEMU_CLOCK_VIRTUAL timer update is not enough, I need to
>> throw an exception of some kind? Or does the timer code need
>> to take care of that?
>
> Is your code calling gen_io_start() and gen_io_end() in the right
> places around where it generates code to do the CCOMPARE accesses ?
> (the rules for getting icount to work right are a bit fiddly)

Yes, it does. Without these calls qemu aborts if I actually try to
access timers. But these functions themselves don't guarantee
anything, as they just generate code that sets can_do_io in the
env to 1 and to 0.

-- 
Thanks.
-- Max

  reply	other threads:[~2017-01-10 18:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-09 15:18 [Qemu-devel] implementing architectural timers using QEMU timers Max Filippov
2017-01-09 15:41 ` Alex Bligh
2017-01-10 15:22   ` Max Filippov
2017-01-10  8:31 ` Pavel Dovgalyuk
2017-01-10 18:39   ` Max Filippov
2017-01-10 18:47     ` Peter Maydell
2017-01-10 18:51       ` Max Filippov [this message]
2017-01-12 11:28     ` Pavel Dovgalyuk
2017-01-12 12:01       ` Peter Maydell
2017-01-12 12:19         ` Pavel Dovgalyuk
2017-01-16 17:19           ` Paolo Bonzini
2017-01-17  5:45             ` Pavel Dovgalyuk
2017-01-17 18:20             ` Max Filippov
2017-01-15 21:52       ` Max Filippov
2017-01-10  9:10 ` Frederic Konrad
2017-01-10 18:45   ` Max Filippov

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='CAMo8BfKTqxnR=ONdAfD1pWiGhsVOG5TiuS+0uRgAZWSCOuX3Ow@mail.gmail.com' \
    --to=jcmvbkbc@gmail.com \
    --cc=Pavel.Dovgaluk@ispras.ru \
    --cc=alex@alex.org.uk \
    --cc=dovgaluk@ispras.ru \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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.