diff mbox series

[RFC,v2,07/12] i386/kvm: Exclude mirror vcpu in kvm_synchronize_all_tsc

Message ID 20210823141636.65975-8-dovmurik@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series Confidential guest-assisted live migration | expand

Commit Message

Dov Murik Aug. 23, 2021, 2:16 p.m. UTC
If we don't exclude it there's a hang when stopping the VM during
migration.

Signed-off-by: Dov Murik <dovmurik@linux.ibm.com>
---
 target/i386/kvm/kvm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 6b20917fa5..04bbc89b48 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386/kvm/kvm.c
@@ -241,7 +241,9 @@  void kvm_synchronize_all_tsc(void)
 
     if (kvm_enabled()) {
         CPU_FOREACH(cpu) {
-            run_on_cpu(cpu, do_kvm_synchronize_tsc, RUN_ON_CPU_NULL);
+            if (!cpu->mirror_vcpu) {
+                run_on_cpu(cpu, do_kvm_synchronize_tsc, RUN_ON_CPU_NULL);
+            }
         }
     }
 }