From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.214.181 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796172172; b=Y2h3R67/Kfm3zuCAacc1eMUpP5K+GUQmIQ6uSoky+ovkbkfwB4PP16buu34LuSorh78P p92k3jLTUQ87FFT/J9Ln+wtwt/XZq1IBZ6NPLvQnQrTLKMr2KIBZCRisxhMxyKvwhgVtf FUYR/trNcGdY4+2WDj/CeELgoOsjp4C7KDhjCbfL+P7Bun7I95SiIcKWHpefxn5qD91WR aglVJXZNKGcG3P7QYPhHksBWWYZtB6//D2L0XY2pX60G2JzLTj8VJzwMMvlY08xvhomPJ JCTMpMGds4Bv9ThCojsD8EKO1P8Sq0YxoTFgvEYNl/0YYYcJyH86SpQrf79s2VqJPAQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796172172; 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=+qmifNe+whiKhc6SYRCoQg4L89Y6Jn5/ysKe0SVmVCI=; b=EUOaL0YTSas6YxEs70bGCKhX5nMtqs98ngqnPm8h3GJA2HQcXvXtLpP5+NL4pkYBbXPY OQm72Leaz6SR1kYkQRGm6TFXRoyQG7AtBCMnj9Y6/kbfHdPMP+IPpkDch3MXz2I1xM4P/ Tq/+hq+yNcSwoeNA/OUahTbfLES6Tyah929L6v6WZZSYfeRqDMLbZQeFxmsKDNYNiFYEq RviCzGSkwLvsmW4imuVGP9vtLYSRt0DcNo8Uvxa5qpnVNFd01SPpdRxeELFvL1j23nCrG aZmWeo5mubNFeqbn9wMYc88+LWwK1+kMabPVyvP6Vwq77tQqCK2i7oR/MVONZr2tYUQ== 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="Hzq1MBC/"; arc=none smtp.remote-ip=209.85.214.181 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 4F4A8606A329 for ; Wed, 2 Dec 2026 00:42:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4F4A8606A329 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=Hzq1MBC/ Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2f0e8bbc7a4so4965ad.1 for ; Tue, 01 Dec 2026 16:42:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796172171; x=1796776971; 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=+qmifNe+whiKhc6SYRCoQg4L89Y6Jn5/ysKe0SVmVCI=; b=Hzq1MBC/4iTL8s2rMmYVMTaH/tG2SLCH5pCmc+IBJ0EgtgiM0XoPm5cR8/kQxuEH2Q Q0NuKfPS9IZqW4bZ8fiK1rsk6K6w6fwKaw2TGmD8eRX7JghMU1QdRGhhcoH+Eb38pcc6 +SlMg9ci5dgI9v8EZe+kbJjo3fwLK5CieBNoSKJ//xG1sSE2W2og3CAh1ICXxXYjIwZm oYyior19R7D9oaAQma8YVlQN7mzTPjOhnhcQR0/8fbLJ3ko6I4SNtlLcFrGKXKpGaYL2 BB+Fw1ZJDV0IgG2jk5ig2Hg8y2Z5aTSe2j5qiTzI5jT5GN0FRtfWCFSiUUz8AEGxT9zS 4l4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796172171; x=1796776971; 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=+qmifNe+whiKhc6SYRCoQg4L89Y6Jn5/ysKe0SVmVCI=; b=Qb3N36dTXPVQ9sRfCn4sjY6jsPExrxAIdiIAys6Je98eUxp4YL79dX4x1jreEiRIrC fXWzUThVlj6VZAoeC3FgVixlvmMUERz6HRLcAZnW4EIs0kWCWY8JSAXqyK6iMbgSuHiE bYdLG0HtQNod3SJPP8KL6oEmBg0tiCZow+vsgS9gYcl/lzona74uHcerxrVRqat5cKVX IvH+zBMtfNIlOsq5k/CVMWMxNvSFBJ28z6z72dT0wCpFLn9z4P2ljjD5xfzONN3nRgXy LwGgPwQZyhdG1pEMljZt/LdOlqmCYXxt2/eD/0hSOdseDE+6k5CN5hXdb3vF5LB8Zrwv gpQQ== X-Forwarded-Encrypted: i=1; AL+hErGuQB8x3oCC0FD1M5xwhZVTVKEOkKIEC9pb6qrVoge1oayDhyuYOF7zfr/grYQ+E1s6NTY=@vger.kernel.org X-Gm-Message-State: APuU4Z/g6RJpSoJqVepNXuUDNdLGl6BGqICBZDfcTrwbluYspmlnhOvf +nAcrpnLAYu4h5mmvgaMOjS9VnkuLYnWPVMXgPusjcC+5m5wei/PRcRXMWBw+7UKUw== X-Gm-Gg: AZFdTZcVAKummid5E2U8cYs1JKxEKXoS96Spw0sq+dSsf31680ZxPkfwU2wbYinATFG u8Y1K+My5wgk92OeLdK/D4lz+1yrUIV0165ie1TSiwboTAm0CsabJVEcV5blyUjiwdeowisCTbE 8vPV664yZYF8V92lc2a10ioFdU691zfpV/zpdcRfFL2up5GyIQ+zEHz75Fx3CHSGFb25bMdNksC d4C52v0NrXVLLKiwT4+v2aoAT9LFk65U9buWlM2OHjVeWk3MGSUKeYpxyP0ywNfr4IlRWrYnyEy 8KXZHL2JYU1Um+9fzDAMjy8dXUE4fR1Nf9uvYopxRkbIyt4IxijaXxDAH4RH24b7zYC/W3/rOc8 83Ff8JbA7P4lj4I09PPjhO25enAhuNBa5wftUQ3buc1iYnc5fpwYldtjfU0UBwj5rVQV8bnv4OH z/z+Mc7E9TdPaRU6z84lCd7J4C+Q2RMvyXdCxL2w00jLE83FHuc+cxh5K/41v9q7x4QiEKkqFQy QG8mSEBbKuWTKgeZgTPvnuavAei7jjOa+ESl8TpbtDE1tHdTvHRwZi9/zDrtnu0Jf7dKUZ23KPq MmmrFaCY1SzkBPVFUqGwu+KaaIG6TPOe+EFv0wESRga9qh8NcUPNOwS7EFqC/SVplfekFlQQ4uD 2RoUdQtlhV73ou9XNqYS3 X-Received: by 2002:a17:902:f705:b0:2e9:5a0b:9f3 with SMTP id d9443c01a7336-2f179e87feamr536635ad.7.1796172170958; Tue, 01 Dec 2026 16:42:50 -0800 (PST) Received: from google.com (25.75.145.34.bc.googleusercontent.com. [34.145.75.25]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-cde6d06ee37sm19897733a12.28.2026.12.01.16.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 16:42:49 -0800 (PST) Date: Wed, 2 Dec 2026 00:42:47 +0000 From: Samiullah Khawaja To: Tarun Sahu Cc: Pasha Tatashin , Mike Rapoport , robin.murphy@arm.com, maz@kernel.org, will@kernel.org, David Matlack , Alexander Graf , seanjc@google.com, jgg@nvidia.com, loganodell@google.com, arnd@arndb.de, dwmw2@infradead.org, baolu.lu@linux.intel.com, Bjorn Helgaas , oupton@kernel.org, alex@shazbot.org, gle.com@google.com, pbonzini@redhat.com, Andrew Morton , kevin.tian@intel.com, joro@8bytes.org, kvmarm@lists.linux.dev, linux-pci@vger.kernel.org, Pratyush Yadav , kexec@lists.infradead.org, kvm@vger.kernel.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, sagis@google.com, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 05/19] kho: Add feature header for fine-grained ABI compatibility Message-ID: References: <20261110050202.529473-1-tarunsahu@google.com> <20261110050202.529473-6-tarunsahu@google.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: <20261110050202.529473-6-tarunsahu@google.com> On Tue, Nov 10, 2026 at 05:01:48AM +0000, Tarun Sahu wrote: >Serialized structures in KHO and Live Update Orchestrator currently rely >on whole-structure compatibility strings or monolithic version fields to >validate handed-over state across kexec. Any change to a serialized >structure, even an optional additive field, requires bumping the >compatibility string or version number and breaks live update between >adjacent kernels. > >Introduce a generic feature header (struct kho_ser_hdr) for serialized >binary structures in include/linux/kho/abi/feature.h. Each subsystem >groups the fields of its serialized structure under feature indices, >starting with index 0 for base fields. When a subsystem adds a new >capability, it appends new fields to the end of its payload structure >under a new feature index. Retired fields are kept in place so existing >field offsets never shift; if the type or format of a field needs to >change, the existing field and feature are kept intact until retired and >a new feature index with an appended field of the new type is added. >Only when a change requires a complete break in the serialized layout or >semantics that feature flags cannot handle, a new handler or format can >be introduced with an incremented version number. > >Each feature belongs to either a required feature space or an optional >feature space. Both spaces are numbered independently starting from 0. >In the serialized header, required features occupy the first nr_required >bits, followed immediately by nr_optional bits for optional features: > > struct kho_ser_hdr { > __u32 size; > __u16 nr_required; > __u16 nr_optional; > __aligned_u64 flags[]; > }; > >A set bit indicates that the feature is present in the payload. The >truth table for deserialization: > > Source bit Target Action > Not set - Accept: feature absent > Optional set unknown or known Accept: ignore or use the data A real world example would be really helpful to understand this. What does optional mean here? If the bit is unknown to the next kernel, how does it decided to ignore it. Thanks, Sami