Question about creating virtual devices outside of QEMU

2024-11-19 Thread Krystian Świtała
Hello,

I am looking for a solution that allows creating and running virtual
devices outside of QEMU (in a separate process). The main goal is to
connect from an external process to the virtual PCI/PCIe bus in QEMU. I am
aware of 'vfio-user', but I have the impression that this solution is not
yet ready - it is not in the official QEMU repository.

Is 'vfio-user' the only option? If so, when will it be included in the
official repository? Are there any alternatives? Does the project plan to
create a general method for creating virtual devices (PCI/PCIe and MMIO)
without the need to modify QEMU code?

Thank you in advance for any information and suggestions.

Best regards, Krystian


QEMU v6.2 riscv64 device crash

2024-11-19 Thread Yanfeng
Dear experts,

I am running a rv64 binary program which uses hypervisor extension v0.6.1 on
QEMU with "virt" board. The same RiscV program can run on both QEMU v6.0 and
v6.1, but it led to crash of QEMU v6.2:

```
ERROR:../..target/riscv/translate.c:232:get_gpr: code should not be reached
Bail out! ERROR:../../target/riscv/translate.c:232:get_gpr: code should not be
reached
Aborted (core dumped)
```

>From GDB I can see the target is in VU mode, and the crash happens when the 
>code
at 0x10152 is hit: 

```
1014e <_start>:
   1014e:   0069e197  auipc gp,0x69e
   10152:   96218193  addi  gp,gp,-1694 # 6adab0 <__global_pointer$>
```

Since I am too new to QEMU tracing, can someone teach how can I find out more
information?

Regards,
yf






-append option to pass kickstart file

2024-11-19 Thread Jack Lamb via
Hi,

I am trying to install Fedora 41 VM using QEMU on macOS using a
kickstart file. I've trouble passing the location of kickstart file to
the OS.

I'd downloaded the ISO file, created a qcow2 disk image using qemu-img,
and created a kickstart file[1].

Trying to boot the VM with qemu-system-x86_64 results in the following
error:

$ qemu-system-x86_64 -m 4G -cdrom fedora41.iso -hda vm.qcow2 -boot d -net nic 
-net user -append "ks=file:vm.ks text"
qemu-system-x86_64: -append only allowed with -kernel option

What's the best way to pass the kickstart file to the OS from qemu? Do
I've to extract the vmlinuz out of the ISO and then pass it as
-kernel VMLINUZ -append "ks=file:vm.ks"?

My goal is to learn how to do an unattended VM install using kickstart
files on QEMU.

Thanks!

[1] https://pastebin.com/bbp2CZdy

-- 
Jack