From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (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 A2A8C2BEC45 for ; Sat, 8 Aug 2026 02:31:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786156282; cv=none; b=K5WtBl6r2bhyLOT3tFqUKGGQHZ/YuKtdhNtdBSI1++aniCOufkQ4Oa7nuHFX8jeH1mF5dnZrX+W+vbELSTXk90PeTd5VeKh8t3drHRppOC799BLwLCtTugvNNTwBPblMwZwAse7UNcIDQpUxgNBKj3WPi7YMWK9CfQww6MyJa5M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786156282; c=relaxed/simple; bh=yy9KYO3WfAu42aqR4kwhL9S1z10fN8BxMXNkSzlVq0w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LoZafdZiIGPQAhBvvHTmvM7XnueTnKDA5LGu+skcDagEwBujwQ7BW7CK45DdBcP5aqoJRt1yC/dsMVnfpTgrVvYhhcKtlrlVMpGEwXs7vix1fBH0vBtooPCGOgkta4KH00jILmWt2m16voaVHSk+P823LmgQHNYR67NT3DfwM6E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Q5gd7ZPT; arc=none smtp.client-ip=209.85.214.176 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.b="Q5gd7ZPT" Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-2cab97c86bdso28095ad.1 for ; Fri, 07 Aug 2026 19:31:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1786156280; x=1786761080; 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=c7tczrAN0Z+XQOnKNy/6C+IzTrIYOyRvANTeANoTkDc=; b=Q5gd7ZPTgIQoZ0Z5SIc3Ob+alyf9ijiA+WlxsGaxZ2cK4LH6IeE5Kq+FA9wJwbh/st d8cQZV456zhjawQlD4u5ZWnNTxuomW1u/oothWbZe5gNSPN/HaQoVTxMicNVPYAdXQgr 0ch3iRxrnZFZHtOUt99WaciXwCkd8bujiCb12N3bDV8OyQK3yyPPzcJrKZcg8DyR7rIg HNtfVOuG1QIq2w+v8juV4A53r3FqbIeWAcE0quiHO9jecwhKWHuJn1PHeWLAQ6jzGCsF GMql2IuRtWX0is7MVEiXkADFgCPIokBhobaf+pDLd+8ZsbiXr57+XghfUdqdCBA8Vyi0 9OYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786156280; x=1786761080; 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=c7tczrAN0Z+XQOnKNy/6C+IzTrIYOyRvANTeANoTkDc=; b=s7cH+cJ/WD62YQgiwi9Yrq1y2nYNrQuqHU5VwsFmcVM1+tHH6f20JZe0PAZqb0fFDt NA9HcgMH8vyUHbsRoSdGBPGnfKdBRwiw9m+gfC6p/3KqF3O5Lu66heGUvZvWW0Tiw4hr zR0/Fq1PIKvjHSHG4KERzVZnwaK9/7H+J+z78fe6Eqnm6e+vDjxcR0REQME4EYXw6Anw cbvXmi8t0ymIXjpEuK5Dba+mzYn+ZePRVlsjoQhrcFddYCizIfDs9CWiec5nfzpLOkSk rxehZ4e+MHZIFYkjkCTYBAM4tqabwdx36T6X7HYV609JlT8w6X36c6qXiXPL9qYCIhFx UEmw== X-Forwarded-Encrypted: i=1; AHgh+RoF+Ibj7hg48Lg1M/tVRUU/KoPgVplzacWW23eZTWyOos4NJM9UMa0GR082VCmTQTt1G+gG91TiS2c0mx4=@vger.kernel.org X-Gm-Message-State: AOJu0YyM93L2WGBBJe0YOG7KvDrH2UOvD4MBgNUyoX62dIvFQy17boWX EYcEBVi69q8dedZpth/t5+8LVLsrNceSC7MZPM+pJli5gYCZ7Lx+oNvZnT5tFp+4Yw== X-Gm-Gg: AR+sD10mmfglblOxJCJ5nLa2zVqvM5/OHH3qqNJFCj57AretJid0jYh8yZaOcHcQ8wP ECk2MX9MUkUM5vu9V0FfQZQWTPBnSUVnpVn0GgLkk8tX4ByyoQZ0rx6kP8hv5UsTf3J2CvwPFIp XBxT5TLShn198GYJWsC6+b7vmfCiDuOYX0Z2whz5F8Ww0uwcBy9U+g/GLY25KuTc3JMh3pZGz/X lG9VJK2kuVygLiilE8I9+/FXMoweGTbxXCd4jO5YNVeY16yQi2NGxm2gWLRVm1n+uXJX5W6ld78 Tb7vTrH5v8PTGyMttdMqWk27Hc1DNYpt+V4cW5j/RBKcOIgA9SySSR6aXKNiMQ4YK6WnHu1MLvF jmaW9yDqRbZD0zK9YrM7XfymtUTZX9ehJx56VFeWq5CjsK2IWn8fKk0zt/70514El66UM0n7DOJ iErBc19cj9LRePiGL5fTKrfcEOr6280vui0J8s0hptnk9d0HETmUX0E0RW7DGKqgScfzObZlh94 zRACD4ge5qdqYOfYuW55WXF3oBtI01+55X4kZN3MhIxl094Ijxcz1bPbfk= X-Received: by 2002:a17:902:c994:b0:2bd:3bfd:74f1 with SMTP id d9443c01a7336-2d2b30c1498mr2941465ad.2.1786156279321; Fri, 07 Aug 2026 19:31:19 -0700 (PDT) Received: from google.com (210.87.127.34.bc.googleusercontent.com. [34.127.87.210]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-390b30d465csm2252994a91.2.2026.08.07.19.31.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2026 19:31:18 -0700 (PDT) Date: Sat, 8 Aug 2026 02:31:14 +0000 From: Samiullah Khawaja To: Ankit Soni Cc: David Woodhouse , Lu Baolu , Joerg Roedel , Will Deacon , Jason Gunthorpe , 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 Subject: Re: [PATCH v3 02/18] iommu: Implement IOMMU Live update FLB callbacks Message-ID: References: <20260614233728.2212104-1-skhawaja@google.com> <20260614233728.2212104-3-skhawaja@google.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; format=flowed Content-Disposition: inline In-Reply-To: On Fri, Jul 31, 2026 at 05:58:20AM +0000, Ankit Soni wrote: >On Sun, Jun 14, 2026 at 11:37:12PM +0000, Samiullah Khawaja wrote: >> Add liveupdate FLB for IOMMU state preservation. Use KHO preserve memory >> alloc/free helper functions to allocate memory for the IOMMU Live update >> FLB object and the serialization structs for device, domain and iommu. >> >> During retrieve, walk through the preserved obj array headers and >> restore each folio. Also recreate the FLB obj. >> >> Signed-off-by: Samiullah Khawaja >> --- >> MAINTAINERS | 9 ++ >> drivers/iommu/Kconfig | 12 ++ >> drivers/iommu/Makefile | 1 + >> drivers/iommu/liveupdate.c | 212 +++++++++++++++++++++++++++++++ >> include/linux/iommu-liveupdate.h | 18 +++ >> include/linux/kho/abi/iommu.h | 207 ++++++++++++++++++++++++++++++ >> 6 files changed, 459 insertions(+) >> create mode 100644 drivers/iommu/liveupdate.c >> create mode 100644 include/linux/iommu-liveupdate.h >> create mode 100644 include/linux/kho/abi/iommu.h >> > >../.. > [snip] > >Hi, > >nit, The v3 changelog has "Replace bitfields with u32 flags", but sign_extend:1 >looks like it was missed. this is 37 bytes, the only arrayed record in this >header that isn't a multiple of 8 (iommu_device_ser is 56, iommu_hw_ser 112). >The arrays are strided with pointer arithmetic, so the skew accumulates: from >objects[1] onwards none of the u64s are naturally aligned. > >Looks like a leftover from the bitfield cleanup. Yes, missed this one in v3. Just sent out v4, it should be cleaned up now. Thanks, Sami > >-Ankit >