Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753792AbbGFIb2 (ORCPT ); Mon, 6 Jul 2015 04:31:28 -0400 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]:43932 "EHLO cam-admin0.cambridge.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753115AbbGFIbJ (ORCPT ); Mon, 6 Jul 2015 04:31:09 -0400 Subject: Re: [PATCH 1/7] KVM: api: add kvm_irq_routing_extended_msi To: Pavel Fedin , "'Eric Auger'" , "eric.auger@st.com" , "linux-arm-kernel@lists.infradead.org" , Marc Zyngier , "christoffer.dall@linaro.org" , "kvmarm@lists.cs.columbia.edu" , "kvm@vger.kernel.org" References: <1435592237-17924-1-git-send-email-eric.auger@linaro.org> <1435592237-17924-2-git-send-email-eric.auger@linaro.org> <011f01d0b498$6a17aeb0$3e470c10$@samsung.com> <5596503E.6040902@arm.com> <00fd01d0b7b6$f6cf3550$e46d9ff0$@samsung.com> Cc: "linux-kernel@vger.kernel.org" , "pbonzini@redhat.com" From: Andre Przywara X-Enigmail-Draft-Status: N1110 Organization: ARM Ltd. Message-ID: <559A3C9C.6050302@arm.com> Date: Mon, 6 Jul 2015 09:30:20 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <00fd01d0b7b6$f6cf3550$e46d9ff0$@samsung.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1650 Lines: 38 Hi Pavel, On 06/07/15 07:42, Pavel Fedin wrote: > Hello! > >> I like this approach, but it runs into problems: >> As you read above the current documentation says that the flags field >> must be zero and the current KVM_SET_GSI_ROUTING handler bails out if it >> isn't. So userland would need to know whether it's safe to set that >> field. > > This problem does not exist because: > a) Older platforms do not need this flag, so they expect to get zero. > b) ARM64 + GICv3 platform cannot work without this flag. > > This is perfectly OK combination IMO. Userland just knows, whether it needs to supply device ID or > not. For example, my modified qemu now has kvm_msi_flags global variable which defaults to 0. ITS > code, then, if activated, changes it to KVM_MSI_VALID_DEVID, and qemu starts supplying device IDs to > the related calls. Well, I had this solution before in kvmtool: If ARM && ITS then set the flag. But I wasn't really happy with this, as the IRQ routing, setup and injection code is rather architecture agnostic (implementing the generic KVM interface), so spraying in some architecture hacks sounded not very elegant. Also as the flag describes a rather generic feature (provide an unique device ID), I'd rather avoid to make this an ARM hack. That being said this is not a show stopper for me, so if the others are happy with this, I will go down your road. Cheers, Andre. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/