All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Laszlo Ersek <lersek@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	Andrew Jones <drjones@redhat.com>
Subject: Re: [Qemu-devel] when we add EL2 to QEMU TCG ARM emulation and the virt board, should it default on or off?
Date: Thu, 03 Nov 2016 13:46:48 +0000	[thread overview]
Message-ID: <87vaw4u14n.fsf@linaro.org> (raw)
In-Reply-To: <36764954-1ef5-ef26-731c-d23f8c914302@redhat.com>


Laszlo Ersek <lersek@redhat.com> writes:

> On 11/01/16 18:16, Peter Maydell wrote:
>> I'm working on turning on EL2 support in our TCG ARM emulation,
>> and one area I'm not sure about is whether it should default to
>> on or off.
>>
>> We have a few precedents:
>>
>> For EL3 support:
>>  * the CPU property is enabled by default but can be disabled by the board
>>  * 'virt' defaults it to disabled, with a -machine secure=on property
>>    which turns it on (barfing if KVM is enabled) and also does some other
>>    stuff like wiring up secure-only memory and devices and making sure
>>    the GIC has security enabled
>>  * if the user does -cpu has_el3=yes things will probably not go
>>    too well and that's unsupported
>>
>> For PMU support:
>>  * the CPU property is enabled by default
>>  * 'virt' defaults it to enabled (except for virt-2.6 and earlier)
>>  * we do expect the user to be able to turn it on and off with
>>    a -cpu pmu=yes/no option (and the board model changes behaviour
>>    based on whether the CPU claims to have the feature)
>>
>> So what about EL2? Some background facts that are probably relevant:
>>  * at the moment KVM can't support it, but eventually machines with
>>    the nested virtualization hardware support will appear (this is
>>    an ARMv8.3 feature), at which point it ought to work there too
>>  * if you just enable EL2 then some currently working setups stop
>>    working (basically any code that was written to assume it was
>>    entered in EL1); notably this includes kvm-unit-tests (patches
>>    pending from Drew that fix that). Linux is fine though as it
>>    checks and handles both.
>>
>> Disabled-by-default has the advantage that (a) a command line
>> will work the same for TCG and KVM
>
> Definitely a bonus in my book.
>
>> and (b) nothing that used to
>> work will break.
>
> I consider this a requirement, sort of. Regressions are very very
> annoying (unless we can prove the previous command line was bogus to
> begin with, and just happened to work -- I don't think that applies in
> this case).
>
>> The disadvantage is that anybody who wants to
>> be able to run nested KVM will now have to specify a command line
>> option of some kind.
>
> Nested KVM is sophisticated / non-standard enough that one more tweak
> for utilizing it shouldn't be a problem. For example, considering the
> kvm_intel host module (yes, it's x86, but the parallel is obvious), it
> has an explicit parameter called "nested", which defaults to N.

I think if we had a board model other than virt for aarch64 then it
would make sense to behave as close to the real hardware as possible.
However as virt is the default model and is intended for virtualisation
I'd also side with el2 being off by default.

If we ever get an SBSA model then I would expect that to start in as
high a privilege level as it should.

--
Alex Bennée

      reply	other threads:[~2016-11-03 13:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-01 17:16 [Qemu-devel] when we add EL2 to QEMU TCG ARM emulation and the virt board, should it default on or off? Peter Maydell
2016-11-02 10:54 ` Edgar E. Iglesias
2016-11-02 13:59 ` Andrew Jones
2016-12-12 12:48   ` Peter Maydell
2016-12-12 13:22     ` Andrew Jones
2016-12-12 13:30       ` Peter Maydell
2016-11-02 22:04 ` Laszlo Ersek
2016-11-03 13:46   ` Alex Bennée [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=87vaw4u14n.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=drjones@redhat.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=lersek@redhat.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 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.