mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-02 09:25:17 +00:00
hv: msr: use UL since ia32_misc_enable is 64bit
Merge two parts of different definitions for MSR_IA32_MISC_ENABLE fields. - use the prefix "MSR_IA32_" to align with others - Change MSR_IA32_MISC_ENABLE_XD to MSR_IA32_MISC_ENABLE_XD_DISABLE to align the meaning of the filed since it is "XD bit disable" Use UL instead of U as the filed bit mask because MSR_IA32_MISC_ENABLE is 64-bit. Tracked-On: #2834 Signed-off-by: Binbin Wu <binbin.wu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -77,9 +77,9 @@ bool has_monitor_cap(void)
|
||||
static inline bool is_fast_string_erms_supported_and_enabled(void)
|
||||
{
|
||||
bool ret = false;
|
||||
uint32_t misc_enable = (uint32_t)msr_read(MSR_IA32_MISC_ENABLE);
|
||||
uint64_t misc_enable = msr_read(MSR_IA32_MISC_ENABLE);
|
||||
|
||||
if ((misc_enable & MSR_IA32_MISC_ENABLE_FAST_STRING) == 0U) {
|
||||
if ((misc_enable & MSR_IA32_MISC_ENABLE_FAST_STRING) == 0UL) {
|
||||
pr_fatal("%s, fast string is not enabled\n", __func__);
|
||||
} else {
|
||||
if (!pcpu_has_cap(X86_FEATURE_ERMS)) {
|
||||
|
Reference in New Issue
Block a user