From: Eduardo Habkost <ehabkost@redhat.com>
To: Robert Foley <robert.foley@linaro.org>
Cc: qemu-devel@nongnu.org, cota@braap.org, pbonzini@redhat.com,
peter.puhov@linaro.org, alex.bennee@linaro.org, rth@twiddle.net
Subject: Re: [PATCH 1/2] hw/core: Add bql_interrupt flag to CPUClass
Date: Fri, 31 Jul 2020 13:43:53 -0400 [thread overview]
Message-ID: <20200731174353.GF225270@habkost.net> (raw)
In-Reply-To: <20200731125127.30866-2-robert.foley@linaro.org>
On Fri, Jul 31, 2020 at 08:51:26AM -0400, Robert Foley wrote:
> The new flag bql_interrupt, allows the CPUClass to
> determine if the BQL should be held during calls to
> cpu_exec_interrupt or do_interrupt.
>
> This is being added in preparation for changes in
> cpu_handle_interrupt, which will use this flag.
>
> Signed-off-by: Robert Foley <robert.foley@linaro.org>
> ---
> hw/core/cpu.c | 1 +
> include/hw/core/cpu.h | 8 ++++++++
> 2 files changed, 9 insertions(+)
>
> diff --git a/hw/core/cpu.c b/hw/core/cpu.c
> index 8707ce2c34..7ab88caa97 100644
> --- a/hw/core/cpu.c
> +++ b/hw/core/cpu.c
> @@ -425,6 +425,7 @@ static void cpu_class_init(ObjectClass *klass, void *data)
> k->cpu_exec_exit = cpu_common_noop;
> k->cpu_exec_interrupt = cpu_common_exec_interrupt;
> k->adjust_watchpoint_address = cpu_adjust_watchpoint_address;
> + k->bql_interrupt = true;
> set_bit(DEVICE_CATEGORY_CPU, dc->categories);
> dc->realize = cpu_common_realizefn;
> dc->unrealize = cpu_common_unrealizefn;
> diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
> index 6a2c77682f..d2c426ee5d 100644
> --- a/include/hw/core/cpu.h
> +++ b/include/hw/core/cpu.h
> @@ -157,6 +157,8 @@ struct TranslationBlock;
> * @disas_set_info: Setup architecture specific components of disassembly info
> * @adjust_watchpoint_address: Perform a target-specific adjustment to an
> * address before attempting to match it against watchpoints.
> + * @bql_interrupt: Hold BQL while performing the cpu_exec_interrupt
> + * or do_interrupt call.
> *
> * Represents a CPU family or model.
> */
> @@ -227,6 +229,7 @@ typedef struct CPUClass {
> /* Keep non-pointer data at the end to minimize holes. */
> int gdb_num_core_regs;
> bool gdb_stop_before_watchpoint;
> + bool bql_interrupt;
> } CPUClass;
>
> /*
> @@ -589,6 +592,11 @@ static inline void cpu_tb_jmp_cache_clear(CPUState *cpu)
> }
> }
>
> +static inline void cpu_class_enable_bql_interrupt(CPUClass *cc)
> +{
> + cc->bql_interrupt = true;
> +}
Class data is not supposed to change outside class_init. Why do
you need this function? I don't see it being used anywhere in
this series.
--
Eduardo
next prev parent reply other threads:[~2020-07-31 17:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-31 12:51 [PATCH 0/2] accel/tcg: remove implied BQL from cpu_handle_interrupt/exception path Robert Foley
2020-07-31 12:51 ` [PATCH 1/2] hw/core: Add bql_interrupt flag to CPUClass Robert Foley
2020-07-31 17:43 ` Eduardo Habkost [this message]
2020-07-31 19:14 ` Robert Foley
2020-07-31 19:24 ` Eduardo Habkost
2020-08-02 16:05 ` Alex Bennée
2020-08-04 20:36 ` Eduardo Habkost
2020-07-31 12:51 ` [PATCH 2/2] accel/tcg: interrupt/exception handling uses bql_interrupt flag Robert Foley
2020-07-31 18:02 ` Paolo Bonzini
2020-07-31 20:09 ` Robert Foley
2020-07-31 20:21 ` Paolo Bonzini
2020-08-02 16:09 ` Alex Bennée
2020-08-03 7:11 ` Paolo Bonzini
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=20200731174353.GF225270@habkost.net \
--to=ehabkost@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=cota@braap.org \
--cc=pbonzini@redhat.com \
--cc=peter.puhov@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=robert.foley@linaro.org \
--cc=rth@twiddle.net \
/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).