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>, Alexander Graf <agraf@suse.de>, kvm@vger.kernel.org, qemu-devel@nongnu.org Subject: [PATCH 2/3] Set cpuid definition to 0 before initializing it Date: Mon, 27 Sep 2010 15:16:16 +0200 [thread overview] Message-ID: <1285593377-1754-3-git-send-email-joerg.roedel@amd.com> (raw) In-Reply-To: <1285593377-1754-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 04ba8d5..3fcf78f 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
WARNING: multiple messages have this Message-ID (diff)
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>, Alexander Graf <agraf@suse.de>, kvm@vger.kernel.org, qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 2/3] Set cpuid definition to 0 before initializing it Date: Mon, 27 Sep 2010 15:16:16 +0200 [thread overview] Message-ID: <1285593377-1754-3-git-send-email-joerg.roedel@amd.com> (raw) In-Reply-To: <1285593377-1754-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 04ba8d5..3fcf78f 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-27 13:16 UTC|newest] Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-09-27 13:16 [PATCH 0/3] SVM feature support for qemu v3 Joerg Roedel 2010-09-27 13:16 ` [Qemu-devel] " Joerg Roedel 2010-09-27 13:16 ` [PATCH 1/3] Make kvm64 the default cpu model when kvm_enabled() Joerg Roedel 2010-09-27 13:16 ` [Qemu-devel] " Joerg Roedel 2010-10-06 18:53 ` Marcelo Tosatti 2010-10-06 18:53 ` [Qemu-devel] " Marcelo Tosatti 2010-10-06 19:24 ` Anthony Liguori 2010-10-06 19:24 ` [Qemu-devel] " Anthony Liguori 2010-10-07 8:42 ` Roedel, Joerg 2010-10-07 8:42 ` [Qemu-devel] " Roedel, Joerg 2010-10-07 12:48 ` Anthony Liguori 2010-10-07 12:48 ` [Qemu-devel] " Anthony Liguori 2010-10-18 8:22 ` Roedel, Joerg 2010-10-18 8:22 ` [Qemu-devel] " Roedel, Joerg 2010-10-18 14:16 ` Anthony Liguori 2010-10-18 14:16 ` [Qemu-devel] " Anthony Liguori 2010-10-20 15:53 ` Blue Swirl 2010-10-20 15:53 ` Blue Swirl 2010-09-27 13:16 ` Joerg Roedel [this message] 2010-09-27 13:16 ` [Qemu-devel] [PATCH 2/3] Set cpuid definition to 0 before initializing it Joerg Roedel 2010-09-27 13:16 ` [PATCH 3/3] Add svm cpuid features Joerg Roedel 2010-09-27 13:16 ` [Qemu-devel] " Joerg Roedel 2010-09-27 14:58 ` Avi Kivity 2010-09-27 14:58 ` [Qemu-devel] " Avi Kivity 2010-09-27 15:02 ` Avi Kivity 2010-09-27 15:02 ` [Qemu-devel] " Avi Kivity 2010-09-27 15:40 ` Roedel, Joerg 2010-09-27 15:40 ` [Qemu-devel] " Roedel, Joerg 2010-09-27 16:22 ` Avi Kivity 2010-09-27 16:22 ` [Qemu-devel] " Avi Kivity 2010-09-28 9:28 ` Roedel, Joerg 2010-09-28 9:28 ` [Qemu-devel] " Roedel, Joerg 2010-09-28 9:37 ` Avi Kivity 2010-09-28 9:37 ` [Qemu-devel] " Avi Kivity 2010-09-28 10:05 ` Roedel, Joerg 2010-09-28 10:05 ` [Qemu-devel] " Roedel, Joerg 2010-09-28 10:16 ` Avi Kivity 2010-09-28 10:16 ` [Qemu-devel] " Avi Kivity 2010-10-06 18:57 ` Marcelo Tosatti 2010-10-06 18:57 ` [Qemu-devel] " Marcelo Tosatti -- strict thread matches above, loose matches on Subject: below -- 2010-09-14 15:52 [PATCH 0/3] SVM feature support for qemu Joerg Roedel 2010-09-14 15:52 ` [PATCH 2/3] Set cpuid definition to 0 before initializing it 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=1285593377-1754-3-git-send-email-joerg.roedel@amd.com \ --to=joerg.roedel@amd.com \ --cc=agraf@suse.de \ --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: linkBe 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.