summaryrefslogtreecommitdiffstats
path: root/arch/arm64/include
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2020-12-22 12:46:41 +0000
committerMarc Zyngier <maz@kernel.org>2020-12-22 12:56:44 +0000
commit767c973f2e4a9264a4f159c9fad5ca8acdb9915e (patch)
tree635addaa0a5ec0a94d732ec19930ae63b09055ed /arch/arm64/include
parent860a4c3d1e04a3c3e62bacbbba64417bf49768e2 (diff)
downloadlinux-767c973f2e4a9264a4f159c9fad5ca8acdb9915e.tar.bz2
KVM: arm64: Declutter host PSCI 0.1 handling
Although there is nothing wrong with the current host PSCI relay implementation, we can clean it up and remove some of the helpers that do not improve the overall readability of the legacy PSCI 0.1 handling. Opportunity is taken to turn the bitmap into a set of booleans, and creative use of preprocessor macros make init and check more concise/readable. Suggested-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/include')
-rw-r--r--arch/arm64/include/asm/kvm_host.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index bce2452b305c..8fcfab0c2567 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -241,11 +241,6 @@ struct kvm_host_data {
struct kvm_pmu_events pmu_events;
};
-#define KVM_HOST_PSCI_0_1_CPU_SUSPEND BIT(0)
-#define KVM_HOST_PSCI_0_1_CPU_ON BIT(1)
-#define KVM_HOST_PSCI_0_1_CPU_OFF BIT(2)
-#define KVM_HOST_PSCI_0_1_MIGRATE BIT(3)
-
struct kvm_host_psci_config {
/* PSCI version used by host. */
u32 version;
@@ -253,8 +248,10 @@ struct kvm_host_psci_config {
/* Function IDs used by host if version is v0.1. */
struct psci_0_1_function_ids function_ids_0_1;
- /* Bitmask of functions enabled for v0.1, bits KVM_HOST_PSCI_0_1_*. */
- unsigned int enabled_functions_0_1;
+ bool psci_0_1_cpu_suspend_implemented;
+ bool psci_0_1_cpu_on_implemented;
+ bool psci_0_1_cpu_off_implemented;
+ bool psci_0_1_migrate_implemented;
};
extern struct kvm_host_psci_config kvm_nvhe_sym(kvm_host_psci_config);