From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKrDe-0001Bn-UT for qemu-devel@nongnu.org; Thu, 08 Nov 2018 15:48:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKr0s-0000X4-0i for qemu-devel@nongnu.org; Thu, 08 Nov 2018 15:34:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39056) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gKr0r-00007V-LL for qemu-devel@nongnu.org; Thu, 08 Nov 2018 15:34:49 -0500 References: <20181102034649.43559-1-liran.alon@oracle.com> <1C803EF0-9E1B-4E1B-A4DD-4BE788A7A1FF@oracle.com> <939A6255-306C-431C-8799-0D56A30A3BD5@oracle.com> <59EE7141-6771-47E2-8473-C1429676AD7B@oracle.com> From: Paolo Bonzini Message-ID: Date: Thu, 8 Nov 2018 21:34:31 +0100 MIME-Version: 1.0 In-Reply-To: <59EE7141-6771-47E2-8473-C1429676AD7B@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liran Alon Cc: Jim Mattson , "Dr. David Alan Gilbert" , Eduardo Habkost , kvm list , mtosatti@redhat.com, rth@twiddle.net, qemu-devel@nongnu.org On 08/11/2018 19:41, Liran Alon wrote: > So what I plan to do is indeed to define first 4K of data as vmcs12 and= next 4K as shadow_vmcs12. > I will also define each of them in a separate VMState subsection that e= ach will have it=E2=80=99s own .needed() > method that will decide if it=E2=80=99s relevant to send it based on kv= m_state.size. > vmcs12 and shadow_vmcs12 will be put in a struct which is unioned with = a struct > of 2 pages buffer to clearly indicate that one well-defined struct is u= sed for VMX and the other for SVM. > (based on kvm_state.format) And SVM will use other subsections. > In addition, I will change KVM_{GET,SET}_NESTED_STATE documentation to = indicate that > future nested state fields should be added at the end of struct and wea= ther they are valid should > be determined by a flag in kvm_state.flags. > QEMU will handle these new states in the future by adding more VMState = subsections that have > .needed() method based on appropriate flag in kvm_state.flags. > The struct itself that userspace use against it=E2=80=99s local kernel = will be determined based on KVM_CAPs. >=20 > If there are no objections, I will write the needed patches for QEMU (a= nd the documentation patch for KVM). Sure. You can also place the flags and format in yet another subsection. Paolo