> +static u16 kvm_hvcall_signal_event(struct kvm_vcpu *vcpu, bool fast, u64 param) > +{ > + u16 ret; > + u32 conn_id, flag_no; > + int idx; > + struct eventfd_ctx *eventfd; > + > + if (unlikely(!fast)) { > + gpa_t gpa = param; > + > + if ((gpa & (__alignof__(param) - 1)) || > + offset_in_page(gpa) + sizeof(param) > PAGE_SIZE) > + return HV_STATUS_INVALID_ALIGNMENT; > + > + idx = srcu_read_lock(&vcpu->kvm->srcu); > + ret = kvm_vcpu_read_guest(vcpu, gpa, ¶m, sizeof(param)); > + srcu_read_unlock(&vcpu->kvm->srcu, idx); > + > + if (ret < 0) > + return HV_STATUS_INSUFFICIENT_MEMORY; "... event flags do not require any buffer allocation or queuing within the hypervisor, so HvSignalEvent will never fail due to insufficient resources." > + } > + > + /* > + * the signaled event number is made up of a 24bit "connection id" and > + * a 16bit "flag number"; on the hypervisor side it's only their sum > + * that matters -- Thanks, David / dhildenb