All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] qemu-kvm: Drop redundant cpuid filtering from cpu_x86_cpuid
@ 2011-09-28 14:53 Jan Kiszka
  2011-09-29 17:02 ` Marcelo Tosatti
  2011-10-03 19:48 ` Marcelo Tosatti
  0 siblings, 2 replies; 3+ messages in thread
From: Jan Kiszka @ 2011-09-28 14:53 UTC (permalink / raw)
  To: Avi Kivity, Marcelo Tosatti; +Cc: kvm

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] qemu-kvm: Drop redundant cpuid filtering from cpu_x86_cpuid
  2011-09-28 14:53 [PATCH] qemu-kvm: Drop redundant cpuid filtering from cpu_x86_cpuid Jan Kiszka
@ 2011-09-29 17:02 ` Marcelo Tosatti
  2011-10-03 19:48 ` Marcelo Tosatti
  1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2011-09-29 17:02 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Avi Kivity, kvm

On Wed, Sep 28, 2011 at 04:53:30PM +0200, Jan Kiszka wrote:
> 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.

Correct, trimming is done in the kernel already.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] qemu-kvm: Drop redundant cpuid filtering from cpu_x86_cpuid
  2011-09-28 14:53 [PATCH] qemu-kvm: Drop redundant cpuid filtering from cpu_x86_cpuid Jan Kiszka
  2011-09-29 17:02 ` Marcelo Tosatti
@ 2011-10-03 19:48 ` Marcelo Tosatti
  1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Tosatti @ 2011-10-03 19:48 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: Avi Kivity, kvm

On Wed, Sep 28, 2011 at 04:53:30PM +0200, Jan Kiszka wrote:
> 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>

Applied all 3, thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-03 20:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-28 14:53 [PATCH] qemu-kvm: Drop redundant cpuid filtering from cpu_x86_cpuid Jan Kiszka
2011-09-29 17:02 ` Marcelo Tosatti
2011-10-03 19:48 ` Marcelo Tosatti

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.