Received: from eggs.gnu.org ([2001:4830:134:3::10]:54205)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from
) id 1ZL6gg-0003cg-H8
for qemu-devel@nongnu.org; Fri, 31 Jul 2015 05:33:14 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1ZL6gc-0005hE-Fp
for qemu-devel@nongnu.org; Fri, 31 Jul 2015 05:33:10 -0400
Received: from mailout3.w1.samsung.com ([210.118.77.13]:57957)
by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1ZL6gc-0005gW-Ab
for qemu-devel@nongnu.org; Fri, 31 Jul 2015 05:33:06 -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 <0NSC00EIPIJ1RG60@mailout3.w1.samsung.com> for
qemu-devel@nongnu.org; Fri, 31 Jul 2015 10:33:01 +0100 (BST)
From: Pavel Fedin
References:
<1dbab1e73e54f0fca4d6d05d50986d2dd396f867.1437731107.git.p.fedin@samsung.com>
In-reply-to:
Date: Fri, 31 Jul 2015 12:32:59 +0300
Message-id: <026901d0cb73$e4708000$ad518000$@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 5/6] Initial implementation of vGICv3
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!
> On 24 July 2015 at 10:55, Pavel Fedin wrote:
> > Get/put routines are missing, live migration is not possible.
>=20
> This commit message could do with being made a bit less terse.
Ok. Subject was self-explanatory, so i didn't have much to add.
> > +static void kvm_arm_gicv3_reset(DeviceState *dev)
> > +{
> > + GICv3State *s =3D ARM_GICV3_COMMON(dev);
> > + KVMARMGICv3Class *kgc =3D KVM_ARM_GICV3_GET_CLASS(s);
> > +
> > + DPRINTF("Reset\n");
> > +
> > + kgc->parent_reset(dev);
> > + kvm_arm_gicv3_put(s);
> > +}
>=20
> If we don't currently do anything in reset then does the GIC just
> go wrong on a VM reset?
No it doesn't, reset works.
> > + /* Try to create the device via the device control API */
> > + s->dev_fd =3D -1;
> > + ret =3D kvm_create_device(kvm_state, KVM_DEV_TYPE_ARM_VGIC_V3, =
false);
> > + if (ret >=3D 0) {
> > + s->dev_fd =3D ret;
> > + } else if (ret !=3D -ENODEV && ret !=3D -ENOTSUP) {
>=20
> Why aren't ENODEV and ENOTSUP fatal errors like other errnos?
Stupid leftover from vGICv2 code, copypasted. I have already removed it =
in my repo, just decided to delay the respin until i know the fate of =
this: =
https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg05778.html
>=20
> > + error_setg_errno(errp, -ret, "error creating in-kernel =
VGIC");
> > + return;
> > + }
> > +
> > + if (kvm_gic_supports_attr(s->dev_fd, =
KVM_DEV_ARM_VGIC_GRP_NR_IRQS, 0)) {
>=20
> Is there any kernel which supports GICv3 but does not support
> this attribute? I would hope not, in which case we can skip the
> conditional check for support.
>=20
> > + uint32_t numirqs =3D s->num_irq;
> > + DPRINTF("KVM_DEV_ARM_VGIC_GRP_NR_IRQS =3D %u\n", numirqs);
> > + kvm_gic_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_NR_IRQS,
> > + 0, 0, &numirqs, 1);
> > + }
> > +
> > + /* Tell the kernel to complete VGIC initialization now */
> > + if (kvm_gic_supports_attr(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,
> > + KVM_DEV_ARM_VGIC_CTRL_INIT)) {
>=20
> Ditto.
I intentionally put some tracing to these conditions. On my system =
KVM_DEV_ARM_VGIC_GRP_NR_IRQS is supported and KVM_DEV_ARM_VGIC_CTRL_INIT =
is not. So will it always be this way?
Kind regards,
Pavel Fedin
Expert Engineer
Samsung Electronics Research center Russia