README: clarify `vhost-user-device-pci` usage
In vhost-device-can/README.md and vhost-device-console/README.md we suggest to use -device vhost-user-device-pci but IIUC that device can't be created by the user without patching QEMU, at least QEMU <= 10.1.
Next version of QEMU is changing the device name (see https://patchew.org/QEMU/[email protected]/).
So @stsquad @epilys should we clarify it better what to do with QEMU <= 10.1 and QEMU > 10.1 (when the patch will be merged?
@uran0sH this should be related to the issue you told us (@germag) while testing vhost-device-console on macOS, so IIUC you just need to patch QEMU in this way:
diff --git a/hw/virtio/vhost-user-device-pci.c b/hw/virtio/vhost-user-device-pci.c
index f10bac874e..0c593da83a 100644
--- a/hw/virtio/vhost-user-device-pci.c
+++ b/hw/virtio/vhost-user-device-pci.c
@@ -39,7 +39,7 @@ static void vhost_user_device_pci_class_init(ObjectClass *klass,
PCIDeviceClass *pcidev_k = PCI_DEVICE_CLASS(klass);
/* Reason: stop users confusing themselves */
- dc->user_creatable = false;
+ dc->user_creatable = true;
k->realize = vhost_user_device_pci_realize;
set_bit(DEVICE_CATEGORY_INPUT, dc->categories);
Yes, good idea.
I have another question. Is there a plan to send the vhost-device-console patches to upstream? It is still in https://github.com/virtualopensystems/qemu/tree/vhu-console-rfc
I have another question. Is there a plan to send the vhost-device-console patches to upstream? It is still in https://github.com/virtualopensystems/qemu/tree/vhu-console-rfc
@uran0sH I guess you mean QEMU patches, right? I have no idea, @TimosAmpel maybe knows the plan.
FYI: we're proposing adding a generic vhost-user device to Cloud Hypervisor in https://github.com/cloud-hypervisor/cloud-hypervisor/pull/7221, not as a development/testing device, but as a solution for allowing Cloud Hypervisor users to use devices that upstream doesn't necessarily want dedicated code for due to its tight focus.
There have been a couple of attempts: https://patchew.org/QEMU/[email protected]/ and https://patchew.org/QEMU/[email protected]/ but there is resistance to having a "generic" test device which might get abused.