From nobody Thu May 11 13:05:42 2023 X-Original-To: virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QHBwL3McQz4BCmN for ; Thu, 11 May 2023 13:05:54 +0000 (UTC) (envelope-from corvink@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QHBwL2gsjz49gY; Thu, 11 May 2023 13:05:54 +0000 (UTC) (envelope-from corvink@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683810354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vEmLDzXFYW+6pRI/h4bEtFLDyI45pKjsLvcQtBDlloo=; b=StzvCWK+TuAFKUP8V18b/BVDuR43WtsGGFgXEv4EG07NuxIJ4IfN9ewyhoZ8OlqgYb5WJk rOkXDm9++IEJFHwmtcauyvRzKcVp1ZreC9mEUdEX0HtrbDQjCNCj0OaF7H1qg4pc5zjeab v05Oc9nWXV6Tqo94N2OXmhxF5s2nja1m8dCoQJGJ54rVCu/2UrfPGh+HvqD1Y+o3t35XQs 4BEHssXznBUWwa16HO7P0sx7HyPhzXTWK2GOCcUjPjR4KrQvPQghLpRt/zp/ibEOfOnuwg Xp22jzbAFfl4i3bLYqfZBe2tdb2oRhI4h3E4w89/jpZG0Uwey40HZw4R4SU9zA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683810354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vEmLDzXFYW+6pRI/h4bEtFLDyI45pKjsLvcQtBDlloo=; b=iA0H2UxATKC2diNo38mWUbY3ug/dyh2gqTkogl60pmwDgkBap05gvGrqihd5QazXYSMJgr +wKVM0ujvuLAaVIBGqEHam+WDj+c2nSobvacte6DIRohnzJCKonEHruzuYwjacA4BYFUUR Vh7yzqXjRibhfE876tt/XQgnr/L0on3cr3zLQR2H1TLGbdN9DfSYDjf0yDlpICtXfLaCD0 eQhfQ/k3kEduZ98VE8jNZft5e03eiv3dWL9p9+mtP/iKwgPyY3TKv1jw2ZRMidV36yxvSv G0+2tS21hmP7R1uNph3BlC/y4FazY9b3z1U5g43bpRYrF0z4TZKevg6nnwfQKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683810354; a=rsa-sha256; cv=none; b=h6pmV2vHUYIeLuTJ63u4Wl0C16jHoh3sfJSiKaeaYvFjCBqGgm0rxdVcm9NtlD03RNSwbA AbxwfYZk8RmX5WV0XfaieM7R1GhC9p+hcfzb2Vs1pUeqEpSiUp3nfRabfubn4bqcwonHMn 0IoF9qkeQTThGH6gIl7QJ+Tzn5FeXCR2iXQqogVNoYEWxufgqWk320NCNrbaH2cJT+uCV4 8+dueSlkr/EifCP45nu3uIsEqA5024tyVLcXkK9O/3FDmMZGD8RocrPzCDD+YVXL5v+z7M J7CsVUF3NOBJz3s6C6XSs1SaBqmRitJeSb/OnaNxQ7xIAf358OdU8r96mu3WzA== Received: from corvink-nb.beckhoff.com (unknown [IPv6:2001:9e8:da76:7b00:9ecd:454c:c57e:cada]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: corvink) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QHBwK60T9zJYr; Thu, 11 May 2023 13:05:53 +0000 (UTC) (envelope-from corvink@FreeBSD.org) From: =?UTF-8?q?Corvin=20K=C3=B6hne?= To: virtualization@FreeBSD.org Cc: =?UTF-8?q?Corvin=20K=C3=B6hne?= Subject: [PATCH 0/3] bhyve: enabling bus enumeration Date: Thu, 11 May 2023 15:05:42 +0200 Message-Id: <20230511130545.748706-1-corvink@FreeBSD.org> X-Mailer: git-send-email 2.40.1 List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ThisMailContainsUnwantedMimeParts: N Hi, this is the next patch series, it'd like to send to the EDKII project. It enables bus enumeration. The use case for this is PCI ROM support. Enabling bus enumeration means that the firmware reassigns the address of the BAR of all PCI devices and executes PCI ROMs if it find some. Our previous approach was that bhyve assigns the address of all BARs. This is required in cases were no firmware is available like booting with bhyveload or grub2-bhyve. While reassigning BARs in guest firmware seems unnecessary, it's required to fully support PCI ROMs. Some use cases where bus enumeration is required: 1. GPU passthrough Here bus enumeration solves two issues: 1. The ROM can contain a GOP driver. This is required for graphical output before the OS driver is loaded. 2. The linux drm driver has a dependency on the ROM. As GPU ROMs are shadowed in system memory, it searches for this shadowed version. So, drm won't be able to find the ROM if bus enumeration is disabled and refuses to load. 2. NIC passthrough The ROM can contain a PXE driver which is required to PXE boot from this device. Any feedback is appreciated. Thanks, Corvin Corvin Köhne (3): Revert "OvmfPkg/Bhyve: consume PciHostBridgeLibScan" Revert "OvmfPkg/Bhyve: remove IncompatiblePciDeviceSupport DXE driver" OvmfPkg/BhyveBhfPkg: enable bus enumeration OvmfPkg/Bhyve/BhyveX64.dsc | 4 ++-- OvmfPkg/Bhyve/BhyveX64.fdf | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.40.1