tests/migration: add support for ppc64le for guestperf.py
Add support for ppc64le for guestperf.py. On ppc, console is usually hvc0 and serial device for pseries machine is spapr-vty. Signed-off-by: Murilo Opsfelder Araujo <muriloo@linux.ibm.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20220809002451.91541-3-muriloo@linux.ibm.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
7661a7ab53
commit
8763196c2c
@ -281,6 +281,26 @@ class Engine(object):
|
|||||||
resp = src.command("stop")
|
resp = src.command("stop")
|
||||||
paused = True
|
paused = True
|
||||||
|
|
||||||
|
def _is_ppc64le(self):
|
||||||
|
_, _, _, _, machine = os.uname()
|
||||||
|
if machine == "ppc64le":
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
def _get_guest_console_args(self):
|
||||||
|
if self._is_ppc64le():
|
||||||
|
return "console=hvc0"
|
||||||
|
else:
|
||||||
|
return "console=ttyS0"
|
||||||
|
|
||||||
|
def _get_qemu_serial_args(self):
|
||||||
|
if self._is_ppc64le():
|
||||||
|
return ["-chardev", "stdio,id=cdev0",
|
||||||
|
"-device", "spapr-vty,chardev=cdev0"]
|
||||||
|
else:
|
||||||
|
return ["-chardev", "stdio,id=cdev0",
|
||||||
|
"-device", "isa-serial,chardev=cdev0"]
|
||||||
|
|
||||||
def _get_common_args(self, hardware, tunnelled=False):
|
def _get_common_args(self, hardware, tunnelled=False):
|
||||||
args = [
|
args = [
|
||||||
"noapic",
|
"noapic",
|
||||||
@ -289,8 +309,10 @@ class Engine(object):
|
|||||||
"noreplace-smp",
|
"noreplace-smp",
|
||||||
"cgroup_disable=memory",
|
"cgroup_disable=memory",
|
||||||
"pci=noearly",
|
"pci=noearly",
|
||||||
"console=ttyS0",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
args.append(self._get_guest_console_args())
|
||||||
|
|
||||||
if self._debug:
|
if self._debug:
|
||||||
args.append("debug")
|
args.append("debug")
|
||||||
else:
|
else:
|
||||||
@ -308,12 +330,12 @@ class Engine(object):
|
|||||||
"-kernel", self._kernel,
|
"-kernel", self._kernel,
|
||||||
"-initrd", self._initrd,
|
"-initrd", self._initrd,
|
||||||
"-append", cmdline,
|
"-append", cmdline,
|
||||||
"-chardev", "stdio,id=cdev0",
|
|
||||||
"-device", "isa-serial,chardev=cdev0",
|
|
||||||
"-m", str((hardware._mem * 1024) + 512),
|
"-m", str((hardware._mem * 1024) + 512),
|
||||||
"-smp", str(hardware._cpus),
|
"-smp", str(hardware._cpus),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
argv.extend(self._get_qemu_serial_args())
|
||||||
|
|
||||||
if self._debug:
|
if self._debug:
|
||||||
argv.extend(["-device", "sga"])
|
argv.extend(["-device", "sga"])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user