On Thu, Oct 18, 2012 at 10:24 AM, Jan Kiszka <jan.kis...@siemens.com> wrote: > On 2012-10-18 08:29, Paolo Bonzini wrote: >> Il 17/10/2012 20:37, Jan Kiszka ha scritto: >>> On 2012-10-17 18:44, Paolo Bonzini wrote: >>>> Il 17/10/2012 18:37, Clemens Kolbitsch ha scritto: >>>>> Guys, >>>>> >>>>> I know this is question might seem a bit odd, but I'm curious: >>>>> >>>>> Has anyone ever tried to write code to disable KVM on the fly / is it >>>>> at all possible? I have a situation where I need to use TCG for >>>>> certain parts of the code, but would love to have acceleration for >>>>> everything else. My idea was to pause the VM, then use the >>>>> snapshotting mechanism to dump the state, and then to resume the >>>>> snapshot, but writing the KVM state into the non-KVM structures. >>>> >>>> As a start, you can try using "migrate exec:cat>foo.save" with a KVM >>>> machine and "-incoming 'exec:cat foo.save'" with a TCG machine. The >>>> main problem should be that TCG doesn't implement kvmclock. >>>> >>>> If you disable the KVM interrupt controller and timer (which is just an >>>> implementation detail, not a hardware difference), >>> >>> Unnecessary. Both models (KVM in-kernel and QEMU userspace) are >>> compatible - in the absence of bugs. >> >> He wants to really switch it on the fly---not just migrate out and >> in---and for that you need to disable the KVM-specific devices. > > Well, that's even more unrealistic than via migration.
I am just looking for a way to do it, regardless whether it causes a big performance penalty due to migration, etc. Even if this means preparing a special environment (emulating specific hardware, etc), this is fine with me. Thanks a lot for all the feedback, now I know what I will have to look into! -Clemens