LDT access in 64bit Vista

Tim Roberts wrote:

Paul Gardiner wrote:

> sh_alex wrote:
>
>> Oh, here it is:
>> http://kb.vmware.com/vmtnkb/search.do?cmd=displayKC&docType=kc&externalId=1901&sliceId=SAL_Public
>
>
> That seems to suggest that some 64bit CPUs don’t support selectors at
> all. Can that be right? Would certainly prevent what I’m wanting to do.

What it says is that selectors are not supported “in long mode”. None
of the 64-bit CPUs use selectors at all in 64-bit mode. CS, DS, ES, FS,
GS, and SS are ignored.

However, all of them (even Itanium) support segmentation in 32-bit mode,
exactly like a Pentium. If your virtual DOS product is a 32-bit app,
then it will have a GDT available.

It is just an ordinary 32bit app. What you say must be correct. Under
a 64bit OS, my app wont be truly running in 32bit prottected mode.
Instead it will be a 32bit compatibility mode task running on a CPU
that is in 64bit mode. I was thinking that might imply that selectors
were unused, but the architecture reference clearly says:

“Compatibility mode — Software that needs to run in compatibility mode
should observe the same memory model as those targeted to run in 32-bit
protected mode. The effect of segmentation is the same as it is in
32-bit protected mode semantics.”

That clearly implies selectors are not ignored. So it really does
just come down to whether I can access the LDT, which I guess is
still uncertain.