From owner-svn-src-all@freebsd.org Fri Mar 15 02:31:52 2019 Return-Path: Delivered-To: svn-src-all@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 7DCDE1538757; Fri, 15 Mar 2019 02:31:52 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E59F1821FE; Fri, 15 Mar 2019 02:31:51 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id x2F2VnWB027996; Thu, 14 Mar 2019 19:31:49 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id x2F2VnR6027995; Thu, 14 Mar 2019 19:31:49 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201903150231.x2F2VnR6027995@gndrsh.dnsmgr.net> Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve In-Reply-To: <201903150211.x2F2BSai079898@repo.freebsd.org> To: Chuck Tuffli Date: Thu, 14 Mar 2019 19:31:49 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: E59F1821FE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.95)[-0.951,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Mar 2019 02:31:52 -0000 > Author: chuck > Date: Fri Mar 15 02:11:28 2019 > New Revision: 345171 > URL: https://svnweb.freebsd.org/changeset/base/345171 > > Log: > Fix bhyve PCIe capability emulation > > PCIe devices starting with version 1.1 must set the Role-Based Error > Reporting bit. > > And while we're in the neighborhood, generalize the code assigning the > device type. > > Reviewed by: imp, araujo, rgrimes > Approved by: imp (mentor) > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D19580 This code requires maintainer approval before a commit, though this was well reviewed that doesnt exclude it from the MAINTAINERS entry. Leave it for now, I am sure jhb or thyco are fine with it, this is just a heads up FYI for future commits. Bhyve code has been and still is under a fairly tight MAINTAINER status. > Modified: > head/usr.sbin/bhyve/pci_emul.c > > Modified: head/usr.sbin/bhyve/pci_emul.c > ============================================================================== > --- head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:27 2019 (r345170) > +++ head/usr.sbin/bhyve/pci_emul.c Fri Mar 15 02:11:28 2019 (r345171) > @@ -953,7 +953,10 @@ pci_emul_add_pciecap(struct pci_devinst *pi, int type) > bzero(&pciecap, sizeof(pciecap)); > > pciecap.capid = PCIY_EXPRESS; > - pciecap.pcie_capabilities = PCIECAP_VERSION | PCIEM_TYPE_ROOT_PORT; > + pciecap.pcie_capabilities = PCIECAP_VERSION | type; > + /* Devices starting with version 1.1 must set the RBER bit */ > + if (PCIECAP_VERSION >= 1) > + pciecap.dev_capabilities = PCIEM_CAP_ROLE_ERR_RPT; > pciecap.link_capabilities = 0x411; /* gen1, x1 */ > pciecap.link_status = 0x11; /* gen1, x1 */ > > > -- Rod Grimes rgrimes@freebsd.org