From c2f6ea52b4cfef324e17ad318a1abd9b8bbc9617 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Tue, 18 Jan 2005 03:28:00 +0000 Subject: [PATCH] Fix SYSENTER support in VMware. New benchmar: 200ms. ***70%*** faster then with Int2E. Fix FPU save bug/explorer bug. Fix Vmware 4.0 crash bug. HARTMUT IS A GENIUS. svn path=/trunk/; revision=13107 --- reactos/ntoskrnl/ke/i386/syscall.S | 8 ++--- reactos/subsys/system/vmwinst/vmwinst.c | 40 ------------------------- reactos/win32k.S | 1 - 3 files changed, 4 insertions(+), 45 deletions(-) delete mode 100644 reactos/win32k.S diff --git a/reactos/ntoskrnl/ke/i386/syscall.S b/reactos/ntoskrnl/ke/i386/syscall.S index a2816832a9f..7a8d833c6a1 100644 --- a/reactos/ntoskrnl/ke/i386/syscall.S +++ b/reactos/ntoskrnl/ke/i386/syscall.S @@ -26,14 +26,14 @@ .globl _KiSystemService _KiFastCallEntry: - + /* Set FS to PCR */ movl $PCR_SELECTOR, %ecx movw %cx, %fs - + /* Set the current stack to Kernel Stack */ movl %fs:KPCR_TSS, %ecx - movl KTSS_ESP0(%ecx), %ecx + movl %ss:KTSS_ESP0(%ecx), %ecx movl %ecx, %esp /* Set up a fake INT Stack. */ @@ -205,7 +205,7 @@ _KiServiceExit: /* Save pointer to Trap Frame */ movl %esp, %ebx - /* Raise IRQL to HIGH_LEVEL */ + /* Raise IRQL to APC_LEVEL */ movl $1, %ecx call @KfRaiseIrql@4 diff --git a/reactos/subsys/system/vmwinst/vmwinst.c b/reactos/subsys/system/vmwinst/vmwinst.c index f90e9f68f71..3af6cbdc0a2 100644 --- a/reactos/subsys/system/vmwinst/vmwinst.c +++ b/reactos/subsys/system/vmwinst/vmwinst.c @@ -315,43 +315,6 @@ SaveResolutionSettings(DWORD ResX, DWORD ResY, DWORD ColDepth) return TRUE; } -BOOL -DisableFastSystemCall(VOID) -{ - DWORD Value = 1; - HKEY hReg; - - /* Open or Create the Kernel Settings Key */ - if(RegCreateKeyEx(HKEY_LOCAL_MACHINE, - L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Kernel", - 0, - NULL, - REG_OPTION_NON_VOLATILE, - KEY_SET_VALUE, - NULL, - &hReg, - NULL) != ERROR_SUCCESS) { - DbgPrint("Failed to Disable Sysenter\n"); - return FALSE; - } - - /* Disable Fast System Call */ - if(RegSetValueEx(hReg, - L"FastSystemCallDisable", - 0, - REG_DWORD, - (BYTE*)&Value, - sizeof(DWORD)) != ERROR_SUCCESS) { - RegCloseKey(hReg); - DbgPrint("Failed to Disable Sysenter\n"); - return FALSE; - } - - /* Return Success */ - RegCloseKey(hReg); - return TRUE; -} - BOOL EnableDriver(WCHAR *Key, BOOL Enable) { @@ -1061,9 +1024,6 @@ WinMain(HINSTANCE hInstance, /* restore the exception handler */ SetUnhandledExceptionFilter(OldHandler); - /* Disable Fast System Call no matter what */ - DisableFastSystemCall(); - lc = DestinationPath; lc += GetSystemDirectory(DestinationPath, MAX_PATH) - 1; if(lc >= DestinationPath && *lc != L'\\') diff --git a/reactos/win32k.S b/reactos/win32k.S deleted file mode 100644 index f6b4d9078db..00000000000 --- a/reactos/win32k.S +++ /dev/null @@ -1 +0,0 @@ -#include "../gdi32/misc/win32k.c"