Jason Lowe-Power has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/50267 )

Change subject: cpu-kvm: Fix instruction counter for threading
......................................................................

cpu-kvm: Fix instruction counter for threading

Previously, the instruction counter was part of a "group" with the cycle
counter. This, in theory, would allow both counters to be read with a
single "read" call. However, as far as I can tell, this feature wasn't
used. Plus, when they were part of a group it was causing EINVAL errors
when detaching and reattching in a different thread.

This change moves the instruction counter to its own group. This
shouldn't cause any functional changes, but it allows multithreaded kvm
to work with the new threading implementation in the next change.

Change-Id: I5a9f55326a5548a0de1d02dded0d7f7817ad19fe
Signed-off-by: Jason Lowe-Power <[email protected]>
---
M src/cpu/kvm/base.cc
1 file changed, 1 insertion(+), 3 deletions(-)



diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc
index c7c72a8..9931f0c 100644
--- a/src/cpu/kvm/base.cc
+++ b/src/cpu/kvm/base.cc
@@ -1352,10 +1352,8 @@
     // sampling settings. See PerfKvmCounter::period() for details.
     if (hwInstructions.attached())
         hwInstructions.detach();
-    assert(hwCycles.attached());
     hwInstructions.attach(cfgInstructions,
-                          0, // TID (0 => currentThread)
-                          hwCycles);
+                          0); // TID (0 => currentThread)

     if (period)
         hwInstructions.enableSignals(KVM_KICK_SIGNAL);

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50267
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I5a9f55326a5548a0de1d02dded0d7f7817ad19fe
Gerrit-Change-Number: 50267
Gerrit-PatchSet: 1
Gerrit-Owner: Jason Lowe-Power <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to