From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.180 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796248286; b=JJ8GtWl35+2YNLys4yTr3etu+VrQISAVEcryxwVmOKYejQAipEkFTvmVtmQGpZmHsK5R h+pYYV1WPgcVlzkKgXPIKvTKvmUy+yZ+/VgmwJE0DDmEO8VVF4TWtjCUySE0MjPt2W+Yd T8zdo726zul2m2EKQf+9hz+KMT/r63eJbyuR6O9yVbnWK1Jmh16V8TldHh4rYGBxMj6lB j/tZQZ+wz5+pvY5vpj48Hz9ZWbt43G15aljldmjmk1WZ+F7Uzl2zPv4cYO8OpR3yfaDgz L8Kr5HOkii+y6Mh+reLiJbub2k696g7aey6pBeZ+Zu7hP87OgVrsTVFPFRskINyUeSA== 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=kbYpriqYUhmWZTLlt2s0GcjHde0AW2jAf9YBgdGOxxNxIxj6XT3kYU5Qqs4m637D521E n4UtoISuNyMW72nH2CjsuzNfEku/thXg66hA4MGDsBd0NFNKocGwCTvehLOZrNyb+OJ5r Ge0wtDcpP5JnkqRCymYHqrbFC6oGNFc4eoIJTtPKGNlq3cF7r8Fsy8sx5Jrm8KAGGWpaF JP6uq+fUCjvx1llvg8YqOM/l/mUJnU9s8gXWsG9axCWGDv/YZ6rQpxvmf8FrUKhi+3I4O nlhWgwVvq8rgDBPrpQc1yqqHmv1E5zcz6AjoXEvggBywrzf2v/czIQB9G0o4cdnDUqg== 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.180 Received: from mail-pl1-f180.google.com (mail-pl1-f180.google.com [209.85.214.180]) (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 242F7606A334 for ; Wed, 2 Dec 2026 21:51:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 242F7606A334 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-f180.google.com with SMTP id d9443c01a7336-2f146d5607aso21695ad.0 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=VZNxtBPeHJB3wB88P/ylxL3ETMuT4kqQruTwZrK0T5zfcIPI69pJjcLpaILDUqJMQ0 F0Abw/mRIukvQkFZf21I+rxXUtpZ54zXjj+T52CHrUci2AeDwO160MaJeEa9UMzlwV+r t+FjKuAIP+7m6i/f0dHOLETmK3Kw02aGODKnqNIAkNHj+91Lj9xT0DP4JuTCMtmtu9Yg GHWXPSCt9hsDf3AQAPnue0oBnZsMujZm1Ow+idHy6ywDKxHOosIx61ViEm3NaIGEeLH/ 00ozqmXq1IJtO/AfuiCT6FKI2d7bFdlkUbSOVhEKeKAIJAOr0uI73LBKVZEBYW5APdiQ Szzw== X-Forwarded-Encrypted: i=1; AL+hErEPHPLso6GCxYajcPin9AfDvj0uEnpc6lHXG1YagW1UwOnPQlvTadi3QP5JFJDODTTYleM=@vger.kernel.org X-Gm-Message-State: APuU4Z+2zjPjv7Y4AvkNNptiO72GVKqBwpkslOE8ruG7d0Ta4/lKgkLt JlCo+jIHcXiYk+zHkZ7hQ+DkbnOCdm8gdWTuAACxW3HVxY745jhj3zD/ZJ1rqRNp1X5tub8yyGs PwwghDCa4 X-Gm-Gg: AZFdTZe0HMWPLEUKIVfdlK2aYuCSu0RSTnU5o+g9jEkQ/aKjTp/5JJhVFfBEilRBDkX +y1qreuZRAkACvw5KYIW0jetEKm48TAJ8K6wc86u/EbHFNmWdup5rlN5N2fWn5ju3HSrkaNs6/W dY4ATi2ocQ40+G2ROCLDX0svwAms1u+i8U7Li3XxGnnaHvsHd5q0ToFcFju9WaBpNyDb1qCXPNH arW5KQcrXYRUcseVjoi2D2qGmmdP9MlMydutrDNlyCe5YcaGOMYWivFacOBGlubl7ysgjEgCazB 4/CkHo1YwPPiGgu+M5/XToxwDtkjEvvcB+uexcUN1MDboZXmihBMdKMwicxz0DG2PxAfxaComJb kq5YmyRo4IMNJ1fCYtNZXHiB515LG2leufACHXhvujSpz9xasH+FAQ9RlKZhyOBoPgW8OR3ALez D7nLqFINpAJ1eudAljvQ/ugKjA+7fV0Xsn9urSoAb697O5WNyMuFZgSv67U7PNrhZpjCbnDxyrS JK+sMX4KXWMjD823d4hLpvaZSU0mDINKB8k5AiT1DdS/CKXMpwC8XOj7ZkqEu6N3d/6JkqanfPH Ep4xPuPRc1kG9IFEwujshyAB7V+a9esRabD5kwnr+vV5oM4AtpQPdskX1kSxrTMmR7UWgHVX2+I EymjALrCkOAj+c3Hwtelc 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: kvm@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