From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753654AbbG3HZG (ORCPT ); Thu, 30 Jul 2015 03:25:06 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:33917 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750770AbbG3HZE (ORCPT ); Thu, 30 Jul 2015 03:25:04 -0400 Subject: Re: [PATCH 3/4] KVM: i8254: remove unnecessary irqchip_in_kernel check To: Steve Rutherford References: <1438176538-26191-1-git-send-email-pbonzini@redhat.com> <1438176538-26191-4-git-send-email-pbonzini@redhat.com> <20150730043645.GF15229@google.com> Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, mtosatti@redhat.com, rkrcmar@redhat.com From: Paolo Bonzini Message-ID: <55B9D14D.1040600@redhat.com> Date: Thu, 30 Jul 2015 09:25:01 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150730043645.GF15229@google.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/07/2015 06:36, Steve Rutherford wrote: > On Wed, Jul 29, 2015 at 03:28:57PM +0200, Paolo Bonzini wrote: >> > The PIT is only created if irqchip_in_kernel returns true, so the >> > check is superfluous. > I poked around. Looks to me like the existence of an IOAPIC is not > checked on the creation of the in-kernel PIT. You're right, and presumably it's also legal to create the PIT before KVM_CREATE_IRQCHIP. > Userspace might limit itself to > that scenario (PIT implies IOAPIC in-kernel), but that isn't enforced at PIT > creation. I'll play with the "PIT without IOAPIC" scenario and see if something breaks badly with this patch. From reading the code it seems like it should not introduce any problems (oopses or similar), but I'll set this patch aside for now. Paolo