1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-30 00:00:15 +01:00

enable fast string operations

This commit is contained in:
Stefan Lankes 2017-11-05 22:08:11 +01:00
parent 57feac36e4
commit 3c45b79acb

View file

@ -635,7 +635,12 @@ int cpu_detection(void) {
LOG_INFO("Maximum input value for hypervisor: 0x%x\n", a);
}
if (first_time) {
// enable fast string operations
uint64_t misc = rdmsr(MSR_IA32_MISC_ENABLE);
wrmsr(MSR_IA32_MISC_ENABLE, misc | MSR_IA32_MISC_ENABLE_FAST_STRING);
LOG_INFO("CR0 0x%llx, CR4 0x%llx\n", read_cr0(), read_cr4());
LOG_INFO("size of xsave_t: %d\n", sizeof(xsave_t));
if (has_msr()) {