Portal lifecycle. More...
import arch.s390x.cpu.sync;import arch.s390x.cpu.cpumask;import zxfoundation.dgp.cap.core;import zxfoundation.dgp.cap.types;import zxfoundation.base.transaction;import zxfoundation.scoms.table;import zxfoundation.scoms.metadata.core;import std;import zxfoundation.scoms.kobject.types;import zxfoundation.dgp.portal.types;import arch.s390x.cpu.ar;import zxfoundation.scoms.kobject.ref;import arch.s390x.cpu.aste;import zxfoundation.dgp.domain.core;import zxfoundation.base.types;import arch.s390x.mmu;import zxfoundation.scoms.kobject.base;import zxfoundation.sys.printk.core;import zxfoundation.sync.qspinlock.core;import zxfoundation.base.config;import arch.s390x.cpu.lowcore;import zxfoundation.sys.syschk.core;import zxfoundation.memory.vm;import zxfoundation.dgp.isolation;import zxfoundation.dgp.isolation.types;import zxfoundation.dgp.domain.types;import zxfoundation.dgp.authorize;import zxfoundation.dgp.sync_contract;import lib.error;import zxfoundation.memory.pmm;import zxfoundation.memory.vm.types;import zxfoundation.sync.lockable;import zxfoundation.memory.hhdm;import zxfoundation.base.typestate;import zxfoundation.smp.csd;Data Structures | |
| class | zxfoundation::dgp::portal::detail::portal_create_txn |
| CRTP transaction that tracks the multi-step portal creation. More... | |
| struct | portal_desc |
Enumerations | |
| enum class | zxfoundation::dgp::portal::detail::lifecycle_state |
| Unified lifecycle states for ALL typestate-tracked resources. More... | |
| enum class | portal_prot |
Functions | |
| auto | zxfoundation::dgp::portal::detail::allocate_ar (zxfoundation::dgp::domain::domain &source) noexcept -> std::expected< u8, lib::kernel_error > |
| auto | zxfoundation::dgp::portal::destroy_for_domain (u32 domain_id) noexcept -> void |
| Destroy all portals involving a specific domain. | |
| auto | zxfoundation::dgp::portal::init () noexcept -> void |
| Initialize the portal subsystem. | |
| auto | zxfoundation::dgp::portal::portal_count () noexcept -> u32 |
| Return the number of currently active portals in the system. | |
| auto | zxfoundation::dgp::portal::portal_create (u32 source_domain_id, u32 target_domain_id, u64 va_start, u64 va_end, portal_prot prot, u8 ar_num, zxfoundation::memory::vm::vm_region *backing) noexcept -> std::expected< u32, lib::kernel_error > |
Create a new portal from source_domain_id to target_domain_id. | |
| auto | zxfoundation::dgp::portal::portal_destroy (u32 id) noexcept -> std::expected< void, lib::kernel_error > |
Destroy the portal identified by id. | |
| auto | zxfoundation::dgp::portal::portal_find (u32 id) noexcept -> portal_desc * |
| auto | zxfoundation::dgp::portal::detail::portal_root_create (portal_desc &desc, zxfoundation::memory::vm::vm_region &source, zxfoundation::dgp::portal::portal_prot prot) noexcept -> std::expected< void, lib::kernel_error > |
| auto | zxfoundation::dgp::portal::detail::portal_root_destroy (portal_desc &desc) noexcept -> void |
| auto | zxfoundation::dgp::portal::detail::purge_alb_all_cpus () noexcept -> std::expected< void, lib::kernel_error > |
| auto | zxfoundation::dgp::portal::detail::purge_alb_on_cpu (u64, void *) noexcept -> void |
| auto | zxfoundation::dgp::portal::register_portal_cap_lookup () noexcept -> void |
| auto | zxfoundation::dgp::portal::detail::release_ar (zxfoundation::dgp::domain::domain &source, u8 ar) noexcept -> void |
Variables | |
| no_export std::array< smp::csd::call_single_data, zxfoundation::base::config::CONFIG_ZX_MAX_CPUS > | zxfoundation::dgp::portal::detail::g_alb_purge_csds {} |
| no_export std::atomic_flag | zxfoundation::dgp::portal::detail::g_alb_purge_lock {} |
| no_export::lib::cpumask | zxfoundation::dgp::portal::detail::g_alb_purge_mask {} |
| no_export zxfoundation::sync::qspinlock::qspinlock | zxfoundation::dgp::portal::detail::g_portal_lock {} |
| no_export scoms_table< portal_desc, MAX_PORTALS > | zxfoundation::dgp::portal::detail::g_portal_table {} |
| SCOMS-managed portal table (replaces ad-hoc array + lock + count). | |
| constexpr u32 | MAX_PORTALS |
Portal lifecycle.
SPDX-License-Identifier: Apache-2.0
|
strong |
Unified lifecycle states for ALL typestate-tracked resources.
Every SCOMS-managed object, every folio, and every slab cache uses exactly these states. No subsystem may define its own.
|
exportnoexcept |
Destroy all portals involving a specific domain.
| domain_id | The domain whose portals should be destroyed. |
|
nodiscardexportnoexcept |
Create a new portal from source_domain_id to target_domain_id.
| source_domain_id | Domain that will hold the portal (owns the AR). |
| target_domain_id | Domain whose address space is accessed. |
| va_start | Start of the accessible VA range in the target. |
| va_end | End (exclusive) of the accessible VA range. |
| prot | Access protection (read, write, rw). |
| ar_num | Access register number (0-15) in the source domain. |
|
nodiscardexportnoexcept |
Destroy the portal identified by id.
| id | Portal slot ID returned by portal_create(). |