All of lore.kernel.org
 help / color / mirror / Atom feed
From: puranjay@kernel.org
To: "Arnd Bergmann" <arnd@arndb.de>, "Marc Zyngier" <maz@kernel.org>,
	"Arnd Bergmann" <arnd@kernel.org>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	"Sumit Garg" <sumit.garg@linaro.org>
Cc: puranjay12@gmail.com
Subject: Supporting KVM_GUESTDBG_BLOCKIRQ or something similar on ARM64
Date: Mon, 28 Oct 2024 10:53:34 +0000	[thread overview]
Message-ID: <mb61p4j4wwlap.fsf@kernel.org> (raw)

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


Hi Everyone,

I work on the BPF JIT for arm64 and regularly use Qemu with gdb for
debugging by single stepping parts of the code. I realized that whenever
I enable KVM, single stepping doesn't work as expected and it lands in an
interrupt handler.

It always worked for me on x86 so I looked in the source code and found
that x86 supports KVM_GUESTDBG_BLOCKIRQ that blocks IRQs when single
stepping.

I assume that arm64 doesn't support KVM_GUESTDBG_BLOCKIRQ because it is
not trivial to implement this on arm64 due to some architectural
limitations? There was a patch [1] posted in 2022 to solve this issue
but it was not merged.

Let's start a discussion about what needs to be done to support this on
arm64.

Thanks,
Puranjay

[1] https://lore.kernel.org/lkml/20221219102452.2860088-2-sumit.garg@linaro.org/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 255 bytes --]

             reply	other threads:[~2024-10-28 10:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 10:53 puranjay [this message]
2024-10-28 11:23 ` Supporting KVM_GUESTDBG_BLOCKIRQ or something similar on ARM64 Marc Zyngier
2024-10-29  8:52   ` Ard Biesheuvel
2024-10-29  9:53     ` Marc Zyngier
2024-10-29 10:00       ` Ard Biesheuvel
2024-10-29 13:57         ` Mark Rutland
2024-10-29 15:36           ` Marc Zyngier

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=mb61p4j4wwlap.fsf@kernel.org \
    --to=puranjay@kernel.org \
    --cc=alex.bennee@linaro.org \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=puranjay12@gmail.com \
    --cc=sumit.garg@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 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.