From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F7F3C48BC2 for ; Thu, 24 Jun 2021 01:36:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5606B60E08 for ; Thu, 24 Jun 2021 01:36:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229800AbhFXBi2 (ORCPT ); Wed, 23 Jun 2021 21:38:28 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:41142 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229774AbhFXBi0 (ORCPT ); Wed, 23 Jun 2021 21:38:26 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1624498567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6Agt8zrKs/F4N1ClKsmnKuU3iQuaV8RIz8HGNILY824=; b=r6nZ0D+TDAABUcuiRXUXXjAPUgIo5ABoa3CP8Z9rO92u1p6M/G+rRRrJ3LsUB7iW0bioDf uV9QtqUhNXszmdgWL/zreyN4OUgkk9E7tFjRhpc6cF1Pz93SkgWONIHWncxizxLU4WPLpZ 9OnC0laLO11hfUF8SnoCKXsj/KaTYSnl119r9Nsa25jYEBBEWswzD+YMHg3usE/JMes+2W kp4hhV7zMo4D8RjDbuiUSS0+vg6gBHX/HYx5N9SrFX6biLxykbDhgoD2/EN6qaFajq8yM1 j/zWi4X7c9SdfrT0i0mmos/k8VcGd8OowSlqfXkZR/JyY+7JvEOBXFv+89UB2A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1624498567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=6Agt8zrKs/F4N1ClKsmnKuU3iQuaV8RIz8HGNILY824=; b=y8FPE18Zp85WPUYsfkJjRINkv8U883vG42wRCe7SBCrRwuvnO7QJEtKTwloCWOmm4Bfa8s Q4sF4oAYK0MzoQBw== To: "Tian\, Kevin" , Alex Williamson Cc: Jason Gunthorpe , "Dey\, Megha" , "Raj\, Ashok" , "Pan\, Jacob jun" , "Jiang\, Dave" , "Liu\, Yi L" , "Lu\, Baolu" , "Williams\, Dan J" , "Luck\, Tony" , "Kumar\, Sanjay K" , LKML , KVM , Kirti Wankhede , Peter Zijlstra , Marc Zyngier , Bjorn Helgaas Subject: RE: Virtualizing MSI-X on IMS via VFIO In-Reply-To: References: <20210622131217.76b28f6f.alex.williamson@redhat.com> <87o8bxcuxv.ffs@nanos.tec.linutronix.de> <20210623091935.3ab3e378.alex.williamson@redhat.com> Date: Thu, 24 Jun 2021 03:36:07 +0200 Message-ID: <87r1gsavso.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Kevin, On Thu, Jun 24 2021 at 00:00, Kevin Tian wrote: >> From: Alex Williamson >> Sent: Wednesday, June 23, 2021 11:20 PM >> > [...] > > > So the only downside today of allocating more MSI-X vectors than >> > necessary is memory consumption for the irq descriptors. >> >> As above, this is a QEMU policy of essentially trying to be a good >> citizen and allocate only what we can infer the guest is using. What's >> a good way for QEMU, or any userspace, to know it's running on a host >> where vector exhaustion is not an issue? > > In my proposal a new command (VFIO_DEVICE_ALLOC_IRQS) is > introduced to separate allocation from enabling. The availability > of this command could be the indicator whether vector > exhaustion is not an issue now? Your proposal still does not address the fundamental issue of a missing feedback to the guest and you can invent a gazillion more IOCTL commands and none of them will solve that issue. A hypercall/paravirt interface is the only reasonable solution. The time you are wasting to come up with non-solutions would have surely been better spent implementing the already known and obvious proper solution. You might be halfways done already with that. Thanks, tglx