From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M09q6-0007ZS-W2 for qemu-devel@nongnu.org; Sat, 02 May 2009 03:40:51 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M09q2-0007Pl-6o for qemu-devel@nongnu.org; Sat, 02 May 2009 03:40:50 -0400 Received: from [199.232.76.173] (port=48141 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M09q2-0007PZ-2t for qemu-devel@nongnu.org; Sat, 02 May 2009 03:40:46 -0400 Received: from mx2.redhat.com ([66.187.237.31]:48789) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M09q1-0004ex-LP for qemu-devel@nongnu.org; Sat, 02 May 2009 03:40:45 -0400 Date: Sat, 2 May 2009 10:40:41 +0300 From: Gleb Natapov Subject: Re: [Qemu-devel] Re: [PATCH 0/8] kvm: Fixes, cleanups and live migration Message-ID: <20090502074041.GB7198@redhat.com> References: <20090501211717.24514.23246.stgit@mchn012c.ww002.siemens.net> <49FB7A40.1020005@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49FB7A40.1020005@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 Fri, May 01, 2009 at 05:40:00PM -0500, Anthony Liguori wrote: > Jan Kiszka wrote: >> Besides refreshed versions of my already posted fixes and cleanups for >> KVM, this series comes with patches to enable live migration in KVM >> mode. If there is still some migration bit missing compared to qemu-kvm, >> please let me know. >> > > In qemu-kvm, we also save: > > MSR_IA32_TSC > mp_state > interrupt_bitmap > > In QEMU, we probably should just emulate MSR_IA32_TSC and then we can > reuse that for save/restore. > > interrupt_bitmap is a bit more tricky. It only ever can have one bit > set AFAICT but I don't see anything that we're currently saving that > maps to it which leads me to wonder why KVM needs it and QEMU doesn't. > KVM stores pending interrupt there (interrupt that is not in irq chip already but not yet injected to vcpu). I have patch (not yet submitted) that removes the use of interrupt_bitmap from kernel. It recreated only for migration bits. My plan is to change migration bits too, but it is trickier if we want to keep backwards compatibility. No need to introduce interrupt_bitmap in qemu upstream IMO. We need to migrate pending interrupt though. The info that should be migrated it interrupt vector, interrupt type (soft/hw) and instruction length (needed for injection of soft interrupts on VMX). -- Gleb.