aboutsummaryrefslogtreecommitdiff
path: root/tests/vm
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-08-20 16:55:54 +0100
committerFam Zheng <famz@redhat.com>2018-09-26 10:46:28 +0800
commitb33bd859d12e70757bb2632573c3a1662d967dbf (patch)
tree6bfc3b67e61ba6949bdbfef8e0bb50a99f44032a /tests/vm
parentcfeb35d6774b2e936046aa9923217818bd160299 (diff)
downloadqemu-b33bd859d12e70757bb2632573c3a1662d967dbf.zip
qemu-b33bd859d12e70757bb2632573c3a1662d967dbf.tar.gz
qemu-b33bd859d12e70757bb2632573c3a1662d967dbf.tar.bz2
tests/vm: Use -cpu max rather than -cpu host
-cpu max works with any accelerator, so we don't need to use it only conditionally if not using KVM. Just use it all the time. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20180820155554.23476-1-peter.maydell@linaro.org> Signed-off-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'tests/vm')
-rwxr-xr-xtests/vm/basevm.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 7e58d9e..cafbc6b 100755
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -65,6 +65,7 @@ class BaseVM(object):
self._stdout = self._devnull
self._args = [ \
"-nodefaults", "-m", "4G",
+ "-cpu", "max",
"-netdev", "user,id=vnet,hostfwd=:127.0.0.1:0-:22",
"-device", "virtio-net-pci,netdev=vnet",
"-vnc", "127.0.0.1:0,to=20",
@@ -72,11 +73,9 @@ class BaseVM(object):
if vcpus:
self._args += ["-smp", str(vcpus)]
if os.access("/dev/kvm", os.R_OK | os.W_OK):
- self._args += ["-cpu", "host"]
self._args += ["-enable-kvm"]
else:
logging.info("KVM not available, not using -enable-kvm")
- self._args += ["-cpu", "max"]
self._data_args = []
def _download_with_cache(self, url, sha256sum=None):