Skip to content

Commit f994041

Browse files
Marc Zyngieroupton
authored andcommitted
KVM: arm64: Clarify the ordering requirements for vcpu/RD creation
It goes without saying, but it is probably better to spell it out: If userspace tries to restore and VM, but creates vcpus and/or RDs in a different order, the vcpu/RD mapping will be different. Yes, our API is an ugly piece of crap and I can't believe that we missed this. If we want to relax the above, we'll need to define a new userspace API that allows the mapping to be specified, rather than relying on the kernel to perform the mapping on its own. Reviewed-by: Zenghui Yu <yuzenghui@huawei.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230927090911.3355209-12-maz@kernel.org Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
1 parent b5daffb commit f994041

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Documentation/virt/kvm/devices/arm-vgic-v3.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ Groups:
5959
It is invalid to mix calls with KVM_VGIC_V3_ADDR_TYPE_REDIST and
6060
KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION attributes.
6161

62+
Note that to obtain reproducible results (the same VCPU being associated
63+
with the same redistributor across a save/restore operation), VCPU creation
64+
order, redistributor region creation order as well as the respective
65+
interleaves of VCPU and region creation MUST be preserved. Any change in
66+
either ordering may result in a different vcpu_id/redistributor association,
67+
resulting in a VM that will fail to run at restore time.
68+
6269
Errors:
6370

6471
======= =============================================================

0 commit comments

Comments
 (0)