Jump to content

How to hide the SSE2 CPU flag for Windows OS


reboot12

Recommended Posts

In QEMU (virt-manager) on Linux you have to do this:

qemu-system-x86_64 -cpu host,-sse2

In QEMU on Windows:

qemu-system-x86_64 -cpu qemu64,-sse2

In the Linux host system, e.g. Debian you need add the option clearcpuid=26 to the kernel cmd line in /etc/default/grub:

GRUB_CMDLINE_LINUX="clearcpuid=26"

then update-grub and reboot

To check if it works:

cat /proc/cpuinfo | grep flags

How to disable CPU Feature / Flag HLE "Hardware Lock Elision" on RHEL x86 - intel

cpufeatures.h

#define X86_FEATURE_XMM2 ( 0*32+26) /* "sse2" */

How to achieve the same for Windows without using a virtual machine?

I found it: set-sse2-enable but this is a guide on how to compile their own applications so that they do not use SSE2

sse2_use_not_use.zip - test tools fo Win 32-bit

Edited by reboot12
Link to comment
Share on other sites

  • 6 months later...

1 hour ago, Mov AX, 0xDEAD said:

There is no switch for windows kernel to disable sse, you need modded kernel, do it yourself :)

There is no for Windows but it is in Grub2 - WRMSR command I just don't know what registry address to change the bit 26 SSE2:

wrmsr.png

I also found a msr-cmd.exe tool for Windows but I don't know how to use it to edit bit 26 SSE2:

Usage:
        msr-cmd.exe [options] read <reg>
        msr-cmd.exe [options] write <reg> <edx(63~32)> <eax(31~0)>
        msr-cmd.exe [options] -l write <reg> <hex_val(63~0)>
        msr-cmd.exe [options] rmw <reg> <h bit> <l bit> <unmasked_hex_val>
        msr-cmd.exe [options] rmwmask <reg> <mask(63~0)> <unmasked_hex_val>
        msr-cmd.exe [options] getbit <reg> <#bit>
        msr-cmd.exe [options] setbit <reg> <#bit> <0/1>

Options:
        -s              write only do not read back
        -d              data only, not to print column item name
        -g <GRP>        processor group (default: 0) to apply
                        'A' or 'a' to apply to all available processors groups
                        by default, a group can contain up to 64 logical processors

However, I modified another - IA32_CLOCK_MODULATION 0x19A register without any problems in GRUB2:

wrmsr 0x19a 0x12

or under WinXP 64-bit with msr-cmd.exe:

msr-cmd read 0x19a
msr_read(): CPU 0 reg: 0x0000019a edx: 0x00000000 eax: 0x00000002
msr-cmd write 0x19a 0x00000000 0x00000012
msr_write(): ret: CPU 0 reg: 0x0000019a edx: 0x00000000 eax: 0x00000012

Edited by reboot12
Link to comment
Share on other sites

17 hours ago, reboot12 said:

I also found a msr-cmd.exe tool for Windows but I don't know how to use it to edit bit 26 SSE2:

Look at intel or amd CPU Programming documentation how to control SSE bit in MSR registers, "Internet" says some old BIOS have "SSE Enable/Disable" option, so it must be possible

 

Link to comment
Share on other sites

14 hours ago, Mov AX, 0xDEAD said:

"Internet" says some old BIOS have "SSE Enable/Disable" option, so it must be possible

Yes, you are right - I found and, for example, in the BIOS JetWay V266B there was such an option:
Jet-Way-V266-B-SSE.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...