From: Peter Maydell <peter.maydell@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: Richard Henderson <richard.henderson@linaro.org>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 0/5] target/arm: KVM vs ARMISARegisters
Date: Thu, 1 Nov 2018 18:09:03 +0000 [thread overview]
Message-ID: <CAFEAcA8dE2ZRqB826UE1KpgM-wGCTe510c2zYebosZXNF1feKA@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA9EFYCaO2XMdYq+Uy72VbTow7oJSHm18TSzG+tUP8NsBg@mail.gmail.com>
On 1 November 2018 at 17:30, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 1 November 2018 at 17:26, Alex Bennée <alex.bennee@linaro.org> wrote:
>> I think the problem is the we trip over the assert because:
>>
>> /* Some features automatically imply others: */
>> if (arm_feature(env, ARM_FEATURE_V8)) {
>> if (arm_feature(env, ARM_FEATURE_M)) {
>> set_feature(env, ARM_FEATURE_V7);
>> } else {
>> set_feature(env, ARM_FEATURE_V7VE);
>> }
>> }
>>
>> Allows:
>>
>> if (arm_feature(env, ARM_FEATURE_V7VE)) {
>> assert(cpu_isar_feature(arm_div, cpu));
>>
>> Which isn't strictly true on kvm guests.
>
> KVM guests should definitely all be v7VE and all have
> the arm divide instruction, if they implement AArch32 at all.
> I think what we're hitting here is the case where the host
> CPU has no AArch32 support. In that case the ID_ISAR0_EL1
> sysreg (which we read from KVM and use to populate the
> cpu->isar struct) has an UNKNOWN value.
So I think the assert should probably be
"assert that if this cpu has any EL that can execute at
AArch32 then it has the arm_div ISAR feature". You can
determine the former by looking at ID_AA64PFR0_EL1 field
EL0 (bits [3:0]), which will be >= 0b0010 if AArch32 is
supported at any EL.
thanks
-- PMM
prev parent reply other threads:[~2018-11-01 18:09 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-24 11:37 [Qemu-devel] [PATCH 0/5] target/arm: KVM vs ARMISARegisters Richard Henderson
2018-10-24 11:37 ` [Qemu-devel] [PATCH 1/5] target/arm: Install ARMISARegisters from kvm host Richard Henderson
2018-11-02 14:24 ` Peter Maydell
2018-10-24 11:37 ` [Qemu-devel] [PATCH 2/5] target/arm: Fill in ARMISARegisters for kvm64 Richard Henderson
2018-10-29 14:58 ` Peter Maydell
2018-10-29 16:03 ` Richard Henderson
2018-11-02 14:37 ` Peter Maydell
2018-10-24 11:37 ` [Qemu-devel] [PATCH 3/5] target/arm: Introduce read_sys_reg32 for kvm32 Richard Henderson
2018-10-24 12:49 ` Richard Henderson
2018-11-02 14:30 ` Peter Maydell
2018-11-02 14:37 ` Richard Henderson
2018-10-24 11:37 ` [Qemu-devel] [PATCH 4/5] target/arm: Fill in ARMISARegisters " Richard Henderson
2018-10-29 15:13 ` Peter Maydell
2018-10-29 15:21 ` Peter Maydell
2018-10-29 15:40 ` Marc Zyngier
2018-10-29 15:48 ` Peter Maydell
2018-10-29 15:56 ` Marc Zyngier
2018-10-24 11:37 ` [Qemu-devel] [PATCH 5/5] target/arm: Convert t32ee from feature bit to isar3 test Richard Henderson
2018-11-02 14:34 ` Peter Maydell
2018-11-01 17:26 ` [Qemu-devel] [PATCH 0/5] target/arm: KVM vs ARMISARegisters Alex Bennée
2018-11-01 17:30 ` Peter Maydell
2018-11-01 18:09 ` Peter Maydell [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=CAFEAcA8dE2ZRqB826UE1KpgM-wGCTe510c2zYebosZXNF1feKA@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).