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: Thu, 01 Apr 2010 11:42:11 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Thunderbird/3.0.3

On 03/31/2010 02:31 PM, Juan Quintela wrote:
Wenhao Xu<address@hidden>  wrote:
Hi, Juan,
    I am fresh to both QEMU and KVM. But so far, I notice that QEMU
uses "KVM_SET_USER_MEMORY_REGION" to set memory region that KVM can
use and uses cpu_register_physical_memory_offset to register the same
memory to QEMU emulator, which means QEMU and KVM use the same host
virtual memory. And therefore the memory KVM modified could be
directly reflected to QEMU. I don't quite understand the different
memory layout problem between the two. So I don't know exactly what
you mean to "fix" it?
1st. qemu-kvm.git and qemu.git memory layouts are different, indeed with
qemu.git kvm mode. (yes it is complex and weird).

kvm vs qemu initialization is different.  Expecting to stop kvm, and run
tcg from there is not going to work.  I guess it would need a lot of
changes, but I haven't looked at it myself.

I don't think it's so far fetched. In fact early versions of qemu-kvm switched between emulation and virtualization (emulate until 64-bit mode, also emulate mmio instructions in qemu).

Even today, all memory initialization is done via generic qemu mechanisms. So long as you synchronize all state (pit, irqchip, registers) you should be fine.

    For why switching is useful? Actually, I am a master student now
and doing a course project. What am I arguing is that QEMU could be
potentially useful to do many instrumentation analysis, but it is a
bit slow. So by combing with KVM, when the os runs to some place where
we are interested in, switch it to QEMU emulator mode and do the
analysis and then switch back.
idea is good, but I don't think that it is _so_ easy at this point.  tcg
and kvm basically live in a different world.  Not sure of what needs to
be done to make them back on sync.

cpu_synchronize_state()

--
error compiling committee.c: too many arguments to function





reply via email to

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