qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gustavo Romero <gustavo.romero@linaro.org>
To: "Richard Henderson" <richard.henderson@linaro.org>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	qemu-devel@nongnu.org, alex.bennee@linaro.org
Cc: peter.maydell@linaro.org
Subject: Re: [PATCH v6 06/11] target/arm: Factor out code for setting MTE TCF0 field
Date: Fri, 28 Jun 2024 15:13:34 -0300	[thread overview]
Message-ID: <d9812dd0-6f72-56ef-f52c-2f879bf2bf36@linaro.org> (raw)
In-Reply-To: <ea688598-b4a5-40f4-a749-c155ecc0988c@linaro.org>

Hi Richard,

On 6/28/24 2:00 PM, Richard Henderson wrote:
> On 6/28/24 08:49, Gustavo Romero wrote:
>> I thought you meant osdep.h should not be included _at all_ in my case, either
>> in mte_user_helper.h or in mte_user_helper.c. Maybe the wording in the docs
>> should be "Do not include "qemu/osdep.h" from header files. Include it from .c
>> files, when necessary.".
> 
> Not "when necessary", always, and always first.

Got it!


> See the "Include directives" section of docs/devel/style.rst, which does explicitly say 'Do not include "qemu/osdep.h" from header files'.

Yep, Phil pointed out this doc when we were discussing it in v5.
I was actually referring to it about the wording. Maybe then it should
be more explicitly that osdep.h _always_ has to be present.

Re-reading it after your clarifications makes it clear, but the first time
Phil pointed it out the phrases:

"[...] since the .c file will have already included it." and
"Headers should normally include everything they need beyond osdep.h."

weren't enough to me to make it clear that osdep.h must always be included
(present) in the .c files. "will have already included" sounded ambiguous to
me, more like, if necessary it would have already be included in .c (but not
always). But, well, that can be a falt in my interpretation..

Thanks a lot for the clarification.


> 
>> I think we agree osdep.h is necessary and must be put in mte_user_helper.c. But
>> that left me wondering how it would work for sources including mte_user_helper.h,
>> because it can be the case they don't have the declarations for the types used in
>> the function prototypes, in this case, for CPUArchState and abi_long types in
>> arm_set_mte_tcf0.
> 
> CPUArchState will come from qemu/typedefs.h via osdep.h.
> 
> For this particular function, 'int' would have been enough,
> since we only care about the low two bits.

hmm, right. I'll send a follow up patch to improve it since Alex already picked up
the series to gdbstub/next. Thanks!


Cheers,
Gustavo


  reply	other threads:[~2024-06-28 18:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28  5:08 [PATCH v6 00/11] Add MTE stubs for aarch64 user mode Gustavo Romero
2024-06-28  5:08 ` [PATCH v6 01/11] gdbstub: Clean up process_string_cmd Gustavo Romero
2024-06-28  7:05   ` Philippe Mathieu-Daudé
2024-06-28  5:08 ` [PATCH v6 02/11] gdbstub: Move GdbCmdParseEntry into a new header file Gustavo Romero
2024-06-28  5:08 ` [PATCH v6 03/11] gdbstub: Add support for target-specific stubs Gustavo Romero
2024-06-28  5:08 ` [PATCH v6 04/11] target/arm: Fix exception case in allocation_tag_mem_probe Gustavo Romero
2024-06-28  5:08 ` [PATCH v6 05/11] target/arm: Make some MTE helpers widely available Gustavo Romero
2024-06-28  5:08 ` [PATCH v6 06/11] target/arm: Factor out code for setting MTE TCF0 field Gustavo Romero
2024-06-28  7:08   ` Philippe Mathieu-Daudé
2024-06-28 15:49     ` Gustavo Romero
2024-06-28 16:18       ` Philippe Mathieu-Daudé
2024-06-28 17:00       ` Richard Henderson
2024-06-28 18:13         ` Gustavo Romero [this message]
2024-06-29 18:38           ` Peter Maydell
2024-06-28 12:14   ` Alex Bennée
2024-06-28 14:55     ` Gustavo Romero
2024-06-28 15:15       ` Alex Bennée
2024-06-28  5:08 ` [PATCH v6 07/11] gdbstub: Make hex conversion function non-internal Gustavo Romero
2024-06-28  5:08 ` [PATCH v6 08/11] gdbstub: Pass CPU context to command handler Gustavo Romero
2024-06-28  5:08 ` [PATCH v6 09/11] gdbstub: Use true to set cmd_startswith Gustavo Romero
2024-06-28  5:08 ` [PATCH v6 10/11] gdbstub: Add support for MTE in user mode Gustavo Romero
2024-06-28  5:08 ` [PATCH v6 11/11] tests/tcg/aarch64: Add MTE gdbstub tests Gustavo Romero
2024-06-28 12:34 ` [PATCH v6 00/11] Add MTE stubs for aarch64 user mode Alex Bennée

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=d9812dd0-6f72-56ef-f52c-2f879bf2bf36@linaro.org \
    --to=gustavo.romero@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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).