qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v1 13/25] hw/tricore: Add testdevice for tests in tests/tcg/


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v1 13/25] hw/tricore: Add testdevice for tests in tests/tcg/
Date: Mon, 26 Apr 2021 11:37:57 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

On 4/19/21 4:54 PM, Alex Bennée wrote:
> From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
> 
> this device is used to verify the correctness of regression tests by
> allowing guests to write their exit status to this device. This is then
> used by qemu to exit using the written status.
> 
> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
> Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> Message-Id: <20210305170045.869437-4-kbastian@mail.uni-paderborn.de>
> ---
>  include/hw/tricore/tricore_testdevice.h | 38 ++++++++++++
>  hw/tricore/tricore_testboard.c          |  8 +++
>  hw/tricore/tricore_testdevice.c         | 82 +++++++++++++++++++++++++
>  hw/tricore/meson.build                  |  1 +
>  4 files changed, 129 insertions(+)
>  create mode 100644 include/hw/tricore/tricore_testdevice.h
>  create mode 100644 hw/tricore/tricore_testdevice.c

> +#include "hw/tricore/tricore_testdevice.h"
> +
> +static void tricore_testdevice_write(void *opaque, hwaddr offset,
> +                                      uint64_t value, unsigned size)
> +{
> +    exit(value);

   ->  qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN);

I'd rather use a 2 steps check of value such watchdog devices do
(to be sure the guest is still in control and isn't nut).


A general comments, all targets require a such test feature,
so we should have a generic user-creatable sysbus-testdev for that.

Regards,

Phil.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]