[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v2 00/10] Support disable/enable CPU features for AArch64
From: |
Peng Liang |
Subject: |
[RFC v2 00/10] Support disable/enable CPU features for AArch64 |
Date: |
Thu, 17 Sep 2020 20:14:39 +0800 |
QEMU does not support disable/enable CPU features in AArch64 for now.
This patch series add support for CPU features in AArch64.
Firstly, we change the isar struct in ARMCPU to an array for
convenience. Secondly, we add support to configure CPU feautres in
AArch64 and make sure that the ID registers can be synchronized to KVM
so that guest can read the value we configure. Thirdly, we add a
mechanism to solve the dependency relationship of some CPU features.
Last, we add a KVM_CAP_ARM_CPU_FEATURE to check whether KVM supports to
set CPU features in AArch64.
Also export CPU features to the result of qmp query-cpu-model-expansion
so that libvirt can get the supported CPU features.
Update the ID fields to ARMv8.6 and add some CPU features according to
the new ID fields.
With related KVM patch set[1], we can disable/enable CPU features in
AArch64.
[1] https://patchwork.kernel.org/patch/11782361/
v1 -> v2:
- adjust the order of patches
- only expose AArch64 features which are exposed by kernel via /proc/cpuinfo
- add check for conflict CPU features set by user
- split the change in linux-headers/linux/kvm.h
Peng Liang (10):
linux-header: Introduce KVM_CAP_ARM_CPU_FEATURE
target/arm: Update ID fields
target/arm: only set ID_PFR1_EL1.GIC for AArch32 guest
target/arm: convert isar regs to array
target/arm: Introduce kvm_arm_cpu_feature_supported
target/arm: register CPU features for property
target/arm: Allow ID registers to synchronize to KVM
target/arm: Introduce user_mask to indicate whether the feature is set
explicitly
target/arm: introduce CPU feature dependency mechanism
target/arm: Add CPU features to query-cpu-model-expansion
linux-headers/linux/kvm.h | 1 +
target/arm/cpu.h | 243 +++++++++--------
target/arm/internals.h | 15 +-
target/arm/kvm_arm.h | 10 +
hw/intc/armv7m_nvic.c | 28 +-
target/arm/cpu.c | 555 ++++++++++++++++++++++++++++++--------
target/arm/cpu64.c | 174 ++++++------
target/arm/cpu_tcg.c | 250 ++++++++---------
target/arm/helper.c | 102 ++++---
target/arm/kvm.c | 38 +++
target/arm/kvm64.c | 86 +++---
target/arm/monitor.c | 4 +
12 files changed, 976 insertions(+), 530 deletions(-)
--
2.26.2
- [RFC v2 00/10] Support disable/enable CPU features for AArch64,
Peng Liang <=
- [RFC v2 01/10] linux-header: Introduce KVM_CAP_ARM_CPU_FEATURE, Peng Liang, 2020/09/17
- [RFC v2 03/10] target/arm: only set ID_PFR1_EL1.GIC for AArch32 guest, Peng Liang, 2020/09/17
- [RFC v2 02/10] target/arm: Update ID fields, Peng Liang, 2020/09/17
- [RFC v2 04/10] target/arm: convert isar regs to array, Peng Liang, 2020/09/17
- [RFC v2 05/10] target/arm: Introduce kvm_arm_cpu_feature_supported, Peng Liang, 2020/09/17
- [RFC v2 07/10] target/arm: Allow ID registers to synchronize to KVM, Peng Liang, 2020/09/17
- [RFC v2 08/10] target/arm: Introduce user_mask to indicate whether the feature is set explicitly, Peng Liang, 2020/09/17
- [RFC v2 10/10] target/arm: Add CPU features to query-cpu-model-expansion, Peng Liang, 2020/09/17
- [RFC v2 06/10] target/arm: register CPU features for property, Peng Liang, 2020/09/17
- [RFC v2 09/10] target/arm: introduce CPU feature dependency mechanism, Peng Liang, 2020/09/17