HV_X64_SEGMENT_REGISTER structure
The HV_X64_SEGMENT_REGISTER structure identifies how a segment register is encoded.
Syntax
typedef struct _HV_X64_SEGMENT_REGISTER { UINT64 Base; UINT32 Limit; UINT16 Selector; union { struct { UINT16 SegmentType :4; UINT16 NonSystemSegment :1; UINT16 DescriptorPrivilegeLevel :2; UINT16 Present :1; UINT16 Reserved :4; UINT16 Available :1; UINT16 Long :1; UINT16 Default :1; UINT16 Granularity :1; }; UINT16 Attributes; }; } HV_X64_SEGMENT_REGISTER, *PHV_X64_SEGMENT_REGISTER;
Members
- Base
-
A UINT64 value that specifies the segment base.
- Limit
-
A UINT32 value that specifies the segment limit.
- Selector
-
A UINT16 value that specifies the segment selector.
- SegmentType
-
A UINT16 value that specifies the segment type. The segment-type attribute is set in the first through fourth bits of the 16-bit Attributes member (0x000F).
- NonSystemSegment
-
A UINT16 value that specifies whether the segment is a non-system segment. Setting this member is equivalent to setting the fifth bit of the 16-bit Attributes member (0x0010).
- DescriptorPrivilegeLevel
-
A UINT16 value that specifies the descriptor-privilege level of the segment. The descriptor-privilege level is set in the sixth through seventh bits of the 16-bit Attributes member (0x0060).
- Present
-
A UINT16 value that specifies whether the segment performs like a null segment. Setting this member is equivalent to setting the eighth bit of the 16-bit Attributes member (0x0080).
- Reserved
-
This member is reserved and should be set to zero. Setting this member to zero is equivalent to setting the ninth through twelfth bits of the 16-bit Attributes member (0x0F00) to zeros.
- Available
-
A UINT16 value that specifies whether the segment is available. Setting this member is equivalent to setting the thirteenth bit of the 16-bit Attributes member (0x1000).
- Long
-
A UINT16 value that specifies whether the segment is long. Setting this member is equivalent to setting the fourteenth bit of the 16-bit Attributes member (0x2000).
- Default
-
A UINT16 value that specifies whether the segment is the default. Setting this member is equivalent to setting the fifteenth bit of the 16-bit Attributes member (0x4000).
- Granularity
-
A UINT16 value that specifies whether the segment is set for granularity. Setting this member is equivalent to setting the sixteenth bit of the 16-bit Attributes member (0x8000).
- Attributes
-
A member in the union in HV_X64_SEGMENT_REGISTER that can hold one 16-bit value that identifies the segment attributes.
Remarks
The limit is encoded as a 32-bit value. For X64 long-mode segments, the limit is ignored. For legacy x86 segments, the limit must be expressible within the bounds of the x64 processor architecture. For example, if the Granularity bit is set within the attributes of a code or data segment, the low-order 12 bits of the limit must be 1s.
The Present bit controls whether the segment performs like a null segment (that is, whether a memory access performed through that segment generates a #GP fault).
The HV_X64_SEGMENT_REGISTER structure is used in the HV_REGISTER_VALUE union and HV_X64_INTERCEPT_MESSAGE_HEADER structure.
The model-specific registers (MSR) IA32_FS_BASE and IA32_GS_BASE are not defined in a list of MSRs because they are aliases to the Base member. You should use the HvX64RegisterFs and HvX64RegisterGs registers (from the HV_REGISTER_NAME enumeration) and HV_X64_SEGMENT_REGISTER instead.
Requirements
|
Header |
|
|---|
See also
Send comments about this topic to Microsoft
Build date: 11/16/2013
