semihosting option

2025-02-26 Thread Yanfeng Liu
Dear experts,

I am wondering QEMU semihosting for ARM or RISCV targets allows user to control
the set of functions available in semihosting? for example, I want give read-
only host folder share and poweroff functions to a guest. Is this possible?

Regards,
yf




qemu emulation for xilinx zynq

2025-02-26 Thread Kandyala Saikumar
Hi Team

i need to emulate a xilinz zynq 700 series in that  zc702 board i
referred qemu documentation also the xilinx can be support using qemu . i
am able to see the boot and root files of zv702 image i have downloaded
prebuilt image. using qemu command i am emulating the xilinx using the
command as :
qemu-system-aarch64 -M xilinx-zynq-a9 -cpu cortex-a9 -m 1024M
  -drive
file=/home/mcw/Downloads/xilinx-v2024.1_zc702_sdimage/petalinux-sdimage.img,if=sd,format=raw
-nographic -append "root=/dev/mmcblk0p2 console=ttyPS0,115200" -dtb
/mnt/boot/system.dtb -kernel /mnt/boot/uImage after qemu command was
run i am not able to see any boot message what was the issue can you help
me this how can i sort out

thanks
sai kumar


VFIO GPU Passthrough with -kernel direct boot

2025-02-26 Thread Callan McNamara
Greetings,

I've been trying to get VFIO GPU passthrough working with direct kernel
boot but haven't been able to figure it out.

I can successfully boot without attaching the VFIO device and I can attach
a VFIO device without direct kernal boot but when I try to combine them the
VM seems to start but there's no console output or any other sign that it's
booted successfully.

I'm wondering if it's even possible to get this to work now since direct
boot is skipping OVMF/UEFI and PCI passthrough is enabled by OVMF?

I've included the QEMU command I'm using below, just removing the 2 vfio
devices is enough to get it to work. Sorry about the verbosity - it was
generated by virsh!

Thanks for your time,
Callan

qemu-system-x86_64 -name guest=gbeast,debug-threads=on -machine
pc-q35-6.2,usb=off,vmport=off,dump-guest-core=off,memory-backend=pc.ram,hpet=off,acpi=on
-accel kvm -cpu
host,migratable=on,hv-time=on,hv-relaxed=on,hv-vapic=on,hv-spinlocks=0x1fff,hv-vpindex=on,hv-synic=on,hv-stimer=on,hv-reset=on,hv-vendor-id=randomid,kvm=off
-m size=32768000k -object
'{"qom-type":"memory-backend-file","id":"pc.ram","mem-path":"/dev/hugepages/libvirt/qemu/-1-gbeast","x-use-canonical-path-for-ramblock-id":false,"prealloc":true,"size":33554432000}'
-overcommit mem-lock=off -smp
24,sockets=1,dies=1,clusters=1,cores=12,threads=2 -uuid
14a09575-a9f7-4009-a518-4f2c63fb5988 -display none -no-user-config
-nodefaults -rtc base=localtime,driftfix=slew -global
kvm-pit.lost_tick_policy=delay -no-shutdown -boot strict=on -kernel
/nix/store/mijjaxkbrhag85l4im8j19mx4vq15bdk-nixos-system-gbeast-24.11.20250120.ae584d9/kernel
-initrd
/nix/store/xm6yln4hs5lysqaw20x2xmi6pkm49i2f-initrd-linux-6.6.72/initrd
-append 'loglevel=7 initcall_blacklist=sysfb_init net.ifnames=0
init=/nix/store/mijjaxkbrhag85l4im8j19mx4vq15bdk-nixos-system-gbeast-24.11.20250120.ae584d9/init
regInfo=/nix/store/gabjc36vvhng6r40cvrnyj4cp01nvzcp-closure-info/registration
console=ttyS0,115200n8' -device
'{"driver":"pcie-root-port","port":8,"chassis":1,"id":"pci.1","bus":"pcie.0","multifunction":true,"addr":"0x1"}'
-device
'{"driver":"pcie-root-port","port":9,"chassis":2,"id":"pci.2","bus":"pcie.0","addr":"0x1.0x1"}'
-device
'{"driver":"pcie-root-port","port":10,"chassis":3,"id":"pci.3","bus":"pcie.0","addr":"0x1.0x2"}'
-device
'{"driver":"pcie-root-port","port":11,"chassis":4,"id":"pci.4","bus":"pcie.0","addr":"0x1.0x3"}'
-device
'{"driver":"pcie-root-port","port":12,"chassis":5,"id":"pci.5","bus":"pcie.0","addr":"0x1.0x4"}'
-device
'{"driver":"pcie-root-port","port":13,"chassis":6,"id":"pci.6","bus":"pcie.0","addr":"0x1.0x5"}'
-device
'{"driver":"pcie-root-port","port":14,"chassis":7,"id":"pci.7","bus":"pcie.0","addr":"0x1.0x6"}'
-device
'{"driver":"pcie-root-port","port":15,"chassis":8,"id":"pci.8","bus":"pcie.0","addr":"0x1.0x7"}'
-device
'{"driver":"pcie-root-port","port":17,"chassis":9,"id":"pci.9","bus":"pcie.0","addr":"0x2.0x1"}'
-device
'{"driver":"pcie-root-port","port":16,"chassis":10,"id":"pci.10","bus":"pcie.0","multifunction":true,"addr":"0x2"}'
-device '{"driver":"qemu-xhci","id":"usb","bus":"pci.3","addr":"0x0"}'
-fsdev local,security_model=passthrough,id=fsdev-fs0,path=/nix/store
-device
'{"driver":"virtio-9p-pci","id":"fs0","fsdev":"fsdev-fs0","mount_tag":"nix-store","bus":"pci.1","addr":"0x0"}'
-chardev pty,id=charserial0 -serial stdio -device
'{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}'
-audiodev '{"id":"audio1","driver":"none"}' -global ICH9-LPC.noreboot=off
-watchdog-action reset -device
'{"driver":"vfio-pci","host":":01:00.1","id":"hostdev0","bus":"pci.5","addr":"0x0"}'
-device
'{"driver":"vfio-pci","host":":01:00.0","id":"hostdev1","bus":"pci.4","addr":"0x0"}'
-device
'{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.6","addr":"0x0"}'
-sandbox
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny
-msg timestamp=on