From owner-freebsd-virtualization@freebsd.org Sun Mar 24 01:44:28 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 E10C4154361E for ; Sun, 24 Mar 2019 01:44:27 +0000 (UTC) (envelope-from jtubnor@gmail.com) Received: from mail-ot1-x329.google.com (mail-ot1-x329.google.com [IPv6:2607:f8b0:4864:20::329]) (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 DF2688D211; Sun, 24 Mar 2019 01:44:26 +0000 (UTC) (envelope-from jtubnor@gmail.com) Received: by mail-ot1-x329.google.com with SMTP id u15so5112359otq.10; Sat, 23 Mar 2019 18:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dusFAN4Cow0wmK+2huIsQ0gE4pSEsp6HNPB8M6ZFr5I=; b=Id8piFTUgbJNrGn5Srwdlz7B77mKxbtOOIH+kttzb+FeEpGSwCs9iHLt9VUajQSVx8 dEsQeDmsEXbCUhYR8eO0/C7kqR8hFw82DgalmiVb6JS4pVHeVn2BC7wAM7PAmWevxyDm QaSZ4xEqDu+lRfR7jYaNqhVQ+Oag/PT5Z7MMY84757dnWb+AJNYPciP0PFJHjZevuoaM Fd1H4CHA+Rs/FX9LxDCw3Piui6DRFKGHmuxGuAY26dAGVbP8Ky+aOOz2bTG+cj25UL61 5g6XKu5FMysYX/fQF6DSoJT9+6gXbNJD0BbN1L68NCNwdq8RnXYO+cTr41BAoUhRlmbs PxDA== 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=dusFAN4Cow0wmK+2huIsQ0gE4pSEsp6HNPB8M6ZFr5I=; b=bDo7R70U3LKk6aRVrFLL9roL/pU865p1lfZc7UB6mlsNWuALBTecCqsqin/x9hdGjt UxyLiU9AlZ+N1cJyY+/QrRLXJAZhQzao39F1rJtjFGfcsuoIKetu2jeGqjqBnL7RTsBb yn2kZTytPZdqnbM73xS8RyUuET+DzbPEXEUTuGcMPq+vrIoC0EFrjEZnsptr97xaUe08 VZy5d1uypOlcsdKMmoI3j+7qK8JJa1mjix5TVp8xrzzr8bNWeVVQLlnzG5DtuRjif8B+ md9btsQmZvABkFtmuhNJQc5nRss/UcuVYlT7aoPfJ2lE5t1CDFz9COtJk4KQ8YQiY1Dy dWAQ== X-Gm-Message-State: APjAAAWWF+aNJ0NwMziwAfy7VLJEwdUMZbYtIwHN/+jQSp/N5Fc/OB48 VaJWmgQ4LCrHznhGjGnxeqmysUjy+lf+OWlLTscidFu5nFg= X-Google-Smtp-Source: APXvYqyqafr3byet+Vs6NhdAvY9dTB785r01POSW70JdoTeCMoDeih+AUBNF8aH4EIZrFK2JHU5jrYUL9Rsi7qAhoNk= X-Received: by 2002:a9d:6047:: with SMTP id v7mr9259002otj.243.1553391865874; Sat, 23 Mar 2019 18:44:25 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jason Tubnor Date: Sun, 24 Mar 2019 10:44:18 +0900 Message-ID: Subject: Re: emulated PCI device BAR size To: Chuck Tuffli Cc: "freebsd-virtualization@freebsd.org" X-Rspamd-Queue-Id: DF2688D211 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=Id8piFTU; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of jtubnor@gmail.com designates 2607:f8b0:4864:20::329 as permitted sender) smtp.mailfrom=jtubnor@gmail.com X-Spamd-Result: default: False [-6.07 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[9.2.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.17)[-0.173,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-2.88)[ip: (-9.37), ipnet: 2607:f8b0::/32(-2.85), asn: 15169(-2.14), country: US(-0.07)]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Sun, 24 Mar 2019 01:44:28 -0000 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!