From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH RFC] KVM: inject #UD if instruction emulation fails while vcpu is in cpl==3 Date: Thu, 06 May 2010 12:15:58 +0300 Message-ID: <4BE288CE.5050801@redhat.com> References: <20100429115847.GW10044@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: mtosatti@redhat.com, kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:11375 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753488Ab0EFJQA (ORCPT ); Thu, 6 May 2010 05:16:00 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o469G0Px001630 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 May 2010 05:16:00 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o469FxoK028424 for ; Thu, 6 May 2010 05:15:59 -0400 In-Reply-To: <20100429115847.GW10044@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 04/29/2010 02:58 PM, Gleb Natapov wrote: > Do not kill VM If instruction emulation fails while vcpu is in > userspace. Inject #UD instead in a hope that guest OS will kill offending > process. Emulation failure is still traced by ftrace point to help > analyze the problem. > Still there's the risk here that a critical failure goes unnoticed. ftrace isn't on at all times. We can probably inject a #UD unconditionally and exit to userspace. Userspace would then report the problem to the user and reenter the guest, which would then recover or not. -- error compiling committee.c: too many arguments to function