From owner-freebsd-virtualization@freebsd.org Fri Apr 5 18:40:52 2019 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 243D71556902 for ; Fri, 5 Apr 2019 18:40:52 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: from mail-ot1-f66.google.com (mail-ot1-f66.google.com [209.85.210.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 368BF6EA8A for ; Fri, 5 Apr 2019 18:40:51 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: by mail-ot1-f66.google.com with SMTP id o74so6543575ota.3 for ; Fri, 05 Apr 2019 11:40:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=TTShiwIio7BCWyPFTVGgh2kvzySL5QZpS7U+ef1wam8=; b=INCvcsOcaj7OpQQCc1/mKjph+3RiEa+k3UvZJo5G/w/U9Uf34RpWKZKGD6txMhDhYm oExk181AcFMa7FeckA4Jiu6kRe+lVr+QsSKHQXqdHefBQ7MDCu9U+MeyNi3F8JX1mNIL 85UC3aLedsTsfsvDQVkWOGtVqBhECXrI0ZUL5HPrBaN0oOTrKL+rzOQ5mmDKt2n41JNn ZusgOmqfU4OvTupbXDoacS2y72KmRq/hnyfzdQCf4GYWomjx9YA36C41JoG0h9xh2JkF vZkkld7uwQlHZ7p7I7hJ/aWcspyyju3x2mg3LGPrASzcqoRk7KPVM/9T61wBtrnL1+Yl Cubw== X-Gm-Message-State: APjAAAU3f4zaz5+QhC8B8D0HorP+ytfiW/tneWfyEG+VqJjVMI3EM/lc dPBTcuumutelPfFY6mvGTWwRh26Z X-Google-Smtp-Source: APXvYqw/r9WIQQ+9vCleQJEdqf/mtOzhVM3QSw6GLxCqQtif31MZhPqP9F9/hxLXTbGQxM7hYEM2Iw== X-Received: by 2002:a9d:57c4:: with SMTP id q4mr9248907oti.151.1554487841695; Fri, 05 Apr 2019 11:10:41 -0700 (PDT) Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com. [209.85.167.177]) by smtp.gmail.com with ESMTPSA id r190sm8980243oie.43.2019.04.05.11.10.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Apr 2019 11:10:41 -0700 (PDT) Received: by mail-oi1-f177.google.com with SMTP id l203so5623434oia.3 for ; Fri, 05 Apr 2019 11:10:41 -0700 (PDT) X-Received: by 2002:aca:407:: with SMTP id 7mr7752502oie.90.1554487841200; Fri, 05 Apr 2019 11:10:41 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Chuck Tuffli Date: Fri, 5 Apr 2019 11:10:30 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: emulated PCI device BAR size To: Jason Tubnor Cc: "freebsd-virtualization@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 368BF6EA8A X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of ctuffli@gmail.com designates 209.85.210.66 as permitted sender) smtp.mailfrom=ctuffli@gmail.com X-Spamd-Result: default: False [-4.17 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; RWL_MAILSPIKE_GOOD(0.00)[66.210.85.209.rep.mailspike.net : 127.0.0.18]; RCVD_COUNT_THREE(0.00)[4]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.94)[-0.938,0]; FORGED_SENDER(0.30)[chuck@freebsd.org,ctuffli@gmail.com]; FREEMAIL_TO(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[chuck@freebsd.org,ctuffli@gmail.com]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; IP_SCORE(-1.22)[ipnet: 209.85.128.0/17(-3.87), asn: 15169(-2.17), country: US(-0.06)]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[66.210.85.209.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 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, 05 Apr 2019 18:40:52 -0000 On Sat, Mar 23, 2019 at 6:44 PM Jason Tubnor wrote: > > > > On Sun., 24 Mar. 2019, 6:35 am Chuck Tuffli, wrote: >> >> On Mon, Mar 18, 2019 at 10:15 AM Chuck Tuffli wrote: >> >> > >> > So my question is how to best fix this. The easiest would be to add a >> > check to the BAR size calculation in pci_nvme.c along the lines of: >> > #define NVME_MMIO_SPACE_MIN (1 << 14) >> > ... >> > pci_membar_sz = MAX( , >> > NVME_MMIO_SPACE_MIN); >> >> I went down this route and have a patch up for review >> (https://reviews.freebsd.org/D19676) if anyone is interested. >> >> --chuck > > > I've built and installed this patch on FreeBSD 12.0-STABLE-amd64-20190314-r345117. Testing occurred against Windows 10 Pro guest with a presented NVMe bhyve device and all IO transactions worked without issue. > > Can this be committed to head and MFD to 12-STABLE. Thanks! Committed with r345956. MFC in 2 weeks if nothing pops up. Thanks again for all your testing! --chuck https://svnweb.freebsd.org/changeset/base/345956