mirror of https://github.com/xqemu/xqemu.git
kvm_stat: Add aarch64 support
This patch enables aarch64 support for kvm_stat. The platform detection is based on OS uname. Signed-off-by: Wei Huang <wei@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
b30934cb52
commit
edcbc401f4
|
@ -204,10 +204,18 @@ def ppc_init():
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
def aarch64_init():
|
||||||
|
globals().update({
|
||||||
|
'sc_perf_evt_open' : 241
|
||||||
|
})
|
||||||
|
|
||||||
def detect_platform():
|
def detect_platform():
|
||||||
if os.uname()[4].startswith('ppc'):
|
if os.uname()[4].startswith('ppc'):
|
||||||
ppc_init()
|
ppc_init()
|
||||||
return
|
return
|
||||||
|
elif os.uname()[4].startswith('aarch64'):
|
||||||
|
aarch64_init()
|
||||||
|
return
|
||||||
|
|
||||||
for line in file('/proc/cpuinfo').readlines():
|
for line in file('/proc/cpuinfo').readlines():
|
||||||
if line.startswith('flags'):
|
if line.startswith('flags'):
|
||||||
|
|
Loading…
Reference in New Issue