From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBk73-0004BJ-J3 for qemu-devel@nongnu.org; Thu, 15 Jan 2015 08:05:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBk6z-0002ew-Fq for qemu-devel@nongnu.org; Thu, 15 Jan 2015 08:05:25 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:36409) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBk6z-0002en-9i for qemu-devel@nongnu.org; Thu, 15 Jan 2015 08:05:21 -0500 Received: by mail-wi0-f169.google.com with SMTP id n3so3814074wiv.0 for ; Thu, 15 Jan 2015 05:05:20 -0800 (PST) From: Eric Auger Date: Thu, 15 Jan 2015 13:05:09 +0000 Message-Id: <1421327111-1563-1-git-send-email-eric.auger@linaro.org> Subject: [Qemu-devel] [RFC v2 0/2] explicit VGIC initialization in finalize function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: eric.auger@st.com, christoffer.dall@linaro.org, qemu-devel@nongnu.org, marc.zyngier@arm.com, peter.maydell@linaro.org, pbonzini@redhat.com, afaerber@suse.de Cc: patches@linaro.org, kvmarm@lists.cs.columbia.edu, eric.auger@linaro.org With current implementation the vgic is initialized implicitly, on-demand. This patch forces the init in the vgic finalize function. At that point all the dimensioning parameters are known. A new group/attribute in VGIC KVM device is used for that: KVM_DEV_ARM_VGIC_GRP_CTRL/KVM_DEV_ARM_VGIC_CTRL_INIT. Among other things, this earlier VGIC initialization allows to have a simpler handling of VFIO. VFIO platform signaling can be setup on reset handler, making sure the VGIC is ready, at that time, to accept injected virtual IRQs. Depends on the following kernel patch: [PATCH v3 0/2] VGIC early initialization initiated by user-space Tested on Calxeda Miday with VFIO platform use case Can be found on http://git.linaro.org/people/eric.auger/qemu.git, branch vfio_integ_v9 v1 -> v2: - The init is not mandated to be done in a machine init done notifier anymore since only the number of vcpus and number of IRQs must be known at init time. Eric Auger (2): linux-headers: update KVM headers from KVM_DEV_ARM_VGIC_GRP_CTRL hw/intc/arm_gic: Initialize the vgic in the realize function hw/intc/arm_gic_kvm.c | 6 ++++++ linux-headers/asm-arm/kvm.h | 5 +++++ linux-headers/asm-arm64/kvm.h | 5 +++++ 3 files changed, 16 insertions(+) -- 1.8.3.2