From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M0UCe-0004el-HD for qemu-devel@nongnu.org; Sun, 03 May 2009 01:25:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M0UCY-0004b6-LW for qemu-devel@nongnu.org; Sun, 03 May 2009 01:25:27 -0400 Received: from [199.232.76.173] (port=41147 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0UCY-0004b1-9r for qemu-devel@nongnu.org; Sun, 03 May 2009 01:25:22 -0400 Received: from mx2.redhat.com ([66.187.237.31]:37636) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M0UCX-0003mO-S6 for qemu-devel@nongnu.org; Sun, 03 May 2009 01:25:22 -0400 Date: Sun, 3 May 2009 08:25:17 +0300 From: Gleb Natapov Subject: Re: [Qemu-devel] Re: [PATCH 0/8] kvm: Fixes, cleanups and livemigration Message-ID: <20090503052517.GG9795@redhat.com> References: <20090501211717.24514.23246.stgit@mchn012c.ww002.siemens.net> <49FB7A40.1020005@us.ibm.com> <20090502074041.GB7198@redhat.com> <49FC4F90.1030901@codemonkey.ws> <20090502172308.GA13933@redhat.com> <49FC9B39.4080408@redhat.com> <20090502200754.GB13933@redhat.com> <49FCA877.6010105@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49FCA877.6010105@us.ibm.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Jan Kiszka , Avi Kivity , qemu-devel@nongnu.org On Sat, May 02, 2009 at 03:09:27PM -0500, Anthony Liguori wrote: > Gleb Natapov wrote: >> On Sat, May 02, 2009 at 10:12:57PM +0300, Avi Kivity wrote: >> >>> Gleb Natapov wrote: >>> >>>>> I think the right thing to do with this is introduce a kvm-cpu >>>>> savevm that stores this information since it isn't relevant to >>>>> TCG. I think it's arguable whether you want instruction length >>>>> there (can you get it reliably on SVM?). >>>>> >>>>> >>>> We can't get it on SVM without instruction decoding, but it is not required >>>> on SVM. It is absolutely essential for soft interrupt/exception injection >>>> on VMX and has to be a part of migratable state. >>>> >>> We need it in some neutral form so cross-vendor migration can work. >>> >>> >> VMX->SVM No problem. >> SVM->VMX bad luck :) We will have to decode instruction ourself. > > Any reason to not just always decode the instruction then? > That is other way around. Any reason to decode instruction if the length is kindly provided by VMX? :) But actually, thinking about it, we may not have to decode instruction even during SVM->VMX migration. Instruction will be re-executed after migration to VMX instead of event re-injected. Intel advice not to do that, but given that migration (especially cross vendor) is very rare and having pending soft interrupt during migration is even more rare I think it will do. -- Gleb.