mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-28 20:16:09 +00:00
hv: cpu: use the physical address limit from CPUID when available
Per SDM Vol. 2: If CPUID.80000008H:EAX[7:0] is supported, the maximum physical address number supported should come from this field. This patch gets the maximum physical address number from CPUID leaf 0x80000008 and calculates the physical address mask when the leaf is available. Currently ACRN does not support platforms w/o this leaf and will panic on such platforms. Also call get_cpu_capabilities() earlier since the physical address mask is required for initializing paging. Signed-off-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -228,11 +228,13 @@ enum feature_word {
|
||||
FEAT_8000_0000_EAX, /* CPUID[8000_0000].EAX */
|
||||
FEAT_8000_0001_ECX, /* CPUID[8000_0001].ECX */
|
||||
FEAT_8000_0001_EDX, /* CPUID[8000_0001].EDX */
|
||||
FEAT_8000_0008_EAX, /* CPUID[8000_0008].EAX */
|
||||
FEATURE_WORDS,
|
||||
};
|
||||
|
||||
struct cpuinfo_x86 {
|
||||
uint8_t x86, x86_model;
|
||||
uint64_t physical_address_mask;
|
||||
uint32_t cpuid_leaves[FEATURE_WORDS];
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user