From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yugz6-0006gE-7a for qemu-devel@nongnu.org; Tue, 19 May 2015 08:51:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yugz2-0007et-70 for qemu-devel@nongnu.org; Tue, 19 May 2015 08:51:00 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:35883) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yugz2-0007eU-0S for qemu-devel@nongnu.org; Tue, 19 May 2015 08:50:56 -0400 Received: by wizk4 with SMTP id k4so116226429wiz.1 for ; Tue, 19 May 2015 05:50:54 -0700 (PDT) Message-ID: <555B31A4.9050708@linaro.org> Date: Tue, 19 May 2015 14:50:44 +0200 From: Eric Auger MIME-Version: 1.0 References: <1431624430-3996-1-git-send-email-ashoks@broadcom.com> <00c401d08eda$57394490$05abcdb0$@samsung.com> In-Reply-To: <00c401d08eda$57394490$05abcdb0$@samsung.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: Added preliminary GICv3 support for kvm mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Fedin , 'Ashok Kumar' , qemu-devel@nongnu.org Cc: 'Shlomo Pongratz' Dear all, On 05/15/2015 08:42 AM, Pavel Fedin wrote: > Hello! > >> Added -M virt,gicversion=2,3 property to configure GICv2 or GICv3. >> GICv3 save/restore is not supported as vgic-v3-emul.c is yet to support >> them. >> >> Signed-off-by: Ashok Kumar > > I also work on this, just not published yet. Some notes about your version: > 1. May be there should be hw/intc/arm_gicv3_kvm.c file created for GICv3? As far as i can > see, save/restore code should differ a lot. > 2. kvm_arch_irqchip_create() should probe only for type we want to get. It has to be > passed there somehow from the virt machine initializer. After a closer look, kvm_arch_irqchip_create is called here with test mode = true. With that option, at kernel level, we only check the kvm device registered its ops and do not go further (see kvm_ioctl_create_device in kvm_main.c): typically the gic kvm_device is not created at that stage. So if my understanding is correct, that piece of code only should & does check either GICv2 or GICV3 was seen in the host dt and accordingly registered. I think Ashok kvm_arch_irqchip_create code is good here. Actual device creation is handled in the device itself with test mode = false. Do you share this understanding? Best Regards Eric And, if we want GICv3, then upon > failure it should return error, not zero. This is because when kvm_arch_irqchip_create() > returns zero, a fallback code is used, which will create GICv2. > 3. Perhaps you should base your work on these patch sets: > https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg00941.html > https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg01505.html > > I added Shlomo to cc because he might also be interested. > > Kind regards, > Pavel Fedin > Expert Engineer > Samsung Electronics Research center Russia > > >