Some build fixes for building a minmal qemu for microvm
cc -m64 @qemu-system-x86_64.rsp
ld: libqemu-x86_64-softmmu.a.p/target_i386_kvm_kvm.c.o: in function
`hyperv_init_vcpu':
target/i386/kvm/kvm.c:1757:(.text+0x5d83): undefined reference to
`hyperv_is_synic_enabled'
ld: libqemu-x86_64-softmmu.a.p/hw_i386_x86-common.c.o: in function
`x86_bios_rom_reload':
hw/i386/x86-common.c:1104:(.text+0x240d): undefined reference to
`x86_firmware_configure'
collect2: error: ld returned 1 exit status
The build is done with the devices file:
CONFIG_PCI_DEVICES=n
CONFIG_MICROVM=y
CONFIG_VIRTIO_BLK=y
CONFIG_VIRTIO_SERIAL=y
CONFIG_VIRTIO_INPUT=y
CONFIG_VIRTIO_INPUT_HOST=y
CONFIG_VHOST_USER_INPUT=y
CONFIG_VIRTIO_NET=y
CONFIG_VIRTIO_SCSI=y
CONFIG_VIRTIO_RNG=y
CONFIG_VIRTIO_CRYPTO=y
CONFIG_VIRTIO_BALLOON=y
CONFIG_VIRTIO_GPU=y
CONFIG_VHOST_USER_GPU=y
and with these confiure options:
../../configure ${common_configure_opts} \
--without-default-features \
--target-list=x86_64-softmmu --enable-kvm --disable-tcg \
--enable-pixman --enable-vnc \
--enable-virtfs \
--enable-linux-aio --enable-linux-io-uring \
--enable-numa \
--enable-attr \
--enable-coroutine-pool \
--audio-drv-list="" \
--without-default-devices \
--with-devices-x86_64=microvm \
--enable-vhost-kernel --enable-vhost-net \
--enable-vhost-vdpa \
--enable-vhost-user --enable-vhost-user-blk-server \
--enable-vhost-crypto \
--enable-seccomp
CI works: https://gitlab.com/anisinha/qemu/-/pipelines/2395426997
CC: [email protected]
CC: [email protected]
Ani Sinha (2):
i386/pc_sysfw: stub out x86_firmware_configure
i386/hyperv: add stubs for synic enablement
hw/i386/pc_sysfw.c | 31 -------------------------------
hw/i386/pc_sysfw_ovmf-stubs.c | 5 +++++
hw/i386/pc_sysfw_ovmf.c | 33 +++++++++++++++++++++++++++++++++
target/i386/kvm/hyperv-stub.c | 5 +++++
target/i386/kvm/hyperv.c | 9 +++++++++
target/i386/kvm/hyperv.h | 1 +
target/i386/kvm/kvm.c | 12 +++++-------
7 files changed, 58 insertions(+), 38 deletions(-)
--
2.42.0