From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (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 18CA5340286 for ; Fri, 17 Jul 2026 19:42:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784317363; cv=none; b=S6UKb0nfeE1CNVQlMZywJhorJahfKyMWN/qBvIrSglLJ+e3l0TwjgvIHKVKmUoCMo2tsFPAvFBmSXBJQVrGyA1m9or9lk4of/cpE47llUrLo/PBC01VVNi8BF+9/2ngBpGXj8NmE7118ww/tdZ0K5NaXlK9jsOAELw4+pexPJ7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784317363; c=relaxed/simple; bh=06eki5QMsXCiN4ojqSTErc49FfqPbYMbzVUiMtQToSY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HnjY6vTk4uKd3NS31kJiJGIwiMW6oBUyCF7EAUO+tE5b0hVu4sCS10O/ap0L+hT/k6Ene20xnWXqiCOeYNXuQmqbkYKx4ukwvNDYFQk3hlS+7Z1Sy57KTu85RPT8vhbyJ5f7+rUKVq2kHaGJ0nu1uSxhjzS4Y8tfkkBf8v8z3HM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com; spf=pass smtp.mailfrom=soleen.com; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b=ZQDdR4Dw; arc=none smtp.client-ip=209.85.222.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=soleen.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=soleen.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=soleen.com header.i=@soleen.com header.b="ZQDdR4Dw" Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-92e53581361so625823385a.1 for ; Fri, 17 Jul 2026 12:42:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; t=1784317360; x=1784922160; 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=XwmOrmcqXQWfj6rtFo+8pLNSVXYkj7WYHrCbKkDrWe8=; b=ZQDdR4Dw5XwL9NdJyrpOlKYzNpS/obcsaXmYmzaFyLJ2uLH15sWpx9M0DZvFONtorD m7qDCshy1fQLyjvF9zU2qJRlKZr0WvPfOBwCpxGl3fAW/FCrGAAXYVA08DQVRhzndP2n epvLTMr7rIAUtfIsHy58bL7cy2cFd/mWMzPjwt+4gmAzWjWAxcCpigSs2xce8V890QAd rtxPsp8XVD1OjeD2LzFqVfEAa7gKTc16o7ugRqElJphGYSAAN3BndNAzEGbkSDg5P2Xs gdCQltzI5JsyY+JKBSEH3jaVxWMMEFdwPhVj6FMEwXtLmEd44Di1PbTCKbqK67TgvROk JDpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784317360; x=1784922160; 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=XwmOrmcqXQWfj6rtFo+8pLNSVXYkj7WYHrCbKkDrWe8=; b=qg9usgiv8SzkeGfgR0X+VuAug19fWPYqaHXdCUrrdTuPFrNFQXx8ZSVt9fPGYxBxy6 ScbCzSWLqzopulWF4tZIXSfCInl4Fe8wnceacrrG0DPBSJ//+vKUT+yzdVUO/50jt88l wifoSlxIFmJjGbVJlfV0EMIaLxUpHfW5MPHC7Yr/14PAXztdny6Eoqcy4BPnKfcLZOS1 8MCpLH8TBEx0OQ4q9ESdrjecRPD5QRFzxFSeKinkoDjffvyPB3ybYzU0+Whk7UQyK2L3 de9EAAyF4tU3W+aeHTbC0oltb+Z0bcQfz5xm2+UDhw942QIifbFQYRAYAUwL2Dq3S4Md fShQ== X-Forwarded-Encrypted: i=1; AHgh+RprYuHA6lyEMA9z9/lt0O7sIpbjaHKBSI7Qw9dHC0TAn4OQH36D0N5UvTV9rnm0MlDQT7z0hZQGqpYL4Ss=@vger.kernel.org X-Gm-Message-State: AOJu0Yyi40fSFg/ec1a8ljofbz2nGKWukNT2n2iFojFWbSSOKvX+3TyW 63VnSmBu7UmZzy3dXlMcIjw1g5S78lUpUIwylmGS7dWhhgf8xJzsm3plDrg7qhvyROY= X-Gm-Gg: AfdE7cnRgG+7XDkFwsVDHlE6RaHVMboi9SOMD6TuK6wELPBW1nzdKOfYrTJzWzs8yXm o2IH+zL05tiXr9pHu2Pis0Y5D2gxzq25/cXj1fiJMi+HyyEvJqf1GBjLJfvHT1qBHuhh5l12SEy NZXvE/KHkX7xkFY1CT3qAvVpMEpAuXNBWCW7QXKRqT0TQBb3Sn3dz8nYTtYcMip3IbGbGnc6MZl BvDT2esS8SSojs51qQvUmWfwXGN3RHjS9o5zXkMC5OnCiXyVTKDp2rh5t1FtF6vq0IEH/cS5yFi uB+Azlw2fxpkgSzHJtLEqqla5/Dg/3/Z5WJts0VBffwMFwjF2gu5kEu8FgvcUWxxr8RL1FNeXut JWwO8DskNOPdiCi5ZTmXkv0380VKiUdoMacLwFI4oZN6mpWrYjdSCdaTP8m/iA0zyr7LKxts66R rVZ3QWJ6nBw6TLQQvES7LY5qrEVbc0ww== X-Received: by 2002:a05:620a:4691:b0:92e:e125:55bb with SMTP id af79cd13be357-930b3e9c541mr429942685a.4.1784317359852; Fri, 17 Jul 2026 12:42:39 -0700 (PDT) Received: from plex ([71.181.43.54]) by smtp.gmail.com with ESMTPSA id af79cd13be357-930b52dd3easm225279585a.3.2026.07.17.12.42.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jul 2026 12:42:39 -0700 (PDT) Date: Fri, 17 Jul 2026 19:42:37 +0000 From: Pasha Tatashin To: David Matlack Cc: kexec@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-pci@vger.kernel.org, Adithya Jayachandran , Alexander Graf , Alex Williamson , Bjorn Helgaas , Chris Li , David Rientjes , Jacob Pan , Jason Gunthorpe , Jonathan Corbet , Josh Hilke , Leon Romanovsky , Lukas Wunner , Mike Rapoport , Parav Pandit , Pasha Tatashin , Pranjal Shrivastava , Pratyush Yadav , Saeed Mahameed , Samiullah Khawaja , Shuah Khan , Vipin Sharma , William Tu , Yi Liu Subject: Re: [PATCH v7 01/12] PCI: liveupdate: Set up FLB handler for the PCI core Message-ID: References: <20260710212616.1351130-1-dmatlack@google.com> <20260710212616.1351130-2-dmatlack@google.com> <178431652443.189683.17611165218179620081.b4-review@b4> 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: <178431652443.189683.17611165218179620081.b4-review@b4> On 07-17 19:28, Pasha Tatashin wrote: > On Fri, 10 Jul 2026 21:26:04 +0000, David Matlack wrote: > > diff --git a/drivers/pci/liveupdate.c b/drivers/pci/liveupdate.c > > new file mode 100644 > > index 000000000000..899758883dd5 > > --- /dev/null > > +++ b/drivers/pci/liveupdate.c > > @@ -0,0 +1,155 @@ > > [ ... skip 50 lines ... ] > > +#include > > + > > +/** > > + * struct pci_flb_outgoing - Outgoing PCI FLB object > > + * @ser: Pointer to the preserved struct pci_ser. > > + * @block_set: The KHO block set holding the outgoing devices. > > AFAIK, these should be aligned after column: > @ser: Pointer to ... > @block_set: The KHO block ... > > > [ ... skip 26 lines ... ] > > + ser->devices = 0; > > + > > + outgoing->ser = ser; > > + kho_block_set_init(&outgoing->block_set, sizeof(struct pci_dev_ser)); > > + > > + args->obj = outgoing; > > Nit: > You could re-write the above: > > args->obj = no_free_ptr(outgoing); > > And declare outgoing like this: > struct pci_flb_outgoing *outgoing __free(kfree) = kzalloc_obj(*outgoing); > > Also, remove kfree(outgoing) call. > > > > > diff --git a/include/linux/kho/abi/pci.h b/include/linux/kho/abi/pci.h > > new file mode 100644 > > index 000000000000..de549016807a > > --- /dev/null > > +++ b/include/linux/kho/abi/pci.h > > @@ -0,0 +1,58 @@ > > [ ... skip 30 lines ... ] > > + * @domain: The device's PCI domain number (segment). > > + * @bdf: The device's PCI bus, device, and function number. > > + * @refcount: Reference count used by the PCI core to keep track of whether it > > + * is done using a device's struct pci_dev_ser. The value of the > > + * refcount is equal to 1 when the struct pci_dev_ser is in use, and > > + * 0 otherwise. > > I believe descriptions must be aligned. > > > + */ > > +struct pci_dev_ser { > > + u32 domain; > > + u16 bdf; > > + u16 refcount; > > +} __packed; > > + > > +/** > > + * struct pci_ser - PCI Subsystem Live Update State > > + * > > + * This struct tracks state about all devices that are being preserved across > > + * a Live Update for the next kernel. > > + * > > + * @nr_devices: The number of devices that were preserved. > > + * @devices: Physical address of the first KHO block containing pci_dev_ser. > > I believe descriptions must be aligned. > > Nit: Please order the included headers alphabetically. > > Nit: Please order the included headers alphabetically. The above was supposed to be right after #include, but b4 had a mind of its own. > > -- > Pasha Tatashin