From fb05e4fb48875bf045b69efc652bf3a3d506d1bb Mon Sep 17 00:00:00 2001 From: Will Deacon Date: Thu, 7 Jul 2022 15:49:14 +0100 Subject: [PATCH] Revert "FROMLIST: BACKPORT: KVM: arm64: Indicate SYSTEM_RESET2 in kvm_run::system_event flags field" This reverts commit 1cff9a26fcfaa8802f83338b9b32e48c98cab398. Bug: 233587962 Signed-off-by: Will Deacon Change-Id: Iebfafe1890f2d3c07218d3345f7d3d65af03b127 --- Documentation/virt/kvm/api.rst | 5 ----- arch/arm64/include/uapi/asm/kvm.h | 7 ------- arch/arm64/kvm/psci.c | 15 ++++----------- 3 files changed, 4 insertions(+), 23 deletions(-) diff --git a/Documentation/virt/kvm/api.rst b/Documentation/virt/kvm/api.rst index 870af061db79..17057eef5573 100644 --- a/Documentation/virt/kvm/api.rst +++ b/Documentation/virt/kvm/api.rst @@ -5681,11 +5681,6 @@ Valid values for 'type' are: to ignore the request, or to gather VM memory core dump and/or reset/shutdown of the VM. -Valid flags are: - - - KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 (arm64 only) -- the guest issued - a SYSTEM_RESET2 call according to v1.1 of the PSCI specification. - :: /* KVM_EXIT_IOAPIC_EOI */ diff --git a/arch/arm64/include/uapi/asm/kvm.h b/arch/arm64/include/uapi/asm/kvm.h index 0c93ab421647..785fe81c2a46 100644 --- a/arch/arm64/include/uapi/asm/kvm.h +++ b/arch/arm64/include/uapi/asm/kvm.h @@ -418,13 +418,6 @@ struct kvm_arm_copy_mte_tags { #define KVM_PSCI_RET_INVAL PSCI_RET_INVALID_PARAMS #define KVM_PSCI_RET_DENIED PSCI_RET_DENIED -/* arm64-specific kvm_run::system_event flags */ -/* - * Reset caused by a PSCI v1.1 SYSTEM_RESET2 call. - * Valid only when the system event has a type of KVM_SYSTEM_EVENT_RESET. - */ -#define KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2 (1ULL << 0) - /* Protected KVM */ #define KVM_CAP_ARM_PROTECTED_VM_FLAGS_SET_FW_IPA 0 #define KVM_CAP_ARM_PROTECTED_VM_FLAGS_INFO 1 diff --git a/arch/arm64/kvm/psci.c b/arch/arm64/kvm/psci.c index cc675b651d63..b873deaf9e3c 100644 --- a/arch/arm64/kvm/psci.c +++ b/arch/arm64/kvm/psci.c @@ -146,7 +146,7 @@ static unsigned long kvm_psci_vcpu_affinity_info(struct kvm_vcpu *vcpu) return PSCI_0_2_AFFINITY_LEVEL_OFF; } -static void kvm_prepare_system_event(struct kvm_vcpu *vcpu, u32 type, u64 flags) +static void kvm_prepare_system_event(struct kvm_vcpu *vcpu, u32 type) { int i; struct kvm_vcpu *tmp; @@ -166,24 +166,17 @@ static void kvm_prepare_system_event(struct kvm_vcpu *vcpu, u32 type, u64 flags) memset(&vcpu->run->system_event, 0, sizeof(vcpu->run->system_event)); vcpu->run->system_event.type = type; - vcpu->run->system_event.flags = flags; vcpu->run->exit_reason = KVM_EXIT_SYSTEM_EVENT; } static void kvm_psci_system_off(struct kvm_vcpu *vcpu) { - kvm_prepare_system_event(vcpu, KVM_SYSTEM_EVENT_SHUTDOWN, 0); + kvm_prepare_system_event(vcpu, KVM_SYSTEM_EVENT_SHUTDOWN); } static void kvm_psci_system_reset(struct kvm_vcpu *vcpu) { - kvm_prepare_system_event(vcpu, KVM_SYSTEM_EVENT_RESET, 0); -} - -static void kvm_psci_system_reset2(struct kvm_vcpu *vcpu) -{ - kvm_prepare_system_event(vcpu, KVM_SYSTEM_EVENT_RESET, - KVM_SYSTEM_EVENT_RESET_FLAG_PSCI_RESET2); + kvm_prepare_system_event(vcpu, KVM_SYSTEM_EVENT_RESET); } static unsigned long kvm_psci_check_allowed_function(struct kvm_vcpu *vcpu, u32 fn) @@ -343,7 +336,7 @@ static int kvm_psci_1_x_call(struct kvm_vcpu *vcpu, u32 minor) arg < PSCI_1_1_RESET_TYPE_VENDOR_START) { val = PSCI_RET_INVALID_PARAMS; } else { - kvm_psci_system_reset2(vcpu); + kvm_psci_system_reset(vcpu); val = PSCI_RET_INTERNAL_FAILURE; ret = 0; }