/* Handle floating-point assist faults and traps for domain.  */
unsigned long vmm_handle_fpu_swa(int fp_fault, struct kvm_pt_regs *regs, unsigned long isr)
/* Handle floating-point assist faults and traps for domain.  */
unsigned long vmm_handle_fpu_swa(int fp_fault, struct kvm_pt_regs *regs, unsigned long isr)
{
	struct kvm_vcpu *v = current_vcpu;
	IA64_BUNDLE bundle;
	unsigned long fault_ip;
	fpswa_ret_t ret;
	fault_ip = regs->cr_iip;
	if (!fp_fault && (ia64_psr(regs)->ri == 0))
		fault_ip -= 16;
	if (fetch_code(v, fault_ip, &bundle))
		return -EAGAIN;
	if (!bundle.i64[0] && !bundle.i64[1])
		return -EACCES;
	ret = vmm_fp_emulate(fp_fault, &bundle, &regs->cr_ipsr, &regs->ar_fpsr,
			&isr, &regs->pr, &regs->cr_ifs, regs);
	return ret.status;
}