Karl Meakin | 5b2da50 | 2024-11-07 17:13:51 +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 | |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 13 | void ffa_vm_disable_interrupts(struct vm_locked vm_locked); |
Karl Meakin | 5b2da50 | 2024-11-07 17:13:51 +0000 | [diff] [blame] | 14 | |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 15 | void ffa_vm_init(struct mpool *ppool); |
Karl Meakin | 5b2da50 | 2024-11-07 17:13:51 +0000 | [diff] [blame] | 16 | |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 17 | struct vm_locked ffa_vm_nwd_create(ffa_id_t vm_id); |
Karl Meakin | 5b2da50 | 2024-11-07 17:13:51 +0000 | [diff] [blame] | 18 | |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 19 | bool ffa_vm_supports_indirect_messages(struct vm *vm); |
Karl Meakin | 5b2da50 | 2024-11-07 17:13:51 +0000 | [diff] [blame] | 20 | |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 21 | bool ffa_vm_notifications_info_get(uint16_t *ids, uint32_t *ids_count, |
| 22 | uint32_t *lists_sizes, uint32_t *lists_count, |
| 23 | uint32_t ids_count_max); |
Karl Meakin | 5b2da50 | 2024-11-07 17:13:51 +0000 | [diff] [blame] | 24 | |
| 25 | /** Get NWd VM's structure. */ |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 26 | struct vm_locked ffa_vm_find_locked(ffa_id_t vm_id); |
Karl Meakin | 5b2da50 | 2024-11-07 17:13:51 +0000 | [diff] [blame] | 27 | |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 28 | struct vm_locked ffa_vm_find_locked_create(ffa_id_t vm_id); |
Karl Meakin | 5b2da50 | 2024-11-07 17:13:51 +0000 | [diff] [blame] | 29 | |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 30 | void ffa_vm_destroy(struct vm_locked to_destroy_locked); |
Karl Meakin | 5b2da50 | 2024-11-07 17:13:51 +0000 | [diff] [blame] | 31 | |
| 32 | /** Reclaim all resources belonging to VM in aborted state. */ |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 33 | void ffa_vm_free_resources(struct vm_locked vm_locked); |
Karl Meakin | 5b2da50 | 2024-11-07 17:13:51 +0000 | [diff] [blame] | 34 | |
| 35 | /** Checks whether managed exit is supported by given SP. */ |
Karl Meakin | 117c808 | 2024-12-04 16:03:28 +0000 | [diff] [blame] | 36 | bool ffa_vm_managed_exit_supported(struct vm *vm); |