Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp385525pxv; Thu, 24 Jun 2021 10:01:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbmdUuNEtbYw6Z/UW0WzyUUJvNT4VYC2TnYMCCLcAnH6UEIJuHlWNnvLuEXo2af83TtHg6 X-Received: by 2002:a6b:7609:: with SMTP id g9mr4852060iom.184.1624554093190; Thu, 24 Jun 2021 10:01:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624554093; cv=none; d=google.com; s=arc-20160816; b=Cg2PFdME/6dY0TBwRF1B7/3YyvVO8homjw2UbK4qogc2C/5kzxH6DgmaaB89ihESHz qhknYMSg2I0piTasz977xNfQSYy7MZflJztxhzegeWbAXwl8jonlyfjFTCUshNmXL5lN 6lpa4VrmtQKP4v8DV8iKTmCJPT22bb+4fAw+f8zsm5mEAVrQD8BXjgZi305VvOYEVcDD 21TnI0Pt1sVD34/9DWLaBGClNdzD/NrF4kKatO8bCqMx4XoU7rP0QYjQIwR5UPNy/wTg 9kBBIndol566it47Gf0ur4+hzdvVZrspvTgl+6rtj6euMhq/KhZg/zOlHgEjbkxgW0U5 4T8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:ironport-sdr:ironport-sdr; bh=VuVODJyV9y/QqvlJsFOxZQwUG9hZWGxaXlCpMgswfhg=; b=FD40RZ9zzswWFo9G/gHgBDojDzuluYfZFfJyr7OHhORPlVHHfeeudxoWqylzhCHMas 7W+Dk8/+17A2RzKa0WCQcV3JvlAz2YbBEfgrIhFlnPpekSytis29uGP+NNTyDfJghNHM FEoTshOSHqShHBw/9Ys6dDk0a/M/5ysyXYgiLqHUa8rYgh6xQUXviHA+GuX9lRYh1w5H NXma91n6Gz9uESHPyvx4wsdnVK6YNCw0Uvg59439rsnhFIFIYMajeSpLCip7Q3VswrEc Rt0dZ5025n59f4CgPXxMaDHF5Tk+U5TfB5c5dn6GfV05Q8xD0+nl7516hIeysgipvgBr 0zIw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o9si3972526jap.86.2021.06.24.10.01.18; Thu, 24 Jun 2021 10:01:33 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231475AbhFXRC7 (ORCPT + 99 others); Thu, 24 Jun 2021 13:02:59 -0400 Received: from mga03.intel.com ([134.134.136.65]:41012 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbhFXRC6 (ORCPT ); Thu, 24 Jun 2021 13:02:58 -0400 IronPort-SDR: 2qg1F7AqXMLaduBvZ9EDqAEMEP2Qgny62S8tBcP3pzyPF6zC27tytp69JNMYReZaUkgk/2hKZY T4bLPDkx2TbQ== X-IronPort-AV: E=McAfee;i="6200,9189,10025"; a="207552777" X-IronPort-AV: E=Sophos;i="5.83,296,1616482800"; d="scan'208";a="207552777" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2021 10:00:29 -0700 IronPort-SDR: vNQhrnzkoU+nttCQvWuDFgP9ciM245PNH7OvUhhQTYmvsowoak6ujOAO5lfoBE9tW8J0Oxyve5 yWYxPI3kP4zw== X-IronPort-AV: E=Sophos;i="5.83,296,1616482800"; d="scan'208";a="407097549" Received: from jacob-builder.jf.intel.com (HELO jacob-builder) ([10.7.199.155]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2021 10:00:27 -0700 Date: Thu, 24 Jun 2021 10:03:16 -0700 From: Jacob Pan To: "Tian, Kevin" Cc: Thomas Gleixner , Alex Williamson , Jason Gunthorpe , "Dey, Megha" , "Raj, Ashok" , "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 , jacob.jun.pan@intel.com Subject: Re: Virtualizing MSI-X on IMS via VFIO Message-ID: <20210624100316.1c1c4c6f@jacob-builder> In-Reply-To: References: <20210622131217.76b28f6f.alex.williamson@redhat.com> <87o8bxcuxv.ffs@nanos.tec.linutronix.de> <87bl7wczkp.ffs@nanos.tec.linutronix.de> <87tuloawm0.ffs@nanos.tec.linutronix.de> Organization: OTC X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kevin, On Wed, 23 Jun 2021 19:41:24 -0700, "Tian, Kevin" wrote: > > > 1) Fix the lost interrupt issue in existing MSI virtualization flow; > > > > > > > That _cannot_ be fixed without a hypercall. See my reply to Alex. > > The lost interrupt issue was caused due to resizing based on stale > impression of vector exhaustion. Is it possible to mitigate the lost interrupt by always injecting an IRQ after unmask? Either in VFIO layer, or let QEMU do that after the second VFIO_DEVICE_SET_IRQS in step 4.b of your original email. After all, spurious interrupts should be tolerated and unmasking MSI-x should be rare. I am not suggesting this as an alternative to the real fix, just a stop gap. Thanks, Jacob