Re: [PATCH RFC v2 6/6] KVM: introduce a new API for getting dirty
Takuya Yoshikawa <[email protected]> Tue, 20 Apr 2010 11:44:50 +0000
| Newsgroups | org.kernel.vger.kvm-ia64,org.kernel.vger.kvm,org.kernel.vger.kvm-ppc |
|---|---|
| Message-ID | <[email protected]> |
(2010/04/20 20:33), Alexander Graf wrote: >>>> >>>> -#define KVM_API_VERSION 12 >>>> +#define KVM_API_VERSION 13 >>> >>> Is there a way to keep both interfaces around for some time at least? I'd prefer the API version not to change if not _really_ necessary. >>> >>> To enable the new dirty mapping you could for example use KVM_CAP_ENABLE_CAP :-). >> >> Thanks, I did not know what is the appropriate way for this kind of change. >> >> I just read the comments in the kvm.h and thought I had to update the number whenever >> I added some entries to kvm.h . > > The rule of thumb is: > > KVM_API_VERSION change -> complete breakage. No way to run older userspace on newer kernels. > new CAP -> optional feature > > If I read correctly you're changing quite a few existing interfaces, so old userspace wouldn't work anymore. Hence I'm proposing using activating the new way of dirty logging optionally. > > Alex > The fact is, I am trying to keep the existing interfaces completely(KVM_API_VERSION part is my mistake). For x86, I have checked that current qemu works without any change. I mean we can use get_dirty_log() as is. And as you propose, we can determine which api(swith_* or get_*) we use optionally.