Loading arch/arm64/kvm/handle_exit.c +11 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,16 @@ static int handle_svc(struct kvm_vcpu *vcpu) return 1; } static int kvm_handle_gcs(struct kvm_vcpu *vcpu) { /* We don't expect GCS, so treat it with contempt */ if (kvm_has_feat(vcpu->kvm, ID_AA64PFR1_EL1, GCS, IMP)) WARN_ON_ONCE(1); kvm_inject_undefined(vcpu); return 1; } static int handle_other(struct kvm_vcpu *vcpu) { bool is_l2 = vcpu_has_nv(vcpu) && !is_hyp_ctxt(vcpu); Loading Loading @@ -380,6 +390,7 @@ static exit_handle_fn arm_exit_handlers[] = { [ESR_ELx_EC_BRK64] = kvm_handle_guest_debug, [ESR_ELx_EC_FP_ASIMD] = kvm_handle_fpasimd, [ESR_ELx_EC_PAC] = kvm_handle_ptrauth, [ESR_ELx_EC_GCS] = kvm_handle_gcs, }; static exit_handle_fn kvm_get_exit_handler(struct kvm_vcpu *vcpu) Loading arch/arm64/kvm/sys_regs.c +8 −0 Original line number Diff line number Diff line Loading @@ -5209,6 +5209,14 @@ void kvm_calculate_traps(struct kvm_vcpu *vcpu) HFGITR_EL2_nBRBIALL); } if (!kvm_has_feat(kvm, ID_AA64PFR1_EL1, GCS, IMP)) { kvm->arch.fgu[HFGRTR_GROUP] |= (HFGRTR_EL2_nGCS_EL0 | HFGRTR_EL2_nGCS_EL1); kvm->arch.fgu[HFGITR_GROUP] |= (HFGITR_EL2_nGCSPUSHM_EL1 | HFGITR_EL2_nGCSSTR_EL1 | HFGITR_EL2_nGCSEPP); } set_bit(KVM_ARCH_FLAG_FGU_INITIALIZED, &kvm->arch.flags); out: mutex_unlock(&kvm->arch.config_lock); Loading Loading
arch/arm64/kvm/handle_exit.c +11 −0 Original line number Diff line number Diff line Loading @@ -298,6 +298,16 @@ static int handle_svc(struct kvm_vcpu *vcpu) return 1; } static int kvm_handle_gcs(struct kvm_vcpu *vcpu) { /* We don't expect GCS, so treat it with contempt */ if (kvm_has_feat(vcpu->kvm, ID_AA64PFR1_EL1, GCS, IMP)) WARN_ON_ONCE(1); kvm_inject_undefined(vcpu); return 1; } static int handle_other(struct kvm_vcpu *vcpu) { bool is_l2 = vcpu_has_nv(vcpu) && !is_hyp_ctxt(vcpu); Loading Loading @@ -380,6 +390,7 @@ static exit_handle_fn arm_exit_handlers[] = { [ESR_ELx_EC_BRK64] = kvm_handle_guest_debug, [ESR_ELx_EC_FP_ASIMD] = kvm_handle_fpasimd, [ESR_ELx_EC_PAC] = kvm_handle_ptrauth, [ESR_ELx_EC_GCS] = kvm_handle_gcs, }; static exit_handle_fn kvm_get_exit_handler(struct kvm_vcpu *vcpu) Loading
arch/arm64/kvm/sys_regs.c +8 −0 Original line number Diff line number Diff line Loading @@ -5209,6 +5209,14 @@ void kvm_calculate_traps(struct kvm_vcpu *vcpu) HFGITR_EL2_nBRBIALL); } if (!kvm_has_feat(kvm, ID_AA64PFR1_EL1, GCS, IMP)) { kvm->arch.fgu[HFGRTR_GROUP] |= (HFGRTR_EL2_nGCS_EL0 | HFGRTR_EL2_nGCS_EL1); kvm->arch.fgu[HFGITR_GROUP] |= (HFGITR_EL2_nGCSPUSHM_EL1 | HFGITR_EL2_nGCSSTR_EL1 | HFGITR_EL2_nGCSEPP); } set_bit(KVM_ARCH_FLAG_FGU_INITIALIZED, &kvm->arch.flags); out: mutex_unlock(&kvm->arch.config_lock); Loading