• Register
0 votes

Problem :

I am learning the Kernel mode. If I run the below assembly sequence in the kernel mode of my Windows 7 x64 bit machine running in the VMWare Workstation virtual machine:

xor eax, eax
mov ax, gs
mov gs, ax     ; this line

Then that last line mov gs, ax instruction immediately causes my VM to crash with the below shown pop-up message:

A fault has occurred causing a virtual CPU to enter the shutdown state. If this fault had occurred outside of a virtual machine, it would have caused the physical machine to restart. The shutdown state can be reached by incorrectly configuring the virtual machine, a bug in the guest operating system, or a problem in VMWare Workstation.

How to fix this issue?

8 4 2
2,300 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I have also faced such issue while I was learning to use the kernel mode.

Your mov gs,ax instruction is loading a dummy 32-bit base value stored in your GDT and not your 64-bit value stored in the IA32_GS_BASE. You should know here the base address of a GS segment is now set to 0 and not to a address of your PCR for your current CPU. And on loading such incorrect GS base it is obvious that before your Windows kernel tries to use a GS register to access your PCR and while doing so ends up reading what is most probably the unmapped memory causing the very unexpected kernel page fault and crashing. And so you are facing this issue.

5 2 1
4,980 points

Related questions

0 votes
1 answer 3 views
Problem: What specifically is the difficulty here? > Unable to change virtual machine power state internal error .
asked 5 days ago Isac Christiaan 9.6k points
0 votes
1 answer 4 views
Problem: When the program executes the function call instruction the CPU stores the memory address of the instruction following the function call. I googled, and it looks like call instructions are just passing control another part of the program or another application. If that's what ... question may sound weird or nit-picky, but I am new to CS and really want to get a solid understanding of CS
asked May 2 sumaiya simi 43.9k points
0 votes
1 answer 5 views
Problem: Getting error while opening the virtual machine vmx file is corrupt. What can I do now?
asked 5 days ago Irenka Kiri 17.9k points
0 votes
1 answer 12 views
Problem: The error pops up when I enable the host/guest share and map the drive. I have installed the VMware Tools, etc. I tried to delete and then add back the the sata drive to VM Player, but it did not help. I am using VM Player 12.5.5 on Win10 Pro Host, and Ubuntu 16.04 Desktop.
asked Apr 23 Yeamin 22k points
0 votes
1 answer 7 views
Failed to start the virtual machine. This says "vmware esx cannot find the virtual disk." I will be really helpful if someone helps.
asked Apr 11 muktaa 34.6k points
0 votes
1 answer 6 views
Problem: Please tell me how to solve this error? Amd-v is disabled in the bios virtualbox
asked Apr 2 Ifra 37.2k points
0 votes
1 answer 19 views
Problem: The vm session was closed before any attempt to power it on.
asked Feb 16 Ethan ross 2.7k points
0 votes
1 answer 3 views
Problem: Please give me an answer to this >How to enable virtualization in windows 7 without bios?
asked 1 day ago Rada Gracelynn 7.3k points
0 votes
2 answers 4 views
Problem: Virtualization enabled in bios but not working.
asked Apr 11 Dan phillip 4.8k points
0 votes
1 answer 9 views
Problem: What is the difference between Trap and Interrupt? If the terminology is different for different systems, then what do they mean on x86?
asked Apr 21 ummesalma 29.2k points