mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-18 11:47:30 +00:00
hv: Make is_x2apic_enabled API visible across source code
Remove static and inline attributes to the API is_x2apic_enabled and declare a prototype in vlapic.h. Also fix the check performed on guest APICBASE_MSR value to query vLAPIC mode. Tracked-On: #3253 Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
1026f1754c
commit
7cb71a317e
@ -106,8 +106,6 @@ static void vlapic_set_error(struct acrn_vlapic *vlapic, uint32_t mask);
|
||||
|
||||
static void vlapic_timer_expired(void *data);
|
||||
|
||||
static inline bool is_x2apic_enabled(const struct acrn_vlapic *vlapic);
|
||||
|
||||
static inline bool vlapic_enabled(const struct acrn_vlapic *vlapic)
|
||||
{
|
||||
const struct lapic_regs *lapic = &(vlapic->apic_page);
|
||||
@ -1989,13 +1987,12 @@ static void vlapic_timer_expired(void *data)
|
||||
/*
|
||||
* @pre vm != NULL
|
||||
*/
|
||||
static inline bool is_x2apic_enabled(const struct acrn_vlapic *vlapic)
|
||||
bool is_x2apic_enabled(const struct acrn_vlapic *vlapic)
|
||||
{
|
||||
bool ret;
|
||||
if ((vlapic_get_apicbase(vlapic) & APICBASE_X2APIC) == 0UL) {
|
||||
ret = false;
|
||||
} else {
|
||||
ret = true;
|
||||
bool ret = false;
|
||||
|
||||
if ((vlapic_get_apicbase(vlapic) & APICBASE_LAPIC_MODE) == (APICBASE_X2APIC | APICBASE_XAPIC)) {
|
||||
ret = true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -211,6 +211,7 @@ void vlapic_calc_dest(struct acrn_vm *vm, uint64_t *dmask, bool is_broadcast,
|
||||
void vlapic_calc_dest_lapic_pt(struct acrn_vm *vm, uint64_t *dmask, bool is_broadcast,
|
||||
uint32_t dest, bool phys);
|
||||
bool is_lapic_pt_enabled(struct acrn_vm *vm);
|
||||
bool is_x2apic_enabled(const struct acrn_vlapic *vlapic);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user