Re: [PATCH 3/3] KVM: VMX: Print out "bad" offsets+value on VMCS config mismatch

From: Chao Gao

Date: Tue Jan 27 2026 - 02:54:17 EST


On Mon, Jan 26, 2026 at 06:57:26AM -0800, Sean Christopherson wrote:
>On Fri, Jan 23, 2026, Sean Christopherson wrote:
>> + pr_cont(" Offset %lu REF = 0x%08x, CPU%u = 0x%08x, mismatch = 0x%08x\n",
>> + i * sizeof(u32), gold[i], cpu, mine[i], gold[i] ^ mine[i]);
>
>As pointed out by the kernel bot, sizeof() isn't an unsigned long on 32-bit.
>Simplest fix is to force it to an int.
>
> pr_cont(" Offset %u REF = 0x%08x, CPU%u = 0x%08x, mismatch = 0x%08x\n",
> i * (int)sizeof(u32), gold[i], cpu, mine[i], gold[i] ^ mine[i]);

Why pr_cont()? The previous line ends with '\n'. so, a plain pr_err() should work.

Anyway, the code looks good.

Reviewed-by: Chao Gao <chao.gao@xxxxxxxxx>