From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id DD1A426732; Tue, 17 Jun 2025 20:02:05 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 3FF9B26727; Tue, 17 Jun 2025 20:02:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DMARC_PASS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by atuin.qyliss.net (Postfix) with ESMTPS id A10B0267DC for ; Tue, 17 Jun 2025 20:02:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1750190520; 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=O+NoG2Xo5HkG5dYXEBVx8rtfO3qQh/xgk518Z7oyOlQ=; b=X/rhBhJbsd8a0qt3OVm4vEyhpoEpud7JSWr1ukksyefRO/hBcmuEMACGgR3bk4iIs+5gY4 hhsPypCwvJvn7cdQ+FlfKz+BVrkX99Py6YkvgMSyB7fOBZaoUygIV8zkCUbw6pxbVxtmr5 e0U02JDLQcOuCOerGTKBi0rbsHSvd08= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-553-9MfJ-ve0POiuJCbywTuPyA-1; Tue, 17 Jun 2025 16:01:58 -0400 X-MC-Unique: 9MfJ-ve0POiuJCbywTuPyA-1 X-Mimecast-MFC-AGG-ID: 9MfJ-ve0POiuJCbywTuPyA_1750190518 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-451deff247cso87455e9.1 for ; Tue, 17 Jun 2025 13:01:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750190517; x=1750795317; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=O+NoG2Xo5HkG5dYXEBVx8rtfO3qQh/xgk518Z7oyOlQ=; b=N/GD/stgJWi3F8Glh0oosdbT4m3be27cD3NeLOHTAnVhM1cBmGRYOKBZK1GOWdGa5z ygEcwVbAgzH0PgtR8kYSwNepAh4K5KKiUZxadv4UwyL4uXcDELS1WEOaV/Ke7Ordxuu7 bq/vvFphd7hPO3INEr+2Rix88lFxlX+jnJ+zSuAR8Njx3OcwhR7EjE/uCkG8gNurpGJp AdDGa+ai8IXNLvNSjr+kFy5tk0uW3fbNx1C1Mk7s1KverKJK1ufVZbYYP7rp8RGv7nMu MuqdmAsawQa6Dc2Ns5FIrqRFcmrQhbordAfRHfUktqnQg+zD19ry6E/qwx/GxikmOPb4 5xgA== X-Forwarded-Encrypted: i=1; AJvYcCVCKz1WLMvLK+rBdLuG9NAZqKNMY8qrh8txyC0QGdb8iHnfcnQ32IcXNzxcZlb4U56cfSFy5Q==@spectrum-os.org X-Gm-Message-State: AOJu0YwO5lF6i97nW9yadLTmf1PW1S0Yq0iWo6jTb2evCAPvSqtNyDOh WXw5u5uOYxr05g7gk/aHmgqNOVU5vHx1YX9QThH37vy7TaLC1ZmKssPoVoWn6r8HGay232uhtDp XJov+JTGpVnPeMjMoRZDhwrr4ityzHZn1/gdnnxxNLo8xxv5Vd4T6TZ/H X-Gm-Gg: ASbGncsWNjgWFXZu0lqD/Q9vRhVTrsLKhcHwrbxPGg6Xj2PBXxR1NrErjEESaIBw03A q3NELuBNQz7jhQbgQfdDF/G9N/4BfTKXqgYSmtPaBQn7x5oeyqK9dexeIjrLr13s/AFBg1eYlmI SsDIcCz95GHqBCXqHeqlJK7D5aAUtA0AyRXGHtC1aDl8Vc1O/IyQR+V3GIooqgYyhc1HzQvZs8z 2Gpn7hOuq9B0441sNZGHkxEVMVKM6Iu01DQiJfnE/bJVwD2T6YhENOnTUDDK6DLaXgBvOvrpdzr 24RIN5ZlepQjSsCC X-Received: by 2002:a05:600c:574b:b0:43c:ed33:a500 with SMTP id 5b1f17b1804b1-4533b2723fbmr106294565e9.10.1750190517524; Tue, 17 Jun 2025 13:01:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNEtk99gWXSpZ+RahNNIJ+KZNHzBGaVUSD+dSFjshNFQhawiqf1xX90P7+NZhpbwqFDbMbUg== X-Received: by 2002:a05:600c:574b:b0:43c:ed33:a500 with SMTP id 5b1f17b1804b1-4533b2723fbmr106294125e9.10.1750190517096; Tue, 17 Jun 2025 13:01:57 -0700 (PDT) Received: from redhat.com ([2a06:c701:73ea:4300:f7cc:3f8:48e8:2142]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a568b4cc7bsm14653724f8f.86.2025.06.17.13.01.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 13:01:56 -0700 (PDT) Date: Tue, 17 Jun 2025 16:01:53 -0400 From: "Michael S. Tsirkin" To: Jason Gunthorpe Subject: Re: Virtio-IOMMU interrupt remapping design Message-ID: <20250617160103-mutt-send-email-mst@kernel.org> References: <> <20250616132031.GB1354058@ziepe.ca> <20250617154331-mutt-send-email-mst@kernel.org> <20250617195720.GI1376515@ziepe.ca> MIME-Version: 1.0 In-Reply-To: <20250617195720.GI1376515@ziepe.ca> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 4__9bdpuljDyELojfzaHO9CnSg55kvG5rH46PHfvMQE_1750190518 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Message-ID-Hash: RDVPBJ2I6PK2EERVE6GJTZHHTKDZ4S3Y X-Message-ID-Hash: RDVPBJ2I6PK2EERVE6GJTZHHTKDZ4S3Y X-MailFrom: mst@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Demi Marie Obenour , Jason Wang , Xuan Zhuo , Eugenio =?iso-8859-1?Q?P=E9rez?= , "Rafael J. Wysocki" , Len Brown , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Joerg Roedel , Will Deacon , Robin Murphy , Alyssa Ross , virtualization@lists.linux.dev, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, iommu@lists.linux.dev, x86@kernel.org, Spectrum OS Development X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, Jun 17, 2025 at 04:57:20PM -0300, Jason Gunthorpe wrote: > On Tue, Jun 17, 2025 at 03:44:20PM -0400, Michael S. Tsirkin wrote: > > On Mon, Jun 16, 2025 at 10:20:31AM -0300, Jason Gunthorpe wrote: > > > On Sun, Jun 15, 2025 at 02:47:15PM -0400, Demi Marie Obenour wrote: > > > > > > > Is a paravirtualized IOMMU with interrupt remapping something that makes > > > > sense? > > > > > > IMHO linking interrupt remapping to the iommu is a poor design, > > > interrupt routing belongs in the irq subsystem, not in the iommu. > > > > > > The fact AMD and Intel both coupled their interrupt routing to their > > > iommu hardware is just a weird design decision. ARM didn't do this, > > > for instance. > > > > why does it matter in which device it resides? > > It would cleanup the boot process if the IRQ components were available > at the same time as the IRQ drivers instead of much later when the > iommu gets plugged in. > > > Way I see it, there is little reason to remap interrupts without > > also using an iommu, so why not a single device. what did I miss? > > Remapping interrupts can be understood to be virtualizing the MSI > addr/data pair space so that the CPU controls where the interrupt goes > though its internal tables not the device through the addr/data. > > On x86 you also need to use remapping to exceed the max CPU count that > can be encoded in the MSI, no iommu required to need this. More of an x86 quirk though, isn't it? > There is also some stuff related to IMS that could get improved here. > > You don't need an iommu to enjoy those benefits. > > Jason