From: nathan binkert Subject: Re: [PATCH] KVM: Make kvm header compile under g++. Date: Tue, 7 Apr 2009 10:25:13 -0700 Message-ID: <217accd40904071025hd712bdbo85622f6a847c8a4d@mail.gmail.com> References: <217accd40903272153m650b0f1ata7bc899eb4b92be0@mail.gmail.com> <217accd40904061157r6f35dfe7r58b78678cb0e3aeb@mail.gmail.com> <49DB2805.7040401@redhat.com> <217accd40904070944p258080a2i8897212b471dd96b@mail.gmail.com> <49DB8950.7090605@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from rv-out-0506.google.com ([209.85.198.228]:39225 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755577AbZDGRZP convert rfc822-to-8bit (ORCPT ); Tue, 7 Apr 2009 13:25:15 -0400 Received: by rv-out-0506.google.com with SMTP id f9so2831830rvb.1 for ; Tue, 07 Apr 2009 10:25:13 -0700 (PDT) In-Reply-To: <49DB8950.7090605@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: > Excellent. =A0One of the things I'm trying hard to do is keep kvm fro= m being a > 'qemu accelerator' and generally useful for other projects. =A0That i= s, I'm > trying to keep the userspace interface neutral, and not to model exac= tly the > hardware qemu provides but allow for other configurations. > > One example where we failed to do this is in mapping interrupts, wher= e PIC > IRQ line n was tied to IOAPIC INTI line n. =A0This came back to bite = us when > qemu changed its model. > > So if you notice such issues in kvm please bring them up so we can fi= x them. I certainly will, and I have noticed such things already. They're mostly problems for me in libkvm at this point. I haven't noticed any big problems with KVM itself yet. I'm going back and forth as to whether or not I want to use libkvm at all, though if you're receptive to changes to that interface, I'll definitely keep that in mind. On the other hand, since I'm using C++, I may just write a C++ libkvm and try to give it to you guys. I will try to work with the existing libkvm for now though. > If you're interested in determinism, can't you just warm up the syste= m once > and then save the state? We often do stuff like that. We drop checkpoints and run from the checkpoints, but the problem with that is that we often change things in such a way that you need to boot fresh again. If we change a device model or the kernel there's no getting around it. There are more subtle things though. For example, if you warm up a simulation with a simulated Gigabit ethernet and then decide that you really wanted 10 Gig, you can't just change it when you resume the checkpoint because TCP takes a while to warm up. We could of course warm up further from the checkpoint, but if you were to go in the reverse direction 10G -> 1G, TCP starts dropping packets and it takes a long time in a simulator to deal with that. If I can impose a good enough notion of time, I can deal with those things. Determinism is another issue altogether. Our simulator is deterministic, and we'd love to keep that property, but that's even more difficult, unless we can figure out a way to tell KVM to do something like "execute up to 100 instructions right now". I'm pretty far from really worrying about these problems. I do have lots of ideas and I know that there are a bunch of papers out there that work on this sort of thing. Thanks again, Nate