Save and restore the state of GIC (Generic Interrupt Controller) as part of the general VM state on aarch64.
The GIC state consists of three groups of registers:
Distributor registers, implemented in the vm-vcpu-ref/aarch64/regs/dist module.
Redistributors registers per vCPU, implemented in vm-vcpu-ref/aarch64/regs/redist.
System (ICC) registers per vCPU, implemented in vm-vcpu-ref/aarch64/regs/icc.
For redistributors and system registers, target vCPUs are identified by MPIDR registers, stored as part of the per-vCPU state. However, when doing get attr and set attr operations on a KVM device, the value of a MPIDR register should be packed in a specific way defined in https://www.kernel.org/doc/html/latest/virt/kvm/devices/arm-vgic-v3.html. The helper function construct_kvm_mpidrs() is used for this conversion.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
[ ] All commits in this PR are signed (with git commit -s), and the commit
message has max 60 characters for the summary and max 75 characters for each
description line.
[ ] All added/changed functionality has a corresponding unit/integration
test.
[ ] Any newly added unsafe code is properly documented.
Summary of the PR
Save and restore the state of GIC (Generic Interrupt Controller) as part of the general VM state on aarch64.
The GIC state consists of three groups of registers:
vm-vcpu-ref/aarch64/regs/dist
module.vm-vcpu-ref/aarch64/regs/redist
.vm-vcpu-ref/aarch64/regs/icc
.For redistributors and system registers, target vCPUs are identified by MPIDR registers, stored as part of the per-vCPU state. However, when doing
get attr
andset attr
operations on a KVM device, the value of a MPIDR register should be packed in a specific way defined in https://www.kernel.org/doc/html/latest/virt/kvm/devices/arm-vgic-v3.html. The helper functionconstruct_kvm_mpidrs()
is used for this conversion.Requirements
Before submitting your PR, please make sure you addressed the following requirements:
git commit -s
), and the commit message has max 60 characters for the summary and max 75 characters for each description line.unsafe
code is properly documented.