Received: from eggs.gnu.org ([2001:4830:134:3::10]:36793)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from
) id 1ZJMGR-0006vi-Iz
for qemu-devel@nongnu.org; Sun, 26 Jul 2015 09:46:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1ZJMGO-0007ek-Co
for qemu-devel@nongnu.org; Sun, 26 Jul 2015 09:46:51 -0400
Received: from mailout3.w1.samsung.com ([210.118.77.13]:24430)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1ZJMGO-0007ea-7I
for qemu-devel@nongnu.org; Sun, 26 Jul 2015 09:46:48 -0400
Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244])
by mailout3.w1.samsung.com
(Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5
2014)) with ESMTP id <0NS30097SKXWII40@mailout3.w1.samsung.com> for
qemu-devel@nongnu.org; Sun, 26 Jul 2015 14:46:44 +0100 (BST)
From: Pavel Fedin
References:
<1d1b6e7107ccc15e3f3a0caf754279258673bfd0.1437731107.git.p.fedin@samsung.com>
In-reply-to:
Date: Sun, 26 Jul 2015 16:46:42 +0300
Message-id: <007b01d0c7a9$8208a730$8619f590$@samsung.com>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-transfer-encoding: quoted-printable
Content-language: ru
Subject: Re: [Qemu-devel] [PATCH v7 4/6] Introduce irqchip
type specification for KVM
List-Id:
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
To: 'Peter Maydell'
Cc: 'Shlomo Pongratz' , 'Shlomo Pongratz' , 'QEMU Developers' , 'Christoffer Dall' , 'Eric Auger'
Hello!
> > This patch introduces kernel_irqchip_type member in Machine class, =
which
> > is passed to kvm_arch_irqchip_create. Machine models which can use =
vGIC
> > now use it in order to supply correct GIC type for KVM capability
> > verification. The variable is defined as int in order to be
> > architecture-agnostic for potential future uses by other =
architectures.
>=20
> This doesn't look right. The board model should just create
> the GIC device that it wants, and it should be the job of
> the GIC device itself to coordinate with the kvm.c code
> if it has to do so to pass the right kind of irqchip type.
Unfortunately, this is how qemu is designed. kvm_irqchip_create() is =
called long before machine model's init code (machvirt_init() in our =
case) is called. So, if we want to check for the right thing, we have to =
know it before machine model actually starts to instantiate its =
components.
I don't see how to change this in a more or less simple way. This =
routine, except capability testing, does one more important thing on old =
kernels. There it actually creates vGICv2 using KVM_CREATE_IRQCHIP =
ioctl. And, on non-ARM architectures, this ioctl also works, and this is =
the only place where creation is done.
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia