All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm <kvm@vger.kernel.org>
Subject: [PATCH] qemu-kvm: Drop redundant cpuid filtering from cpu_x86_cpuid
Date: Wed, 28 Sep 2011 16:53:30 +0200	[thread overview]
Message-ID: <4E8334EA.4090004@siemens.com> (raw)

This is already done in kvm_arch_init_vcpu based on the kernel-reported
supported features.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

I'm not 100% sure, so please double-check.

 target-i386/cpuid.c |   22 ----------------------
 1 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index f179999..1e8bcff 100644
--- a/target-i386/cpuid.c
+++ b/target-i386/cpuid.c
@@ -1232,28 +1232,6 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
                 *ecx |= 1 << 1;    /* CmpLegacy bit */
             }
         }
-        if (kvm_enabled()) {
-            uint32_t h_eax, h_edx;
-
-            host_cpuid(index, 0, &h_eax, NULL, NULL, &h_edx);
-
-            /* disable CPU features that the host does not support */
-
-            /* long mode */
-            if ((h_edx & 0x20000000) == 0 /* || !lm_capable_kernel */)
-                *edx &= ~0x20000000;
-            /* syscall */
-            if ((h_edx & 0x00000800) == 0)
-                *edx &= ~0x00000800;
-            /* nx */
-            if ((h_edx & 0x00100000) == 0)
-                *edx &= ~0x00100000;
-
-            /* disable CPU features that KVM cannot support */
-
-            /* 3dnow */
-            *edx &= ~0xc0000000;
-        }
         break;
     case 0x80000002:
     case 0x80000003:
-- 
1.7.3.4

             reply	other threads:[~2011-09-28 14:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-28 14:53 Jan Kiszka [this message]
2011-09-29 17:02 ` [PATCH] qemu-kvm: Drop redundant cpuid filtering from cpu_x86_cpuid Marcelo Tosatti
2011-10-03 19:48 ` Marcelo Tosatti

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=4E8334EA.4090004@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@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.