From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC PATCH] KVM: optimize apic interrupt delivery Date: Tue, 11 Sep 2012 15:05:54 +0300 Message-ID: <504F2922.3050005@redhat.com> References: <20120910130915.GB20907@redhat.com> <20120910144438.GA19741@redhat.com> <20120910161754.GB25827@redhat.com> <20120910170522.GC25827@redhat.com> <504F0462.5050103@redhat.com> <20120911093502.GF20907@redhat.com> <504F0748.5010705@redhat.com> <20120911094546.GA23020@redhat.com> <20120911095722.GH20907@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Michael S. Tsirkin" , kvm@vger.kernel.org, mtosatti@redhat.com To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:30893 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852Ab2IKMF6 (ORCPT ); Tue, 11 Sep 2012 08:05:58 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q8BC5wuw030396 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 Sep 2012 08:05:58 -0400 In-Reply-To: <20120911095722.GH20907@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 09/11/2012 12:57 PM, Gleb Natapov wrote: >> > If you get -ENOMEM when allocating a page without GFP_ATOMIC (or >> > GFP_NOIO etc) then the entire host is dead anyway. The same thing can >> > happen if the guest (or userspace) touches a yet-unallocated page, or if >> > the page fault path fails to allocate mmu pages, or any of a thousand >> > other allocations we have all over. >> Then it is just simpler to sigkill the guest right away. What's the >> point in returning error if you believe that userspace can't handle it >> and will likely not run long enough to even get to userspace due to >> memory shortage. >> > And although this is not the route I will go the question remains. How > do we return to the kernel after userspace exit in the middle of IO that > is handled by an in-kernel device. Looks like the kernel will expect > emulation result from userspace on next ioctl(RUN). Option 1 is to rewind everything to before the instruction. Option 2 is to document that errors are not recoverable. -- error compiling committee.c: too many arguments to function