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.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to