From owner-freebsd-virtualization@freebsd.org Fri Jun 1 10:24:18 2018 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C65E0FDD31A for ; Fri, 1 Jun 2018 10:24:18 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-lf0-x241.google.com (mail-lf0-x241.google.com [IPv6:2a00:1450:4010:c07::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 252D071F7F; Fri, 1 Jun 2018 10:24:18 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-lf0-x241.google.com with SMTP id i83-v6so1914233lfh.5; Fri, 01 Jun 2018 03:24:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=4g2GmygyfG88psTFAd6QAs/C8DSfLIx3fHQK50oi/tc=; b=XW/H066ZoAu5je8b+D3YhqX1Ry18Y9JHyF6JuAhD92hFWfeJxcKVfnOouo6LC0Pc1q cHbH1WHVeZyniF0dMg8nh3PoUfVSdFlORYNPWOVKnit+gMTfEPAFE/JHpdbDIFmAnf00 UDoCBpXysYaZYYlscHn3zKlCZKa5363eSCvpQq2zHd2M+f1h2SDXxG7VzHljVKV8BcO9 vLw4zjp/gXGivVnHTMXk1XBNzHqUF66WsnCevssXhw167B1wKqexulPNwR/CZkjZB3Ap PodBifTVs0y9hIeYyqyzjvuICDbBxIIcDjm2fPzv9Tnb1lMnbQIihuYlMvSRbPxIDXZA +Tpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=4g2GmygyfG88psTFAd6QAs/C8DSfLIx3fHQK50oi/tc=; b=Pdaa+PunSDRpFD2O7ORm5gEIK5GfvjpVhQcuFrijrNcpB+KvFfZLXF2YhVyVCFHu5n fUF/WYc0VEx79GVhJo898Gq+pjx3iEUeszf2NLXaJiqPExfrxsYBlHUF08KqLo+R6B6Z NrLHE76kxDtayE82RQkp5PHu5LQognuyHeCoQj12akZ/K0WG4QPZeLCtDPK6++QaMw2g LpPRk8HWAKbtRHZ+hMJ/0U3onSWHxmebaIRz4byOuAnfR4nBMkTqfNrEWM4vDrwodNhX KYQsJo/7TVWqT1slNSlQb1U/ugLVCE25Gpvedr4ssqZR/VEpbwIAQ2EjR8EPi7q9Fbtx 6VbA== X-Gm-Message-State: ALKqPwcfoje+EjqmHrSKvfmCo5Q95szIq97vXnSzQb5clvW1e3+eTQ8a /QFoXquk/CECGswN0ZjSHLTlAzlkS/w5mQoNyr10QA== X-Google-Smtp-Source: ADUXVKKYbxRb1eCJ4WTvnJShgS/a4VosAWcpqjn4QzqvF/JUH7KtQKAiikROo/t2342gqSrvY7uA4LL7jjptVERo2FA= X-Received: by 2002:a2e:80c1:: with SMTP id r1-v6mr8093567ljg.85.1527848656837; Fri, 01 Jun 2018 03:24:16 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:1fc9:0:0:0:0:0 with HTTP; Fri, 1 Jun 2018 03:24:15 -0700 (PDT) Reply-To: araujo@freebsd.org In-Reply-To: <45bce0fc-c6a5-9b9e-9e74-312c2814a31e@omnilan.de> References: <586BFC91.4090404@omnilan.de> <2a8308c3-1570-08a3-a993-0f699fcd267d@freebsd.org> <5A0C4CFF.7040902@omnilan.de> <45bce0fc-c6a5-9b9e-9e74-312c2814a31e@omnilan.de> From: Marcelo Araujo Date: Fri, 1 Jun 2018 18:24:15 +0800 Message-ID: Subject: Re: pci_virtio_block.c Assertion failed: line 216 To: Harry Schmalzbauer Cc: Peter Grehan , freebsd-virtualization@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2018 10:24:19 -0000 2018-06-01 17:38 GMT+08:00 Harry Schmalzbauer : > Am 15.11.2017 um 15:19 schrieb Harry Schmalzbauer: > >> Bez=C3=BCglich Peter Grehan's Nachricht vom 03.01.2017 20:36 (localtime)= : >> >>> Hi Harry, >>> >>> trying to use bhyve(8) with virtio-blk and Windows guest results in cor= e >>>> dump: >>>> Assertion failed: (n >=3D 2 && n <=3D BLOCKIF_IOV_MAX + 2), function >>>> pci_vtblk_proc, file usr.sbin/bhyve/pci_virtio_block.c, line >>>> 216. >>>> Abort trap (core dumped) >>>> >>>> Unfortunately this is on a production-test machine which lacks gdb etc= . >>>> Will try to reproduce on antoher machine, but maybe someone already >>>> knows that problem? >>>> >>> virtio-blk isn't currently supported with Windows guests. You'll need >>> to use ahci-hd for now. >>> >>> However, I do have a fix that can hopefully be committed shortly. >>> >> =E2=80=A6 >> >> Mising in another reply: >> >> Wiadomo=C5=9B=C4=87 napisana przez Harry Schmalzbauer >>> > w dniu 03.01.2017, o godz. 20:33: >>>> >>> =E2=80=A6 >> >>> Will try to reproduce on antoher machine, but maybe someone already >>>> knows that problem? >>>> >>> I've seen that problem and fixed it, will upstream the patch later toda= y. >>> >>> JFYI, fixing >>> commit: >>> >> https://github.com/freenas/os/commit/0e4d6e1826f8aa7041cbeeb >> 4365c797eeec5c5f4 >> >> Thanks Jakub for the info. >> >> I can confirm that increasing BLOCKIF_IOV_MAX from 33 to 128, like the >> diff shows, solved the problem for me. >> I've successfully done some performace tests on Windows7 (virtio-blk vs. >> ahci,hd:) and also migrated one Server 2012R2 to bhyve using virtio-blk. >> >> Peter, is your mentioned fix different from just increasing >> BLOCKIF_IOV_MAX? >> If not, would you commit that please? >> > > I hope that I don't bug people knowing better, but this simple diff makes > virtio-blk usable for Windows 7. > Is there any reason not to commit? > There were some discussion[0] about this possible fix, but seems the fix is not that so simple. I got distracted with other things and I didn't further investigated this issue. Maybe Peter has something news about this issue. [0] https://reviews.freebsd.org/D10581 Best, > > Index: src/usr.sbin/bhyve/block_if.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- usr.sbin/bhyve/block_if.h (Revision 325745) > +++ usr.sbin/bhyve/block_if.h (Arbeitskopie) > @@ -39,7 +39,7 @@ > #include > #include > > -#define BLOCKIF_IOV_MAX 33 /* not practical to be > IOV_MAX */ > +#define BLOCKIF_IOV_MAX 128 /* not practical to be > IOV_MAX */ > > struct blockif_req { > struct iovec br_iov[BLOCKIF_IOV_MAX]; > > > Thanks, > > -harry > _______________________________________________ > freebsd-virtualization@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization > To unsubscribe, send any mail to "freebsd-virtualization-unsubs > cribe@freebsd.org" > --=20 --=20 Marcelo Araujo (__)araujo@FreeBSD.org \\\'',)http://www.FreeBSD.org \/ \ ^ Power To Server. .\. /_)