HV: refine is_lapic_pt

- Do not refer vm_configs[] directly in vm module;

Tracked-On: #2291

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Victor Sun
2019-02-28 16:23:15 +08:00
committed by wenlingz
parent 1bb15c64a6
commit 0d90515bf6
2 changed files with 11 additions and 4 deletions

View File

@@ -244,10 +244,7 @@ uint16_t get_vm_pcpu_nums(const struct acrn_vm_config *vm_config);
void vrtc_init(struct acrn_vm *vm);
#endif
static inline bool is_lapic_pt(const struct acrn_vm *vm)
{
return ((vm_configs[vm->vm_id].guest_flags & LAPIC_PASSTHROUGH) != 0U);
}
bool is_lapic_pt(const struct acrn_vm *vm);
#endif /* !ASSEMBLER */