linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: andre.przywara@linaro.org (Andre Przywara)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4] ARM/KVM: save and restore generic timer registers
Date: Thu, 12 Dec 2013 10:32:43 +0100	[thread overview]
Message-ID: <52A982BB.4030901@linaro.org> (raw)
In-Reply-To: <CAFEAcA_F3T1+YsKKq3h8P139OX085N-PPPPZo5dvwgwcuGoXHg@mail.gmail.com>

On 12/12/2013 10:23 AM, Peter Maydell wrote:
> On 12 December 2013 02:28, Christoffer Dall <christoffer.dall@linaro.org> wrote:
>> diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt
>> index a30035d..9565e6a 100644
>> --- a/Documentation/virtual/kvm/api.txt
>> +++ b/Documentation/virtual/kvm/api.txt
>> @@ -1889,9 +1889,12 @@ value in the kvm_regs structure seen as a 32bit array.
>>   arm64 CCSIDR registers are demultiplexed by CSSELR value:
>>     0x6020 0000 0011 00 <csselr:8>
>>
>> -arm64 system registers have the following id bit patterns:
>> +arm64 64-bit system registers have the following id bit patterns:
>>     0x6030 0000 0013 <op0:2> <op1:3> <crn:4> <crm:4> <op2:3>
>>
>> +arm64 32-bit system registers have the following id bit patterns:
>> +  0x6020 0000 0013 <op0:2> <op1:3> <crn:4> <crm:4> <op2:3>
>
> What does it mean to say that a system register for AArch64
> is "32 bits" given that MRS/MSR always operate on a 64 bit
> register? We have the distinction in AArch32 because the
> instructions (and whether the input/output is in one register
> or a register pair) are different, but I can't see the need for
> AArch64.

But ARMv8 ARM still defines these registers as 32-bit:
D8.5.14: CNTV_CTL_EL0
Attributes
            CNTV_CTL_EL0 is a 32-bit register.
But indeed the MSR/MRS instruction references a Xt register, and the 
documentation does not seem to tell how this is handled, so I assume 
this is zero-extended.
Would be great to have this clarified, though.

Regards,
Andre.


>
> (The code I've just written for QEMU to handle sysregs says
> "they're all 64 bit"...)
>
> thanks
> -- PMM
>

  reply	other threads:[~2013-12-12  9:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-10 10:50 [PATCH v4] ARM/KVM: save and restore generic timer registers Andre Przywara
2013-12-10 10:55 ` Andre Przywara
2013-12-12  2:28 ` Christoffer Dall
2013-12-12  9:23   ` Peter Maydell
2013-12-12  9:32     ` Andre Przywara [this message]
2013-12-12 11:36       ` Peter Maydell
2013-12-12 17:15         ` Marc Zyngier
2013-12-12 19:24           ` Christoffer Dall

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=52A982BB.4030901@linaro.org \
    --to=andre.przywara@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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).