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 7ACFE26782; Tue, 17 Jun 2025 19:57:28 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id B9EF9266E0; Tue, 17 Jun 2025 19:57:25 +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=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by atuin.qyliss.net (Postfix) with ESMTPS id 2F2802670C for ; Tue, 17 Jun 2025 19:57:24 +0000 (UTC) Received: by mail-qt1-x834.google.com with SMTP id d75a77b69052e-4a42cb03673so73024861cf.3 for ; Tue, 17 Jun 2025 12:57:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1750190242; x=1750795042; darn=spectrum-os.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=GSljJoj4v6CeDXJDozVd8y37KP8tPNu+Cmnc8/7K2EU=; b=Phe+iJCi1JA3J6ViEVVylVaN0DPd4FYmqs/fDuoFWmuJD6Abo0ZEIxKIenLl/weh6C yyQG76XNKPXuzJtTwYLOmql2pRylUVKNXaknCtULALS+hjE8u2xsRwFSYw0TWnVk03OV 4t7KJcpwfx2NGjKCQ6IkIFzFgLwdQnw8NIELFWPURBwNLoCeA+jsonA9lsl4d5WEI40P 18J0aF43ik3O6dbdIvFv5IyzBzAyGbQI543uQN9iRGIPeypRw/lUwDK80ilaHjIdneW7 mf0inBN9TIMlMHmR5KVVJd0XAb21JlCjFBjODt9Fm9sm/qX0vCa3Zj07rAJPYliWVQ1k VcvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750190242; x=1750795042; 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=GSljJoj4v6CeDXJDozVd8y37KP8tPNu+Cmnc8/7K2EU=; b=MpY4v3ys5cxxYjNyVnTavIhEBqqkaXNbZuG9WTZHaFNJHVrllUcMpxDBtH8wxU8ZbA v62txev+d6gWN72vWsNrD1cv7VUJchhUxpfRsROoK0ddyBXS3tPccI4oK8/140j2pxgP FHJ3IuphcyXMRNWW+Ke9SDT1SXjf11UycxLZ0X22NcC6PurbceGvRT+jjlWZ0g6hVEHI FbtCyhByYn+vrKNC1i+2mqVa7Z2ex+WN8NQ97B1v/9AHrkn8KY293sgEc1ysbAyjs1X8 4zqes6xBj19+Ho0mHsn/E80gMjmLMesOBxW0c1rkYpvaUziP9VBzTJL0Vvjpkr5H5phN 9uUQ== X-Forwarded-Encrypted: i=1; AJvYcCX519kkMyWmYh+TBR4L+ROTj6HouS136jf/5zA0W2nI5JOd8/hfrj7JVle8ARY1fdrxMeB1vw==@spectrum-os.org X-Gm-Message-State: AOJu0YyUiIedFiBzjQRFOMNBSpWxIbmDlQu8LfLZEznRM82LIzLSMEXH r71wN2FcEQyr/0j9VG6dr/qyilSod8H7qq4WDSzr5mbB40wwqv720rtXRmqsqy6FUm4= X-Gm-Gg: ASbGncsffi7T3i2gyg3TMsb6jd7ZkHl2RYaMKJkjKaSAefncIpWsrAhKvJs7wQPMAuo y+coo8viXQ25NfPPacbAg9Je29zIAFwlM7/f+QefLsNKFqy51dEnbcZuSbJYigK9AOR7NYUbASW fAly06vm4oXRF3Mq13f28I/Xe6hspIPKHGeieIyjaCpzKaq+SI0mWibzNOms7cQGrOPhIh6v06H B263pS5nObuye1KIjGa9zIZ7OsSHKkYMicTKVO39YT5ksj3VpEDU1unPwwWUlF4Y00JN/snxlxj oJNHR3VD9eJFbVzqhRwGbDDzlzyn0YHcwmqrt+yGKOw4xox34i5whgnO4dV04neESD5WwvsDu6Z 9VG/n7Haehw8W/lY57sW5UBzHkJS4KK1Am8PeSg== X-Google-Smtp-Source: AGHT+IHoE/CIYPSeBo9AkwYX6P5QyNezX929DkvT7AQbxP5vAuyPsD+eSrDU1SNqwDaclH2cAsl91Q== X-Received: by 2002:ac8:5746:0:b0:494:f1e7:65ef with SMTP id d75a77b69052e-4a73c627abcmr231747311cf.44.1750190241701; Tue, 17 Jun 2025 12:57:21 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-167-56-70.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.167.56.70]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4a72a4b0e93sm65849681cf.42.2025.06.17.12.57.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Jun 2025 12:57:21 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1uRcQq-00000006ckX-2tam; Tue, 17 Jun 2025 16:57:20 -0300 Date: Tue, 17 Jun 2025 16:57:20 -0300 From: Jason Gunthorpe To: "Michael S. Tsirkin" Subject: Re: Virtio-IOMMU interrupt remapping design Message-ID: <20250617195720.GI1376515@ziepe.ca> References: <> <20250616132031.GB1354058@ziepe.ca> <20250617154331-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250617154331-mutt-send-email-mst@kernel.org> Message-ID-Hash: F4VV373PWCWD4HMOBWQJBYTTOBH2KB4D X-Message-ID-Hash: F4VV373PWCWD4HMOBWQJBYTTOBH2KB4D X-MailFrom: jgg@ziepe.ca 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 =?utf-8?B?UMOpcmV6?= , "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 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. There is also some stuff related to IMS that could get improved here. You don't need an iommu to enjoy those benefits. Jason