From owner-svn-src-all@freebsd.org Fri Mar 15 03:05:27 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 E46F6153979F for ; Fri, 15 Mar 2019 03:05:26 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: from mail-it1-x131.google.com (mail-it1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) (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 79C4B83D83 for ; Fri, 15 Mar 2019 03:05:24 +0000 (UTC) (envelope-from andy@fud.org.nz) Received: by mail-it1-x131.google.com with SMTP id z124so8655067itc.2 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=tPavpMs5lkwVcc5RhTZbU7wDEfB/Uvj0epkqbm9WAyeYux7OvUxjLnfUzJ3pY9AC1X 9q+O5PJFBerELG2dqxIiGSqUBopU4tUyJ2yXBkw5RLAupnbsFeokUYtrDrF3bqP4V45j WZa6gGEQpLN5jQ4/P6zehAjoJnZLmPqjFZqORz3lZo9yUGgOjnY0TiID8VK3UiuP8Xkj W8uTDF8tA7m7zpepOzusJS1V8Dk550IAP5G55eVZfkQ9hm8ux2ekscJD8ZSxW7yEuhwA +qSqsxCyrfD7or0J8AhorVtweHXUfYyXzNGhPbCBZv8F+Z6Da6BBCwL9autlbDBTcj/y v36A== X-Gm-Message-State: APjAAAWC7xZjvYbBApay7a17Zz1px/rBEXQmnJj9yuQPIXz/MZV6ss4P pw2fl2JXmFM29xcPPS4gtGuChQ9rCpbrCmPN2o6yLA== 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: 79C4B83D83 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-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 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