From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAcDL-00060F-TD for qemu-devel@nongnu.org; Sun, 09 Sep 2012 03:45:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAcDH-00032T-J5 for qemu-devel@nongnu.org; Sun, 09 Sep 2012 03:45:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21587) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAcDH-00032K-2e for qemu-devel@nongnu.org; Sun, 09 Sep 2012 03:45:51 -0400 Date: Sun, 9 Sep 2012 10:45:45 +0300 From: Gleb Natapov Message-ID: <20120909074544.GA4109@redhat.com> References: <504C084C.4080900@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <504C084C.4080900@gmail.com> Subject: Re: [Qemu-devel] Inject Interrupt, Using VMCS during qemu live migration. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?B?5p2OIOODqOODs+OCuOODpeODsw==?= Cc: qemu-devel@nongnu.org On Sun, Sep 09, 2012 at 12:09:00PM +0900, =E6=9D=8E =E3=83=A8=E3=83=B3=E3= =82=B8=E3=83=A5=E3=83=B3 wrote: > Hello, I am trying to inject interrupt, in final phase of Live migration. >=20 > I use vmcs_write32 function to inject interrupt. This function is called > by qemu, with ioctl. >=20 > This is Code. >=20 > (KVM) >=20 > void vmcs_write32_provider(unsigned long field, u32 value) > { > vmcs_write32(field, value); > } >=20 >=20 > long kvm_arch_vcpu_ioctl(struct file *filp, > unsigned int ioctl, unsigned long arg) > { > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~// > case KVM_TEST_IOCTL: { > r=3D0; > //printk("Test IOCTL!!!\n"); > int type =3D 0; > int trap=3D58; > u32 intr_fields=3D (0x80000000 | (type<<8) | trap); > vmcs_write32_provider(0x00004016,intr_fields); > printk("vmcs_write Success!!!\n"); >=20 > goto out; > } This is not how you inject interrupts in KVM. You are calling kvm_set_irq() instead. >=20 >=20 > This code works perfectly when called by hypercall.(When call this > function in kvm_emulate_hypercall function by guest VM.) >=20 You mean this code sometimes accidentally has desirable effect. > But, when I trying to call this function by qemu(ioctl), This error > message is occurred. >=20 > http://pds23.egloos.com/pds/201209/09/86/f0062286_504c07a4bc3c7.png >=20 You are trying to inject interrupt when interrupts are disabled. -- Gleb.