From: Daniel Henrique Barboza <danielhb413@gmail.com>
To: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Cc: Juan Quintela <quintela@redhat.com>,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
mopsfelder@gmail.com, farosas@suse.de
Subject: Re: [PATCH 2/2] tests/migration: add support for ppc64le for guestperf.py
Date: Fri, 23 Dec 2022 13:19:43 -0300 [thread overview]
Message-ID: <d6bea113-6753-7b52-fd84-05edb8a134fd@gmail.com> (raw)
In-Reply-To: <20220809002451.91541-3-muriloo@linux.ibm.com>
On 8/8/22 21:24, Murilo Opsfelder Araujo wrote:
> 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>
> tests/migration/guestperf/engine.py | 28 +++++++++++++++++++++++++---
> 1 file changed, 25 insertions(+), 3 deletions(-)
>
> diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py
> index 87a6ab2009..88da516899 100644
> --- a/tests/migration/guestperf/engine.py
> +++ b/tests/migration/guestperf/engine.py
> @@ -282,6 +282,26 @@ def _migrate(self, hardware, scenario, src, dst, connect_uri):
> resp = src.command("stop")
> 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):
> args = [
> "noapic",
> @@ -290,8 +310,10 @@ def _get_common_args(self, hardware, tunnelled=False):
> "noreplace-smp",
> "cgroup_disable=memory",
> "pci=noearly",
> - "console=ttyS0",
> ]
> +
> + args.append(self._get_guest_console_args())
> +
> if self._debug:
> args.append("debug")
> else:
> @@ -309,12 +331,12 @@ def _get_common_args(self, hardware, tunnelled=False):
> "-kernel", self._kernel,
> "-initrd", self._initrd,
> "-append", cmdline,
> - "-chardev", "stdio,id=cdev0",
> - "-device", "isa-serial,chardev=cdev0",
> "-m", str((hardware._mem * 1024) + 512),
> "-smp", str(hardware._cpus),
> ]
>
> + argv.extend(self._get_qemu_serial_args())
> +
> if self._debug:
> argv.extend(["-device", "sga"])
>
next prev parent reply other threads:[~2022-12-23 16:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-09 0:24 [PATCH 0/2] tests/migration: add support for ppc64le in guestperf.py Murilo Opsfelder Araujo
2022-08-09 0:24 ` [PATCH 1/2] tests/migration: add sysprof-capture-4 as dependency for stress binary Murilo Opsfelder Araujo
2022-12-23 16:19 ` Daniel Henrique Barboza
2023-02-02 16:54 ` Juan Quintela
2022-08-09 0:24 ` [PATCH 2/2] tests/migration: add support for ppc64le for guestperf.py Murilo Opsfelder Araujo
2022-12-23 16:19 ` Daniel Henrique Barboza [this message]
2023-02-02 16:57 ` Juan Quintela
2023-01-21 11:39 ` [PATCH 0/2] tests/migration: add support for ppc64le in guestperf.py Daniel Henrique Barboza
2023-01-21 11:57 ` BALATON Zoltan
2023-01-21 12:20 ` Daniel Henrique Barboza
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d6bea113-6753-7b52-fd84-05edb8a134fd@gmail.com \
--to=danielhb413@gmail.com \
--cc=dgilbert@redhat.com \
--cc=farosas@suse.de \
--cc=mopsfelder@gmail.com \
--cc=muriloo@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).