From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Subject: Re: IRQFD support with GICv3 ITS (WAS: RE: [PATCH 00/13] arm64: KVM: GICv3 ITS emulation) Date: Wed, 17 Jun 2015 12:02:48 +0100 Message-ID: <558153D8.7040100@arm.com> References: <042601d0a357$d3cec4d0$7b6c4e70$@samsung.com> <557842A0.9070503@linaro.org> <05da01d0a392$58bf5030$0a3df090$@samsung.com> <011601d0a8de$f75b8280$e6128780$@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: "kvm@vger.kernel.org" To: Pavel Fedin , "'Eric Auger'" , Marc Zyngier , "christoffer.dall@linaro.org" Return-path: Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:51715 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750900AbbFQLCg (ORCPT ); Wed, 17 Jun 2015 07:02:36 -0400 In-Reply-To: <011601d0a8de$f75b8280$e6128780$@samsung.com> Sender: kvm-owner@vger.kernel.org List-ID: =D0=97=D0=B4=D1=80=D0=B0=D0=B2=D1=81=D1=82=D0=B2=D1=83=D0=B9 Pavel, On 06/17/2015 10:21 AM, Pavel Fedin wrote: > PING! > The discussion has suddenly stopped... What is our status? Is ITS v2= patch being > developed, or what? Yes, I am about to get a v2 ready, but mostly with some fixes. If you want to work on top of it, I can push a WIP branch to my repo. As Marc mentioned before, this whole irqfd story does not go together well with KVM and the ITS architecture, so that needs some more investigation (which I am planning to do in the next days). Cheers, Andre. And do we have some conclusion on irqfd ? >=20 > Kind regards, > Pavel Fedin > Expert Engineer > Samsung Electronics Research center Russia >=20 >=20 >> -----Original Message----- >> From: kvm-owner@vger.kernel.org [mailto:kvm-owner@vger.kernel.org] O= n Behalf Of Pavel >> Fedin >> Sent: Wednesday, June 10, 2015 6:30 PM >> To: 'Eric Auger'; 'Marc Zyngier'; 'Andre Przywara'; christoffer.dall= @linaro.org >> Cc: kvmarm@lists.cs.columbia.edu; linux-arm-kernel@lists.infradead.o= rg; > kvm@vger.kernel.org >> Subject: RE: IRQFD support with GICv3 ITS (WAS: RE: [PATCH 00/13] ar= m64: KVM: GICv3 ITS >> emulation) >> >> Hi! >> >>> indeed in newly added qemu kvm-all.c kvm_arch_msi_data_to_gsi we co= uld >>> call a new ioctl that translates the data + deviceid? into an LPI a= nd >>> program irqfd with that LPI. This is done once when setting irqfd u= p. >>> This also means extending irqfd support to lpi injection, gsi being= the >>> LPI index if gsi >=3D 8192. in that case we continue using >>> kvm_gsi_direct_mapping and gsi still is an IRQ index. >> >> This is exactly what i have done in my kernel + qemu. I have added = a new KVM capability >> and then in qemu i do this: >> --- cut --- >> if (kvm_gsi_kernel_mapping()) { >> struct kvm_msi msi; >> >> msi.address_lo =3D (uint32_t)msg.address; >> msi.address_hi =3D msg.address >> 32; >> msi.data =3D le32_to_cpu(msg.data); >> memset(msi.pad, 0, sizeof(msi.pad)); >> >> if (dev) { >> msi.devid =3D (pci_bus_num(dev->bus) << 8) | dev->devfn; >> msi.flags =3D KVM_MSI_VALID_DEVID; >> } else { >> msi.devid =3D 0; >> msi.flags =3D 0; >> } >> >> return kvm_vm_ioctl(s, KVM_TRANSLATE_MSI, &msi); >> } >> --- cut --- >> KVM_TRANSLATE_MSI returns an LPI number. This seemed to be the simp= lest and fastest > thing >> to do. >> If someone is interested, i could prepare an RFC patch series for t= his, which would > apply >> on top of Andre's ITS implementation. >> >> Kind regards, >> Pavel Fedin >> Expert Engineer >> Samsung Electronics Research center Russia >> >> >> -- >> To unsubscribe from this list: send the line "unsubscribe kvm" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >=20