diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2020-07-23 16:27:01 +0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2020-07-23 15:03:54 -0400 |
commit | 0baa4b445e28f37243e5dc72e7efe32f0c9d7801 (patch) | |
tree | 78ee53139eca0e3d49bea9c956f7a74d7a1cda10 /linux-user | |
parent | 8ffa52c20d5693d454f65f2024a1494edfea65d4 (diff) | |
download | qemu-0baa4b445e28f37243e5dc72e7efe32f0c9d7801.zip qemu-0baa4b445e28f37243e5dc72e7efe32f0c9d7801.tar.gz qemu-0baa4b445e28f37243e5dc72e7efe32f0c9d7801.tar.bz2 |
KVM: fix CPU reset wrt HF2_GIF_MASK
HF2_GIF_MASK is set in env->hflags2 unconditionally on CPU reset
(see x86_cpu_reset()) but when calling KVM_SET_NESTED_STATE,
KVM_STATE_NESTED_GIF_SET is only valid for nSVM as e.g. nVMX code
looks like
if (kvm_state->hdr.vmx.vmxon_pa == -1ull) {
if (kvm_state->flags & ~KVM_STATE_NESTED_EVMCS)
return -EINVAL;
}
Also, when adjusting the environment after KVM_GET_NESTED_STATE we
need not reset HF2_GIF_MASK on VMX as e.g. x86_cpu_pending_interrupt()
expects it to be set.
Alternatively, we could've made env->hflags2 SVM-only.
Reported-by: Jan Kiszka <jan.kiszka@siemens.com>
Fixes: b16c0e20c742 ("KVM: add support for AMD nested live migration")
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20200723142701.2521161-1-vkuznets@redhat.com>
Tested-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'linux-user')
0 files changed, 0 insertions, 0 deletions