From owner-svn-src-head@freebsd.org Fri Mar 15 21:37:13 2019 Return-Path: Delivered-To: svn-src-head@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 1868B152F5FB; Fri, 15 Mar 2019 21:37:13 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: from mail-oi1-x241.google.com (mail-oi1-x241.google.com [IPv6:2607:f8b0:4864:20::241]) (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 941AA83EDD; Fri, 15 Mar 2019 21:37:12 +0000 (UTC) (envelope-from ctuffli@gmail.com) Received: by mail-oi1-x241.google.com with SMTP id 67so8513236oif.10; Fri, 15 Mar 2019 14:37:12 -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=J+QH5+/lhtLMPsxmxN2qZ8hG528gYh4QwEXhU2KhgbM=; b=YubHZ1iICqH/waOjQI6mTrS+yzIOrTqdI869ufAr6n6Rq724jP+6FpnkvIfJBSE6WZ XZNc0VmFmcR76Py9MEjirnF9PZVMosicRi2AU/XI2li/69oa8r/1c3kI8buuGP1PCPqL OTxTy2reisg4dQj38qRe9f2I6+XDLvUO8RmWpCEl6DkPzM0rOabdG8FS6qdwYOK5tE29 TSyDrAgIOqD/k0a5aOniD4gjVZ9ifpBL1JxGCZhFjbFGAI04rjtJP3CGHRWdRlIxOg0c PmmVN0bS9kQrBvqomKalQnxTEUOIRYzdt6bSNG5EQtH53Ii6ehTjOauL8VUTbW1lxdde QiyA== 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=J+QH5+/lhtLMPsxmxN2qZ8hG528gYh4QwEXhU2KhgbM=; b=gNMkwERB48QNGHFER6zD+KfETuOVu0HtfwkIJ+Z/yZFMvF5WPd0zIqMKPFeELhIiDG Wwx5ndAsl+gb2DPegnoULKR77SohenZgjyWQ7b1PD4Cb2mkrwgD2nM5mq5ahILZAuzr3 eEhklMRaHmhP5tLqVcFS3snCvSQAm8KdC4JaWJHKAUp/EqCvFX/j5I1V/2Asr6kQZSmx Z44YvI7BktE8+UfoSogjxyyTD8hvet95OBscoXFriGBC53DcXQwLSoVdEGGO+v7xhlUd BOWJiM4JkrYFsbOZREq+SGj59hBOGwf++jzIQMrnIsZrqjAHAQKN/r5OlfalJIpOUyB+ cKlw== X-Gm-Message-State: APjAAAUljofERHrBeuhkY61h4NYHt5J25/MnyBqmr3Z6q4LjELPLrFqI 5ZX0zZ6T5GbuvvvS1/xwr9f25Q2Dr4F6Wh01UMgiTQ== X-Google-Smtp-Source: APXvYqyWEHhj7SMbXsqtfoapWUDjOSabfMxqlz4miVoxs3LmxmzHs3Wu3R84/wveXWK4eA6BATrplO9pPJxG8O8+tSo= X-Received: by 2002:aca:f4d3:: with SMTP id s202mr2873196oih.178.1552685831631; Fri, 15 Mar 2019 14:37:11 -0700 (PDT) MIME-Version: 1.0 References: <201903150211.x2F2BSai079898@repo.freebsd.org> <5adee283-2cac-14d2-ec06-bce43bf3bcde@FreeBSD.org> In-Reply-To: <5adee283-2cac-14d2-ec06-bce43bf3bcde@FreeBSD.org> From: Chuck Tuffli Date: Fri, 15 Mar 2019 14:36:59 -0700 Message-ID: Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: John Baldwin Cc: cem@freebsd.org, Andrew Thompson , src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 941AA83EDD X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 21:37:13 -0000 Apologies all the way around. I was ignorant about the maintainer for this code and goofed. See inline for other comments. On Fri, Mar 15, 2019 at 9:28 AM John Baldwin wrote: > > On 3/14/19 10:24 PM, Conrad Meyer wrote: > > On Thu, Mar 14, 2019 at 8:06 PM Andrew Thompson wrote: > >> > >> On Fri, 15 Mar 2019 at 15:11, Chuck Tuffli wrote: > >>> bzero(&pciecap, sizeof(pciecap)); > > ... > >>> + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; > >> > >> If the message you say 'set the bit' but you are overwriting the whole variable, is this intended? > > > > Looks like it was zero before. So yeah, it sets the bit. > > It would probably be cleaner for future changes to make it a |=, but that's a > tiny nit. style(9) wants a blank line before the comment as well. Happy to make those changes > I hadn't approved it yet only because I hadn't gone and dug through my PCIe > books / specs to see what this bit is and confirm it is required. > > OTOH, it's not clear to me that bhyve PCI-e devices don't want to just be 1.0a > devices as a lowest common denominator to be as accommodating to as wide variety > of OS's as possible. > > One thing I didn't see in a review was a reason for why to make this change? > Does some OS reject devices without this bit set or is it just based on reading > the spec? bhyve doesn't assert any PCI-e errors for virtual devices, so > this bit is pretty meaningless. I was contacted by a bhyve user who mentioned that Windows didn't seem to like bhyve's NVMe emulation. This change doesn't fix that, but this is one of a handful of changes inspired by qemu. While trying to reverse engineer why Windows is grumpy, I've run across several comments in the qemu code which make claims about what Windows needs to see before starting a device. This was one of those, and (at the time) seemed innocuous enough to commit. --chuck