qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [questions] savevm|loadvm


From: Avi Kivity
Subject: [Qemu-devel] Re: [questions] savevm|loadvm
Date: Wed, 07 Apr 2010 08:56:17 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]