From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH v2 4/4] KVM: x86: Add VCPU substate for NMI states Date: Tue, 20 Oct 2009 14:44:21 +0200 Message-ID: <20091020124421.GK29477@redhat.com> References: <20091015170535.5076.91206.stgit@mchn012c.ww002.siemens.net> <20091015170536.5076.56790.stgit@mchn012c.ww002.siemens.net> <20091019203254.GD17781@amt.cnet> <20091019203950.GC8278@redhat.com> <4ADCF771.9070709@redhat.com> <4ADD7B3C.5080607@siemens.com> <4ADD7D9C.4060605@redhat.com> <20091020090809.GJ29477@redhat.com> <4ADD7F5C.9080906@redhat.com> <20091020111302.GA5123@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Avi Kivity , Jan Kiszka , "kvm@vger.kernel.org" To: Marcelo Tosatti Return-path: Received: from mx1.redhat.com ([209.132.183.28]:58789 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750976AbZJTMoU (ORCPT ); Tue, 20 Oct 2009 08:44:20 -0400 Content-Disposition: inline In-Reply-To: <20091020111302.GA5123@amt.cnet> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Oct 20, 2009 at 09:13:02AM -0200, Marcelo Tosatti wrote: > On Tue, Oct 20, 2009 at 06:14:04PM +0900, Avi Kivity wrote: > > On 10/20/2009 06:08 PM, Gleb Natapov wrote: > >> On Tue, Oct 20, 2009 at 06:06:36PM +0900, Avi Kivity wrote: > >> > >>> On 10/20/2009 05:56 PM, Jan Kiszka wrote: > >>> > >>>> So save/restore kvm_vcpu_arch::exception? As another substate or as part > >>>> of a generalized NMI substate? > >>>> > >>> Yes. It's not part of an nmi substate, but both can be part of an > >>> exception substate (but need to look at the docs vewy cawefuwy to > >>> make sure we don't screw up again). > >>> > >>> > >> What do you mean? How they can be both part of exception substate? > >> > >> > > > > Sorry, nomenclature failure. We need NMI state, Interrupt state > > (already provided), and pending exception state (which can be a fault or > > a trap). There's also some extra state associated with pending debug > > exceptions (maybe we can copy it into dr6). > > KVM_REQ_TRIPLE_FAULT can also be lost, but i don't think anybody cares? > If pending exception will be migrated KVM_REQ_TRIPLE_FAULT will be restored after guest will try to re-execute instruction that caused it. One more reason to migrate pending exceptions. And why not migrate KVM_REQ_TRIPLE_FAULT while we are at it. > > > > We can either put all of these into one substate, or into separate > > substates. I'm not sure which is best. -- Gleb.