From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: patches@linaro.org, "Michael S . Tsirkin" <mst@redhat.com>,
Alex Williamson <alex.williamson@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>
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 [thread overview]
Message-ID: <decba0c5-91d8-57f4-762d-fe4bf584eea5@redhat.com> (raw)
In-Reply-To: <20180525132755.21839-5-peter.maydell@linaro.org>
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 <peter.maydell@linaro.org>
> ---
> 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 <pbonzini@redhat.com>
I would be okay with squashing 4-6 too though.
Paolo
next prev parent reply other threads:[~2018-05-25 14:18 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-25 13:27 [Qemu-devel] [PATCH 0/6] Update Linux headers to 4.17-rc6 Peter Maydell
2018-05-25 13:27 ` [Qemu-devel] [PATCH 1/6] virtio-gpu-3d: Define VIRTIO_GPU_CAPSET_VIRGL2 elsewhere Peter Maydell
2018-05-25 13:27 ` [Qemu-devel] [PATCH 2/6] scripts/update-linux-headers: Handle __aligned_u64 Peter Maydell
2018-05-25 14:55 ` Richard Henderson
2018-05-25 14:59 ` Peter Maydell
2018-05-25 13:27 ` [Qemu-devel] [PATCH 3/6] scripts/update-linux-headers: Handle kernel license no longer being one file Peter Maydell
2018-05-25 14:58 ` Richard Henderson
2018-05-25 13:27 ` [Qemu-devel] [PATCH 4/6] target/i386/kvm.c: Handle renaming of KVM_HINTS_DEDICATED Peter Maydell
2018-05-25 14:17 ` Paolo Bonzini [this message]
2018-05-25 13:27 ` [Qemu-devel] [PATCH 5/6] Update Linux headers to 4.17-rc6 Peter Maydell
2018-05-25 13:27 ` [Qemu-devel] [PATCH 6/6] target/i386/kvm.c: Remove compatibility shim for KVM_HINTS_REALTIME Peter Maydell
2018-05-25 13:35 ` [Qemu-devel] [PATCH 0/6] Update Linux headers to 4.17-rc6 no-reply
2018-05-25 14:00 ` Michael S. Tsirkin
2018-05-28 7:38 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=decba0c5-91d8-57f4-762d-fe4bf584eea5@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=mst@redhat.com \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).