Re: [PATCH v2 08/15] KVM: x86: Add mode-aware versions of kvm_<reg>_{read,write}() helpers
From: Huang, Kai
Date: Mon May 18 2026 - 07:37:03 EST
> @@ -10413,29 +10413,30 @@ static int complete_hypercall_exit(struct kvm_vcpu *vcpu)
>
> if (!is_64_bit_hypercall(vcpu))
> ret = (u32)ret;
> - kvm_rax_write(vcpu, ret);
> + kvm_rax_write_raw(vcpu, ret);
> return kvm_skip_emulated_instruction(vcpu);
> }
>
Nit: AFAICT if we use kvm_rax_write(vcpu, ret) instead of the "raw" version
here, we can then remove the
if (!is_64_bit_hypercall(vcpu))
ret = (u32)ret;
But I saw in your next patch you are going to remove the non-raw write helpers.