From: Joerg Roedel <joerg.roedel@amd.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: Joerg Roedel <joerg.roedel@amd.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: [Qemu-devel] [PATCH 2/3] qemu-kvm: Set cpuid definition to 0 before initializing it
Date: Tue, 7 Sep 2010 13:27:22 +0200 [thread overview]
Message-ID: <1283858843-21330-3-git-send-email-joerg.roedel@amd.com> (raw)
In-Reply-To: <1283858843-21330-1-git-send-email-joerg.roedel@amd.com>
This patch cleans the (stack-allocated) cpuid definition to
0 before actually initializing it.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
target-i386/cpuid.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index 5fa0dd0..5735795 100644
--- a/target-i386/cpuid.c
+++ b/target-i386/cpuid.c
@@ -788,6 +788,8 @@ int cpu_x86_register (CPUX86State *env, const char *cpu_model)
{
x86_def_t def1, *def = &def1;
+ memset(def, 0, sizeof(*def));
+
if (cpu_x86_find_by_name(def, cpu_model) < 0)
return -1;
if (def->vendor1) {
--
1.7.0.4
next prev parent reply other threads:[~2010-09-07 11:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 11:27 [Qemu-devel] [PATCH 0/3] Add svm cpuid features to qemu-kvm Joerg Roedel
2010-09-07 11:27 ` [Qemu-devel] [PATCH 1/3] qemu-kvm: Invert svm-flag setting logic Joerg Roedel
2010-09-07 12:23 ` Alexander Graf
2010-09-07 12:30 ` Daniel P. Berrange
2010-09-07 12:33 ` Alexander Graf
2010-09-07 12:35 ` Avi Kivity
2010-09-07 12:37 ` Alexander Graf
2010-09-07 12:43 ` Avi Kivity
2010-09-07 12:55 ` Alexander Graf
2010-09-07 12:59 ` Avi Kivity
2010-09-07 14:14 ` Roedel, Joerg
2010-09-07 13:51 ` Avi Kivity
2010-09-07 14:12 ` Roedel, Joerg
2010-09-07 14:14 ` Alexander Graf
2010-09-07 14:18 ` Roedel, Joerg
2010-09-07 14:16 ` Alexander Graf
2010-09-07 14:20 ` Roedel, Joerg
2010-09-07 14:22 ` Alexander Graf
2010-09-07 14:33 ` Roedel, Joerg
2010-09-07 14:36 ` Alexander Graf
2010-09-07 14:56 ` Avi Kivity
2010-09-07 11:27 ` Joerg Roedel [this message]
2010-09-07 11:27 ` [Qemu-devel] [PATCH 3/3] qemu-kvm: Add svm cpuid features Joerg Roedel
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=1283858843-21330-3-git-send-email-joerg.roedel@amd.com \
--to=joerg.roedel@amd.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=qemu-devel@nongnu.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 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).