On Wed, Feb 28, 2024 at 06:35:46 -0800, Andrea Bolognani wrote:
On Tue, Feb 27, 2024 at 05:36:08PM +0100, Peter Krempa wrote:
> @@ -4157,6 +4158,14 @@ qemuDomainDefAddDefaultDevices(virQEMUDriver *driver,
> switch (def->os.arch) {
> case VIR_ARCH_I686:
> case VIR_ARCH_X86_64:
> + /* don't add anything for microvm */
> + if (qemuDomainIsMicrovm(def)) {
> + /* explicitly add 'none' USB controller */
> + usbModel = VIR_DOMAIN_CONTROLLER_MODEL_USB_NONE;
> + addDefaultUSB = true;
> + break;
> + }
I'm not terribly keen on seeing support for microvm officially
introduced in libvirt.
AFAIK nobody ever asked for it, and given that the intended use case
for the machine type is specifically to have incredibly minimal, fast
booting VMs, to the extent where trimmed out kernels and even custom
firmware implementations are employed to shave every last possible
microsecond off the boot time, I really don't expect that anyone
would ever consider using libvirt to manage them.
In other words, I think we should just keep pretending they don't
exist and save a bit of code/complexity.
I sure can do that. My motivation for doing this was to cover explicitly
every case (machine type) where qemu does honour '-usb'. 'microvm' is
one of them (if ACPI is enabled) and it adds a MMIO mapped USB
controller.
Regardless of whether this patch gets applied the USB controller will
be removed from there as we don't really support the platform-internal
USB controllers for ARM boards either.