All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Wei Huang <wei@redhat.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	Laurent Vivier <lvivier@redhat.com>,
	Andrew Jones <drjones@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH V8 4/4] tests: Add migration test for aarch64
Date: Sat, 1 Sep 2018 11:07:26 +0100	[thread overview]
Message-ID: <CAFEAcA_ycC8=YnUBF+zUHcTnsCHTCzXG5M77mu2yAgunuEpapg@mail.gmail.com> (raw)
In-Reply-To: <1535778675-32170-5-git-send-email-wei@redhat.com>

On 1 September 2018 at 06:11, Wei Huang <wei@redhat.com> wrote:
> This patch adds migration test support for aarch64. The test code, which
> implements the same functionality as x86, is booted as a kernel in qemu.
> Here are the design choices we make for aarch64:
>
>  * We choose this -kernel approach because aarch64 QEMU doesn't provide a
>    built-in fw like x86 does. So instead of relying on a boot loader, we
>    use -kernel approach for aarch64.
>  * The serial output is sent to PL011 directly.
>  * The physical memory base for mach-virt machine is 0x40000000. We change
>    the start_address and end_address for aarch64.
>
> In addition to providing the binary, this patch also includes the source
> code and the build script in tests/migration/aarch64. So users can change
> the source and/or re-compile the binary as they wish.
> +    } else if (strcmp(arch, "aarch64") == 0) {
> +        struct utsname utsname;
> +

The comment says:

> +        /* kvm and tcg need different cpu and gic-version configs */

...but the code below it doesn't change the cpu or gic-version
based on 'accel'.

> +        if (access("/dev/kvm", F_OK) == 0 && uname(&utsname) == 0 &&
> +            strcmp(utsname.machine, "aarch64") == 0) {
> +            accel = "kvm";
> +        } else {
> +            accel = "tcg";
> +        }

Maybe we could just use -accel=kvm,tcg rather than guessing
whether kvm is going to work ? If this is how the x86 code
works then probably best to do the same as that, though.

> +
> +        init_bootfile(bootpath, aarch64_kernel);
> +        cmd_src = g_strdup_printf("-machine virt,accel=%s,gic-version=max "
> +                                  "-name vmsource,debug-threads=on -cpu max "
> +                                  "-m 150M -serial file:%s/src_serial "
> +                                  "-kernel %s ",
> +                                  accel, tmpfs, bootpath);
> +        cmd_dst = g_strdup_printf("-machine virt,accel=%s,gic-version=max "
> +                                  "-name vmdest,debug-threads=on -cpu max "
> +                                  "-m 150M -serial file:%s/dest_serial "
> +                                  "-kernel %s "
> +                                  "-incoming %s ",
> +                                  accel, tmpfs, bootpath, uri);
> +
> +        start_address = ARM_TEST_MEM_START;
> +        end_address = ARM_TEST_MEM_END;
> +
> +        g_assert(sizeof(aarch64_kernel) <= ARM_TEST_MAX_KERNEL_SIZE);

thanks
-- PMM

  reply	other threads:[~2018-09-01 10:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-01  5:11 [Qemu-devel] [PATCH V8 0/4] tests: Add migration test for aarch64 Wei Huang
2018-09-01  5:11 ` [Qemu-devel] [PATCH V8 1/4] tests/migration: Convert x86 boot block compilation script into Makefile Wei Huang
2018-09-03  9:32   ` Juan Quintela
2018-09-03 11:08   ` Andrew Jones
2018-09-03 11:45     ` Juan Quintela
2018-09-03 12:14       ` Andrew Jones
2018-09-04 15:51     ` Wei Huang
2018-09-01  5:11 ` [Qemu-devel] [PATCH V8 2/4] tests/migration: Support cross compilation in generating boot header file Wei Huang
2018-09-03  9:43   ` Juan Quintela
2018-09-03 11:26   ` Andrew Jones
2018-09-04 17:04     ` Wei Huang
2018-09-04 18:05       ` Andrew Jones
2018-09-01  5:11 ` [Qemu-devel] [PATCH V8 3/4] tests/migration: Add migration-test " Wei Huang
2018-09-03  9:35   ` Juan Quintela
2018-09-03 11:34   ` Andrew Jones
2018-09-01  5:11 ` [Qemu-devel] [PATCH V8 4/4] tests: Add migration test for aarch64 Wei Huang
2018-09-01 10:07   ` Peter Maydell [this message]
2018-09-02  5:00     ` Wei Huang
2018-09-03 11:46     ` Andrew Jones
2018-09-03  9:42   ` Juan Quintela
2018-09-03 11:53   ` Andrew Jones
2018-09-04 17:07     ` Wei Huang
2018-09-04 18:02       ` Andrew Jones

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='CAFEAcA_ycC8=YnUBF+zUHcTnsCHTCzXG5M77mu2yAgunuEpapg@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=dgilbert@redhat.com \
    --cc=drjones@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=wei@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.