Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@amd.com>
To: "Thomas Weißschuh" <linux@weissschuh.net>,
	"Brendan Higgins" <brendan.higgins@linux.dev>,
	"David Gow" <david@davidgow.net>,
	"Rae Moar" <raemoar63@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	kunit-dev@googlegroups.com
Subject: Re: [PATCH 4/4] kunit: qemu_configs: Add microblaze configuration
Date: Mon, 31 Aug 2026 12:48:08 +0200	[thread overview]
Message-ID: <5cd8df03-ad51-460c-9b20-3bf288831b5a@amd.com> (raw)
In-Reply-To: <20260804-kunit-microblaze-v1-4-6dcdfe12eb40@weissschuh.net>



On 8/4/26 07:32, Thomas Weißschuh wrote:
> Add a basic configuration to run kunit tests on microblaze.
> 
> Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
> ---
>   tools/testing/kunit/qemu_configs/microblaze.py | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
> 
> diff --git a/tools/testing/kunit/qemu_configs/microblaze.py b/tools/testing/kunit/qemu_configs/microblaze.py
> new file mode 100644
> index 000000000000..ff012095e77d
> --- /dev/null
> +++ b/tools/testing/kunit/qemu_configs/microblaze.py
> @@ -0,0 +1,17 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +from ..qemu_config import QemuArchParams
> +
> +QEMU_ARCH = QemuArchParams(linux_arch='microblaze',
> +						   kconfig='''
> +CONFIG_CPU_BIG_ENDIAN=y

Big endian is quite old and I am even surprised that it is working.


> +CONFIG_SERIAL_UARTLITE=y
> +CONFIG_SERIAL_UARTLITE_CONSOLE=y

I think it is just pure luck that this worked for you because you didn't rewrite 
the most important parts of config.

You should define at least these values

CONFIG_KERNEL_BASE_ADDR=0x90000000
CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
CONFIG_XILINX_MICROBLAZE0_USE_DIV=0
CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=1
CONFIG_XILINX_MICROBLAZE0_USE_FPU=0

to be aligned with s3adsp1800

It will solve these two issues too.
ERROR: Microblaze BARREL, MSR, PCMP or DIV-different for kernel and DTS
ERROR: Microblaze HW_MUL-different for kernel and DTS

> +CONFIG_MB_POWER_OFF_THROUGH_UNALIGNED_PC=y
> +''',
> +						   qemu_arch='microblaze',
> +						   kernel_path='arch/microblaze/boot/linux.bin',
> +						   kernel_command_line='kunit_shutdown=poweroff',
> +						   extra_qemu_params=[
> +							'-M', 'petalogix-s3adsp1800',
> +						   ],
> +)
> 

That's bring us to different topic. When qemu runs I see these 2 issues

qemu-system-microblaze: -accel kvm: invalid accelerator kvm
qemu-system-microblaze: -accel hvf: invalid accelerator hvf


I don't have any issue if you want to wire big-endian version but would be more 
useful to wire little endian version.

If there is an issue with memmove implementation I can't see any issue to 
disable that options to let it pass from the beginning and solve it separately.

This should be fragment for Little endian.

[linux](next)$ cat tools/testing/kunit/qemu_configs/microblazeel.py
# SPDX-License-Identifier: GPL-2.0-only
from ..qemu_config import QemuArchParams

QEMU_ARCH = QemuArchParams(linux_arch='microblaze',
						   kconfig='''

CONFIG_KERNEL_BASE_ADDR=0x50000000
CONFIG_XILINX_MICROBLAZE0_FAMILY="virtex5"
CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR=1
CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR=1
CONFIG_XILINX_MICROBLAZE0_USE_BARREL=1
CONFIG_XILINX_MICROBLAZE0_USE_DIV=1
CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL=2
CONFIG_XILINX_MICROBLAZE0_USE_FPU=1
CONFIG_CPU_LITTLE_ENDIAN=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_16550A_VARIANTS=y
CONFIG_SERIAL_OF_PLATFORM=y
CONFIG_MB_POWER_OFF_THROUGH_UNALIGNED_PC=y
''',
						   qemu_arch='microblazeel',
						   kernel_path='arch/microblaze/boot/linux.bin',
						   kernel_command_line='kunit_shutdown=poweroff',
						   extra_qemu_params=[
							'-M', 'petalogix-ml605',
						   ],
)


Thanks,
Michal



  parent reply	other threads:[~2026-08-31 10:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04  5:32 [PATCH 0/4] microblaze: KUnit support Thomas Weißschuh
2026-08-04  5:32 ` [PATCH 1/4] microblaze: uaccess: Zero out destination on failed get_user() Thomas Weißschuh
2026-08-05 13:59   ` David Gow
2026-08-04  5:32 ` [PATCH 2/4] microblaze: reset: Call POWER_OFF handlers Thomas Weißschuh
2026-08-05 13:59   ` David Gow
2026-08-31  8:13   ` Michal Simek
2026-08-31 15:39     ` Thomas Weißschuh
2026-08-04  5:32 ` [PATCH 3/4] microblaze: reset: Provide a power off handler through an unaligned PC Thomas Weißschuh
2026-08-05 13:59   ` David Gow
2026-08-04  5:32 ` [PATCH 4/4] kunit: qemu_configs: Add microblaze configuration Thomas Weißschuh
2026-08-05 13:59   ` David Gow
2026-08-05 19:18     ` Thomas Weißschuh
2026-08-31  8:15       ` Michal Simek
2026-08-31 10:48   ` Michal Simek [this message]
2026-08-31 15:43     ` Thomas Weißschuh
2026-09-01 13:33       ` Michal Simek
2026-09-01 18:33         ` Thomas Weißschuh
2026-09-02 10:44           ` Michal Simek
2026-08-31 12:57 ` [PATCH 0/4] microblaze: KUnit support Michal Simek
2026-08-31 15:45   ` Thomas Weißschuh

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=5cd8df03-ad51-460c-9b20-3bf288831b5a@amd.com \
    --to=michal.simek@amd.com \
    --cc=brendan.higgins@linux.dev \
    --cc=david@davidgow.net \
    --cc=kunit-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=raemoar63@gmail.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