From: Paolo Bonzini Subject: Re: [PATCH 0/8] kvm: nVMX: Checkpoint/restore support for VMX state Date: Wed, 15 Feb 2017 11:15:00 +0100 Message-ID: <52584419-5c45-3e22-4c18-8d62894d7437@redhat.com> References: <1480536229-11754-1-git-send-email-jmattson@google.com> <4e2df8e6-0c1b-5d57-0247-bd7cd69c3e12@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Jim Mattson Return-path: Received: from mail-wr0-f196.google.com ([209.85.128.196]:33405 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751246AbdBOKO6 (ORCPT ); Wed, 15 Feb 2017 05:14:58 -0500 Received: by mail-wr0-f196.google.com with SMTP id i10so30642826wrb.0 for ; Wed, 15 Feb 2017 02:14:57 -0800 (PST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 14/02/2017 23:17, Jim Mattson wrote: > Yikes! Did I forget to include "kvm: nVMX: Set nested_run_pending > before prepare_vmcs02()"? Sorry. That obviates the need for > "from_vmentry," and is a little less awkward, I think. (The problem is > that kvm can exit to userspace with vmx->nested.nested_run_pending > set. If VMX state is saved at that time, then the restore code has to > behave as if "from_vmentry" is true. In any event, your version looks > fine, and I can always clean it up later (or not). Looks like that, yes. I went for "from_vmentry" because I wasn't sure if your missing patch was just reverting this: commit 7af40ad37b3f097f367cbe9c0198caccce6fd83b Author: Jan Kiszka Date: Sat Jan 4 18:47:23 2014 +0100 KVM: nVMX: Fix nested_run_pending on activity state HLT When we suspend the guest in HLT state, the nested run is no longer pending - we emulated it completely. So only set nested_run_pending after checking the activity state. Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini I guess it would be possible to reset nested_run_pending on activity state HLT, too, but I didn't feel like mangling your patches even more. Paolo