mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-05 02:40:37 +00:00
hv: add missing support to intercept x2APIC MSRs
Accessing x2APIC MSRs in xAPIC mode should result in GP exception according to SDM section 10.12.2. Adding support to ACRN to inject GP into guests for the same reason. Tracked-On: #1626 Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com> Reviewed-by: Xu Anthony <anthony.xu@intel.com>
This commit is contained in:
committed by
lijinxia
parent
94dadc1d14
commit
64f61961bf
@@ -529,6 +529,18 @@ static inline bool pat_mem_type_invalid(uint64_t x)
|
||||
(x != PAT_MEM_TYPE_WT) && (x != PAT_MEM_TYPE_WP) &&
|
||||
(x != PAT_MEM_TYPE_WB) && (x != PAT_MEM_TYPE_UCM));
|
||||
}
|
||||
|
||||
static inline bool is_x2apic_msr(uint32_t msr)
|
||||
{
|
||||
bool ret = false;
|
||||
/*
|
||||
* if msr is in the range of x2APIC MSRs
|
||||
*/
|
||||
if ((msr >= MSR_IA32_EXT_XAPICID) && (msr <= MSR_IA32_EXT_APIC_SELF_IPI)) {
|
||||
ret = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#endif /* ASSEMBLER */
|
||||
|
||||
/* 5 high-order bits in every field are reserved */
|
||||
|
Reference in New Issue
Block a user