summaryrefslogtreecommitdiff
path: root/src/cpu/kvm
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/kvm')
-rw-r--r--src/cpu/kvm/BaseKvmCPU.py10
-rw-r--r--src/cpu/kvm/X86KvmCPU.py19
2 files changed, 14 insertions, 15 deletions
diff --git a/src/cpu/kvm/BaseKvmCPU.py b/src/cpu/kvm/BaseKvmCPU.py
index cc0b28fe9..cb9bf481a 100644
--- a/src/cpu/kvm/BaseKvmCPU.py
+++ b/src/cpu/kvm/BaseKvmCPU.py
@@ -35,6 +35,7 @@
#
# Authors: Andreas Sandberg
+from m5.SimObject import *
from m5.params import *
from m5.proxy import *
@@ -46,11 +47,10 @@ class BaseKvmCPU(BaseCPU):
cxx_header = "cpu/kvm/base.hh"
abstract = True
- @classmethod
- def export_methods(cls, code):
- code('''
- void dump() const;
-''')
+ @cxxMethod
+ def dump(self):
+ """Dump the internal state of KVM to standard out."""
+ pass
@classmethod
def memory_mode(cls):
diff --git a/src/cpu/kvm/X86KvmCPU.py b/src/cpu/kvm/X86KvmCPU.py
index 18a4d3d6f..411db7dbe 100644
--- a/src/cpu/kvm/X86KvmCPU.py
+++ b/src/cpu/kvm/X86KvmCPU.py
@@ -27,21 +27,20 @@
# Authors: Andreas Sandberg
from m5.params import *
+from m5.SimObject import *
from BaseKvmCPU import BaseKvmCPU
class X86KvmCPU(BaseKvmCPU):
type = 'X86KvmCPU'
cxx_header = "cpu/kvm/x86_cpu.hh"
- @classmethod
- def export_methods(cls, code):
- code('''
- void dumpFpuRegs();
- void dumpIntRegs();
- void dumpSpecRegs();
- void dumpXCRs();
- void dumpXSave();
- void dumpVCpuEvents();
-''')
+ cxx_exports = [
+ PyBindMethod("dumpFpuRegs"),
+ PyBindMethod("dumpIntRegs"),
+ PyBindMethod("dumpSpecRegs"),
+ PyBindMethod("dumpXCRs"),
+ PyBindMethod("dumpXSave"),
+ PyBindMethod("dumpVCpuEvents"),
+ ]
useXSave = Param.Bool(True, "Use XSave to synchronize FPU/SIMD registers")