Thread (28 messages) flat view 28 messages, 3 authors, 10d ago

Re: [PATCH v2 10/17] KVM: arm64: Prevent host PC adjustments for protected vCPUs

From: Fuad Tabba <fuad.tabba@linux.dev>
Date: 2026-09-14 06:23:01
Also in: kvmarm, lkml

Hi Joey,

[...]
 For a non-protected vCPU, use PKVM_HOST_STATE_DIRTY to determine
 whether to update the host vCPU or hyp vCPU.
[...]
Feel free to not take the rewording, but it helped me understand a bit,
and felt clearer.
Marc had a second look at this patch and it came out reworked: the
copy selection moved into __kvm_adjust_pc() behind a get/put pair, and
the pinning moved out into its own fix. The pinning paragraph you
reworded is gone from this patch, and the PKVM_HOST_STATE_DIRTY one is
reworded along your lines.
Not sure here why we use hyp_vcpu->vcpu.kvm over host_vcpu->kvm, in
non-protected pKVM do we still not trust it?
It was the pointer, not the VM: EL2 wasn't dereferencing a
host-written pointer without pinning what it points at. Moot now, the
host copy is adjusted with its own struct kvm, which the fix pins.
 /* Loaded protected vCPU: do nothing. */
The else clause went with the rework. The drop is a NULL from the get
helper, with a comment there.
Acked-by: Joey Gouly <joey.gouly@arm.com>
Thanks! I've left it off v3 since the code you acked has changed under
you, so I'd appreciate a second look there.

Cheers,
/fuad
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help