All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Sebastian Ott <sebott@redhat.com>
Cc: qemu-arm@nongnu.org, qemu-devel@nongnu.org,
	Peter Maydell <peter.maydell@linaro.org>,
	Eric Auger <eric.auger@redhat.com>
Subject: Re: [PATCH RFC] arm/kvm: report registers we failed to set
Date: Wed, 23 Jul 2025 11:59:45 +0200	[thread overview]
Message-ID: <87jz3z5isu.fsf@redhat.com> (raw)
In-Reply-To: <b1f7bb67-070f-da38-369b-51ed1962fd2d@redhat.com>

On Tue, Jul 22 2025, Sebastian Ott <sebott@redhat.com> wrote:

> On Mon, 21 Jul 2025, Cornelia Huck wrote:
>> +/* pretty-print a KVM register */
>> +#define CP_REG_ARM64_SYSREG_OP(_reg, _op)                       \
>> +    ((uint8_t)((_reg & CP_REG_ARM64_SYSREG_ ## _op ## _MASK) >> \
>> +               CP_REG_ARM64_SYSREG_ ## _op ## _SHIFT))
>> +
>> +#define PRI_CP_REG_ARM64_SYSREG(_reg)                    \
>> +    ({                                                   \
>> +        char _out[32];                                   \
>> +        snprintf(_out, sizeof(_out),                     \
>> +                 "op0:%d op1:%d crn:%d crm:%d op2:%d",   \
>> +                 CP_REG_ARM64_SYSREG_OP(_reg, OP0),      \
>> +                 CP_REG_ARM64_SYSREG_OP(_reg, OP1),      \
>> +                 CP_REG_ARM64_SYSREG_OP(_reg, CRN),      \
>> +                 CP_REG_ARM64_SYSREG_OP(_reg, CRM),      \
>> +                 CP_REG_ARM64_SYSREG_OP(_reg, OP2));     \
>> +        _out;                                            \
>> +    })
>
> Gcc correctly complains about a dangling pointer here.

Hum, I maybe should switch to a system with a less ancient
compiler... thanks for testing.



  reply	other threads:[~2025-07-23 10:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-21 16:19 [PATCH RFC] arm/kvm: report registers we failed to set Cornelia Huck
2025-07-22 16:11 ` Sebastian Ott
2025-07-23  9:59   ` Cornelia Huck [this message]
2025-08-12 18:11 ` Eric Auger
2025-08-13 10:01   ` Cornelia Huck
2025-08-13 12:43     ` Eric Auger

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=87jz3z5isu.fsf@redhat.com \
    --to=cohuck@redhat.com \
    --cc=eric.auger@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sebott@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.