Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Hello, this is my first post. I've done tests on several virtual machines as Bochs, VMWare, VirtualBox and on real machines and PAE paging works correctly. I use a detection method with cpuid to see if PAE is available or not, but... Virtual PC detects PAE is available and when enable PAE paging triple failure happens.
PAE requires not only a compatible CPU but also a compatible chipset. I suspect that the Intel 440BX chipset emulated by Virtual PC does not support PAE.
Virtual PC is really only useful for Microsoft consumer OSs. Even then there are better alternatives.
alexfru wrote:What's the version of Virtual PC? What about regular 4KB pages?
Is the last version: Virtual PC SP1 (6.0.192.0)
I don't try with 4KB pages. I will try.
iansjack wrote:PAE requires not only a compatible CPU but also a compatible chipset. I suspect that the Intel 440BX chipset emulated by Virtual PC does not support PAE.
Virtual PC is really only useful for Microsoft consumer OSs. Even then there are better alternatives.
I don't think virtual pc indicating that supports PAE when not supported.
I think he actually meant that having a 32-bit chipset (rather than a 36-bit one) will imply that PAE offers no advantages since the actual memory range doesn't get extended.
Of course this is insufficient excuse as PAE does give you access to the NX bit - which is an advantage, and it's the developers responsibility not to make accesses to undefined memory.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
If the processor says it supports PAE (by virtue of CPUID), then it is also allowed to use that mode of execution.
Although I wouldn't be surprised if some VMs out there were incapable of performing PAE shadow mapping while still letting the guest see the capability bits. After all, pretty much every VM out there is lying about supporting VME - with Bochs being the only one to actually support it.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Combuster wrote:If the processor says it supports PAE (by virtue of CPUID), then it is also allowed to use that mode of execution.
Although I wouldn't be surprised if some VMs out there were incapable of performing PAE shadow mapping while still letting the guest see the capability bits. After all, pretty much every VM out there is lying about supporting VME - with Bochs being the only one to actually support it.
VMWare, Bochs and VirtualBox supports PAE "correctly" (not triple fault). Only Virtual PC is the problem. Apparently virtual pc does not support NX because the EDX register of CPUID (0x80000001, 20) is zero.
I will try to enable PAE with 4KB pages and if not work I don't know what do.
Perform VM identification and sanitize CPUID flags based on that. Basically if SGDT/SIDT doesn't do the opposite of LGDT/LIDT, you can be absolutely sure it's not actual hardware you're talking to.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Combuster wrote:Perform VM identification and sanitize CPUID flags based on that. Basically if SGDT/SIDT doesn't do the opposite of LGDT/LIDT, you can be absolutely sure it's not actual hardware you're talking to.
There are many ways to check for virtual environment and bugs in it, and this one is a necessary but not sufficient one.
Combuster wrote:Perform VM identification and sanitize CPUID flags based on that. Basically if SGDT/SIDT doesn't do the opposite of LGDT/LIDT, you can be absolutely sure it's not actual hardware you're talking to.
I'm sorry, I can not understand. You tell me that sidt must be opposed lidt? and what also sgdt and lgdt? sgdt save and lgdt load .. Maybe I misunderstood.
Have you tried running SGDT and SIDT (after doing LGDT and LIDT) in VirtualPC and printed the result? Did that surprise you?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]