From: Jan Kiszka <jan.kiszka@siemens.com>
To: Andre Przywara <andre.przywara@amd.com>
Cc: anthony@codemonkey.ws, avi@redhat.com, kvm@vger.kernel.org,
Frank Arnold <frank.arnold@amd.com>
Subject: Re: [PATCH] QEMU: Fix KVM XSAVE feature bit enumeration
Date: Fri, 10 Jun 2011 15:31:21 +0200 [thread overview]
Message-ID: <4DF21CA9.4030904@siemens.com> (raw)
In-Reply-To: <1307707690-4861-1-git-send-email-andre.przywara@amd.com>
On 2011-06-10 14:08, Andre Przywara wrote:
> When iterating through the XSAVE feature enumeration CPUID leaf (0xD)
> we should not stop at the first zero EAX, but instead keep scanning
> since there are gaps in the enumeration (ECX=1 for instance).
> This fixes the proper usage of AVX in KVM guests.
>
> Signed-off-by: Andre Przywara <andre.przywara@amd.com>
> ---
> target-i386/kvm.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/target-i386/kvm.c b/target-i386/kvm.c
> index faedc6c..4a97f78 100644
> --- a/target-i386/kvm.c
> +++ b/target-i386/kvm.c
> @@ -448,6 +448,8 @@ int kvm_arch_init_vcpu(CPUState *env)
> case 0xb:
> case 0xd:
> for (j = 0; ; j++) {
> + if (i == 0xd && j == 64)
> + break;
checkpatch.pl?
> c->function = i;
> c->flags = KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
> c->index = j;
> @@ -460,7 +462,7 @@ int kvm_arch_init_vcpu(CPUState *env)
> break;
> }
> if (i == 0xd && c->eax == 0) {
> - break;
> + continue;
> }
> c = &cpuid_data.entries[cpuid_i++];
> }
Jan
--
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2011-06-10 13:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-10 12:08 [PATCH] QEMU: Fix KVM XSAVE feature bit enumeration Andre Przywara
2011-06-10 13:31 ` Jan Kiszka [this message]
2011-06-10 13:56 ` [PATCH] KVM: Fix " Andre Przywara
2011-06-19 13:29 ` Avi Kivity
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=4DF21CA9.4030904@siemens.com \
--to=jan.kiszka@siemens.com \
--cc=andre.przywara@amd.com \
--cc=anthony@codemonkey.ws \
--cc=avi@redhat.com \
--cc=frank.arnold@amd.com \
--cc=kvm@vger.kernel.org \
/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.