From: Marc Zyngier <maz@kernel.org>
To: 赖株锋 <csumushu@gmail.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
kvmarm <kvmarm@lists.linux.dev>
Subject: Re: Using the ldp instruction to access the I/O address space in KVM mode causes an exception
Date: Mon, 25 Nov 2024 17:16:13 +0000 [thread overview]
Message-ID: <86iksbutcy.wl-maz@kernel.org> (raw)
In-Reply-To: <SEZPR01MB4825C8FFB2994CC67225DB74A32E2@SEZPR01MB4825.apcprd01.prod.exchangelabs.com>
+ kvmarm
On Mon, 25 Nov 2024 00:11:22 +0000,
赖株锋 <csumushu@gmail.com> wrote:
>
> I am running ARM64 emulation using QEMU’s KVM mode on an ARM64 device, but I encountered the following exception when booting the guest Linux kernel.
> error: kvm run failed Function not implemented
> PC=ffff800008e201e0 X00=ffff00208a63b000 X01=0000000000000000
> And the instruction pointed to by the PC register is
> 0xffff800008e201e0: ldp q11, q12, [x22], where the address held by
> the x22 register belongs to the address space of the nic.
> After testing, it was found that using the ldp instruction to access
> peripheral address spaces causes issues, but accessing RAM works
> normally. What could be the cause of this issue, and are there any
> solutions to resolve this problem?
The cause of the issue is that such an instruction is not emulatable,
because it uses more than a single register. In your case, it is even
worse, as you are using FP registers to access emulated MMIO,
something that is unlikely to work correctly on real HW (depending on
the alignment of the address in x22).
What QEMU *could* do is to implement enough instruction emulation (by
reading the offending instruction from guest memory), and emulating it
(see how KVM_CAP_ARM_NISV_TO_USER can be used for this purpose).
But frankly, you are asking for trouble here, and you really should
fix your code.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
prev parent reply other threads:[~2024-11-25 17:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 0:11 Using the ldp instruction to access the I/O address space in KVM mode causes an exception 赖株锋
2024-11-25 17:16 ` Marc Zyngier [this message]
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=86iksbutcy.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=csumushu@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
/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.