Skip to content

Commit b75a7df

Browse files
lifeixlijinxia
authored andcommitted
hv: vcpuid: disable some features in cpuid
We didn't emualte them well, so just disable them. Here are PMU CPUID.0A, Intel RDT CPUID.0F and CPUID.10, Intel SGX CPUID.12, Intel Processor Trace CPUID.14 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
1 parent 42aaf5d commit b75a7df

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

hypervisor/arch/x86/cpuid.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,6 @@ static void init_vcpuid_entry(__unused struct vm *vm,
112112
}
113113
break;
114114

115-
case 0x0aU:
116-
/* not support pmu */
117-
entry->eax = 0U;
118-
entry->ebx = 0U;
119-
entry->ecx = 0U;
120-
entry->edx = 0U;
121-
break;
122115
case 0x16U:
123116
if (boot_cpu_data.cpuid_level >= 0x16U) {
124117
/* call the cpuid when 0x16 is supported */
@@ -252,6 +245,17 @@ int set_vcpuid_entries(struct vm *vm)
252245
}
253246
break;
254247

248+
/* These features are disabled */
249+
/* PMU is not supported */
250+
case 0x0aU:
251+
/* Intel RDT */
252+
case 0x0fU:
253+
case 0x10U:
254+
/* Intel SGX */
255+
case 0x12U:
256+
/* Intel Processor Trace */
257+
case 0x14U:
258+
break;
255259
default:
256260
init_vcpuid_entry(vm, i, 0U, 0U, &entry);
257261
result = set_vcpuid_entry(vm, &entry);

0 commit comments

Comments
 (0)