[Qemu-devel] [RFC] [PATCH] kvm: arm: Introduce error code KVM_EINVARIANT

2018-10-23 Thread mjaggi
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

[Qemu-devel] [PATCH v2 2/2] [RFC] arm: program migrated guests' invariant registers with host ones

2018-10-23 Thread mjaggi
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

[Qemu-devel] [PATCH v2 1/2] [RFC] arm: Introduce hostinvariant command line option

2018-10-23 Thread mjaggi
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

[Qemu-devel] [PATCH v2 0/2] [RFC] qemu: arm: Migration between machines with different MIDR values

2018-10-23 Thread mjaggi
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

[Qemu-devel] [RFC] [PATCH 1/3] arm: API to check if the register is invariant

2018-09-26 Thread mjaggi
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

[Qemu-devel] [RFC] [PATCH 3/3] arm: Skip invariant register restore

2018-09-26 Thread mjaggi
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

[Qemu-devel] [RFC] [PATCH 2/3] arm: Introduce skipinvariant command line option

2018-09-26 Thread mjaggi
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

[Qemu-devel] [RFC] [PATCH 0/3] qemu: arm: Migration between machines with different MIDR values

2018-09-26 Thread mjaggi
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

[Qemu-devel] Live Migration between machines with different processor ids

2018-08-20 Thread Mjaggi Oss
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