* Re: Qemu process in Guest
[not found] <3D9CB4061D1EB3408D4A0B910433453C0302918A0C@inbmail01.lsi.com>
@ 2009-04-03 11:08 ` Avi Kivity
0 siblings, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2009-04-03 11:08 UTC (permalink / raw)
To: Kumar, Venkat; +Cc: kvm
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Qemu process in Guest
2009-04-02 10:25 Kumar, Venkat
@ 2009-04-02 13:34 ` Avi Kivity
0 siblings, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2009-04-02 13:34 UTC (permalink / raw)
To: Kumar, Venkat; +Cc: kvm
Kumar, Venkat wrote:
> 1. How does Qemu process start running in Guest?
>
qemu doesn't run in the guest. Unless you log into the guest and start
qemu.
But I don't think that's what you were asking?
> 2. How does a guest's I/O request get trapped into the user mode qemu process?
>
kvm traps the I/O and returns back to userspace.
Look in libkvm/libkvm.c's handle_io() and handle_mmio(). These
eventually call into qemu/qemu-kvm.c kvm_inb() and friends, and
kvm_mmio_read() and kvm_mmio_write().
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 3+ messages in thread
* Qemu process in Guest
@ 2009-04-02 10:25 Kumar, Venkat
2009-04-02 13:34 ` Avi Kivity
0 siblings, 1 reply; 3+ messages in thread
From: Kumar, Venkat @ 2009-04-02 10:25 UTC (permalink / raw)
To: kvm
1. How does Qemu process start running in Guest?
2. How does a guest's I/O request get trapped into the user mode qemu process?
Thx,
Venkat
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-03 11:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <3D9CB4061D1EB3408D4A0B910433453C0302918A0C@inbmail01.lsi.com>
2009-04-03 11:08 ` Qemu process in Guest Avi Kivity
2009-04-02 10:25 Kumar, Venkat
2009-04-02 13:34 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).