Inject Interrupt, Using VMCS during migration


I am trying to inject interrupt, in final phase of Live migration.

I use vmcs_write32 function to inject interrupt. This function is called by qemu, with ioctl.

This is Code.

void vmcs_write32_provider(unsigned long field, u32 value)
vmcs_write32(field, value);

long kvm_arch_vcpu_ioctl(struct file *filp,
unsigned int ioctl, unsigned long arg)

		//printk("Test IOCTL!!!\n");
		int type = 0;
		int trap=58;
		u32 intr_fields= (0x80000000 | (type<<8) | trap);
		printk("vmcs_write Success!!!\n");

		goto out;

This code works perfectly when called by hypercall.(When call this function in kvm_emulate_hypercall function, in guest VM.)

But, when I trying to call this function by qemu(ioctl), This error message is occurred.

I need help. Thank you.