From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48977) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfArh-0003P6-U7 for qemu-devel@nongnu.org; Thu, 24 Sep 2015 14:03:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfAre-0001Tx-OM for qemu-devel@nongnu.org; Thu, 24 Sep 2015 14:03:29 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57674) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfAre-0001TD-Jo for qemu-devel@nongnu.org; Thu, 24 Sep 2015 14:03:26 -0400 Message-ID: <56043AEA.6080907@codeaurora.org> Date: Thu, 24 Sep 2015 14:03:22 -0400 From: Christopher Covington MIME-Version: 1.0 References: <1442511496-24050-1-git-send-email-shlomopongratz@gmail.com> <1442511496-24050-5-git-send-email-shlomopongratz@gmail.com> In-Reply-To: <1442511496-24050-5-git-send-email-shlomopongratz@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC V4 4/4] Add virt-v3 machine that uses GIC-500 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Shlomo Pongratz , qemu-devel@nongnu.org, p.fedin@samsung.com Cc: peter.maydell@linaro.org, imammedo@redhat.com, shannon.zhao@linaro.org, ashoks@broadcom.com, eric.auger@linaro.org Hi, On 09/17/2015 01:38 PM, Shlomo Pongratz wrote: > From: Pavel Fedin > > I would like to offer this, slightly improved implementation. The key thing is a new > kernel_irqchip_type member in Machine class. Currently it it used only by virt machine for > its internal purposes, however in future it is to be passed to KVM in > kvm_irqchip_create(). The variable is defined as int in order to be architecture agnostic, > for potential future users. > > Signed-off-by: Pavel Fedin > --- > hw/arm/virt.c | 72 +++++++++++++++++++++++++++++++++++++++++++++------ > include/hw/arm/fdt.h | 2 ++ > include/hw/arm/virt.h | 1 + > target-arm/machine.c | 7 ++++- > 4 files changed, 73 insertions(+), 9 deletions(-) > > diff --git a/hw/arm/virt.c b/hw/arm/virt.c > index 4d15309..4c2ae7f 100644 > --- a/hw/arm/virt.c > +++ b/hw/arm/virt.c > @@ -445,6 +462,14 @@ static void create_gic(VirtBoardInfo *vbi, qemu_irq *pic, int type, bool secure) > sysbus_mmio_map(gicbusdev, 1, vbi->memmap[VIRT_GIC_CPU].base); > } > > + if (type == 3) { > + /* Connect GIC to CPU */ > + for (i = 0; i < smp_cpus; i++) { > + CPUState *cpu = qemu_get_cpu(i); > + aatch64_registers_with_opaque_set(OBJECT(cpu), (void *)gicdev); Typo--should be "aarch64". With that, feel free to add the following if it's any use: Tested-by: Christopher Covington -- Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project