* [PATCH] Pass through SSSE3 capability
@ 2008-01-09 18:46 Alexander Graf
[not found] ` <4785166C.6080705-r27SGEef+tmzQB+pC5nmwQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Alexander Graf @ 2008-01-09 18:46 UTC (permalink / raw)
To: kvm-devel
[-- Attachment #1: Type: text/plain, Size: 186 bytes --]
Darwin requires SSSE3 in 64-bit mode, so KVM needs to reveal the
appropriate CPUID flag. I could not find a proper define in the kernel
headers, so I just added the specific bit number.
[-- Attachment #2: kvm-ssse3.patch --]
[-- Type: text/x-patch, Size: 523 bytes --]
Index: kernel/x86.c
===================================================================
--- kernel.orig/x86.c
+++ kernel/x86.c
@@ -898,7 +903,7 @@ static void do_cpuid_ent(struct kvm_cpui
bit(X86_FEATURE_3DNOWEXT) |
bit(X86_FEATURE_3DNOW);
const u32 kvm_supported_word3_x86_features =
- bit(X86_FEATURE_XMM3) | bit(X86_FEATURE_CX16);
+ bit(X86_FEATURE_XMM3) | bit(X86_FEATURE_CX16) | bit(9) /* SSSE3 */;
const u32 kvm_supported_word6_x86_features =
bit(X86_FEATURE_LAHF_LM) | bit(X86_FEATURE_CMP_LEGACY);
[-- Attachment #3: Type: text/plain, Size: 278 bytes --]
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
[-- Attachment #4: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Pass through SSSE3 capability
@ 2008-01-10 6:22 Alexander Graf
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2008-01-10 6:22 UTC (permalink / raw)
To: kvm-devel
[-- Attachment #1: Type: text/plain, Size: 188 bytes --]
Darwin requires SSSE3 in 64-bit mode, so KVM needs to reveal the
appropriate CPUID flag. I could not find a proper define in the kernel
headers, so I just added the specific bit number.
[-- Attachment #2: kvm-ssse3.patch --]
[-- Type: text/x-patch, Size: 524 bytes --]
Index: kernel/x86.c
===================================================================
--- kernel.orig/x86.c
+++ kernel/x86.c
@@ -898,7 +903,7 @@ static void do_cpuid_ent(struct kvm_cpui
bit(X86_FEATURE_3DNOWEXT) |
bit(X86_FEATURE_3DNOW);
const u32 kvm_supported_word3_x86_features =
- bit(X86_FEATURE_XMM3) | bit(X86_FEATURE_CX16);
+ bit(X86_FEATURE_XMM3) | bit(X86_FEATURE_CX16) | bit(9) /* SSSE3 */;
const u32 kvm_supported_word6_x86_features =
bit(X86_FEATURE_LAHF_LM) | bit(X86_FEATURE_CMP_LEGACY);
[-- Attachment #3: Type: text/plain, Size: 278 bytes --]
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
[-- Attachment #4: Type: text/plain, Size: 186 bytes --]
_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Pass through SSSE3 capability
[not found] ` <4785166C.6080705-r27SGEef+tmzQB+pC5nmwQ@public.gmane.org>
@ 2008-01-10 7:16 ` Dan Kenigsberg
[not found] ` <20080110071634.GA19223-iWbx9bcAnq+Hk9JtIoIkgNBPR1lH4CV8@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Dan Kenigsberg @ 2008-01-10 7:16 UTC (permalink / raw)
To: Alexander Graf; +Cc: kvm-devel
On Wed, Jan 09, 2008 at 07:46:04PM +0100, Alexander Graf wrote:
> Darwin requires SSSE3 in 64-bit mode, so KVM needs to reveal the
> appropriate CPUID flag. I could not find a proper define in the kernel
> headers, so I just added the specific bit number.
> Index: kernel/x86.c
> ===================================================================
> --- kernel.orig/x86.c
> +++ kernel/x86.c
> @@ -898,7 +903,7 @@ static void do_cpuid_ent(struct kvm_cpui
> bit(X86_FEATURE_3DNOWEXT) |
> bit(X86_FEATURE_3DNOW);
> const u32 kvm_supported_word3_x86_features =
> - bit(X86_FEATURE_XMM3) | bit(X86_FEATURE_CX16);
> + bit(X86_FEATURE_XMM3) | bit(X86_FEATURE_CX16) | bit(9) /* SSSE3 */;
> const u32 kvm_supported_word6_x86_features =
> bit(X86_FEATURE_LAHF_LM) | bit(X86_FEATURE_CMP_LEGACY);
>
>
I bet that one day this will be added to asm-x86/cpufeature_32.h, so maybe
adding the following would be nicer.
diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h
index 67b9cc4..0e2bc4c 100644
--- a/kernel/external-module-compat.h
+++ b/kernel/external-module-compat.h
@@ -566,6 +566,9 @@ static inline void blahblah(void)
#ifndef X86_FEATURE_NX
#define X86_FEATURE_NX (1*32+20)
#endif
+#ifndef X86_FEATURE_SSSE3
+#define X86_FEATURE_SSSE3 (4*32+9)
+#endif
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Pass through SSSE3 capability
[not found] ` <20080110071634.GA19223-iWbx9bcAnq+Hk9JtIoIkgNBPR1lH4CV8@public.gmane.org>
@ 2008-01-10 10:30 ` Alexander Graf
0 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2008-01-10 10:30 UTC (permalink / raw)
To: kvm-devel
Dan Kenigsberg wrote:
> On Wed, Jan 09, 2008 at 07:46:04PM +0100, Alexander Graf wrote:
>
>> Darwin requires SSSE3 in 64-bit mode, so KVM needs to reveal the
>> appropriate CPUID flag. I could not find a proper define in the kernel
>> headers, so I just added the specific bit number.
>>
>
>
>> Index: kernel/x86.c
>> ===================================================================
>> --- kernel.orig/x86.c
>> +++ kernel/x86.c
>> @@ -898,7 +903,7 @@ static void do_cpuid_ent(struct kvm_cpui
>> bit(X86_FEATURE_3DNOWEXT) |
>> bit(X86_FEATURE_3DNOW);
>> const u32 kvm_supported_word3_x86_features =
>> - bit(X86_FEATURE_XMM3) | bit(X86_FEATURE_CX16);
>> + bit(X86_FEATURE_XMM3) | bit(X86_FEATURE_CX16) | bit(9) /* SSSE3 */;
>> const u32 kvm_supported_word6_x86_features =
>> bit(X86_FEATURE_LAHF_LM) | bit(X86_FEATURE_CMP_LEGACY);
>>
>>
>>
>
> I bet that one day this will be added to asm-x86/cpufeature_32.h, so maybe
> adding the following would be nicer.
>
I agree. Do I need to send a new patch including this as the patch is
really small?
> diff --git a/kernel/external-module-compat.h b/kernel/external-module-compat.h
> index 67b9cc4..0e2bc4c 100644
> --- a/kernel/external-module-compat.h
> +++ b/kernel/external-module-compat.h
> @@ -566,6 +566,9 @@ static inline void blahblah(void)
> #ifndef X86_FEATURE_NX
> #define X86_FEATURE_NX (1*32+20)
> #endif
> +#ifndef X86_FEATURE_SSSE3
> +#define X86_FEATURE_SSSE3 (4*32+9)
> +#endif
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-01-10 10:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-09 18:46 [PATCH] Pass through SSSE3 capability Alexander Graf
[not found] ` <4785166C.6080705-r27SGEef+tmzQB+pC5nmwQ@public.gmane.org>
2008-01-10 7:16 ` Dan Kenigsberg
[not found] ` <20080110071634.GA19223-iWbx9bcAnq+Hk9JtIoIkgNBPR1lH4CV8@public.gmane.org>
2008-01-10 10:30 ` Alexander Graf
-- strict thread matches above, loose matches on Subject: below --
2008-01-10 6:22 Alexander Graf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox