From: Jan Kiszka <jan.kiszka@siemens.com>
To: Paolo Bonzini <pbonzini@redhat.com>, kvm@vger.kernel.org
Subject: Re: [PATCH 1/4] stubs for xsavec support
Date: Mon, 02 Feb 2015 08:04:00 +0100 [thread overview]
Message-ID: <54CF2160.1010305@siemens.com> (raw)
In-Reply-To: <1420713159-25947-2-git-send-email-pbonzini@redhat.com>
On 2015-01-08 11:32, Paolo Bonzini wrote:
> These are needed for KVM changes in 3.18.
>
> Recent kernels added a separate feature word for XSAVE features, and KVM's
> CPUID code is relying on the new definition. Except for cpu_has_xsaves,
> it's never accessing the feature itself: wrap cpu_has_xsaves with
> kvm_cpu_has_xsaves, and then there is no problem with out-of-bounds
> accesses.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> external-module-compat-comm.h | 4 ++++
> external-module-compat.c | 11 +++++++++++
> sync | 14 ++++++++++++--
> x86/external-module-compat.h | 37 +++++++++++++++++++++++++++++++++++++
> 4 files changed, 64 insertions(+), 2 deletions(-)
>
...
> diff --git a/x86/external-module-compat.h b/x86/external-module-compat.h
> index dec53b6..87cf76a 100644
> --- a/x86/external-module-compat.h
> +++ b/x86/external-module-compat.h
> @@ -428,6 +428,23 @@ static inline int rdmsrl_safe(unsigned msr, unsigned long long *p)
> #define X86_FEATURE_MPX (9*32+14) /* Memory Protection Extension */
> #endif
>
> +#if X86_FEATURE_XSAVEOPT < 10 * 32
> +#undef X86_FEATURE_XSAVEOPT
> +#endif
> +#define X86_FEATURE_XSAVEOPT (10*32+0) /* XSAVEOPT instruction */
This causes redefinition warnings if the condition is not met. Was the
plan to put the define before the #endif?
Jan
--
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2015-02-02 7:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 10:32 [PATCH kvm-kmod 0/4] Update to 3.19-rc1 Paolo Bonzini
2015-01-08 10:32 ` [PATCH 1/4] stubs for xsavec support Paolo Bonzini
2015-02-02 7:04 ` Jan Kiszka [this message]
2015-02-02 9:05 ` Paolo Bonzini
2015-02-06 19:40 ` Jan Kiszka
2015-02-09 13:17 ` Paolo Bonzini
2015-02-09 13:44 ` Jan Kiszka
2015-02-09 13:45 ` Paolo Bonzini
2015-01-08 10:32 ` [PATCH 2/4] fixes for changes in the iommu and PCI APIs Paolo Bonzini
2015-01-08 10:32 ` [PATCH 3/4] fixes for changes in the percpu counter API Paolo Bonzini
2015-01-08 10:32 ` [PATCH 4/4] add trace_seq_buffer_ptr 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=54CF2160.1010305@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.