Notify hypervisor that core affinities were changed in CIP. This is necessary because the hypervisor has to update the ownership of the cell's CPU core resources.

This commit is contained in:
Michael Mueller
2025-02-25 10:26:48 +01:00
parent ab060aad6b
commit 9135630c00
3 changed files with 15 additions and 0 deletions

View File

@@ -411,6 +411,11 @@ namespace Tukija {
return syscall_5(NOVA_PD_CTRL, Pd_op::PD_DEBUG, pd, limit, usage);
}
ALWAYS_INLINE
inline uint8_t cell_ctrl(mword_t pd, Cell_control const op)
{
return syscall_0(TUKIJA_CELL_CTRL, op, pd);
}
ALWAYS_INLINE
inline uint8_t assign_pci(mword_t pd, mword_t mem, mword_t rid)

View File

@@ -71,6 +71,15 @@ namespace Tukija {
NOVA_PD_CTRL = 0xf,
TUKIJA_CREATE_CELL = 0x10,
TUKIJA_ALLOCATE = 0x11,
TUKIJA_CELL_CTRL = 0x12,
};
/**
* Tukija operations
*/
enum Cell_control
{
UPDATE_AFFINITY = 0,
};
/**

View File

@@ -101,6 +101,7 @@ class Ealan::Cell_component : public Genode::Rpc_object<Cell>,
/* TODO: implement */
Genode::log("Changing cell's affinity to ", affinity);
_calculate_mask_for_location(&_cip->cores_reserved, affinity.location());
Tukija::cell_ctrl(_native_pd.sel(), Tukija::Cell_control::UPDATE_AFFINITY);
}
bool is_brick() override {