qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] target/i386: Add PDCM feature bit when when CPU's pmu property is enabled
@ 2020-07-28  6:42 Gal Hammer
  0 siblings, 0 replies; only message in thread
From: Gal Hammer @ 2020-07-28  6:42 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gal Hammer, Eduardo Habkost

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

Signed-off-by: Gal Hammer <ghammer@redhat.com>
---
 target/i386/cpu.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index 588f32e136..6e1c8b6019 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -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:
-- 
2.26.2



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-07-28  6:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-28  6:42 [PATCH] target/i386: Add PDCM feature bit when when CPU's pmu property is enabled Gal Hammer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).