From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752986AbcHOLtM (ORCPT ); Mon, 15 Aug 2016 07:49:12 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34968 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752636AbcHOLtL (ORCPT ); Mon, 15 Aug 2016 07:49:11 -0400 Reply-To: alex.popov@linux.com Subject: Re: [PATCH 1/1] x86/apic: Introduce paravirq irq_domain 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> To: Paolo Bonzini 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: Alexander Popov Message-ID: <8cfa4c43-85d1-462b-176d-c14bf2a0afb5@linux.com> Date: Mon, 15 Aug 2016 14:51:38 +0300 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. It seems to me that the idea of an irq_domain for interrupts injected by a hypervisor is quite generic. I don't like such a way of initializing paravirq_chip very much too. But to my mind, putting some custom hypervisor API to the generic code in Linux kernel mainline is less attractive. Can we find another solution? Thank you. Best regards, Alexander