From owner-svn-src-head@freebsd.org Fri Mar 15 03:05:27 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 E641E15397A0 for ; Fri, 15 Mar 2019 03:05:26 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-it1-x12d.google.com (mail-it1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) (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 79D7E83D85 for ; Fri, 15 Mar 2019 03:05:24 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: by mail-it1-x12d.google.com with SMTP id z126so5336070itd.5 for ; Thu, 14 Mar 2019 20:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fud-org-nz.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B0tjL3HIsHWt0uRBzsJJy6sndDbBy7ezM9ZNxv9nmzg=; b=j8kkyVz90XelEFnFxQdy7nqOaIRzRNBDuNt7yD0jCRM0pUmfncb7QD7mOlUqRLGKzW 2n7Um/M37VCy0AcegnbDuT6aMz3A0meGohqEzSVLW+eNVzoMd5g54W6ViP+yBwvnmk7H 44fac5O+58DcLLS2M7HbK4UO8fzuwEoW75PimJ1SQKtWPA6eT4sA0GPwSrQMFg2vLIHx BMcPB6m5nmPeP9agdivDDAxYqHaH4DSM51D65b5LB1Ifg6Rz4YuP0jutq6JCKS+NIR2r yqq3+qemJLHM6CY9xFUVvksPjCcHLALvWugNEuDClWPwxLvcwF+WpRqrU+wHSs+XF0dd ugDg== 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=B0tjL3HIsHWt0uRBzsJJy6sndDbBy7ezM9ZNxv9nmzg=; b=MYScHaPtlHIOtGfl8upmTAZOHp3AYv8pWjy/RWlTVnw06GOiZ5OwKZbVr0sT3ffbk3 uxBCHuaE6GYETNeYlVDAXWAKGIEZt7s4XnqMW4xBEmtD+RDYq6p/mU6mj6NfaJCEL11C m+IJ7h5chLTHGp6dvEFUUNCjV0Y7dgfhTDpNNiO1SYX+mBVu6MTcbmhByp8K8BHCDf/p FaXIkdV0BWYfd0xB2LefKfqmSjN4A60PiJrpubqQu1UowUEL8EVxNTPRNxAckv5dpnnb OEgSIHPo1p7o8AB16xbwKzmbX1GooDdAHpApCH/biz6B58gwqUlwbU9l5V4e2CJWeqFY oY8w== X-Gm-Message-State: APjAAAVhIle3ox+95oqsiO/vveZ3xcmNCCq6GFdTPiVBWalsT57mYGNU PgQFEf5uvGMhus78CH7u5b1GOEQfdUgXUZtLT3+P10i5VtA= X-Google-Smtp-Source: APXvYqxyDoUhVmNiRw7jaEl8MpkbC7PiAWAwMqG6PurRb/Hs4kSMEdXttkkH3MDU++JZi5V4p4DX5x7/hZ5pw4DpduM= X-Received: by 2002:a24:2811:: with SMTP id h17mr667611ith.54.1552619124026; Thu, 14 Mar 2019 20:05:24 -0700 (PDT) MIME-Version: 1.0 References: <201903150211.x2F2BSai079898@repo.freebsd.org> In-Reply-To: <201903150211.x2F2BSai079898@repo.freebsd.org> From: Andrew Thompson Date: Fri, 15 Mar 2019 16:05:12 +1300 Message-ID: Subject: Re: svn commit: r345171 - head/usr.sbin/bhyve To: Chuck Tuffli Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Rspamd-Queue-Id: 79D7E83D85 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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 03:05:27 -0000 On Fri, 15 Mar 2019 at 15:11, Chuck Tuffli wrote: > 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 > > 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 */ > If the message you say 'set the bit' but you are overwriting the whole variable, is this intended? Andrew