> On 9 Oct 2025, at 16:29, Peter Maydell <[email protected]> wrote:
> 
> On Thu, 9 Oct 2025 at 14:26, Alexander Gryanko <[email protected] 
> <mailto:[email protected]>> wrote:
>> 
>> 
>> 
>>> On 7 Oct 2025, at 16:11, Igor Mammedov <[email protected]> wrote:
>>> 
>>> On Sat, 4 Oct 2025 23:19:09 +0300
>>> Alexander Gryanko <[email protected]> wrote:
>>> 
>>>> Currently, pvpanic is available in three device types: ISA,
>>>> MMIO, and PCI. For early stages of system initialisation
>>>> before PCI enumeration, only ISA and MMIO are suitable.
>>>> ISA is specific to the x86 platform; only MMIO devices
>>>> can be used for ARM. It is not possible to specify a
>>>> device as on the x86 platform (-device pvpanic); the
>>> 
>>> perhaps ARM folsk know better, don't we have some
>>> user create-able sysbus devices? Can it be implemented
>>> as such, so we would avoid creating built-in device?
>> 
>> As a QEMU user, I expected there to be a way to specify a dtb from a file 
>> that could be used as the actual device tree inside the virtual machine. 
>> Perhaps there is a way to do this, but I am not very familiar with the QEMU 
>> code and do not know how it should work.
> 
> You can generally use '-machine dtb=file.dtb'. But note that
> this entirely overrides any internally generated dtb file
> for machines that do that, so for those machine types it's
> mostly a helpful debugging tool.

I added '-machine dumpdtb=qemu.dtb', then converted dtb to dts 'dtc -I dtb -O 
dts -o qemu.dts qemu.dtb', added 

        pvpanic@9060000 {
                reg = <0x0 0x09060000 0x0 0x2>;
                compatible = "qemu,pvpanic-mmio";
        };

Then I compiled qemu without optimisation and set a breakpoint in 
‘pvpanic_mmio_initfn'. It was never called with '-machine dtb=file.dtb'. 'info 
qtree' also does not show the device. Perhaps I have configured something 
incorrectly?

/opt/qemu10/bin/qemu-system-aarch64 \
  -S -d guest_errors,unimp -trace enable=device_* -D $CWD/qemu.log \
  -trace memory_region_ops_write \
  -cpu cortex-a72 \
  -m 2048 \
  -bios $CWD/QEMU_EFI.fd \
  -nographic \
  -qmp unix:$CWD/qmp.sock,server,nowait \
  -drive if=virtio,format=raw,file=$CWD/market.img \
  -chardev 
socket,id=ch0,path=$CWD/serial0.sock,reconnect=1,logfile=$CWD/serial0.log \
  -serial chardev:ch0 \
  -blockdev 
driver=file,filename="$CWD/OVMF_VARS.fd",node-name=uefi-vars,read-only=on \
  -vnc :0 \
  -display none \
  -audiodev none,id=none \
  -machine virt,dtb=uefi.dtb \
  -monitor stdio \

> 
> -- PMM

Reply via email to