From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [patch 1/2] KVM: x86: handle double and triple faults for every exception Date: Sun, 15 Nov 2009 14:41:58 +0200 Message-ID: <4AFFF716.5000708@redhat.com> References: <20091111192947.348198723@localhost.localdomain> <20091111193837.115825934@localhost.localdomain> <20091112122659.GC7392@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org, jan.kiszka@siemens.com, joerg.roedel@amd.com, Jan Kiszka To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44745 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752692AbZKOMl5 (ORCPT ); Sun, 15 Nov 2009 07:41:57 -0500 In-Reply-To: <20091112122659.GC7392@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/12/2009 02:26 PM, Gleb Natapov wrote: >> >> - if (vcpu->arch.exception.pending) { >> - switch(vcpu->arch.exception.nr) { >> - case DF_VECTOR: >> - /* triple fault -> shutdown */ >> - set_bit(KVM_REQ_TRIPLE_FAULT,&vcpu->requests); >> - return; >> - case PF_VECTOR: >> - vcpu->arch.exception.nr = DF_VECTOR; >> - vcpu->arch.exception.error_code = 0; >> - return; >> - default: >> - /* replace previous exception with a new one in a hope >> - that instruction re-execution will regenerate lost >> - exception */ >> - vcpu->arch.exception.pending = false; >> - break; >> > When exceptions are handled serially previous exception have to be > replaced by new one. Think about #PF during #DE. #PF should be handled first > before #DE can proceed. > "replacing" exceptions is dangerous in the case of debug exceptions and machine checks, since restarting execution won't recover them. -- error compiling committee.c: too many arguments to function