From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753101AbcHOMhj (ORCPT ); Mon, 15 Aug 2016 08:37:39 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:32769 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752905AbcHOMhf (ORCPT ); Mon, 15 Aug 2016 08:37:35 -0400 Subject: Re: [PATCH 1/1] x86/apic: Introduce paravirq irq_domain To: alex.popov@linux.com References: <1470924138-17825-1-git-send-email-alex.popov@linux.com> <1325048698.1236199.1470933872152.JavaMail.zimbra@redhat.com> <54704ec6-4b74-9aa3-cccc-1fb7e2412f9a@linux.com> <8cfa4c43-85d1-462b-176d-c14bf2a0afb5@linux.com> Cc: Thomas Gleixner , Christoph Hellwig , Ingo Molnar , Marc Zyngier , "H. Peter Anvin" , Andrew Morton , Kees Cook , Dmitry Vyukov , Jiang Liu , Jason Cooper , Radim Krcmar , Joerg Roedel , linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org From: Paolo Bonzini Message-ID: Date: Mon, 15 Aug 2016 14:37:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <8cfa4c43-85d1-462b-176d-c14bf2a0afb5@linux.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 15/08/2016 13:51, Alexander Popov wrote: > On 13.08.2016 09:20, Paolo Bonzini wrote: >> On 13/08/2016 00:07, Alexander Popov wrote: >>> I.e. our irq_mask()/irq_unmask() callbacks get irq_desc of the interrupt >>> which should be masked/unmasked and can ask the hypervisor to stop/start >>> injecting the vector of that particular interrupt. >> >> So just let the irqdomain know about your hypervisor and avoid the >> pointless indirection through function pointers, and only call >> arch_init_paravirq_domain in a file specific to your hypervisor. > > Paolo, I would like paravirq irq_domain to be useful for many hypervisors, > not only for one developed by Positive Technologies. If somebody else comes up with similar needs, leave the generalization of the code to them. The maintainers will surely remember. Without two users, there's a nonzero chance that the abstraction you have is not good enough, and actually gets in the way of the "second user". > It seems to me that the idea of an irq_domain for interrupts injected > by a hypervisor is quite generic. True, but all of Xen, KVM and VMware use PCI devices for this. Paolo