qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

target/i386/kvm.c: Handle renaming of KVM_HINTS_DEDICATED

In kernel header commit 633711e8287, the define KVM_HINTS_DEDICATED
was renamed to KVM_HINTS_REALTIME. Work around this compatibility
break by (a) using the new constant name, and (b) defining it
if the headers don't.

Part (b) can be removed once we've updated our copy of the kernel
headers to a version that defines KVM_HINTS_REALTIME.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20180525132755.21839-5-peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Peter Maydell and committed by
Paolo Bonzini
2af1acad f5bba4ca

+6 -1
+6 -1
target/i386/kvm.c
··· 47 47 #include "exec/memattrs.h" 48 48 #include "trace.h" 49 49 50 + /* Work around this kernel header constant changing its name */ 51 + #ifndef KVM_HINTS_REALTIME 52 + #define KVM_HINTS_REALTIME KVM_HINTS_DEDICATED 53 + #endif 54 + 50 55 //#define DEBUG_KVM 51 56 52 57 #ifdef DEBUG_KVM ··· 386 391 ret &= ~(1U << KVM_FEATURE_PV_UNHALT); 387 392 } 388 393 } else if (function == KVM_CPUID_FEATURES && reg == R_EDX) { 389 - ret |= 1U << KVM_HINTS_DEDICATED; 394 + ret |= 1U << KVM_HINTS_REALTIME; 390 395 found = 1; 391 396 } 392 397