On Wed, Jun 11, 2025, Binbin Wu wrote:My previous thought was MapGpa is in base GHIC API.
On 6/11/2025 3:58 AM, Sean Christopherson wrote:Why can't KVM just do what it already does, and return an error to the guest?
On Tue, Jun 10, 2025, Rick P Edgecombe wrote:So, when the TDX guest calls MapGPA and KVM finds userspace doesn't opt-in
It seems like the reasoning could be just to shrink the possible configurationsYes, drop it.
KVM has to think about, and that we only have the option to do this now before
the ABI becomes harder to change.
Did you need any QEMU changes as a result of this patch?
Wait, actually I think the patch is wrong, because KVM_CAP_EXIT_HYPERCALL could
be called again after KVM_TDX_FINALIZE_VM. In which case userspace could get an
exit unexpectedly. So should we drop this patch?
KVM_HC_MAP_GPA_RANGE, just return error to userspace?
if (!user_exit_on_hypercall(vcpu->kvm, KVM_HC_MAP_GPA_RANGE)) {
ret = TDVMCALL_STATUS_INVALID_OPERAND;
goto error;
}