Opened 12 years ago

Last modified 11 years ago

#36856 closed defect

Qemu support of sse4.2 extended instructions. — at Version 1

Reported by: enf@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: haspatch Cc:
Port: qemu

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Qemu disables processor instruction extentions with non linux builds -- mac builds. specifically, processor sse4.2 functions.

Here is patch for cpu.c file to allow.

mmacbookpro-enf:~ enf$ diff -c ~/Downloads/qemu-1.2.0/target-i386/cpu.c ~/src/play/c/qemu-1.2.0/target-i386/cpu.c
*** /Users/enf/Downloads/qemu-1.2.0/target-i386/cpu.c 2012-09-05 07:03:06.000000000 -0700
--- /Users/enf/src/play/c/qemu-1.2.0/target-i386/cpu.c 2012-11-01 19:32:19.000000000 -0700
***************
*** 116,122 ****
 void host_cpuid(uint32_t function, uint32_t count,
                 uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)
 {
! #if defined(CONFIG_KVM)
     uint32_t vec[4];

 #ifdef __x86_64__
--- 116,122 ----
 void host_cpuid(uint32_t function, uint32_t count,
                 uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx)
 {
! #if defined(CONFIG_KVM) || defined(__APPLE__)
     uint32_t vec[4];

 #ifdef __x86_64__
***************
*** 273,279 ****
           CPUID_VME, CPUID_DTS, CPUID_SS, CPUID_HT, CPUID_TM, CPUID_PBE */
 #define TCG_EXT_FEATURES (CPUID_EXT_SSE3 | CPUID_EXT_MONITOR | \
           CPUID_EXT_CX16 | CPUID_EXT_POPCNT | \
!           CPUID_EXT_HYPERVISOR)
           /* missing:
           CPUID_EXT_DTES64, CPUID_EXT_DSCPL, CPUID_EXT_VMX, CPUID_EXT_EST,
           CPUID_EXT_TM2, CPUID_EXT_XTPR, CPUID_EXT_PDCM, CPUID_EXT_XSAVE */
--- 273,279 ----
           CPUID_VME, CPUID_DTS, CPUID_SS, CPUID_HT, CPUID_TM, CPUID_PBE */
 #define TCG_EXT_FEATURES (CPUID_EXT_SSE3 | CPUID_EXT_MONITOR | \
           CPUID_EXT_CX16 | CPUID_EXT_POPCNT | \
!           CPUID_EXT_HYPERVISOR | CPUID_EXT_SSE42)
           /* missing:
           CPUID_EXT_DTES64, CPUID_EXT_DSCPL, CPUID_EXT_VMX, CPUID_EXT_EST,
           CPUID_EXT_TM2, CPUID_EXT_XTPR, CPUID_EXT_PDCM, CPUID_EXT_XSAVE */

Change History (1)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: haspatch added
Port: qemu added

Patchfiles should be in unified not contextual form, and should be attached not pasted. Remember to use WikiFormatting when writing in Trac.

Note: See TracTickets for help on using tickets.