[libvirt] [PATCH] qemu: Add default address type for vhost-user interface on aarch64
Michal Privoznik
mprivozn at redhat.com
Fri Dec 14 09:55:30 UTC 2018
On 12/14/18 10:19 AM, Wang Yechao wrote:
> on aarch64, hotadd vhost-user interface with the follow xml file:
> <interface type='vhostuser'>
> <mac address='fa:16:3e:a2:e1:58'/>
> <source type='unix' path='/var/run/vhu24a3f044-80' mode='server'/>
> <target dev='vhu24a3f044-80'/>
> <model type='virtio'/>
> </interface>
>
> will get error like that:
> error: internal error: Nicdev support unavailable
>
> Because there is no device address type specified in xml file, so
> qemuDomainSupportsNicdev returns 'false' when invoked in
> qemuDomainAttachNetDevice. Using pci as the default address type,
> and assigns pci address later in qemuDomainEnsurePCIAddress.
>
> Signed-off-by: Wang Yechao <wang.yechao255 at zte.com.cn>
> ---
> src/qemu/qemu_hotplug.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
> index 68d021a..c1464a9 100644
> --- a/src/qemu/qemu_hotplug.c
> +++ b/src/qemu/qemu_hotplug.c
> @@ -1443,6 +1443,11 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver,
> queueSize = net->driver.virtio.queues;
> if (!queueSize)
> queueSize = 1;
> +
> + if (!net->info.type &&
> + vm->def->os.arch == VIR_ARCH_AARCH64)
> + net->info.type = VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI;
This is almost certainly incorrect. At this point, the address should
have been already assigned. Maybe you need to look into why it wasn't.
Michal
More information about the libvir-list
mailing list