Anthony Liguori wrote: > Jan Kiszka wrote: >> -----------> >> >> Signed-off-by: Jan Kiszka >> --- >> >> kvm-all.c | 4 +++- >> 1 files changed, 3 insertions(+), 1 deletions(-) >> >> diff --git a/kvm-all.c b/kvm-all.c >> index 824bb4c..53925be 100644 >> --- a/kvm-all.c >> +++ b/kvm-all.c >> @@ -348,7 +348,9 @@ int >> kvm_physical_sync_dirty_bitmap(target_phys_addr_t start_addr, >> d.slot = mem->slot; >> >> r = kvm_vm_ioctl(s, KVM_GET_DIRTY_LOG, &d); >> - if (r == -EINVAL) { >> + /* KVM for PowerPC returns illicit -ENOTSUPP (-524) which we >> handle >> + * below. */ >> + if (r < 0 && r != -524) { >> > > That makes me uncomfortable. Shouldn't we make kvm return something > that's exposed to userspace? > Yes, but we can't do this from user space :) (or in other words: there are already kernels out there which return this invalid code). The situation would only be different if Alex said that it takes further kernel patches anyway to make his PowerPC targets work. Dunno. Jan