* [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition
@ 2022-03-14 17:25 Khem Raj
2022-03-14 17:58 ` Daniel Henrique Barboza
2022-03-14 19:18 ` Richard Henderson
0 siblings, 2 replies; 5+ messages in thread
From: Khem Raj @ 2022-03-14 17:25 UTC (permalink / raw)
To: qemu-devel
Cc: Peter Maydell, Richard Henderson, qemu-ppc, Khem Raj,
Philippe Mathieu-Daudé
Fixes
../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs'
return uc->uc_mcontext.regs->nip;
~~~~~~~~~~~~~~~~~~~~^
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
Cc: Richard Henderson <richard.henderson@linaro.org>
---
v2: Drop ifdef __powerpc__
linux-user/include/host/ppc/host-signal.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/linux-user/include/host/ppc/host-signal.h b/linux-user/include/host/ppc/host-signal.h
index b80384d135..ec6166ed66 100644
--- a/linux-user/include/host/ppc/host-signal.h
+++ b/linux-user/include/host/ppc/host-signal.h
@@ -11,6 +11,9 @@
#ifndef PPC_HOST_SIGNAL_H
#define PPC_HOST_SIGNAL_H
+/* needed for pt_regs */
+#include <asm/ptrace.h>
+
/* The third argument to a SA_SIGINFO handler is ucontext_t. */
typedef ucontext_t host_sigcontext;
--
2.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition
2022-03-14 17:25 [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition Khem Raj
@ 2022-03-14 17:58 ` Daniel Henrique Barboza
2022-03-14 18:06 ` Peter Maydell
2022-03-14 19:18 ` Richard Henderson
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Henrique Barboza @ 2022-03-14 17:58 UTC (permalink / raw)
To: Khem Raj, qemu-devel
Cc: qemu-ppc, Peter Maydell, Richard Henderson,
Philippe Mathieu-Daudé
On 3/14/22 14:25, Khem Raj wrote:
> Fixes
> ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs'
> return uc->uc_mcontext.regs->nip;
> ~~~~~~~~~~~~~~~~~~~~^
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Cc: Richard Henderson <richard.henderson@linaro.org>
> ---
> v2: Drop ifdef __powerpc__
>
> linux-user/include/host/ppc/host-signal.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/linux-user/include/host/ppc/host-signal.h b/linux-user/include/host/ppc/host-signal.h
> index b80384d135..ec6166ed66 100644
> --- a/linux-user/include/host/ppc/host-signal.h
> +++ b/linux-user/include/host/ppc/host-signal.h
> @@ -11,6 +11,9 @@
> #ifndef PPC_HOST_SIGNAL_H
> #define PPC_HOST_SIGNAL_H
>
> +/* needed for pt_regs */
> +#include <asm/ptrace.h>
> +
I am intrigued about why we didn't hit this before, especially considering that ppc64 header is just a
pointer to this file.
I looked it up and didn't find why. This change seems harmless to me though.
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> /* The third argument to a SA_SIGINFO handler is ucontext_t. */
> typedef ucontext_t host_sigcontext;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition
2022-03-14 17:58 ` Daniel Henrique Barboza
@ 2022-03-14 18:06 ` Peter Maydell
2022-03-14 19:02 ` Daniel P. Berrangé
0 siblings, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2022-03-14 18:06 UTC (permalink / raw)
To: Daniel Henrique Barboza
Cc: qemu-ppc, Philippe Mathieu-Daudé, Richard Henderson,
Khem Raj, qemu-devel
On Mon, 14 Mar 2022 at 17:59, Daniel Henrique Barboza
<danielhb413@gmail.com> wrote:
> I am intrigued about why we didn't hit this before, especially considering that ppc64 header is just a
> pointer to this file.
It's specific to musl, which does different things with its
system includes than glibc does.
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition
2022-03-14 18:06 ` Peter Maydell
@ 2022-03-14 19:02 ` Daniel P. Berrangé
0 siblings, 0 replies; 5+ messages in thread
From: Daniel P. Berrangé @ 2022-03-14 19:02 UTC (permalink / raw)
To: Peter Maydell
Cc: Daniel Henrique Barboza, Richard Henderson, qemu-devel,
Philippe Mathieu-Daudé, qemu-ppc, Khem Raj
On Mon, Mar 14, 2022 at 06:06:40PM +0000, Peter Maydell wrote:
> On Mon, 14 Mar 2022 at 17:59, Daniel Henrique Barboza
> <danielhb413@gmail.com> wrote:
> > I am intrigued about why we didn't hit this before, especially considering that ppc64 header is just a
> > pointer to this file.
>
> It's specific to musl, which does different things with its
> system includes than glibc does.
And while we have CI testing for QEMU with Alpine that uses musl, this
is only x86_64 host. IOW we don't have CI coverage of ppc64 host
with musl, only glibc
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition
2022-03-14 17:25 [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition Khem Raj
2022-03-14 17:58 ` Daniel Henrique Barboza
@ 2022-03-14 19:18 ` Richard Henderson
1 sibling, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2022-03-14 19:18 UTC (permalink / raw)
To: Khem Raj, qemu-devel; +Cc: Peter Maydell, qemu-ppc, Philippe Mathieu-Daudé
On 3/14/22 10:25, Khem Raj wrote:
> Fixes
> ../qemu-6.2.0/linux-user/host/ppc64/../ppc/host-signal.h:16:32: error: incomplete definition of type 'struct pt_regs'
> return uc->uc_mcontext.regs->nip;
> ~~~~~~~~~~~~~~~~~~~~^
>
> Signed-off-by: Khem Raj<raj.khem@gmail.com>
> Cc: Peter Maydell<peter.maydell@linaro.org>
> Cc: Philippe Mathieu-Daudé<f4bug@amsat.org>
> Cc: Richard Henderson<richard.henderson@linaro.org>
> ---
> v2: Drop ifdef __powerpc__
>
> linux-user/include/host/ppc/host-signal.h | 3 +++
> 1 file changed, 3 insertions(+)
As per late conversation vs version 1, instead of the include, we should update the code
to avoid the pt_regs indirection and instead reference gp_regs directly.
We should also move the file to ../ppc64/, leaving ppc/ empty.
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-03-14 19:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-14 17:25 [PATCH v2] ppc: Include asm/ptrace.h for pt_regs struct definition Khem Raj
2022-03-14 17:58 ` Daniel Henrique Barboza
2022-03-14 18:06 ` Peter Maydell
2022-03-14 19:02 ` Daniel P. Berrangé
2022-03-14 19:18 ` Richard Henderson
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).