mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor, vmm: Fix aarch64 SVE register save/restore
When SVE is enabled, KVM replaces the FPSIMD V-registers with wider SVE Z-registers. Attempting to access the old FPSIMD offsets returns EINVAL. Fix by classifying each register from KVM_GET_REG_LIST as core, system, or extended. Extended registers (currently SVE only) are saved as generic `ExtendedReg` entries split into `pre_finalize_regs` (registers like SVE VLS that must be written before `vcpu_finalize`) and `extended_regs`. FPSIMD registers are only accessed when SVE is absent. Unrecognized register families error immediately so future extensions like SME fail clearly rather than silently losing state. The snapshot is deserialized before vCPU init to make pre-finalize register state available for the init -> VLS -> finalize ordering required by KVM. Signed-off-by: Ruben Hakobyan <hruben@meta.com>
This commit is contained in:
committed by
Rob Bradford
parent
e390f0bdc1
commit
5c25d82f59
@@ -4,3 +4,11 @@
|
||||
|
||||
pub mod gic;
|
||||
pub mod regs;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize)]
|
||||
pub struct ExtendedReg {
|
||||
pub id: u64,
|
||||
pub data: Vec<u8>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user