From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: patches@linaro.org, "Igor Mammedov" <imammedo@redhat.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [Qemu-devel] [PATCH v2 0/6] arm: support -cpu max (and gic-version=max)
Date: Tue, 6 Mar 2018 12:55:20 +0000 [thread overview]
Message-ID: <20180306125526.27838-1-peter.maydell@linaro.org> (raw)
This patchset adds support for '-cpu max' to Arm, along the lines
of the existing support we have for x86 targets:
* under KVM, -cpu max is the same as -cpu host
* under TCG, -cpu max means "emulate with as many features as
possible"
-cpu max is supported for both usermode and system emulation,
again following the x86 line.
NB that cross-QEMU-version migration is not supported for -cpu max:
in future the definition of "maximum set of features" will change
as we add more emulation features.
The patchset also adds support to the virt board for the "max"
option to -machine gic-version, requesting "best available
interrupt controller", with the same semantics as -cpu max.
Together these should assist users like libguestfs that just want
to be able to run code without having to figure out what the
right command line arguments for this particular host system are.
The patches make 'any' a synonym for 'max', using the approach
of putting a compat hack into arm_cpu_class_by_name() that
Igor suggested. For the moment, we don't enable any of the
CPU feature bits in 'max' that aren't in the a15/a57 if we're
doing system emulation mode. This is a combination of:
* some of those bits are currently only implemented sufficiently
for user-only mode, not for system emulation
* we would also need to update ID register bits to advertise the
extra features
We should certainly do that, but I'd like to get basic -cpu max
support into 2.12, and the softfreeze deadline is rapidly approaching,
so I've opted to postpone that to post 2.12. If people have the time
to review this series this week I'd really appreciate it.
Changes since v1:
* the "check CPU realize succeeded in virt board" patch is in master
* the "target/arm: Make 'any' CPU just an alias for 'max'" is new,
and unifies 'any' with 'max' as suggested in review of v1
* the other patches are essentially unchanged
thanks
-- PMM
Peter Maydell (6):
target/arm: Query host CPU features on-demand at instance init
target/arm: Move definition of 'host' cpu type into cpu.c
target/arm: Add "-cpu max" support
target/arm: Make 'any' CPU just an alias for 'max'
hw/arm/virt: Add "max" to the list of CPU types "virt" supports
hw/arm/virt: Support -machine gic-version=max
target/arm/cpu-qom.h | 2 ++
target/arm/cpu.h | 5 +++
target/arm/kvm_arm.h | 35 +++++++++++++------
hw/arm/virt.c | 30 +++++++++++------
target/arm/cpu.c | 95 +++++++++++++++++++++++++++++++++++++++++++---------
target/arm/cpu64.c | 66 +++++++++++++++++++++++-------------
target/arm/kvm.c | 53 ++++++++++-------------------
target/arm/kvm32.c | 8 ++---
target/arm/kvm64.c | 8 ++---
9 files changed, 198 insertions(+), 104 deletions(-)
--
2.16.2
next reply other threads:[~2018-03-06 12:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-06 12:55 Peter Maydell [this message]
2018-03-06 12:55 ` [Qemu-devel] [PATCH v2 1/6] target/arm: Query host CPU features on-demand at instance init Peter Maydell
2018-03-06 12:55 ` [Qemu-devel] [PATCH v2 2/6] target/arm: Move definition of 'host' cpu type into cpu.c Peter Maydell
2018-03-06 12:55 ` [Qemu-devel] [PATCH v2 3/6] target/arm: Add "-cpu max" support Peter Maydell
2018-03-06 12:55 ` [Qemu-devel] [PATCH v2 4/6] target/arm: Make 'any' CPU just an alias for 'max' Peter Maydell
2018-03-06 15:16 ` Igor Mammedov
2018-03-06 16:03 ` Peter Maydell
2018-03-06 12:55 ` [Qemu-devel] [PATCH v2 5/6] hw/arm/virt: Add "max" to the list of CPU types "virt" supports Peter Maydell
2018-03-06 12:55 ` [Qemu-devel] [PATCH v2 6/6] hw/arm/virt: Support -machine gic-version=max 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=20180306125526.27838-1-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=f4bug@amsat.org \
--cc=imammedo@redhat.com \
--cc=patches@linaro.org \
--cc=qemu-arm@nongnu.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).