mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-08 11:39:39 +00:00
HV:initialize variables before reference in vmx.c
- to avoid complains from code static scan tool Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
parent
ccc1c25e88
commit
03ae242eb7
@ -372,7 +372,7 @@ static void init_guest_state(struct vcpu *vcpu)
|
|||||||
/* Limit */
|
/* Limit */
|
||||||
limit = 0xFFFF;
|
limit = 0xFFFF;
|
||||||
} else if (get_vcpu_mode(vcpu) == PAGE_PROTECTED_MODE) {
|
} else if (get_vcpu_mode(vcpu) == PAGE_PROTECTED_MODE) {
|
||||||
descriptor_table gdtb;
|
descriptor_table gdtb = {0, 0};
|
||||||
|
|
||||||
/* Base *//* TODO: Should guest GDTB point to host GDTB ? */
|
/* Base *//* TODO: Should guest GDTB point to host GDTB ? */
|
||||||
/* Obtain the current global descriptor table base */
|
/* Obtain the current global descriptor table base */
|
||||||
@ -407,7 +407,7 @@ static void init_guest_state(struct vcpu *vcpu)
|
|||||||
/* Limit */
|
/* Limit */
|
||||||
limit = 0xFFFF;
|
limit = 0xFFFF;
|
||||||
} else if (get_vcpu_mode(vcpu) == PAGE_PROTECTED_MODE) {
|
} else if (get_vcpu_mode(vcpu) == PAGE_PROTECTED_MODE) {
|
||||||
descriptor_table idtb ;
|
descriptor_table idtb = {0, 0};
|
||||||
|
|
||||||
/* TODO: Should guest IDTR point to host IDTR ? */
|
/* TODO: Should guest IDTR point to host IDTR ? */
|
||||||
asm volatile ("sidt %0"::"m" (idtb));
|
asm volatile ("sidt %0"::"m" (idtb));
|
||||||
@ -660,8 +660,8 @@ static void init_host_state(__unused struct vcpu *vcpu)
|
|||||||
uint64_t trbase_lo;
|
uint64_t trbase_lo;
|
||||||
uint64_t trbase_hi;
|
uint64_t trbase_hi;
|
||||||
uint64_t realtrbase;
|
uint64_t realtrbase;
|
||||||
descriptor_table gdtb;
|
descriptor_table gdtb = {0, 0};
|
||||||
descriptor_table idtb;
|
descriptor_table idtb = {0, 0};
|
||||||
uint16_t tr_sel;
|
uint16_t tr_sel;
|
||||||
|
|
||||||
pr_dbg("*********************");
|
pr_dbg("*********************");
|
||||||
|
Loading…
Reference in New Issue
Block a user