From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.182 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796248286; b=niC28csIyi1L96MMhQ7bdFp73+spjS+XTp/Oqi35aXOT4842BfmhjzAVDX1exUWmr6Y2 OjUCrgEQhChZiz+mupGot6HvcWhXTBCpWk7tpmmoB8Q8MeaZd2z3x47A0bOaYe4Kp4vgy Tt0VS4Brk39K/PEOmVU4Se4rK48fd/wmJI/mEw68wg1DzteCeSDcJwAQZCY2mdWfhZD+E 7+z1lvg8oMCG0zPNhqGR6XgWuFHtCLUMxirdStKi0VxSQICtTtBLa5PMJwznPmGYChrVI UtCJgXkKDhPcHVqbb+ZOUVtZ7yCpDKprOi5nPCTLVA8vSm4AZQdYycuC/twfzRsel9A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796248286; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=ma48dMdhkRWW+FQMbcHvkREyOFTClTyycfOyvvhoqus=; b=Dlym5idL44D1TdsIEKfh+VIfRajzSWtOfnFAmH1uClDXigiAlTniAV3Cs1SDVgceWJEN XnCiQhwwgy9rb26kO5B7VXligQyiWfnKnsEzddXxV4CDY2SL8DZB3nWT3ucQTkXP9k06B YTcldue8D18g3WfRCMoFn5+D/4SFPFqQPWRUB38bcm7MVjUdLMn5OWz6d1IehWgCwPuff glSMMLuJPQv0tcDk/P0k4GaxjOmh9YXwm9p+qppbNMFAOmoYkVyGeYgEnWvhfEiYFc3ed Ad7oAsZJrR88h2WHSDLKRpFVo5DznU6zFuRUwRvz0Md0ZOZPUYI/QhJJ8Js9VSWGT9w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=bWfvQqLo; arc=none smtp.remote-ip=209.85.214.182 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1222D606A322 for ; Wed, 2 Dec 2026 21:51:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 1222D606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=bWfvQqLo Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-2f0e8bbc7a4so7185ad.1 for ; Wed, 02 Dec 2026 13:51:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796248285; x=1796853085; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=ma48dMdhkRWW+FQMbcHvkREyOFTClTyycfOyvvhoqus=; b=bWfvQqLoCWUHQSTubOX4kxTQrZmb8/Gx4quYDfpY4NebTeS1V58Y0yT4oqYaBZEFmc NyCc7kmksc81MpLAOVOcTLgacOifHRxFhrz05qk0SpvJEaOfA6VkYBnxi8USU8AYSTRX wTBZiQaYhE/9KCZmr6BAYqVX38E4m6/GXVqiwa1MBQ2iTOppFQrpXKawrpq5Kis/L+fq lSc/tTVLKwWAFtJZBdUsHrmF5bw7kYN1raYhQnypdDRAGFGD3gPYHqH8BEvBnh4579h3 e+WmB0DEUumz+pyfPEzjVbSf7LQcWDscGRTUyzkUT64HglypNZoQHw/1yOvDSaqdzdJS RTzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796248285; x=1796853085; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ma48dMdhkRWW+FQMbcHvkREyOFTClTyycfOyvvhoqus=; b=wHCMnmFzYUk94GS72lG2T3AfmcDL0MiHxjb8Uu9Ri9P8FF48Vc991R/e0q84i34yT8 oYCd6TyyFplE5RQ77yhDknyOLSzb05QzV5fk+l2kBQPiM7lBtLG4mjG1hWtgaTZrW6+f 2fb3I/ieaDXA7yA/eUYMQziXQsmNPC9lL2ZGc96TZ/xy3uSQiZiXbZNCcfSza9QbCWd2 swZb8QxgFb2fxdtWB4nCFqZaZaIfboIPGy3PWCQUZy0IgrJcjbE+HSXo3Dw04S453AhU xkAYHjfLpLmHb8fZgdSZtFxRrUM31JWB5Ca6dTMjPcu5/9F8E6rXC+EUUkEp4g/TH3os W+sQ== X-Forwarded-Encrypted: i=1; AL+hErGmghZDNGt8HoMiDm7TDZXBH/cog3vlci8ElP740+jpouh4Z7GE7GPJRamFIquDQhOZQWeoZ3z/6gQaHKE=@vger.kernel.org X-Gm-Message-State: APuU4Z+q4RqG03ikTYMmblCfGB7Rkiy9Vvr/Ie56QTMaT7/99Qy0bO0L aiZk+qpuyF4Z2KSe1GEt3Ju3Use7zh/Y0koyc1rh99C5qIYrDgCM3rv9lt92dkTlig== X-Gm-Gg: AZFdTZdaCaJLM65XISq+Chw5VHjxwDvKMB9oiU41/neJPEYgkTZcABOOuwPrinV2hw9 DMJUh7q6VXR2btKtgL/1hdmf6uLJKLATNs9jpaOvbwNlU01wA8WwqXfOTGTdKEfcneHJyqgHQst f1ptOpMq9YJcdba+keU2tRqJJY43Oxl8K71Vc3PaOgAASf4AT/h58+6oopmQeNHTtn7MK+ESQqD wwYfT3WniRBzFOGnIBejDjd3KIFxnofwjP6GHW7Qo5ePLyLgDVRoDZbiHVdb6jSoTp4aI0Rh6vt DhfGLqlbioLNZ10zNvyCvGyI9AwmEG/k8T1Zr22tMWJ4Kzm5ws1QLd6tI7g6NLUDQZk2ahKvjj6 eOt4FC2sBH5pTD+aMIaEj1xbT/e41Qk4lEcQDVzXhbZAnYv0FUGq88zij5PTQdxMAqbse6rlMq5 OzMfLmZL96iZtdg73Qta3vjSk+7UIZ5le5eSurAE7hEHp6TWV4ZxGSuWJ1bdkAsKH17ir/D21WI C97zGiYMH9fv/jLX2rKguEwXXsFxHP7hrBKFgK+8HZG73pxVriDn7PAy3zbCyGAlW5Pc9VNoNod pvOxE1cVC/UPvPIBFzj/fwoAHhbl/XdlPIE/HgQosuujp1HJ1WtX9x8Ne511qAS5Qm4rW/2Mns7 O7s80eBjlG1vEpiNV+kHT X-Received: by 2002:a17:902:ef47:b0:2ec:f228:764d with SMTP id d9443c01a7336-2f1972a1ae7mr138965ad.18.1796248284755; Wed, 02 Dec 2026 13:51:24 -0800 (PST) Received: from google.com (25.75.145.34.bc.googleusercontent.com. [34.145.75.25]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8c87285c228sm22425436b3a.10.2026.12.02.13.51.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Dec 2026 13:51:23 -0800 (PST) Date: Wed, 2 Dec 2026 21:51:21 +0000 From: Samiullah Khawaja To: Dongli Zhang Cc: David Woodhouse , Jason Gunthorpe , Lu Baolu , Will Deacon , Joerg Roedel , Ankit Soni , Robin Murphy , Kevin Tian , Alex Williamson , Shuah Khan , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Pratyush Yadav , Pasha Tatashin , David Matlack , Andrew Morton , Pranjal Shrivastava , Vipin Sharma , Nicolin Chen , John Starks Subject: Re: [PATCH v8 04/18] iommupt: Implement preserve/unpreserve/restore callbacks Message-ID: References: <20261123044949.3610702-1-skhawaja@google.com> <20261123044949.3610702-5-skhawaja@google.com> <7bbf2c5f-b938-4ab7-ac9b-2d2e8726488f@oracle.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <7bbf2c5f-b938-4ab7-ac9b-2d2e8726488f@oracle.com> On Mon, Nov 30, 2026 at 09:06:10AM -0800, Dongli Zhang wrote: > > >On Sun, Nov 22, 2026 8:49:35PM -0800, Samiullah Khawaja wrote: >> Add iommupt ops for preservation, unpreservation and restoration of iommu >> page tables for liveupdate. Use the existing page walker to preserve the >> ioptdesc of the top_table and the lower tables. >> >> Preserve top_level, VASZ and FEAT Sign Extended to restore the domain in >> the next kernel. On restore, the domain has only the preserved features >> enabled and all the other features are zeroed. This is ok since the >> restored domain is made immutable and can only be freed. A kunit test is > >Can I ask a basic design question? > >Would you mind helping me confirm that the plan is not to reuse the preserved >DMA tables long term after kexec? > >So the DMA tables are preserved and used during kexec and until the new DMA >tables are available? Yes this is correct. > >Based on the LPC 2025 talk, can I assume the plan is not to reuse the old DMA >tables long term, but to put more effort into replacing them quickly? > >https://lpc.events/event/19/contributions/2046/ > >Taking a VM as an example, that means the below? > >1. Preserve the old tables. >2. Run kexec. >3. Use the old tables until the new VM is set up. >4. Build the new tables. >5. Quickly switch to the new tables. Yes the steps you mentioned are correct. I sent out an RFC for replacing these tables in a hitless way: https://lore.kernel.org/all/20260925011308.3381953-1-skhawaja@google.com/ Thanks, Sami