> Preserve the newest kernel log tail in the host's vmware.log, which can > outlive a guest with no working userspace or persistent storage. > > Allocate an 8 KiB buffer during early init and register on > panic_pre_kdump_list. A 4 KiB buffer can omit useful stack-trace > context. Use a fixed byte budget so transfer work does not scale > with PAGE_SIZE. > > Copy the newest records, prefix them with "log ", and send one RPC over > the low-bandwidth register interface. Bound the transfer to 8 KiB and > at most three checkpoint attempts; zero-fill a partial payload word and > close the channel after every successful open. > > The callback allocates nothing and emits no printk messages. Enable it > for ordinary guests, leaving encrypted guests disabled until explicitly > enabled by the sysctl. Skip initialization without printk support, and > leave logging disabled after allocation or registration failure. > > Suggested-by: Michael Kelley <[email protected]> > Link: > https://lore.kernel.org/r/sn6pr02mb41574a11d309a0530c63e0fed4...@sn6pr02mb4157.namprd02.prod.outlook.com > Link: > https://lore.kernel.org/r/[email protected] > Co-developed-by: Bo Gan <[email protected]> > Signed-off-by: Bo Gan <[email protected]> > Co-developed-by: Alexey Makhalov <[email protected]> > Signed-off-by: Alexey Makhalov <[email protected]> > Signed-off-by: Zack Rusin <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=4

