Karl Meakin | 8e58ddc | 2024-11-08 23:19:34 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2024 The Hafnium Authors. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style |
| 5 | * license that can be found in the LICENSE file or at |
| 6 | * https://opensource.org/licenses/BSD-3-Clause. |
| 7 | */ |
| 8 | |
| 9 | #pragma once |
| 10 | |
| 11 | #include "hf/vm.h" |
| 12 | |
| 13 | /** |
| 14 | * Deactivate interrupt. |
| 15 | */ |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 16 | int64_t ffa_interrupts_deactivate(uint32_t pint_id, uint32_t vint_id, |
| 17 | struct vcpu *current); |
Karl Meakin | 8e58ddc | 2024-11-08 23:19:34 +0000 | [diff] [blame] | 18 | |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 19 | void ffa_interrupts_handle_secure_interrupt(struct vcpu *current, |
| 20 | struct vcpu **next); |
| 21 | bool ffa_interrupts_inject_notification_pending_interrupt( |
Daniel Boulby | d49d077 | 2025-01-15 11:19:36 +0000 | [diff] [blame^] | 22 | struct vcpu_locked next_locked, struct vm_locked receiver_locked); |
Karl Meakin | 8e58ddc | 2024-11-08 23:19:34 +0000 | [diff] [blame] | 23 | |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 24 | bool ffa_interrupts_intercept_call(struct vcpu_locked current_locked, |
| 25 | struct vcpu_locked next_locked, |
| 26 | struct ffa_value *signal_interrupt); |
Karl Meakin | 8e58ddc | 2024-11-08 23:19:34 +0000 | [diff] [blame] | 27 | |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 28 | struct vcpu *ffa_interrupts_unwind_nwd_call_chain(struct vcpu *current); |
Karl Meakin | 8e58ddc | 2024-11-08 23:19:34 +0000 | [diff] [blame] | 29 | |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 30 | void ffa_interrupts_enable_virtual_interrupts(struct vcpu_locked current_locked, |
| 31 | struct vm_locked vm_locked); |
Karl Meakin | fa1dcb8 | 2025-02-10 16:47:50 +0000 | [diff] [blame] | 32 | void ffa_interrupts_mask(struct vcpu_locked receiver_vcpu_locked); |
| 33 | void ffa_interrupts_unmask(struct vcpu *current); |
Karl Meakin | 8e58ddc | 2024-11-08 23:19:34 +0000 | [diff] [blame] | 34 | /** |
| 35 | * Reconfigure the interrupt belonging to the current partition at runtime. |
| 36 | */ |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 37 | int64_t ffa_interrupts_reconfigure(uint32_t int_id, uint32_t command, |
| 38 | uint32_t value, struct vcpu *current); |
Karl Meakin | 8e58ddc | 2024-11-08 23:19:34 +0000 | [diff] [blame] | 39 | |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 40 | uint32_t ffa_interrupts_get(struct vcpu_locked current_locked); |