From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] qemu-kvm: Fix segfault on -no-kvm startup Date: Sun, 27 Sep 2009 10:33:56 +0200 Message-ID: <4ABF2374.1010303@redhat.com> References: <4ABCEA5D.4000209@siemens.com> <20090925170548.GA30416@redhat.com> <4ABD13EF.7090403@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , Marcelo Tosatti , kvm-devel To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:28780 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753534AbZI0Id4 (ORCPT ); Sun, 27 Sep 2009 04:33:56 -0400 In-Reply-To: <4ABD13EF.7090403@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On 09/25/2009 10:03 PM, Jan Kiszka wrote: > Gleb Natapov wrote: > >> On Fri, Sep 25, 2009 at 06:05:49PM +0200, Jan Kiszka wrote: >> >>> The check for in-kernel irqchip must be protected by kvm_enabled, and we >>> have a different wrapper for it. >>> >>> >> Why not move kvm_enabled() into kvm_irqchip_in_kernel()? It will return >> false if !kvm_enabled(). >> > Yes, possible. But I'm not sure if it's worth to refactor at this level. > In any case, fix bugs first, refactor later. > I think the whole irqchip interface has to go through some broader > refactoring when pushing it upstream. The result should either be a > specific, in-kernel-irqchip apic device or generic wrapper services that > cover all cases, is easily compiled away in the absence of KVM and avoid > #ifdefs like below. > s/when/before/ -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.