Re: [PATCH] KVM: arm64: Take a protected vCPU's TWI and TWE only at vCPU load

From: Fuad Tabba

Date: Sun Oct 18 2026 - 11:31:30 EST


Thanks for fixing this Sasha.

On Sat, 17 Oct 2026 17:52:04 +0100, Sasha Levin <sashal@xxxxxxxxxx> wrote:
[...]
> Build-tested only: arm64 defconfig with gcc and clang, W=1, no new
> warnings. The only code generation change is the protected vCPU's
> per-entry mask, 0x6100 to 0x100. Not runtime-tested, as the in-tree
> selftests can't create protected VMs.

I tested it on QEMU, with the host booted with
kvm-arm.wfi_trap_policy=notrap and a protected VM using kvmtool. The
protected VM doesn't take any WFI exits (4415 with the default
policy), so TWI still reaches it at vCPU load.

Reviewed-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>
Tested-by: Fuad Tabba <fuad.tabba@xxxxxxxxx>

Cheers,
/fuad