Opened 12 years ago

Last modified 12 years ago

#36856 closed defect

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

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

Description

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 (0)

Note: See TracTickets for help on using tickets.