[MacPorts] #36856: Qemu support of sse4.2 extended instructions.

MacPorts noreply at macports.org
Fri Nov 2 19:48:39 PDT 2012


#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


More information about the macports-tickets mailing list