From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Qemu process in Guest Date: Fri, 03 Apr 2009 14:08:25 +0300 Message-ID: <49D5EE29.5030704@redhat.com> References: <3D9CB4061D1EB3408D4A0B910433453C0302918A0C@inbmail01.lsi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" To: "Kumar, Venkat" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:54270 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757356AbZDCLHu (ORCPT ); Fri, 3 Apr 2009 07:07:50 -0400 In-Reply-To: <3D9CB4061D1EB3408D4A0B910433453C0302918A0C@inbmail01.lsi.com> Sender: kvm-owner@vger.kernel.org List-ID: Kumar, Venkat wrote: > > Thanks for the reply. > > > > I had wrong understanding that Qemu runs in Guest. > > But now I understand that *ioctl(fd, KVM_RUN, 0);* will tell KVM to > load the guest and whenever there is an exception in the guest, KVM > traps it and executes the host code post ioctl depending on the reason > for exit. > > > > Can you point me to the code where the KVM traps the exception and > loads the host to execute the post ioctl code? > That's what vmx.c and svm.c in the kernel are about, look at vmx_vcpu_run() and svm_vcpu_run(). -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.