From: Avi Kivity <avi@redhat.com>
To: Wenhao Xu <xuwenhao2008@gmail.com>
Cc: Juan Quintela <quintela@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org, aliguori@us.ibm.com,
paul@codesourcery.com
Subject: Re: [questions] savevm|loadvm
Date: Wed, 07 Apr 2010 08:56:17 +0300 [thread overview]
Message-ID: <4BBC1E81.3040202@redhat.com> (raw)
In-Reply-To: <i2idd93c66a1004011235y621905abg7346c38a32637d68@mail.gmail.com>
On 04/01/2010 10:35 PM, Wenhao Xu wrote:
> Does current qemu-kvm (qemu v0.12.3) use the irqchip, pit of KVM? I
> cannot find any KVM_CREATE_IRQCHIP and KVM_CREATE_PIT in the qemu
> code.
>
>
Are you looking at qemu or qemu-kvm?
> Concerning the interface between qemu and kvm, I have the following confusion:
> 1. How irqchip and pit of KVM collaborating with the irq and pit
> emulation of QEMU? As far as I see, qemu-kvm still uses qemu's irq and
> pit emulation, doesn't it?
>
No, they're completely separate.
> 2. For return from KVM to QEMU, I cannot get the meaning of two exit reasons:
> case KVM_EXIT_EXCEPTION:
> What exception will cause KVM exit?
>
I think that's obsolete.
> default:
> dprintf("kvm_arch_handle_exit\n");
> ret = kvm_arch_handle_exit(env, run);
> What exit reasons are default?
>
> 3. How could DMA interrupt the cpu when it finishes and the qemu-kvm
> is still running in kvm now?
>
Usually the device that does the dma will raise an interrupt, which qemu
is waiting for.
> I am still working in the patch, but these confusions really prevent
> me moving forward. Thanks first for you guys giving me more hints.
>
>
> The following is the code so far I write:
> The main idea is synchronizing the CPU state and enter into the
> emulator mode when switching from kvm to emulator. I only do the
> switch when the exit reason is KVM_EXIT_IRQ_WINDOW_OPEN.
>
That doesn't happen with qemu-kvm.
> However, I got the following errors:
> Whenever switch from kvm to qemu, the interrupt request in qemu will
> cause qemu enter into smm mode which is definitely a bug.
>
Definitely shouldn't happen.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
WARNING: multiple messages have this Message-ID (diff)
From: Avi Kivity <avi@redhat.com>
To: Wenhao Xu <xuwenhao2008@gmail.com>
Cc: aliguori@us.ibm.com, paul@codesourcery.com,
qemu-devel@nongnu.org, kvm@vger.kernel.org,
Juan Quintela <quintela@redhat.com>
Subject: [Qemu-devel] Re: [questions] savevm|loadvm
Date: Wed, 07 Apr 2010 08:56:17 +0300 [thread overview]
Message-ID: <4BBC1E81.3040202@redhat.com> (raw)
In-Reply-To: <i2idd93c66a1004011235y621905abg7346c38a32637d68@mail.gmail.com>
On 04/01/2010 10:35 PM, Wenhao Xu wrote:
> Does current qemu-kvm (qemu v0.12.3) use the irqchip, pit of KVM? I
> cannot find any KVM_CREATE_IRQCHIP and KVM_CREATE_PIT in the qemu
> code.
>
>
Are you looking at qemu or qemu-kvm?
> Concerning the interface between qemu and kvm, I have the following confusion:
> 1. How irqchip and pit of KVM collaborating with the irq and pit
> emulation of QEMU? As far as I see, qemu-kvm still uses qemu's irq and
> pit emulation, doesn't it?
>
No, they're completely separate.
> 2. For return from KVM to QEMU, I cannot get the meaning of two exit reasons:
> case KVM_EXIT_EXCEPTION:
> What exception will cause KVM exit?
>
I think that's obsolete.
> default:
> dprintf("kvm_arch_handle_exit\n");
> ret = kvm_arch_handle_exit(env, run);
> What exit reasons are default?
>
> 3. How could DMA interrupt the cpu when it finishes and the qemu-kvm
> is still running in kvm now?
>
Usually the device that does the dma will raise an interrupt, which qemu
is waiting for.
> I am still working in the patch, but these confusions really prevent
> me moving forward. Thanks first for you guys giving me more hints.
>
>
> The following is the code so far I write:
> The main idea is synchronizing the CPU state and enter into the
> emulator mode when switching from kvm to emulator. I only do the
> switch when the exit reason is KVM_EXIT_IRQ_WINDOW_OPEN.
>
That doesn't happen with qemu-kvm.
> However, I got the following errors:
> Whenever switch from kvm to qemu, the interrupt request in qemu will
> cause qemu enter into smm mode which is definitely a bug.
>
Definitely shouldn't happen.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2010-04-07 5:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-30 5:59 [questions] savevm|loadvm Wenhao Xu
2010-03-30 5:59 ` [Qemu-devel] " Wenhao Xu
2010-03-30 8:22 ` Juan Quintela
2010-03-30 8:22 ` [Qemu-devel] " Juan Quintela
2010-03-30 17:03 ` Wenhao Xu
2010-03-30 17:03 ` [Qemu-devel] " Wenhao Xu
2010-03-31 11:31 ` Juan Quintela
2010-03-31 11:31 ` [Qemu-devel] " Juan Quintela
2010-04-01 8:42 ` Avi Kivity
2010-04-01 8:42 ` [Qemu-devel] " Avi Kivity
2010-04-01 19:35 ` Wenhao Xu
2010-04-01 19:35 ` [Qemu-devel] " Wenhao Xu
2010-04-07 5:56 ` Avi Kivity [this message]
2010-04-07 5:56 ` Avi Kivity
2010-04-01 12:20 ` Paul Brook
2010-04-01 12:20 ` Paul Brook
-- strict thread matches above, loose matches on Subject: below --
2010-03-30 6:03 Wenhao Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BBC1E81.3040202@redhat.com \
--to=avi@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=xuwenhao2008@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.