[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 4/6] target/i386/kvm.c: Handle renaming of KVM_H
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 4/6] target/i386/kvm.c: Handle renaming of KVM_HINTS_DEDICATED |
Date: |
Fri, 25 May 2018 16:17:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 25/05/2018 15:27, Peter Maydell wrote:
> 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 <address@hidden>
> ---
> target/i386/kvm.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/target/i386/kvm.c b/target/i386/kvm.c
> index 6511329d11..c2699f2f44 100644
> --- a/target/i386/kvm.c
> +++ b/target/i386/kvm.c
> @@ -48,6 +48,11 @@
> #include "exec/memattrs.h"
> #include "trace.h"
>
> +/* Work around this kernel header constant changing its name */
> +#ifndef KVM_HINTS_REALTIME
> +#define KVM_HINTS_REALTIME KVM_HINTS_DEDICATED
> +#endif
> +
> //#define DEBUG_KVM
>
> #ifdef DEBUG_KVM
> @@ -387,7 +392,7 @@ uint32_t kvm_arch_get_supported_cpuid(KVMState *s,
> uint32_t function,
> ret &= ~(1U << KVM_FEATURE_PV_UNHALT);
> }
> } else if (function == KVM_CPUID_FEATURES && reg == R_EDX) {
> - ret |= 1U << KVM_HINTS_DEDICATED;
> + ret |= 1U << KVM_HINTS_REALTIME;
> found = 1;
> }
>
>
Acked-by: Paolo Bonzini <address@hidden>
I would be okay with squashing 4-6 too though.
Paolo
- [Qemu-devel] [PATCH 0/6] Update Linux headers to 4.17-rc6, Peter Maydell, 2018/05/25
- [Qemu-devel] [PATCH 2/6] scripts/update-linux-headers: Handle __aligned_u64, Peter Maydell, 2018/05/25
- [Qemu-devel] [PATCH 4/6] target/i386/kvm.c: Handle renaming of KVM_HINTS_DEDICATED, Peter Maydell, 2018/05/25
- Re: [Qemu-devel] [PATCH 4/6] target/i386/kvm.c: Handle renaming of KVM_HINTS_DEDICATED,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 3/6] scripts/update-linux-headers: Handle kernel license no longer being one file, Peter Maydell, 2018/05/25
- [Qemu-devel] [PATCH 6/6] target/i386/kvm.c: Remove compatibility shim for KVM_HINTS_REALTIME, Peter Maydell, 2018/05/25
- [Qemu-devel] [PATCH 1/6] virtio-gpu-3d: Define VIRTIO_GPU_CAPSET_VIRGL2 elsewhere, Peter Maydell, 2018/05/25
- [Qemu-devel] [PATCH 5/6] Update Linux headers to 4.17-rc6, Peter Maydell, 2018/05/25
- Re: [Qemu-devel] [PATCH 0/6] Update Linux headers to 4.17-rc6, Michael S. Tsirkin, 2018/05/25
- Re: [Qemu-devel] [PATCH 0/6] Update Linux headers to 4.17-rc6, no-reply, 2018/05/26