qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Fedorov <serge.fdrv@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] target-arm: Add MDCR_EL2
Date: Tue, 29 Sep 2015 20:24:15 +0300	[thread overview]
Message-ID: <560AC93F.3060505@gmail.com> (raw)
In-Reply-To: <CAFEAcA-j0dFVqiA6p-1JXyKdJ5QH6BnJPJAw2sPeO1tsYr2mfA@mail.gmail.com>

On 29.09.2015 20:19, Peter Maydell wrote:
> On 29 September 2015 at 18:14, Sergey Fedorov <serge.fdrv@gmail.com> wrote:
>> On 29.09.2015 12:33, Peter Maydell wrote:
>>> On 28 September 2015 at 11:37, Sergey Fedorov <serge.fdrv@gmail.com> wrote:
>>> This field should be named mdcr_el2 if we have it, but:
>>> the reset value for this register is defined architecturally,
>>> so we don't need to specify it per CPU. (It's "all 0s, except
>>> the bottom field resets to the same value as PMCR.N". Strictly
>>> speaking some fields are defined to be architecturally
>>> unknown and so might differ per CPU, but only in ways which
>>> a guest doesn't care about. We typically model these in
>>> the same way for all guest CPUs in QEMU.)
>>>
>> We reset PMCR_EL0 to cpu->midr & 0xff000000. So if we want to reset
>> MDCR_EL2.N with PMCR_EL0.N we should reset PMCR_EL0.N to the proper
>> value somehow first. I think we could reset PMCR_EL0 with its own reset
>> value from a dedicated ARMCPU structure field independent from MIDR_EL1
>> reset value. This makes sense considering that most of PMCR_EL0's fields
>> are RO/UNKNOWN. What do you think?
> At the moment we don't implement any perf counters except
> the cycle counter, so I think PMCR_EL0.N is already being
> reset to the proper value...

Seems like I should just simply use zero as a reset value for MDCR_EL2
register :)

  reply	other threads:[~2015-09-29 17:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28 10:37 [Qemu-devel] [PATCH] target-arm: Add MDCR_EL2 Sergey Fedorov
2015-09-29  6:00 ` Alex Bennée
2015-09-29  9:25   ` Peter Maydell
2015-10-02 14:39     ` Alex Bennée
2015-09-29  9:33 ` Peter Maydell
2015-09-29 17:14   ` Sergey Fedorov
2015-09-29 17:19     ` Peter Maydell
2015-09-29 17:24       ` Sergey Fedorov [this message]
2015-10-08  9:56         ` Sergey Fedorov
2015-10-08 10:10           ` Peter Maydell

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=560AC93F.3060505@gmail.com \
    --to=serge.fdrv@gmail.com \
    --cc=peter.maydell@linaro.org \
    --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).