From: Manish Jaggi
This patch introduces an error code KVM_EINVARIANT which is returned
by KVM when userland tries to set an invariant register.
The need for this error code is in VM Migration for arm64.
ARM64 systems use mainly -machine virt -cpu host as parameter to qemu.
Migration requires bo
From: Manish Jaggi
When KVM_SET_ONE_REG returns KVM_EINVARIANT call KVM_GET_ONE_REG to query
and then replace the particular guest invariant register value with destination
hosts register.
Signed-off-by: Manish Jaggi
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 65f867d..8cf4dc9 10064
From: Manish Jaggi
This option is user opt-in. hostinvariant will replace guest's invariant
registers with hosts.
Signed-off-by: Manish Jaggi
diff --git a/qemu-options.hx b/qemu-options.hx
index 654ef48..d8c0da7 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3896,6 +3896,19 @@ STEXI
p
From: Manish Jaggi
QEMU on arm systems use -machine virt -cpu host option for a VM.
Migration thus is limited between machines with same cpu.
This is a limitation if migration is desired between cpus which are of same
family and have only few difeerences like bug fixes which have no effect on
VM
From: Manish Jaggi
kvm_arm_is_invariant is added to return true if the register
is invariant. This patch also adds an array invariant_sys_regs
which is lookedup for invaraint register ids.
Currently this patch checks for only MIDR invaraint register.
Signed-off-by: Manish Jaggi
diff --git a/t
From: Manish Jaggi
Invariant registers will be skipped from being restored from
guests' context on migrated host.
Signed-off-by: Manish Jaggi
diff --git a/target/arm/kvm.c b/target/arm/kvm.c
index 65f867d..2d89600 100644
--- a/target/arm/kvm.c
+++ b/target/arm/kvm.c
@@ -451,6 +451,9 @@ bool wr
From: Manish Jaggi
This option along with the API kvm_arm_is_invariant will
prevent any invariant registers written to KVM.
This option is handy when doing migration between arm hosts
which use -cpu host option, and are similar in CPU family but
only differ in MIDR value or other invariant regist
From: Manish Jaggi
QEMU on arm systems use -machine virt -cpu host option for a VM.
Migration thus is limited between machines with same cpu.
This is a limitation if migration is desired between cpus which are of same
family and have only few diferences like bug fixes which have no effect on
VM
Live Migration between machines with different processorIds
VM Migration between machines with different processorId values throws an error
in qemu/kvm. Though this check is appropriate but is overkill in cases where the
two machines are of same SoC/arch family and have exactly similar core/gic bu