From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Fedin Subject: RE: [PATCH 00/13] arm64: KVM: GICv3 ITS emulation Date: Wed, 10 Jun 2015 15:18:51 +0300 Message-ID: <04da01d0a377$9d20c2b0$d7624810$@samsung.com> References: <1432893209-27313-1-git-send-email-andre.przywara@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: 'Andre Przywara' , christoffer.dall@linaro.org, marc.zyngier@arm.com Return-path: Received: from mailout3.w1.samsung.com ([210.118.77.13]:38833 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751318AbbFJMSz (ORCPT ); Wed, 10 Jun 2015 08:18:55 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NPQ001V1A7GZE70@mailout3.w1.samsung.com> for kvm@vger.kernel.org; Wed, 10 Jun 2015 13:18:53 +0100 (BST) In-reply-to: <1432893209-27313-1-git-send-email-andre.przywara@arm.com> Content-language: ru Sender: kvm-owner@vger.kernel.org List-ID: Hi! I have researched the promised third bug in your implementation. It reproduces if you start qemu with -S switch, and then immediately exit it without actually running the OS. In KVM vGIC initialization is lazy and performed when first vCPU is booted up for the first time. Consequently, if you never do it but attempt to quit qemu, KVM will go through the complete shutdown process and call vits_destroy(), which will crash in list_for_each_safe() because its->device_list was never initialized. For a quick fix i have added this: --- cut --- if (!its->device_list.next) return; --- cut --- Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia