Re: Using the ldp instruction to access the I/O address space in KVM mode causes an exception

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+ kvmarm

On Mon, 25 Nov 2024 00:11:22 +0000,
赖株锋 <csumushu@xxxxxxxxx> 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.





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux