From: Thomas Huth <thuth@redhat.com>
To: "Steffen Görtz" <contrib@steffen-goertz.de>, qemu-devel@nongnu.org
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
Joel Stanley <joel@jms.id.au>,
Jim Mussared <jim@groklearning.com>,
Julia Suvorova <jusual@mail.ru>,
Peter Maydell <peter.maydell@linaro.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Laurent Vivier <lvivier@redhat.com>,
Eric Blake <eblake@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v4 01/13] qtest: Add set_irq_in command to set IRQ/GPIO level
Date: Mon, 5 Nov 2018 07:18:31 +0100 [thread overview]
Message-ID: <6e7d3eda-8303-ae7d-f5da-3e78e0796f57@redhat.com> (raw)
In-Reply-To: <20181102170730.12432-2-contrib@steffen-goertz.de>
On 2018-11-02 18:07, Steffen Görtz wrote:
> Adds a new qtest command "set_irq_in" which allows
> to set qemu gpio lines to a given level.
>
> Based on https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02363.html
> which never got merged.
>
> Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
> Originally-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net>
> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
> qtest.c | 43 +++++++++++++++++++++++++++++++++++++++++++
> tests/libqtest.c | 10 ++++++++++
> tests/libqtest.h | 28 ++++++++++++++++++++++++++++
> 3 files changed, 81 insertions(+)
[...]
> diff --git a/tests/libqtest.h b/tests/libqtest.h
> index ed88ff99d5..65bffa9ace 100644
> --- a/tests/libqtest.h
> +++ b/tests/libqtest.h
> @@ -232,6 +232,19 @@ void qtest_irq_intercept_in(QTestState *s, const char *string);
> */
> void qtest_irq_intercept_out(QTestState *s, const char *string);
>
> +/**
> + * qtest_set_irq_in:
> + * @s: QTestState instance to operate on.
> + * @string: QOM path of a device
> + * @name: IRQ name
> + * @irq: IRQ number
> + * @level: IRQ level
> + *
> + * Force given device/irq GPIO-in pin to the given level.
> + */
> +void qtest_set_irq_in(QTestState *s, const char *string, const char *name,
> + int irq, int level);
> +
> /**
> * qtest_outb:
> * @s: #QTestState instance to operate on.
> @@ -678,6 +691,21 @@ static inline void irq_intercept_out(const char *string)
> qtest_irq_intercept_out(global_qtest, string);
> }
>
> +/**
> + * qtest_set_irq_in:
> + * @string: QOM path of a device
> + * @name: IRQ name
> + * @irq: IRQ number
> + * @level: IRQ level
> + *
> + * Force given device/IRQ GPIO-in pin to the given level.
> + */
> +static inline void set_irq_in(const char *string, const char *name,
> + int irq, int level)
> +{
> + qtest_set_irq_in(global_qtest, string, name, irq, level);
> +}
> +
> /**
> * outb:
> * @addr: I/O port to write to.
>
Hi Steffen,
please don't add any new function wrappers around global_qtest anymore.
We recently already started to get rid of this global variable in a
couple of places (see
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=db57d7a3c284db2315d9 and
preceding commits for example), since it causes trouble in tests that
want to run multiple QEMU instances at once (in migration tests for
example). It would be good to have new code clean for this right from
the start.
Thanks,
Thomas
next prev parent reply other threads:[~2018-11-05 6:21 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 17:07 [Qemu-devel] [PATCH v4 00/13] arm: nRF51 Devices and Microbit Support Steffen Görtz
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 01/13] qtest: Add set_irq_in command to set IRQ/GPIO level Steffen Görtz
2018-11-05 6:18 ` Thomas Huth [this message]
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 02/13] arm: Add header to host common definition for nRF51 SOC peripherals Steffen Görtz
2018-11-05 16:47 ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 03/13] hw/misc/nrf51_rng: Add NRF51 random number generator peripheral Steffen Görtz
2018-11-05 16:48 ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 04/13] arm: Instantiate NRF51 random number generator Steffen Görtz
2018-11-05 16:49 ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 05/13] hw/nvram/nrf51_nvm: Add nRF51 non-volatile memories Steffen Görtz
2018-11-05 17:09 ` Peter Maydell
2018-11-08 9:28 ` Stefan Hajnoczi
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 06/13] arm: Instantiate NRF51 special NVM's and NVMC Steffen Görtz
2018-11-05 16:50 ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 07/13] tests: Add bbc:microbit / nRF51 test suite Steffen Görtz
2018-11-05 16:51 ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 08/13] hw/gpio/nrf51_gpio: Add nRF51 GPIO peripheral Steffen Görtz
2018-11-05 16:47 ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 09/13] arm: Instantiate NRF51 general purpose I/O Steffen Görtz
2018-11-05 16:51 ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 10/13] tests/microbit-test: Add Tests for nRF51 GPIO Steffen Görtz
2018-11-05 16:54 ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 11/13] hw/timer/nrf51_timer: Add nRF51 Timer peripheral Steffen Görtz
2018-11-05 17:45 ` Peter Maydell
2018-11-08 9:30 ` Stefan Hajnoczi
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 12/13] arm: Instantiate NRF51 Timers Steffen Görtz
2018-11-05 16:56 ` Peter Maydell
2018-11-02 17:07 ` [Qemu-devel] [PATCH v4 13/13] arm: Add Clock peripheral stub to NRF51 SOC Steffen Görtz
2018-11-04 8:19 ` [Qemu-devel] [PATCH v4 00/13] arm: nRF51 Devices and Microbit Support no-reply
2018-11-04 8:23 ` no-reply
2018-11-06 6:41 ` no-reply
2018-11-06 6:45 ` no-reply
2018-11-08 9:32 ` Stefan Hajnoczi
2018-11-08 9:42 ` Peter Maydell
2018-11-08 10:20 ` Joel Stanley
2018-11-08 10:23 ` Peter Maydell
2018-11-08 22:18 ` no-reply
2018-11-08 22:22 ` no-reply
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=6e7d3eda-8303-ae7d-f5da-3e78e0796f57@redhat.com \
--to=thuth@redhat.com \
--cc=contrib@steffen-goertz.de \
--cc=eblake@redhat.com \
--cc=jim@groklearning.com \
--cc=joel@jms.id.au \
--cc=jusual@mail.ru \
--cc=lvivier@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@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;
as well as URLs for NNTP newsgroup(s).