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

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