summaryrefslogtreecommitdiff
path: root/src/cpu/kvm/base.hh
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2017-07-27 09:24:22 +0000
committerAndreas Sandberg <andreas.sandberg@arm.com>2017-08-01 16:20:24 +0000
commit1935cec529ac2ae7d9b31f1e55f333a0769184b5 (patch)
tree2f2c1db4b255a802cf519ba11b7492f9a280c393 /src/cpu/kvm/base.hh
parent9d6d3e5f7dd50e882a503ee4bb2ac7d9b8d21e30 (diff)
downloadgem5-1935cec529ac2ae7d9b31f1e55f333a0769184b5.tar.xz
kvm: Add a helper method to access device event queues
The VM's event queue is normally used for devices in multi-core KVM mode. Add a helper method, BaseKvmCPU::deviceEventQueue(), to access this queue. This makes the intention of code migrating to device event queues clearer. Change-Id: Ifb10f553a6d7445c8d562f658cf9d0b1f4c577ff Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-on: https://gem5-review.googlesource.com/4287 Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/cpu/kvm/base.hh')
-rw-r--r--src/cpu/kvm/base.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cpu/kvm/base.hh b/src/cpu/kvm/base.hh
index 29872e744..a22637f98 100644
--- a/src/cpu/kvm/base.hh
+++ b/src/cpu/kvm/base.hh
@@ -419,6 +419,16 @@ class BaseKvmCPU : public BaseCPU
void syncThreadContext();
/**
+ * Get a pointer to the event queue owning devices.
+ *
+ * Devices always live in a separate device event queue when
+ * running in multi-core mode. We need to temporarily migrate to
+ * this queue when accessing devices. By convention, devices and
+ * the VM use the same event queue.
+ */
+ EventQueue *deviceEventQueue() { return vm.eventQueue(); }
+
+ /**
* Update the KVM if the thread context is dirty.
*/
void syncKvmState();