Skip to contentSkip to conversation

target/i386: Add PDCM feature bit when when CPU's pmu property is enabled

PATCH New Gal Hammer 1 participant 1 message Jul 28, 2020

lore
Share & tools
lore

Gal Hammer

author
#0 lore raw

PATCH 1/1 target/i386: Add PDCM feature bit when when CPU's pmu property is enabled

The PDCM feature bit is not enabled when adding the pmu property to a CPU without this capability (e.g. -cpu qemu64,pmu).

---
 target/i386/cpu.c | 2 ++
 1 file changed, 2 insertions(+)
target/i386/cpu.c +2 -0
index 588f32e136..6e1c8b6019 100644
@@ -5535,6 +5535,8 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
         }
         if (!cpu->enable_pmu) {
             *ecx &= ~CPUID_EXT_PDCM;
+        } else {
+            *ecx |= CPUID_EXT_PDCM;
         }
         break;
     case 2:
Signature · 1 line
2.26.2