From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 C4E4845C1C for ; Mon, 24 Jun 2024 22:35:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719268539; cv=none; b=B5E20JiJSDInD826y6khqRPtQcq5t+3XG7vx7dIpgkCF7z+6wX23yrbGCLJPXDxbaVbOpZZh9jRPtEl/cRQ2EyeEoy1ZMSnALo5dLKpF+lFR94rDIzXmaEm0aTIGBExH9s1Nkm2n2tlWGeOlXCQcM0ylWbQit9CGmYHVEg6hj1Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719268539; c=relaxed/simple; bh=aT2qy8ye9kgiry9WC4F+sGOsviYcZPjeN5uNOxlkGfA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hSARaLnM6I2+i1rGZhuROgTdkFi4H98YsctWDsTod75yc0A3UndTscJg4uCLON3HaDyBbaK/F7DuFoBEATEDKGsVtCa9XUhjYG0qp4Ix3tIfw9wmguwmiwmehSe8v/K9MjYW2oXoDVmrJPESRfDK+Kw9cp9KPuxnuAncxQs2Wqk= 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=YiJXStyA; arc=none smtp.client-ip=209.85.222.169 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="YiJXStyA" Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-7955aaf8006so388529485a.1 for ; Mon, 24 Jun 2024 15:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1719268536; x=1719873336; 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=MtTp+BqiuzS7EIIVZNGGCWhCGJWEUGz0/p9POpsvwrQ=; b=YiJXStyAyiwdbYhVRmEEeZVq3fw2jh5ZkLSVe8AfWvZDWeOFXUap5W99GBIlyryO4R wGfQuKvZHQkt/aef1LIxPn+GJPpw08JZr0XnWSR0TrTzdeeNDk+us8apu7718ut9qp32 y4aW8RZH2HKnII4XBKyYIUeZ6aND0rdHVjspjMV0J7WsoYEMqgJGdIRP+Uck2FSh/50M qlQlAx2pmsKZMweyzKj9O71RV/G930XA2LNzSDP/qM8Fj/IM2jsAjbj6d0Seh4zY2fY6 dZlLGemMylGS6STbasxt0/1G/NfNdd22f/YCjzoHshAe5ZsJN5VA7emDQHcMShPw1kcz qhZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719268536; x=1719873336; 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=MtTp+BqiuzS7EIIVZNGGCWhCGJWEUGz0/p9POpsvwrQ=; b=BZ20s9QQTr0jhVrmnYGIgCluR/toVDKK11FD4n2hVNviZavGd/9sazUTn4jtKSxuFo CnfzfHX1dFOQkRU4hIla1wfTjE5fqywytRA+45Jeverg9QMPnxS/TezpzftHsumCnUco rBkdTDNql+Yd9M+pEHj1z/n08NevG/3WJV6P7RwAe3DDr1eZ8ucZL3vbOSGCzQAXFypt vGZ1LMWtuUSeHN+EtVV2rQbnaNyOmkZXhG5PJpQTOuN2Os1E9eWYAu4XQZZN/uOW9/92 BbZ54vpe/UeoKel+7vPhphgzdeOlKOK9bTGfBX4mK7BBzc/h/S/oCMq0RCgSJfEJohdd UnTg== X-Forwarded-Encrypted: i=1; AJvYcCXgRqBIvcUaIk9rkaMpMO3/ZOV48LjgGuirUAI2mN7r3vRq5OV5tnRzhnTImBO6fHrmHnFt2ErKFcxBBjb+ub6OvLTn9fo= X-Gm-Message-State: AOJu0Yz3h7wh4Kr7APJfBMWSnctxkYC0tWzfcxARk0RvSrXJtCa+06Zk lEL/BTcCx7lr7bj5YEF9GWgOm3DAkW7hQTt73r0rAith6L8K2yNwLXkigoa4rcY= X-Google-Smtp-Source: AGHT+IEt1C3MFNaCsLFJB/VCC9aFQBtXdDV0dColoFeVqztX4eRvEXQuqixZ/9chLmqAWqi9C18PTw== X-Received: by 2002:a0c:f8c4:0:b0:6b0:7f83:adad with SMTP id 6a1803df08f44-6b56d379671mr2817056d6.39.1719268536573; Mon, 24 Jun 2024 15:35:36 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-80-239.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.80.239]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6b5255f441csm33785236d6.113.2024.06.24.15.35.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 15:35:35 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1sLsHf-007WFC-Cq; Mon, 24 Jun 2024 19:35:35 -0300 Date: Mon, 24 Jun 2024 19:35:35 -0300 From: Jason Gunthorpe To: Oliver Upton Cc: Sean Christopherson , Shameer Kolothum , kvmarm@lists.linux.dev, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linuxarm@huawei.com, kevin.tian@intel.com, alex.williamson@redhat.com, maz@kernel.org, will@kernel.org, robin.murphy@arm.com, jean-philippe@linaro.org, jonathan.cameron@huawei.com Subject: Re: [RFC PATCH v2 4/7] iommufd: Associate kvm pointer to iommufd ctx Message-ID: <20240624223535.GA1781035@ziepe.ca> References: <20240208151837.35068-1-shameerali.kolothum.thodi@huawei.com> <20240208151837.35068-5-shameerali.kolothum.thodi@huawei.com> <20240208154210.GP31743@ziepe.ca> <20240624170747.GA1515249@ziepe.ca> <20240624180148.GV791043@ziepe.ca> 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: On Mon, Jun 24, 2024 at 12:51:34PM -0700, Oliver Upton wrote: > Having the SMMU participate in broadcast TLB maintenance means TLBI > instructions on the CPU invalidate translations in the SMMU, which is > useful for SVA usecases. However, if the host is using different VMIDs > for the CPU and SMMU, then guest TLBIs no longer match the guest's SMMU > context... > > Pinning / sharing the VMID between CPU and SMMU is a hard requirement if > you advertise BTM support to the guest. Yes, and the extra detail that the SMMU *must* always have a unique VMID for the specific VM, we can't leave it in a state without one. Meaning there is little purpose to changing the VMID at runtime as you can't multiplex more VM's than you have IDs once the SMMU is using it anyhow. Jason