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 EA826201B0; Mon, 16 Jun 2025 17:33:12 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id BE618201A5; Mon, 16 Jun 2025 17:33:09 +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-qk1-x733.google.com (mail-qk1-x733.google.com [IPv6:2607:f8b0:4864:20::733]) by atuin.qyliss.net (Postfix) with ESMTPS id 03D94201A4 for ; Mon, 16 Jun 2025 17:33:08 +0000 (UTC) Received: by mail-qk1-x733.google.com with SMTP id af79cd13be357-7d3900f90f6so521560285a.1 for ; Mon, 16 Jun 2025 10:33:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1750095186; x=1750699986; 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=8X31SysrSCqMRM+zb4wzBK8eDdmvTJaf6Uq+iS7ehOE=; b=RP12E8ilGOl8st3X9rAmgQ3H0oEub4tCXEpXjEZFG5Fxmt5c5H6zWeByuL9ZFaS5rb 4qo1AArRIwZY4It9MyFJGYRJS3P6Ikv9ugqqUk1JUGIaL8dbxvvhXDzo+TVvTAcmC9Np NcO43AkTKDfMyVw+IUWdSGaC8ZAcpxpn2IJQrnxvukmIf76kAyCbXeZ0lxBqQvY76p0N IQe2chxgI2hM6pBB1IRfSM+qpNcdBeBgnHDkvlB9fWVdKlRLXhEXgLFqU4V9b7RuXjD1 Hv260LtKg3YJn5SyHAQiO2+I9P4dr3rHmYjdE5/k7vvdDhPir7v2jCK9befCnD5UWzTw hhtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750095186; x=1750699986; 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=8X31SysrSCqMRM+zb4wzBK8eDdmvTJaf6Uq+iS7ehOE=; b=tfXxMcG50D0/VAJ81EUN6nPRMdH2GrA9qkLqjddn/M+Inv89OjxVzGtM3W9YqglvsE rjp7oK8Zt2bIiRioS+GoLNzImM4CndiyU9b3SW35+nkP9GfJhxlrrw3c7/rtvYg+QnPz jvj9qGjOtqTBi0RGbkq0aT+CsAGvMfJjgXC6SwJSJDLfdQjsAKg1VH7weLfcTmWrF6Wp dW2OBvpLcM/F4GiE66laiRmfrx5LYCEqRBiOVR7Y+it5NHxX3AF4WAN7ZEi4LiycxW+8 DAVQhOB2rSrZT0B+3uHdbdzgqF3l5uBoTdtRd8FKAkl3oL07uI3tFWGylJo6RgobwTmo VGDw== X-Forwarded-Encrypted: i=1; AJvYcCV0/+wAvR0QyMX6fzIHRlRrGh8YFg0R5zxXDIVj4PL0V6kD7yt0aqQ+qBpkfZvQlhEUnEs5XQ==@spectrum-os.org X-Gm-Message-State: AOJu0YzkN5swk1Xo1uOOKa3BjAN1ct/gLJq5a+ooFyZsUqgxT/HGsaLB 7ye7fpfp2ODMKIe0uTnFX7oBxl7JC75nu6m28rkyQ3MmRoHa3zdbiHoLuhSqbP/Ej+0= X-Gm-Gg: ASbGncv0U3al8J8f/XLrwYkS9r9zQ8jze4Thx8K1xouYTtFjR6oRudx27hoQR7a36NU 5/QGZLX4ImOCzu4tP4JSCdKAiYePs/KnKEPf7EZVWeWnMtEqoYrHVglnNYxjoBTI/NddZAvjlrD XPbuFdQtbB4FlAYqYVDHR/dn5wfI9JYeCvGe/QsFfV24ECJe7PhtfbZpEZc7GhJYWNB3GorhxcE EfNoQsKInpch0Eds9Ibq+JGe89VxNSGmBzP44uXHgT5xpbxt2EbtGE9RscIzixVsco2cc2CXIw2 XW9fNQoH8nJwJyVwmubwwTgQ4O744YNx16B3fC8uccZbevmId5P5gERcz6f9kaeKoJrO4HjOaNk MzCPbZBclof0K73H2KuYTLzcn7WVU42H+VzEZPQ== X-Google-Smtp-Source: AGHT+IF4chGBuDLOAfxdrZKfkSU9t0Ai/SG6GB1rXrSJpRvbZP1WNygH1xEW0dli48w32M0hptcl5w== X-Received: by 2002:a05:620a:c4f:b0:7ca:dac1:a2d9 with SMTP id af79cd13be357-7d3c6cdf0c2mr1264284085a.28.1750095186387; Mon, 16 Jun 2025 10:33:06 -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 af79cd13be357-7d3b8dc9b58sm553436685a.13.2025.06.16.10.33.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jun 2025 10:33:05 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1uRDhh-00000005m43-1aC1; Mon, 16 Jun 2025 14:33:05 -0300 Date: Mon, 16 Jun 2025 14:33:05 -0300 From: Jason Gunthorpe To: Demi Marie Obenour Subject: Re: Virtio-IOMMU interrupt remapping design Message-ID: <20250616173305.GA1376249@ziepe.ca> References: <> <20250616132031.GB1354058@ziepe.ca> <8c3b08d5-24aa-4db2-84e1-dfd1d2c52065@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8c3b08d5-24aa-4db2-84e1-dfd1d2c52065@gmail.com> Message-ID-Hash: B4PQVH5XS2TBAPXKQNG5JR5PJ4MAHOUN X-Message-ID-Hash: B4PQVH5XS2TBAPXKQNG5JR5PJ4MAHOUN 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: "Michael S. Tsirkin" , 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 Mon, Jun 16, 2025 at 12:53:40PM -0400, Demi Marie Obenour wrote: > > AFAIK hyperv shows how to build something like this. > Would this need KVM patches? I'm concerned that implementing this > in userspace would interact badly with the irqfd fast path. I don't know. I think you get the same issues even if you did virtio-iommu irq handling, it shouldn't be any different. I'm not sure there even is a fast path here, remapping happens during initial vector setup/affinity change only. That isn't fast path. So long as the MSI is delivered to the correct CPU vector entirely in KVM it seems OK. And the hyperv approach of asking the hypervisor for the addr/data pair to achieve certain parameters will work alot better with existing Linux than trying to build a iommu emulation where the guest is building its own private addr/data pairs :\ Jason