yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-i386-kvm-Do-not-sync-nested-state-during-runtime.patch

4ec855
From aaf60450da6b0bc4723028aeab9ced75ee03111b Mon Sep 17 00:00:00 2001
4ec855
From: Paolo Bonzini <pbonzini@redhat.com>
4ec855
Date: Mon, 22 Jul 2019 18:22:20 +0100
4ec855
Subject: [PATCH 39/39] i386/kvm: Do not sync nested state during runtime
4ec855
4ec855
RH-Author: Paolo Bonzini <pbonzini@redhat.com>
4ec855
Message-id: <20190722182220.19374-19-pbonzini@redhat.com>
4ec855
Patchwork-id: 89635
4ec855
O-Subject: [RHEL-8.1.0 PATCH qemu-kvm v3 18/18] i386/kvm: Do not sync nested state during runtime
4ec855
Bugzilla: 1689269
4ec855
RH-Acked-by: Peter Xu <zhexu@redhat.com>
4ec855
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
4ec855
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
4ec855
4ec855
From: Jan Kiszka <jan.kiszka@siemens.com>
4ec855
4ec855
Writing the nested state e.g. after a vmport access can invalidate
4ec855
important parts of the kernel-internal state, and it is not needed as
4ec855
well. So leave this out from KVM_PUT_RUNTIME_STATE.
4ec855
4ec855
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
4ec855
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
4ec855
Message-Id: <bdd53f40-4e60-f3ae-7ec6-162198214953@siemens.com>
4ec855
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
4ec855
(cherry picked from commit 20b25d239ab7a94bb8bff3d0f13a9527ee75cf10)
4ec855
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
4ec855
---
4ec855
 target/i386/kvm.c | 10 +++++-----
4ec855
 1 file changed, 5 insertions(+), 5 deletions(-)
4ec855
4ec855
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
4ec855
index 8648f1f..da5f07e 100644
4ec855
--- a/target/i386/kvm.c
4ec855
+++ b/target/i386/kvm.c
4ec855
@@ -3014,12 +3014,12 @@ int kvm_arch_put_registers(CPUState *cpu, int level)
4ec855
 
4ec855
     assert(cpu_is_stopped(cpu) || qemu_cpu_is_self(cpu));
4ec855
 
4ec855
-    ret = kvm_put_nested_state(x86_cpu);
4ec855
-    if (ret < 0) {
4ec855
-        return ret;
4ec855
-    }
4ec855
-
4ec855
     if (level >= KVM_PUT_RESET_STATE) {
4ec855
+        ret = kvm_put_nested_state(x86_cpu);
4ec855
+        if (ret < 0) {
4ec855
+            return ret;
4ec855
+        }
4ec855
+
4ec855
         ret = kvm_put_msr_feature_control(x86_cpu);
4ec855
         if (ret < 0) {
4ec855
             return ret;
4ec855
-- 
4ec855
1.8.3.1
4ec855