From: Himanshu Chauhan <
hcha...@xvisor-x86.org>
arch/x86/cpu/common/cpu_features.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/arch/x86/cpu/common/cpu_features.c b/arch/x86/cpu/common/cpu_features.c
index 18cb98f0..53cff3ba 100644
--- a/arch/x86/cpu/common/cpu_features.c
+++ b/arch/x86/cpu/common/cpu_features.c
@@ -121,11 +121,13 @@ static inline void gather_amd_features(struct cpuinfo_x86 *cpu_info)
cpu_info->hw_virt_available = ((c >> 2) & 1);
if (cpu_info->hw_virt_available) {
- /* Check if nested paging is also available. */
- cpuid(AMD_CPUID_EXTENDED_SVM_IDENTIFIER, &a, &b, &c, &d);
- cpu_info->hw_nested_paging = (d & 0x1UL);
- cpu_info->hw_nr_asids = b;
- cpu_info->decode_assist = ((d >> 7) & 0x1);
+ if (cpu_info->vendor == x86_VENDOR_AMD) {
+ /* Check if nested paging is also available. */
+ cpuid(AMD_CPUID_EXTENDED_SVM_IDENTIFIER, &a, &b, &c, &d);
+ cpu_info->hw_nested_paging = (d & 0x1UL);
+ cpu_info->hw_nr_asids = b;
+ cpu_info->decode_assist = ((d >> 7) & 0x1);
+ }
}
}
--
2.27.0