qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Phil Dennis-Jordan <phil@philjordan.eu>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, Cameron Esfahani <dirty@apple.com>,
	 Roman Bolshakov <rbolshakov@ddn.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	 Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
	Alexander Graf <agraf@csgraf.de>,
	Peter Maydell <peter.maydell@linaro.org>,
	qemu-arm@nongnu.org
Subject: Re: [PATCH 09/11] i386/hvf: Print hex pairs for each opcode byte in decode error
Date: Tue, 10 Dec 2024 12:28:27 +0100	[thread overview]
Message-ID: <CAAibmn2ijkbOqy-oD9F_50N4WBHQ77JadenvDfFHtREv_ReUSw@mail.gmail.com> (raw)
In-Reply-To: <3d0d87b8-d86f-4411-b1dd-7e825ec237e4@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]

On Mon, 9 Dec 2024 at 21:54, Philippe Mathieu-Daudé <philmd@linaro.org>
wrote:

> On 9/12/24 21:36, phil@philjordan.eu wrote:
> > From: Phil Dennis-Jordan <phil@philjordan.eu>
> >
> > Printing a sequence of bytes as hex with leading zeroes omitted just
> looks odd.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>
> >
> > Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
> > ---
> >   target/i386/hvf/x86_decode.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/target/i386/hvf/x86_decode.c b/target/i386/hvf/x86_decode.c
> > index 6c7cfc820f..f8d37f2d53 100644
> > --- a/target/i386/hvf/x86_decode.c
> > +++ b/target/i386/hvf/x86_decode.c
> > @@ -30,7 +30,7 @@ static void decode_invalid(CPUX86State *env, struct
> x86_decode *decode)
> >   {
> >       printf("%llx: failed to decode instruction ", env->eip);
> >       for (int i = 0; i < decode->opcode_len; i++) {
> > -        printf("%x ", decode->opcode[i]);
> > +        printf("%02x ", decode->opcode[i]);
> >       }
> >       printf("\n");
>
> Maybe we should use monitor_printf() here?
>

Or perhaps snprintf it into a buffer, then change this…


> >       VM_PANIC("decoder failed\n");
>
>
… to a VM_PANIC_EX() that also writes out the opcode buffer?

[-- Attachment #2: Type: text/html, Size: 2288 bytes --]

  reply	other threads:[~2024-12-10 11:29 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 20:36 [PATCH 00/11] hvf and APIC fixes, improvements, and optimisations phil
2024-12-09 20:36 ` [PATCH 01/11] hvf: Add facility for initialisation code prior to first vCPU run phil
2024-12-10 10:05   ` Alexander Graf
2025-02-05 21:02   ` Philippe Mathieu-Daudé
2025-02-09 19:45     ` Phil Dennis-Jordan
2024-12-09 20:36 ` [PATCH 02/11] arm/hvf: Initialise GICv3 state just before " phil
2024-12-10 10:05   ` Alexander Graf
2025-02-05 14:47   ` Zenghui Yu
2024-12-09 20:36 ` [PATCH 03/11] i386/hvf: Don't send signal to thread when kicking phil
2024-12-09 21:22   ` Philippe Mathieu-Daudé
2024-12-10  8:17     ` Phil Dennis-Jordan
2024-12-10  9:21     ` Roman Bolshakov
2024-12-10  9:52       ` Phil Dennis-Jordan
2025-02-05 20:58         ` Philippe Mathieu-Daudé
2024-12-09 20:36 ` [PATCH 04/11] i386/hvf: Pre-fetch emulated instructions phil
2024-12-09 20:36 ` [PATCH 05/11] i386/hvf: Decode APIC access x86 instruction outside BQL phil
2024-12-09 20:36 ` [PATCH 06/11] i386/hvf: APIC access exit with fast-path for common mov cases phil
2024-12-09 20:36 ` [PATCH 07/11] i386/hvf: Enables APIC_ACCESS VM exits by setting APICBASE phil
2024-12-09 20:36 ` [PATCH 08/11] i386/hvf: Variable type fixup in decoder phil
2024-12-09 20:49   ` Philippe Mathieu-Daudé
2024-12-09 20:36 ` [PATCH 09/11] i386/hvf: Print hex pairs for each opcode byte in decode error phil
2024-12-09 20:54   ` Philippe Mathieu-Daudé
2024-12-10 11:28     ` Phil Dennis-Jordan [this message]
2024-12-09 20:36 ` [PATCH 10/11] hw/intc/apic: Fixes magic number use, removes outdated comment phil
2024-12-09 20:55   ` Philippe Mathieu-Daudé
2024-12-09 20:36 ` [PATCH 11/11] hw/intc/apic: Raise exception when setting reserved APICBASE bits phil

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=CAAibmn2ijkbOqy-oD9F_50N4WBHQ77JadenvDfFHtREv_ReUSw@mail.gmail.com \
    --to=phil@philjordan.eu \
    --cc=agraf@csgraf.de \
    --cc=dirty@apple.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rbolshakov@ddn.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 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).