diff options
author | Liran Alon <liran.alon@oracle.com> | 2019-06-25 02:05:14 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-07-05 22:16:46 +0200 |
commit | ec7b1bbd2c470d8766b61617bd4d8ba46aa2056b (patch) | |
tree | b8e7dc9ba060ab648bade0fe95e4ab6e5a422f94 | |
parent | 6b7ac49d570c66754fad1b80cc200c7596d1facd (diff) |
target/i386: kvm: Fix when nested state is needed for migration
When vCPU is in VMX operation and enters SMM mode,
it temporarily exits VMX operation but KVM maintained nested-state
still stores the VMXON region physical address, i.e. even when the
vCPU is in SMM mode then (nested_state->hdr.vmx.vmxon_pa != -1ull).
Therefore, there is no need to explicitly check for
KVM_STATE_NESTED_SMM_VMXON to determine if it is necessary
to save nested-state as part of migration stream.
Reviewed-by: Karl Heubaum <karl.heubaum@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Message-Id: <20190624230514.53326-1-liran.alon@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | target/i386/machine.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/target/i386/machine.c b/target/i386/machine.c index 851b249d1a..704ba6de46 100644 --- a/target/i386/machine.c +++ b/target/i386/machine.c @@ -997,9 +997,8 @@ static bool vmx_nested_state_needed(void *opaque) { struct kvm_nested_state *nested_state = opaque; - return ((nested_state->format == KVM_STATE_NESTED_FORMAT_VMX) && - ((nested_state->hdr.vmx.vmxon_pa != -1ull) || - (nested_state->hdr.vmx.smm.flags & KVM_STATE_NESTED_SMM_VMXON))); + return (nested_state->format == KVM_STATE_NESTED_FORMAT_VMX && + nested_state->hdr.vmx.vmxon_pa != -1ull); } static const VMStateDescription vmstate_vmx_nested_state = { |