From: Fabiano Rosas <farosas@linux.ibm.com>
To: "Bruno Larsen (billionai)" <bruno.larsen@eldorado.org.br>,
qemu-devel@nongnu.org
Cc: lucas.araujo@eldorado.org.br, luis.pires@eldorado.org.br,
fernando.valle@eldorado.org.br, qemu-ppc@nongnu.org,
"Bruno Larsen \(billionai\)" <bruno.larsen@eldorado.org.br>,
matheus.ferst@eldorado.org.br, david@gibson.dropbear.id.au
Subject: Re: [PATCH v2 2/7] target/ppc: Created !TCG SPR registration macro
Date: Thu, 29 Apr 2021 17:02:59 -0300 [thread overview]
Message-ID: <87eees3ll8.fsf@linux.ibm.com> (raw)
In-Reply-To: <20210429162130.2412-3-bruno.larsen@eldorado.org.br>
"Bruno Larsen (billionai)" <bruno.larsen@eldorado.org.br> writes:
> Added macros for spr_register and spr_register_kvm that can
> ignore SPR RW callbacks, in preparation to support building
> without TCG.
>
> Signed-off-by: Bruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
> ---
> target/ppc/translate_init.c.inc | 22 ++++++++++++++++++----
> 1 file changed, 18 insertions(+), 4 deletions(-)
>
> diff --git a/target/ppc/translate_init.c.inc b/target/ppc/translate_init.c.inc
> index 6235eb7536..3ddcfefb62 100644
> --- a/target/ppc/translate_init.c.inc
> +++ b/target/ppc/translate_init.c.inc
> @@ -720,6 +720,7 @@ static inline void vscr_init(CPUPPCState *env, uint32_t val)
> helper_mtvscr(env, val);
> }
>
> +#ifdef CONFIG_TCG
> #ifdef CONFIG_USER_ONLY
> #define spr_register_kvm(env, num, name, uea_read, uea_write, \
> oea_read, oea_write, one_reg_id, initial_value) \
> @@ -728,7 +729,7 @@ static inline void vscr_init(CPUPPCState *env, uint32_t val)
> oea_read, oea_write, hea_read, hea_write, \
> one_reg_id, initial_value) \
> _spr_register(env, num, name, uea_read, uea_write, initial_value)
> -#else
> +#else /*CONFIG_USER_ONLY */
Missing a space after the first *
> #if !defined(CONFIG_KVM)
> #define spr_register_kvm(env, num, name, uea_read, uea_write, \
> oea_read, oea_write, one_reg_id, initial_value) \
> @@ -739,7 +740,7 @@ static inline void vscr_init(CPUPPCState *env, uint32_t val)
> one_reg_id, initial_value) \
> _spr_register(env, num, name, uea_read, uea_write, \
> oea_read, oea_write, hea_read, hea_write, initial_value)
> -#else
> +#else /* CONFIG_KVM */
> #define spr_register_kvm(env, num, name, uea_read, uea_write, \
> oea_read, oea_write, one_reg_id, initial_value) \
> _spr_register(env, num, name, uea_read, uea_write, \
This won't work if you don't include the change to _spr_register as well.
> @@ -751,8 +752,21 @@ static inline void vscr_init(CPUPPCState *env, uint32_t val)
> _spr_register(env, num, name, uea_read, uea_write, \
> oea_read, oea_write, hea_read, hea_write, \
> one_reg_id, initial_value)
> -#endif
> -#endif
> +#endif /* CONFIG_KVM */
> +#endif /* CONFIG_USER_ONLY */
> +#else /* CONFIG_TCG */
> +#ifdef CONFIG_KVM /* sanity check. should always enter this */
> +#define spr_register_kvm(env, num, name, uea_read, uea_write, \
> + oea_read, oea_write, one_reg_id, initial_value) \
> + _spr_register(env, num, name, one_reg_id, initial_value)
> +#define spr_register_kvm_hv(env, num, name, uea_read, uea_write, \
> + oea_read, oea_write, hea_read, hea_write, \
> + one_reg_id, initial_value) \
> + _spr_register(env, num, name, one_reg_id, initial_value)
> +#else /* CONFIG_KVM */
> +#error "Either TCG or KVM should be condigured"
configured
> +#endif /* CONFIG_KVM */
> +#endif /* CONFIG_TCG */
>
> #define spr_register(env, num, name, uea_read, uea_write, \
> oea_read, oea_write, initial_value) \
next prev parent reply other threads:[~2021-04-29 20:04 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-29 16:21 [PATCH v2 0/7] target/ppc: untangle cpu init from translation Bruno Larsen (billionai)
2021-04-29 16:21 ` [PATCH v2 1/7] target/ppc: move opcode table logic to translate.c Bruno Larsen (billionai)
2021-04-30 3:13 ` Richard Henderson
2021-04-30 4:18 ` David Gibson
2021-04-29 16:21 ` [PATCH v2 2/7] target/ppc: Created !TCG SPR registration macro Bruno Larsen (billionai)
2021-04-29 20:02 ` Fabiano Rosas [this message]
2021-04-29 16:21 ` [PATCH v2 3/7] target/ppc: Isolated SPR read/write callbacks Bruno Larsen (billionai)
2021-04-29 20:42 ` Fabiano Rosas
2021-04-30 3:33 ` Richard Henderson
2021-04-30 4:21 ` David Gibson
2021-04-30 13:02 ` Bruno Piazera Larsen
2021-05-03 3:54 ` David Gibson
2021-04-29 16:21 ` [PATCH v2 4/7] target/ppc: turned SPR R/W callbacks not static Bruno Larsen (billionai)
2021-04-29 20:52 ` Fabiano Rosas
2021-04-30 3:40 ` Richard Henderson
2021-04-30 17:26 ` Bruno Piazera Larsen
2021-04-30 4:34 ` Richard Henderson
2021-04-29 16:21 ` [PATCH v2 5/7] target/ppc: removed VSCR from SPR registration Bruno Larsen (billionai)
2021-04-29 16:21 ` [PATCH v2 6/7] target/ttc: renamed SPR registration functions Bruno Larsen (billionai)
2021-04-30 3:52 ` Richard Henderson
2021-04-29 16:21 ` [PATCH v2 7/7] target/ppc: isolated cpu init from translation logic Bruno Larsen (billionai)
2021-04-29 21:23 ` Fabiano Rosas
2021-04-30 17:12 ` Bruno Piazera Larsen
2021-04-30 17:42 ` Richard Henderson
2021-04-30 4:25 ` Richard Henderson
2021-04-30 14:35 ` Bruno Piazera Larsen
2021-04-30 3:12 ` [PATCH v2 0/7] target/ppc: untangle cpu init from translation Richard Henderson
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=87eees3ll8.fsf@linux.ibm.com \
--to=farosas@linux.ibm.com \
--cc=bruno.larsen@eldorado.org.br \
--cc=david@gibson.dropbear.id.au \
--cc=fernando.valle@eldorado.org.br \
--cc=lucas.araujo@eldorado.org.br \
--cc=luis.pires@eldorado.org.br \
--cc=matheus.ferst@eldorado.org.br \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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).