[MacPorts] #36856: Qemu support of sse4.2 extended instructions.
#36856: Qemu support of sse4.2 extended instructions. --------------------+-------------------------------- Reporter: enf@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Keywords: | Port: --------------------+-------------------------------- 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 */ -- Ticket URL: <https://trac.macports.org/ticket/36856> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36856: Qemu support of sse4.2 extended instructions. ---------------------+-------------------------------- Reporter: enf@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: haspatch Port: qemu | ---------------------+-------------------------------- Changes (by ryandesign@…): * keywords: => haspatch * port: => qemu Old 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 */
New 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 */ }}} -- Comment: Patchfiles should be in unified not contextual form, and should be attached not pasted. Remember to use WikiFormatting when writing in Trac. -- Ticket URL: <https://trac.macports.org/ticket/36856#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36856: Qemu support of sse4.2 extended instructions. ---------------------+-------------------------------- Reporter: enf@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: haspatch Port: qemu | ---------------------+-------------------------------- Comment (by gjasny@…): Hello, did you try to submit the patch upstream? Thanks, Gregor -- Ticket URL: <https://trac.macports.org/ticket/36856#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36856: Qemu support of sse4.2 extended instructions. ---------------------+-------------------------------- Reporter: enf@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: haspatch Port: qemu | ---------------------+-------------------------------- Comment (by enf@…): Replying to [comment:2 gjasny@…]:
Hello,
did you try to submit the patch upstream?
Thanks, Gregor
Hi Gregor, I see some patches applied to the QEMU code for MacPort functionality today. When looking at the qemu code base (their site appears down right now) there is no extra provision for Mac specific changes. Hence, I submitted these changes here. Also... Sorry about the diff formatting.... I wanted to get the info into the report. Next time will be better. -- Eric -- Ticket URL: <https://trac.macports.org/ticket/36856#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36856: Qemu support of sse4.2 extended instructions. ---------------------+---------------------- Reporter: enf@… | Owner: raimue@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: | Keywords: haspatch Port: qemu | ---------------------+---------------------- Changes (by raimue@…): * owner: macports-tickets@… => raimue@… Comment: Is still required for qemu @1.3.0_0? -- Ticket URL: <https://trac.macports.org/ticket/36856#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#36856: Qemu support of sse4.2 extended instructions. ----------------------+---------------------- Reporter: enf@… | Owner: raimue@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.2 Resolution: wontfix | Keywords: haspatch Port: qemu | ----------------------+---------------------- Changes (by raimue@…): * status: new => closed * resolution: => wontfix Comment: The function `host_cpuid()` is called only from within conditional blocks checked by `CONFIG_KVM` or `kvm_enabled()`, so the proposed change to this function does not change any functionality. Whether TCG already supports SSE 4.2 or if it should be added to the default features should be discussed with upstream as that is not specific to Mac OS X. -- Ticket URL: <https://trac.macports.org/ticket/36856#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts