Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp160725pxj; Wed, 23 Jun 2021 18:38:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2YFQW4C+u1dXkKqlJN8UUZCNjHwQbtfN6mAXIeIIQ3X/y/4bQJLtmDmX0RXtpHeTCClA2 X-Received: by 2002:a05:6402:2066:: with SMTP id bd6mr3556867edb.293.1624498685101; Wed, 23 Jun 2021 18:38:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624498685; cv=none; d=google.com; s=arc-20160816; b=JXOW5j9zI/S7+7wGyanLddBf66qJ1xltngxajoT3mvRQZSuZFKcc+yO2ung5v/spfH mh7S91B2KLEJ2azOLWe5+ouYUroSI72yQGHBZVGzu75fA+LEL/nYEwxo/xGUlmZAJMrO AJdRRWEKyVfMvqnnnxM/iSaFR7dGe8CrfmSSRUljO3tJBW6XEgpym4xmj0QYzaVIidO/ Y9gyrmq5CkLtOlw6etWjLmLY+GDnAoMjMZDoMZ1OkRlZgGEK34E/Zqz33YkpJXt32i43 nZqZHlHZGxAZodx1vqcKSgAlcPEhpSKPfo2RKiUwKcFH09//SM7yFDn7ykKDOcaoYXah xI5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=6Agt8zrKs/F4N1ClKsmnKuU3iQuaV8RIz8HGNILY824=; b=z3AQEJewl9/Aehpx74lcek+Okrd4VFNpfMxwQjj9ztkAuHWV/0s4tRXtPG6ouI55BZ 7VcevnJFSD+iO7n8UPG4+o8so+ktmsaqtCHDVzIuaewuk4NB15sPSsbjOOP5vE8tZYuE lyC/Xs43zLxdkclTZfsLFD2l8zFCYqOQrsFl3cxNtR8igdL4JZBnlMWnREWfBglwPsIC CZ/pj2ljulGYs+fa/kn0Z2V1AvxehacOc2/guLcCS81l20LGxbOkvHguPKHKtAafub86 2HOV/e0CdnsictnmLs4WPEj10Z7E4HsLUMddLg9rk43JZSbGSHkWpG7NvfrSdnrJpwMz xjyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=r6nZ0D+T; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hy20si1236015ejc.123.2021.06.23.18.37.42; Wed, 23 Jun 2021 18:38:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=r6nZ0D+T; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229882AbhFXBi2 (ORCPT + 99 others); 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: linux-kernel@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