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