From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f46.google.com (mail-qv1-f46.google.com [209.85.219.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B3D620B7E1 for ; Tue, 1 Apr 2025 16:13:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743523984; cv=none; b=ufAXuWqLL6Yai/aEJE1z4rn3WJEDCMdkm4cIZodTh3np0APAgsVLdwlS+0V6ffzLaGCIpYr6GJy9CzdN2IzD16qgj/fNbYrH/OImZs5YY7NLslm6q79Mh1aU/IWhlfaSHtMaoLsbtke6y6hVisOqyPEAXHP1c739dTFscc2+ZMw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743523984; c=relaxed/simple; bh=jsPocqxTm3Tk/n85dNMIT20KutkK5Grt6C4lCnIAUO4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=a49eOB5xPzfMIyseLa3SlJWLaQYj0tA4lZ/ql2Viz4aMIVb3mLfNZBAoRqXc52yF0xGBfvMpXTJy/DPRCPknMmePRO6yKBh7vMUf2JHWciZ9JpDU+rmKxkOcTg5R6/yYrgLIP6P0MLeFbe+B3u/KdI4Z+nXnl/kIWUBAjjsAh6A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=dDHma69e; arc=none smtp.client-ip=209.85.219.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="dDHma69e" Received: by mail-qv1-f46.google.com with SMTP id 6a1803df08f44-6ecfc2cb1aaso53513486d6.3 for ; Tue, 01 Apr 2025 09:13:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1743523982; x=1744128782; darn=lists.linux.dev; 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=poENEUfmFrThnex6gEytUaMxRROeOKxTbEdDijAo1Do=; b=dDHma69eOp7gJHnnfuQUjMGiLZEDoYF0YW1JK41j0rgXEaj/vxRrqXH4G8a/I73jOQ 6bDRgK2MVyyueHr8HxB729prKWePXppP55703lLbJwHDWqncV7141rB0NI7lcQ6Acfge CKTkNSHQ7bPrE3Wihb0CHTyriiVuso2ycPnJEVhMqVLm6uHQw00SU/4UluNuh8+E9yem zumaspyspQ41EtFgvts7ZUX1Ts0Cj5i4GrazOgb0HB+EFe5wTuTc0A+RjahU8t7tZ8XT SntUJDTznMBsPjgRr1a/NE/oWgViSDG7FTleb/Ns67C2pqgXXbv8Xu2+iNA5LUtO0vyt OcnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743523982; x=1744128782; 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=poENEUfmFrThnex6gEytUaMxRROeOKxTbEdDijAo1Do=; b=vG2By2HjRlYB74eRbQJSaV0E1ipIXYqR19ISuPfwF6WITeVx7pSlgC3T/tVSvKQHdq jsXsaStgxxbVfD+65RbP4yMqLyOj0RUiHr3vdOsBcyw7G3E0Tbb9J153eQx9vTqmhn/h Jt5oL3OyUvIRp7tKzaWPGdGWr775UcJk/SV764mW5lY/D/qfVpf04YLHKHIDHizBUTJl mJSrvPgUbUL2rzQCSOU7GgR+ZKBspxaD95YjCgOveftCF3a8FpJqXBVF236E/3AwY50v pFenXM3FmUX3fsyAFV9KojwzjVfjjWuLvBdxHfdDHpfYx1Iwmrefzgqgjw3YuV0uWPcj Je8g== X-Forwarded-Encrypted: i=1; AJvYcCUAt+U4eu98IQVUZPwUGTzkMPY4PcYu26o3hWtwR7H5z6u3Wgy+pTaq7sJdLlFgvNkNzqPrkg==@lists.linux.dev X-Gm-Message-State: AOJu0Yy77AGTWN2Zn3dt5GhJJQiKeyMyVXV322P653ZvmsoS0QqhnoxC CCvYcey1F6GD/2s+zF8g81scFNprChbCsg9K4RMn3ENhF6h7C51/zXIO/yXQ0+k= X-Gm-Gg: ASbGncv/KLKXNM5L64kHUVJipdqyChN6zMvGOZdcEZ0gVDckpld9UdYodyBSpKuBqMj uj+S0P0xEtLKsCrPxoNrBhA5JS+RzXUBr/BIK5fyx9spRjmw/Aob7c2BvNsD1imM4us85sK2Erf 4CDXIvayy7JHAYCstuOYXMpB0XJ+gdpde7oqaJdWXqwvCOyC1SZAlUshhKrNJ6EXl5x3Pb8LUML HU4iOmD5Vnh+lIPNz0eXloKzOExgtW1HlrVL2JxKwVn3zcHk4UEPRKEOSKqTTrptgMlDU4TY7Xr DLdd4eIcU+WkwPze2K7NGbamiNwtVMuIBO/Ie2EF0gX+aWfs8+hc5Y3taUDnVIk6LYbi88v5UFV KDanEOs8ZRdF6X8P/UIvoPs4= X-Google-Smtp-Source: AGHT+IFgqnXSN6fOa8wvReuysgLZpbCK1HhkdqcE+Mm2zYjIPC+dt/OEL3eUy9xyw3HgFZ9lLvi7Ow== X-Received: by 2002:a05:6214:226c:b0:6e8:f905:aff0 with SMTP id 6a1803df08f44-6eed62a0be1mr227091686d6.35.1743523980713; Tue, 01 Apr 2025 09:13:00 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-167-219-86.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.167.219.86]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6eec97718e1sm63039286d6.70.2025.04.01.09.13.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Apr 2025 09:13:00 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.97) (envelope-from ) id 1tzeEV-00000001MLv-35Gu; Tue, 01 Apr 2025 13:12:59 -0300 Date: Tue, 1 Apr 2025 13:12:59 -0300 From: Jason Gunthorpe To: Alexey Kardashevskiy Cc: x86@kernel.org, kvm@vger.kernel.org, linux-crypto@vger.kernel.org, linux-pci@vger.kernel.org, linux-arch@vger.kernel.org, Sean Christopherson , Paolo Bonzini , Tom Lendacky , Ashish Kalra , Joerg Roedel , Suravee Suthikulpanit , Robin Murphy , Kevin Tian , Bjorn Helgaas , Dan Williams , Christoph Hellwig , Nikunj A Dadhania , Michael Roth , Vasant Hegde , Joao Martins , Nicolin Chen , Lu Baolu , Steve Sistare , Lukas Wunner , Jonathan Cameron , Suzuki K Poulose , Dionna Glaze , Yi Liu , iommu@lists.linux.dev, linux-coco@lists.linux.dev, Zhi Wang , AXu Yilun , "Aneesh Kumar K . V" Subject: Re: [RFC PATCH v2 14/22] iommufd: Add TIO calls Message-ID: <20250401161259.GM186258@ziepe.ca> References: <20250218111017.491719-1-aik@amd.com> <20250218111017.491719-15-aik@amd.com> Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250218111017.491719-15-aik@amd.com> On Tue, Feb 18, 2025 at 10:10:01PM +1100, Alexey Kardashevskiy wrote: > When a TDISP-capable device is passed through, it is configured as > a shared device to begin with. Later on when a VM probes the device, > detects its TDISP capability (reported via the PCIe ExtCap bit > called "TEE-IO"), performs the device attestation and transitions it > to a secure state when the device can run encrypted DMA and respond > to encrypted MMIO accesses. > > Since KVM is out of the TCB, secure enablement is done in the secure > firmware. The API requires PCI host/guest BDFns, a KVM id hence such > calls are routed via IOMMUFD, primarily because allowing secure DMA > is the major performance bottleneck and it is a function of IOMMU. > > Add TDI bind to do the initial binding of a passed through PCI > function to a VM. Add a forwarder for TIO GUEST REQUEST. These two > call into the TSM which forwards the calls to the PSP. Can you list here what the basic flow of iommufd calls is to create a CC VM, with no vIOMMU, and a CC capable vPCI device? I'd like the other arches to review this list and see how their arches fit Thanks Jason