mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
HV: Add one correct Descriptor_table struct to configure VMCS
Now one uint64_t type is used to obtain the corresponding descriptor_table for GDT/IDT. This will cause the stack protect corruption under -O2. So the descriptor_table struct is added to configure the GDT/IDT of VMCS. V1->V2: Move the descriptor_table into vmx.h header file And its type is renamed from dt_addr_t to descriptor_table. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Zheng Gen <gen.zheng@intel.com> Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -472,6 +472,12 @@ static inline uint8_t get_vcpu_mode(struct vcpu *vcpu)
|
||||
{
|
||||
return vcpu->arch_vcpu.cpu_mode;
|
||||
}
|
||||
|
||||
typedef struct _descriptor_table_{
|
||||
uint16_t limit;
|
||||
uint64_t base;
|
||||
}__attribute__((packed)) descriptor_table;
|
||||
|
||||
#endif /* ASSEMBLER */
|
||||
|
||||
#endif /* VMX_H_ */
|
||||
|
Reference in New Issue
Block a user