mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 08:50:27 +00:00
hv: Add is_xapic_enabled API to check vLAPIC moe
is_xapic_enabled API returns true if vLAPIC is in xAPIC mode. In all other cases, it returns false. 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:
committed by
wenlingz
parent
7cb71a317e
commit
a3fdc7a496
@@ -1998,6 +1998,16 @@ bool is_x2apic_enabled(const struct acrn_vlapic *vlapic)
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool is_xapic_enabled(const struct acrn_vlapic *vlapic)
|
||||
{
|
||||
bool ret = false;
|
||||
if ((vlapic_get_apicbase(vlapic) & APICBASE_LAPIC_MODE) == APICBASE_XAPIC) {
|
||||
ret = true;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline uint32_t x2apic_msr_to_regoff(uint32_t msr)
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user