[libvirt] [PATCH] qemu: Use virtio network device for aarch64/virt

Daniel P. Berrange berrange at redhat.com
Fri Jan 24 14:07:53 UTC 2014


On Fri, Jan 24, 2014 at 05:34:05PM +0400, Oleg Strikov wrote:
> This patch changes network device type used by default from rtl8139
> to virtio when architecture type is aarch64 and machine type is virt.
> Qemu doesn't support any other machine types for aarch64 right now and
> we can't make any other aarch64-specific tuning in this function yet.
> 
> Signed-off-by: Oleg Strikov <oleg.strikov at canonical.com>
> ---
>  src/qemu/qemu_domain.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
> index c947e2e..a0e9a33 100644
> --- a/src/qemu/qemu_domain.c
> +++ b/src/qemu/qemu_domain.c
> @@ -795,11 +795,12 @@ qemuDomainDefaultNetModel(const virDomainDef *def)
>  {
>      if (def->os.arch == VIR_ARCH_S390 ||
>          def->os.arch == VIR_ARCH_S390X)
>          return "virtio";
> 
> -    if (def->os.arch == VIR_ARCH_ARMV7L) {
> +    if (def->os.arch == VIR_ARCH_ARMV7L ||
> +        def->os.arch == VIR_ARCH_AARCH64) {
>          if (STREQ(def->os.machine, "versatilepb"))
>              return "smc91c111";
> 
>          if (STREQ(def->os.machine, "virt"))
>              return "virtio";

We could do with an addition to the qemuxml2argvtest suite to
validate correct setup for aarch64 guests when no NIC model
is provided in the XML.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list