From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) (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 B566C1D6DB9 for ; Mon, 7 Oct 2024 15:01:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728313303; cv=none; b=cesg3J2nWvXJfHh+ytxbvW6vW7R0naUYS1G7j1ELWtBGDoSsYkDhOZnalxHUtaTYrjQB7P0JeFsZx7Btnm85tdoO3GJ5JEmjOlflSEtf7rEXP8olt0yT+MpULlMCjYkDV/UbYOw8O4FEZqI2B1Qf5KNlZhMXX7gnoOTRL2qjOTo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728313303; c=relaxed/simple; bh=rRVuIaOx8RNrteaDGFooPVCgbWZsVHEatmlbzj7fViY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aOQzGm90b4ETSBGpeJBTK25Uaj4U4N/QLahaJ0zJ7GT/fh9wpxOouRdER7XC4r0xdLv3IHXSKDDh/6R3vTG3cs9k5KLZBRvv3EPz+X3Ld9/ZDh4CF64Bn06VPKD0LccerW5s/dZCLDkp2Eds44H+BEiv0jdQ6fo8zNCWaNWGKmI= 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=EsG8/Azs; arc=none smtp.client-ip=209.85.222.177 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="EsG8/Azs" Received: by mail-qk1-f177.google.com with SMTP id af79cd13be357-7acd7d9dbefso475262685a.3 for ; Mon, 07 Oct 2024 08:01:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; t=1728313300; x=1728918100; darn=vger.kernel.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=4bInHqGw/7pXdDA3IXyTgOVdi79kStxfjp6yDL0daeE=; b=EsG8/Azs6QNi2ZnSa0so8tY9ftg0gKXL7pk4qP9hzK5qrt0wUFXXRvdMYKCbCcRS9p n49LNm/AILbZ/GDgD7o4iZrfiVTp10yzlTfOP1at0rgWo+Un3HbPw37hBXVX1npXym2E 75TORHgNOBV7807m/bcEecsmrYSnyysT6xOMVmgja6O3AN3nWzREdUH+c3z1WX1aeiaV +TTkJPo6/GuAw6WGrxIcMID64yV8iz4PyH/ikIIDPUPoZyNs1ibCA2KoclqId9viUvGm Z8QVkWCS1B8n6P26wYl0PK8tvNxHwCGz5xblLTJZSpJHo2+lb6k13l3kA07ltMsfvxmD tJHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728313300; x=1728918100; 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=4bInHqGw/7pXdDA3IXyTgOVdi79kStxfjp6yDL0daeE=; b=bhKPcx3AkX4FRuwDnK48kUf9+Ml6+yT7WW1ZhLv9uw0EEyZF18hmK1yEpiJ9z2W77J 8nzFQDbVMeaaxnai2Cy62dXhuw16Hyq8wBtFKUh6Ty5MjbNY+l/XQ6mjQmvP9t3qw7B4 jILnfjNs32CUoWc2EYu9U9vS9VqY6mMnAjgio8Xze1rKqiMpP6dKWY5VMKKCphGbQdaR dmqS3ACdwqPoYGqqT1TzVLVlxTtb88Sa0zy63VF2viW1zSDUQ2G/fqrPFAYQmak5xL5g JcLXT7rIjtCCRJiOYwCPcKRU93fawPQUWKnYOrisZmm2eKuyINTs82Drx7OE91tAxTu3 YtPA== X-Forwarded-Encrypted: i=1; AJvYcCVn0jKvJMV5NI/jYZbThdVbEH0/2DYpMeYHTizdThkajyZrCspD+1DTfue183/fzM+m0WOaByELlTqEIxE=@vger.kernel.org X-Gm-Message-State: AOJu0Yw9asDdHt6TBvzG+S6jq8CYYfF9oRw3+RQbjA1sYI0GLcxfTCGf Ri+GmgY+YJds7Yq4BdVcoAXJkLaToJzKio1AIe5s2AM4U3mb1PDT7VSryhvwhoQ= X-Google-Smtp-Source: AGHT+IEC12fI88Gp57MHDcshS4/IkrApM2kBYgZQIiBILAEfDwFMFN//oZi0JmEkR0VcJlcGa+25Vw== X-Received: by 2002:a05:620a:40cd:b0:7a9:b914:279c with SMTP id af79cd13be357-7ae6f3aecbamr1931318585a.0.1728313300551; Mon, 07 Oct 2024 08:01:40 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-68-128-5.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.128.5]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7ae7563619fsm264722085a.62.2024.10.07.08.01.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Oct 2024 08:01:39 -0700 (PDT) Received: from jgg by wakko with local (Exim 4.95) (envelope-from ) id 1sxpEw-002Wvt-Te; Mon, 07 Oct 2024 12:01:38 -0300 Date: Mon, 7 Oct 2024 12:01:38 -0300 From: Jason Gunthorpe To: "Gowans, James" Cc: "dwmw2@infradead.org" , "kvm@vger.kernel.org" , "rppt@kernel.org" , "kw@linux.com" , "iommu@lists.linux.dev" , "madvenka@linux.microsoft.com" , "anthony.yznaga@oracle.com" , "robin.murphy@arm.com" , "baolu.lu@linux.intel.com" , "nh-open-source@amazon.com" , "linux-kernel@vger.kernel.org" , "seanjc@google.com" , "Saenz Julienne, Nicolas" , "pbonzini@redhat.com" , "kevin.tian@intel.com" , "maz@kernel.org" , "steven.sistare@oracle.com" , "Graf (AWS), Alexander" , "will@kernel.org" , "joro@8bytes.org" Subject: Re: [RFC PATCH 05/13] iommufd: Serialise persisted iommufds and ioas Message-ID: <20241007150138.GM2456194@ziepe.ca> References: <20240916113102.710522-1-jgowans@amazon.com> <20240916113102.710522-6-jgowans@amazon.com> <20241002185520.GL1369530@ziepe.ca> <1d331c55a299d414e49ba5eb6f46dccb525bf788.camel@amazon.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1d331c55a299d414e49ba5eb6f46dccb525bf788.camel@amazon.com> On Mon, Oct 07, 2024 at 08:57:07AM +0000, Gowans, James wrote: > With the ARM SMMUv3 for example I think there are break-before-make > requirement, so is it possible to do an atomic switch of the SMMUv3 page > table PGD in a hitless way? The BBM rules are only about cached translations. If all your IOPTEs result in the same translation *size* then you are safe. You can change the radix memory storing the IOPTEs freely, AFAIK. BBM level 2 capable HW doesn't have those limitations either and everything is possible. Jason