Revision 5430a28f net/tap.c

b/net/tap.c
491 491
        }
492 492
    }
493 493

  
494
    if (qemu_opt_get_bool(opts, "vhost", !!qemu_opt_get(opts, "vhostfd"))) {
494
    if (qemu_opt_get_bool(opts, "vhost", !!qemu_opt_get(opts, "vhostfd") ||
495
                          qemu_opt_get_bool(opts, "vhostforce", false))) {
495 496
        int vhostfd, r;
497
        bool force = qemu_opt_get_bool(opts, "vhostforce", false);
496 498
        if (qemu_opt_get(opts, "vhostfd")) {
497 499
            r = net_handle_fd_param(mon, qemu_opt_get(opts, "vhostfd"));
498 500
            if (r == -1) {
......
502 504
        } else {
503 505
            vhostfd = -1;
504 506
        }
505
        s->vhost_net = vhost_net_init(&s->nc, vhostfd);
507
        s->vhost_net = vhost_net_init(&s->nc, vhostfd, force);
506 508
        if (!s->vhost_net) {
507 509
            error_report("vhost-net requested but could not be initialized");
508 510
            return -1;

Also available in: Unified diff