Re: bhyve: GPU passthrough for Nvidia cards

2025-06-26 Thread Corvin Köhne
On Thu, 2025-06-26 at 16:49 +0200, Stephan Althaus wrote: > On 6/26/25 15:07, Corvin Köhne wrote: > > Hi, > > > > I'm currently experimenting with GPU passthrough for Nvidia cards. All I > > have to > > do to make it work with Ubuntu guests, is setting the IN

bhyve: GPU passthrough for Nvidia cards

2025-06-26 Thread Corvin Köhne
Hi, I'm currently experimenting with GPU passthrough for Nvidia cards. All I have to do to make it work with Ubuntu guests, is setting the INTPIN register to any value instead of just 0x00. Unfortunately, I'm unfamiliar with PCI legacy interrupts and how they work. The INTLINE register is set to 0

Re: bhyve: bootindex= not working?

2025-05-25 Thread Corvin Köhne
On Sun, 2025-05-25 at 13:14 +0200, Roman Bogorodskiy wrote: > Hi, > > I'm trying to understand how to use bootindex= configuration for disk > devices. > > I start with a fresh copy of the VARs file: > > sudo cp /usr/local/share/uefi-firmware/BHYVE_UEFI_VARS.fd > /data/vars/freebsd_VARS.fd > > T

Re: bhyve/passthru for Intel dGPU (ARC A380)?

2025-01-06 Thread Corvin Köhne
On Mon, 2025-01-06 at 13:56 +, Peter Wood wrote: > Thanks for the feedback Corvin, and thank you for the hard work you've been > putting into GPU passthru. > > I'm reaching the end of my limited knowledge here, and I have no expectation > of any further assistance - but as a status update, BIO

Re: bhyve/passthru for Intel dGPU (ARC A380)?

2025-01-06 Thread Corvin Köhne
Hi Peter, unfortunately, this iGPU stuff is a bit messy. For some reason, Intel is unable to design them in a platform independent way. That's why bhyve has to probe for it and apply some quirks to it in it's GVT-d code. It's not expected that those quirks are required for dedicated GPUs. So, plea

Re: bhyve passthru problem

2024-06-16 Thread Corvin Köhne
On Fri, 2024-06-14 at 17:50 +1000, Peter Grehan wrote: > > I don't know why bhyve validates the BAR size. The commit adding > > this > > check is old [1] and doesn't explain it. What bhyve could do is > > rounding up the BAR size to a full page size when allocating memory > > for > > the BAR. > >

Re: bhyve passthru problem

2024-06-13 Thread Corvin Köhne
On Thu, 2024-06-13 at 10:53 +0300, Oleksandr Kryvulia wrote: >  I'm trying to passthru a wwan-adapter to linux guest using > sysutils/vm-bhyve-devel. >   >  ppt0@pci0:8:0:0:    class=0x0d4000 rev=0x01 hdr=0x00 > vendor=0x8086 device=0x7560 subvendor=0x1cf8 subdevice=0x8654 > vendor = '

Re: Accessing a VMs GUI

2024-05-26 Thread Corvin Köhne
On Fri, 2024-05-24 at 17:08 +0300, Odhiambo Washington wrote: > FreeBSD 14-RELEASE. > > I am completely unable to get my mouse working on ALL my bhyve VMs. > This used to work before I upgraded to FreeBSD 14 RELEASE. > > How I start my VM: > > # Linux Guest > /usr/sbin/bhyve -A -D -H -P -S -u -w

Re: VNC Viewer on Windows: Unable to access VMs GUI

2024-02-14 Thread Corvin Köhne
On Wed, 2024-02-14 at 15:18 +0300, Odhiambo Washington wrote: > Hellos, > > When I was still on FreeBSD 13.2-RELEASE I was able to access some > Linux VMs GUI using VNC Viewer on my Windows PC. > After I upgraded to 14-RELEASE, this changed: I can connect to the > VMs, but the GUI desktop is froze

Re: bhyve intel 530 integrated graphics error

2024-01-16 Thread Corvin Köhne
Hi, unfortunately, GPU passthrough is supported by bhyve but not OVMF. So, you have to use a patched OVMF. The required patch stack is available at https://reviews.freebsd.org/D41714. An older version and most probably still working prebuilt version is available at https://reviews.freebsd.org/D262

Re: bhyve nvidia gtx-1650 mobile passthru on win11

2023-12-18 Thread Corvin Köhne
On Sat, 2023-12-16 at 16:07 +, Nuno Teixeira wrote: > Hello all, > > Specs: > - laptop with integrated intel + dedicated nvidia > - 15-CURRENT 3b1904d9eb04 amd64 > - win11 with nvme and tpm > > I'm sharing my results with nvidia passthru: > ### > /boot/loader.conf.local: > vmm_load="YES" > pp

Re: building bhyve from source

2023-12-12 Thread Corvin Köhne
On Tue, 2023-12-12 at 16:04 -0500, Sean McBride wrote: > On 12 Dec 2023, at 15:42, Patrick M. Hausen wrote: > > > Compile on 13.1-p(latest) if possible > > Quite possible. I'm doing the compiling in a VM, so I'll just create > another. > > I suppose I may as well put TrueNAS in a VM and do my co

Re: bhyve issues in 15-CURRENT

2023-09-20 Thread Corvin Köhne
On Wed, 2023-09-20 at 19:02 -0500, Dustin Marquess wrote: > > > > I just upgraded from a kernel+userland of 15-CURRENT from a release > 20 days ago (git commit 565c887) to one today (git commit e39e6be). > Afterwards, I've noticed two things that are probably really the same > thing: > > - My W

Re: Sudden need for bhyve TPM Emulation... willing to port swtpm?

2023-08-20 Thread Corvin Köhne
On Mon, 2023-08-21 at 08:35 +0200, Corvin Köhne wrote: > On Sun, 2023-08-20 at 19:52 +0200, Goran Mekić wrote: > > On 8/19/23 17:27, Goran Mekić wrote: > > > On 8/19/23 10:27, Goran Mekić wrote: > > > > > > With updated port there's also support for CUSE,

Re: Sudden need for bhyve TPM Emulation... willing to port swtpm?

2023-08-20 Thread Corvin Köhne
On Sun, 2023-08-20 at 19:52 +0200, Goran Mekić wrote: > On 8/19/23 17:27, Goran Mekić wrote: > > On 8/19/23 10:27, Goran Mekić wrote: > > > > > With updated port there's also support for CUSE, which would > > > > > allow > > > > > swtpm > > > > > to be used with pass-through. The problem is that so

Re: Sudden need for bhyve TPM Emulation... willing to port swtpm?

2023-08-18 Thread Corvin Köhne
On Fri, 2023-08-18 at 11:22 +0200, Goran Mekić wrote: > Hello, > > There's an update for swtpm and I submitted > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273199. My first > question is if phabricator is preferred for this port? I'm OK with > submitting it on either place, so whatever i

Re: RFB doesn't use client's SetPixelFormat

2023-08-17 Thread Corvin Köhne
On Thu, 2023-08-17 at 10:31 -0700, Justin England wrote: > Greetings, > > I am using FreeBSD 13.2-STABLE and have recently attempted to get > noVNC’s web based VNC client to work with my bhyve VNC consoles, but > immediately realized that the colors are not correctly displayed > where essentially

Re: Sudden need for bhyve TPM Emulation... willing to port swtpm?

2023-08-11 Thread Corvin Köhne
On Thu, 2023-08-10 at 16:41 +0200, Goran Mekić wrote: >   > On 8/7/23 10:04, Corvin Köhne wrote: >   >   > >     > > Hi, > >   > > > >   > >   > > afaik, qemu is making use of the swtpm project too. So, it'd great > > to imp

Re: Sudden need for bhyve TPM Emulation... willing to port swtpm?

2023-08-07 Thread Corvin Köhne
On Mon, 2023-08-07 at 10:04 +0200, Corvin Köhne wrote: > On Sun, 2023-08-06 at 18:47 +0200, Goran Mekić wrote: > > > > On 8/2/23 02:28, Michael Dexter wrote: > > > > > Hello all, > > > > > > Long-time bhyve-in-production user Jason Tubnor p

Re: Sudden need for bhyve TPM Emulation... willing to port swtpm?

2023-08-07 Thread Corvin Köhne
On Sun, 2023-08-06 at 18:47 +0200, Goran Mekić wrote: > > On 8/2/23 02:28, Michael Dexter wrote: > > > Hello all, > > > > Long-time bhyve-in-production user Jason Tubnor pointed out that a > > recent Windows 11 update breaks the "lab mode" under which Windows > > 11 could be run without a TPM

Re: Warm and Live Migration Implementation for bhyve

2023-07-03 Thread Corvin Köhne
On Tue, 2023-06-27 at 16:35 +0300, Elena Mihailescu wrote: > Hi Corvin, > > Thank you for the questions! I'll respond to them inline. > > On Mon, 26 Jun 2023 at 10:16, Corvin Köhne > wrote: > > > > Hi Elena, > > > > thanks for posting this prop

Re: Warm and Live Migration Implementation for bhyve

2023-06-26 Thread Corvin Köhne
Hi Elena, thanks for posting this proposal here. Some open questions from my side: 1. How is the data send to the target? Does the host send a complete dump and the target parses it? Or does the target request data one by one und the host sends it as response? 2. What happens if we add a new da

How to remove bhyve's fwctl device?

2023-06-13 Thread Corvin Köhne
Hi, this is a request for some guidance on how to remove the fwctl device of bhyve. I've recently added support for qemu's fwcfg device as replacement for bhyve's fwctl device. As both devices are using the same io ports they can't coexist. For that reason, I'd like to remove the fwctl device fro

[PATCH 4/5] OvmfPkg: avoid including AcpiPlatformLib twice

2023-06-12 Thread Corvin Köhne
Signed-off-by: Corvin Köhne --- OvmfPkg/Include/Library/AcpiPlatformLib.h | 5 + 1 file changed, 5 insertions(+) diff --git a/OvmfPkg/Include/Library/AcpiPlatformLib.h b/OvmfPkg/Include/Library/AcpiPlatformLib.h index 54c89d62b3bf..df141b9b13cf 100644 --- a/OvmfPkg/Include/Library

[PATCH 5/5] OvmfPkg/Bhyve: install Acpi tables provided by FwCfg

2023-06-12 Thread Corvin Köhne
Signed-off-by: Corvin Köhne --- OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c | 5 + 1 file changed, 5 insertions(+) diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c b/OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c index 1e1c90614ea1..fb926a8bd803 100644 --- a/OvmfPkg/Bhyve

[PATCH 2/5] OvmfPkg: move BootScript into AcpiPlatformLib

2023-06-12 Thread Corvin Köhne
This is required to move InstallQemuFwCfgTables into AcpiPlatformLib. Signed-off-by: Corvin Köhne --- OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf | 2 -- .../AcpiPlatformLib/DxeAcpiPlatformLib.inf| 2 ++ OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h| 27 --- OvmfPkg

[PATCH 3/5] OvmfPkg: move QemuFwCfgAcpi into AcpiPlatformLib

2023-06-12 Thread Corvin Köhne
This makes the InstallQemuFwcfgTables function reusable by bhyve. Signed-off-by: Corvin Köhne --- OvmfPkg/AcpiPlatformDxe/AcpiPlatformDxe.inf | 3 --- OvmfPkg/Library/AcpiPlatformLib/DxeAcpiPlatformLib.inf | 5 + OvmfPkg/AcpiPlatformDxe/AcpiPlatform.h

[PATCH 1/5] OvmfPkg: move PciEncoding into AcpiPlatformLib

2023-06-12 Thread Corvin Köhne
Bhyve supports providing ACPI tables by FwCfg. Therefore, InstallQemuFwCfgTables should be moved to AcpiPlatformLib to reuse the code. As first step, move PciEncoding into AcpiPlatformLib. Signed-off-by: Corvin Köhne --- OvmfPkg/OvmfPkgX64.dsc| 1 + OvmfPkg

[PATCH 0/5] OvmfPkg/Bhyve: install ACPI tables by FwCfg

2023-06-12 Thread Corvin Köhne
that's not possible, it's falls back to our old approach of picking up ACPI tables from memory. Any feedback, even if it's just a short "Looks good" or "Keep going", is appreciated. Kind regards, Corvin Corvin Köhne (5): OvmfPkg: move PciEncoding into AcpiPla

Re: BHYVE SNAPSHOT image format proposal

2023-06-12 Thread Corvin Köhne
On Wed, 2023-06-07 at 21:25 +0300, Vitaliy Gusev wrote: > Hi Corvin,  > > > On 6 Jun 2023, at 15:59, Corvin Köhne wrote: > > > ... > > > > We may have different version of the format from the same produce. > > IMHO, it makes sense to have a dedicated IDENT

[PATCH 1/1] OvmfPkg/Bhyve: include TPM driver

2023-06-06 Thread Corvin Köhne
From: Corvin Köhne Bhyve will gain support for TPM emulation in the near future. Therefore, prepare OVMF by copying all TPM driver used by qemu's OVMF DSC into the bhyve OVMF DSC. Signed-off-by: Corvin Köhne --- OvmfPkg/Bhyve/BhyveX64.dsc | 17 +++-- OvmfPkg/Bhyve/BhyveX6

[PATCH 0/1] bhyve: TPM support for OVMF

2023-06-06 Thread Corvin Köhne
Hi, I'm currently working on TPM emulation for bhyve. Therefore, the guest firmware has to set up the TPM device properly for the guest OS. I'd like to send the attached patch to the EDKII project. Any comments are appreciated. Thanks, Corvin Corvin Köhne (1): OvmfPkg/Bhyve: i

Re: BHYVE SNAPSHOT image format proposal

2023-06-06 Thread Corvin Köhne
Hi Vitaliy, thanks for your answers. See comments below. On Tue, 2023-06-06 at 14:25 +0300, Vitaliy Gusev wrote: > Hi Corvin,  > > Thanks for your comments and advices.  > > Answers are below, > > > On 5 Jun 2023, at 18:32, Corvin Köhne wrote: > > > &g

Re: [PATCH 0/3] bhyve: enabling bus enumeration

2023-06-06 Thread Corvin Köhne
On Thu, 2023-05-11 at 15:05 +0200, Corvin Köhne wrote: > 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 reassi

Re: bhyve HEVC/H.265 encoding support in ubuntu vm

2023-06-06 Thread Corvin Köhne
On Wed, 2023-05-24 at 16:12 -0700, Pete Wright wrote: > On Wed, May 24, 2023 at 09:12:15AM +0200, elk-wetznet.de wrote: > > > > HI, > > > > I run bhyve at Freebsd on a AMD Pro Ryzen 5 and still dont know a > > way to get > > the encoding support of the GPU inside the VM. > > > > Any hints ? > >

Re: BHYVE SNAPSHOT image format proposal

2023-06-05 Thread Corvin Köhne
On Tue, 2023-05-23 at 19:05 +0300, Vitaliy Gusev wrote: > Hi, > > Here is a proposal for bhyve snapshot/checkpoint image format > improvements. > Hi Vitaliy, thank you very much for sending this proposal to the mailing list. > It implies moving snapshot code to nvlist engine.  > > Current sna

[PATCH 3/3] OvmfPkg/BhyveBhfPkg: enable bus enumeration

2023-05-11 Thread Corvin Köhne
From: Corvin Köhne bhyve supports adding a ROM to PCI devices. It was added to support GPU passthrough of dedicated AMD GPUs. At the moment, this ROM file is mostly useless as it's not shadowed and executed by firmware. Change that by enabling bus enumeration. Signed-off-by: Corvin

[PATCH 2/3] Revert "OvmfPkg/Bhyve: remove IncompatiblePciDeviceSupport DXE driver"

2023-05-11 Thread Corvin Köhne
We like to enable bus enumeration for bhyve. Therefore, this patch needs to be reverted. This reverts commit 8c8f886f27556f2fb6e8b502d32aa9ccee930acc. Signed-off-by: Corvin Köhne --- OvmfPkg/Bhyve/BhyveX64.dsc | 1 + OvmfPkg/Bhyve/BhyveX64.fdf | 1 + 2 files changed, 2 insertions(+) diff

[PATCH 0/3] bhyve: enabling bus enumeration

2023-05-11 Thread Corvin Köhne
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,

[PATCH 1/3] Revert "OvmfPkg/Bhyve: consume PciHostBridgeLibScan"

2023-05-11 Thread Corvin Köhne
We like to enable bus enumartion for bhyve. Therefore, this patch needs to be reverted. This reverts commit c2f24ba3218ae91a8d5a1a31c31dad3417850d0c. Signed-off-by: Corvin Köhne --- OvmfPkg/Bhyve/BhyveX64.dsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OvmfPkg/Bhyve

Re: Bhyve: SMBIOS area too small for 65+ vCPUs

2023-05-08 Thread Corvin Köhne
On Sun, 2023-05-07 at 11:12 -0600, Rebecca Cran wrote: > I have a machine with enough cores that I'm able to run large VMs > with > up to 128 or more vCPUs. > > However, it looks like bhyve's SMBIOS area is too small once we reach > 65 > vCPUs since I get the following assert failure on boot: >

Re: BHYVE_SNAPSHOT

2023-05-02 Thread Corvin Köhne
On Tue, 2023-05-02 at 01:16 -0500, Matthew Grooms wrote: > On 4/30/23 21:31, Rob Wing wrote: > >  Hey Matthew, > > > > On Sun, Apr 30, 2023 at 1:41 PM Matthew Grooms > > wrote: > > > > > >  Would you like to see support for VM snapshots in the generic > > > kernel? > > > > Is there a review ope

Re: [PATCH] OvmfPkg/BhyveBhf: install bhyve's ACPI tables

2023-04-05 Thread Corvin Köhne
On Wed, 2023-04-05 at 07:54 +1000, Peter Grehan wrote: > > Using the qemu fwcfg has one big disadvantage: > > Bhyve's fwctl and qemu's fwcfg can't be used at the same time. Due > > to > > backward compatibility reasons, bhyve uses fwctl as default. So, > > using > > qemu's fwcfg to locate the rsdp

Re: [PATCH] OvmfPkg/BhyveBhf: install bhyve's ACPI tables

2023-04-03 Thread Corvin Köhne
On Mon, 2023-04-03 at 21:26 +1000, Peter Grehan wrote: > Hi Corvin, > > > I would like to send the following patch to the EDKII project. > > Therefore, I'd like to get some feedback from the bhyve community > > before > > sending them to EDKII. > >   Thanks for giving a heads-up. > >   The patch

[PATCH] OvmfPkg/BhyveBhf: install bhyve's ACPI tables

2023-03-31 Thread Corvin Köhne
Hi, I would like to send the following patch to the EDKII project. Therefore, I'd like to get some feedback from the bhyve community before sending them to EDKII. At the moment, UEFI guests are using static ACPI tables. Modifying them is not easy because we need to patch them in the EDKII repo. A

Re: CURRENT: Operation not supported by device

2023-03-29 Thread Corvin Köhne
On Wed, 2023-03-29 at 12:44 +0200, Evilham wrote: > Hello, > > I've been using bhyve for a while now and in the past couple days > (though I'm not sure when it started, certainly less than two > weeks ago), I've been getting this message when trying to start a > VM on CURRENT: > > # # This is

Re: devctl: Failed to detach pci0:1:0:0: Device not configured

2023-01-26 Thread Corvin Köhne
On 1/27/2023 1:54 AM, Mario Marietto wrote: Hello FreeBSD Virtualization Team. I've created this bhyve script that suits my needs,but unfortunately it does not work properly. Can someone help me to understand where the error is ? *./20-Ubuntu-2004-Focal-Stable-Diffusion-vm20.sh* #!/bin/sh

Re: How to use the framebuffer as primary video device instead of the nvidia passed-through graphic card in a bhyve/linux vm

2022-12-04 Thread Corvin Köhne
quot; > >EndSection > >Section "Screen" >Identifier "Screen0" >Device "Card0" >Monitor"Monitor0" >SubSection "Display" >Viewport 0 0 >Depth 1 >EndSubSection >SubSection "D

Re: How to use the framebuffer as primary video device instead of the nvidia passed-through graphic card in a bhyve/linux vm

2022-12-03 Thread Corvin Köhne
On December 3, 2022 4:49:46 PM GMT+01:00, Mario Marietto wrote: >Hello to everyone. > >what Im trying to do is to set the framebuffer video adapter as primary >graphic card on my bhyve-ubuntu vm instead of the nvidia RTX 2080 ti card >that I have passed through. What I want to do really is to use

Re: bhyve nvlist constness bug

2022-11-04 Thread Corvin Köhne
On 10/23/22 11:18 AM, Mark Johnston wrote: I'm going through compiler warnings in the bhyve code with the aim of bumping WARNS, since the current setting hides bugs. There's one in the config code that looks a bit tricky to resolve and I was hoping for some guidance on the right way to do that.

RE: My nvidia gpu can't be passed through from Linux (qemu+kvm) to the 2. guest OS (Puppy Linux) that I tried to virtualize on the 1. (FreeBSD 13.1)

2022-10-09 Thread Corvin Köhne
Hi, Your nested virtualization may not support all features required for nested passthrough. Best regards Corvin This email contains confidential information. If you have received it in error, you must not read, use, copy or pass on this e-mail or its attachments. If you have received the e-

RE: bhyve GPU passthrough + romfile

2022-06-20 Thread Corvin Köhne
Hi John, > Thank you for the detailed response. I will try these for my own curiosity. > Is there a reason these patches aren’t in the upstream project or otherwise > available as a FreeBSD port/package? I already sent the patches upstream. There wasn't much feedback on it but the feedback I g

RE: bhyve GPU passthrough + romfile

2022-06-19 Thread Corvin Köhne
Hi John, first of all, the ROM is only required for Linux/BSD amdgpu driver. Windows works without a ROM file. Additionally, the ROM is required for pre-OS graphics (e.g. EFI boot, bootloader, etc.). Currently, OVMF doesn't processes the ROM file. Processing the ROM would include: - executing

RE: [edk2-devel] [PATCH v5] OvmfPkg/Bhyve: add support for QemuFwCfg

2022-05-02 Thread Corvin Köhne
Hi > CI runs on all pull requests, so just open a draft pull request, then > check pull request status. I know now. Thanks. I did so before sending v5 to the mailing list and all checks have passed. https://github.com/tianocore/edk2/pull/2830 Maybe something went wrong when sending the patch to

[PATCH v6] OvmfPkg/Bhyve: add support for QemuFwCfg

2022-04-27 Thread Corvin Köhne
QemuFwCfg is much more powerful than BhyveFwCtl. Sadly, BhyveFwCtl decided to use the same IO ports as QemuFwCfg. It's not possible to use both interfaces simultaneously. So, prefer QemuFwCfg over BhyveFwCtl. Signed-off-by: Corvin Köhne Reviewed-by: Rebecca Cran Acked-by: Gerd Hoffmann

RE: [edk2-devel] [PATCH v5] OvmfPkg/Bhyve: add support for QemuFwCfg

2022-04-27 Thread Corvin Köhne
-Original Message- From: Rebecca Cran Sent: Tuesday, April 26, 2022 4:23 PM To: de...@edk2.groups.io; jiewen....@intel.com; Corvin Köhne Cc: Ard Biesheuvel ; Justen, Jordan L ; FreeBSD Virtualization ; Gerd Hoffmann ; Rebecca Cran ; Peter Grehan Subject: Re: [edk2-devel] [PATCH v5]

[PATCH v5] OvmfPkg/Bhyve: add support for QemuFwCfg

2022-04-26 Thread Corvin Köhne
QemuFwCfg is much more powerful than BhyveFwCtl. Sadly, BhyveFwCtl decided to use the same IO ports as QemuFwCfg. It's not possible to use both interfaces simultaneously. So, prefer QemuFwCfg over BhyveFwCtl. Signed-off-by: Corvin Köhne Reviewed-by: Rebecca Cran Acked-by: Gerd Hoffmann

RE: [PATCH v4] OvmfPkg/BhyveBhfPkg: add support for QemuFwCfg

2022-04-26 Thread Corvin Köhne
rt: Guetersloh HRA 7075 -Original Message- From: Rebecca Cran Sent: Tuesday, April 26, 2022 4:39 AM To: Corvin Köhne Cc: Corvin Köhne ; Ard Biesheuvel ; Jordan Justen ; de...@edk2.groups.io; FreeBSD Virtualization ; Jiewen Yao ; Gerd Hoffmann ; Peter Grehan Subject: Re: [PAT

RE: [PATCH v4] OvmfPkg/BhyveBhfPkg: add support for QemuFwCfg

2022-04-25 Thread Corvin Köhne
Hi, does it require more review to get merged? Best regards Corvin Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075 -Original Message- From: Corvin Köhne Sent: Friday, Apr

[PATCH v4] OvmfPkg/BhyveBhfPkg: add support for QemuFwCfg

2022-04-08 Thread Corvin Köhne
From: Corvin Köhne QemuFwCfg is much more powerful than BhyveFwCtl. Sadly, BhyveFwCtl decided to use the same IO ports as QemuFwCfg. It's not possible to use both interfaces simultaneously. So, prefer QemuFwCfg over BhyveFwCtl. Signed-off-by: Corvin Köhne Acked-by: Gerd Hoffmann Ack

RE: [edk2-devel] [PATCH v2] OvmfPkg/BhyveBhfPkg: add support for QemuFwCfg

2022-04-07 Thread Corvin Köhne
Hi Rebecca and Peter, thank you very much for your feedback. Best regards Corvin Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075

[PATCH v3] OvmfPkg/BhyveBhfPkg: add support for QemuFwCfg

2022-04-07 Thread Corvin Köhne
From: Corvin Köhne QemuFwCfg is much more powerful than BhyveFwCtl. Sadly, BhyveFwCtl decided to use the same IO ports as QemuFwCfg. It's not possible to use both interfaces simultaneously. So, prefer QemuFwCfg over BhyveFwCtl. Signed-off-by: Corvin Köhne Acked-by: Gerd Hoffmann Ack

RE: [edk2-devel] [PATCH v2] OvmfPkg/BhyveBhfPkg: add support for QemuFwCfg

2022-04-07 Thread Corvin Köhne
Hi Mario, > im trying to test the patch on my pc,that has two graphic cards,the > intel coffee lake and the nvidia. i tried to start the pc from the > nvidia card and ive configured the xorg.conf file giving the > proper bus id value. in addition ive loaded the kernel.ko file > from the boot loade

RE: [edk2-devel] [PATCH v2] OvmfPkg/BhyveBhfPkg: add support for QemuFwCfg

2022-04-06 Thread Corvin Köhne
Hi Peter and Rebecca, thanks for your feedback. This patch is backward compatible. It checks if QemuFwCfg is available and if QemuFwCfg is missing it falls back to BhyveFwCtl. So, should I add Reviewed-by (or Acked-by?) Peter and Rebecca to the commit message? Thanks Corvin Beckhoff Automation

RE: [PATCH v2] OvmfPkg/BhyveBhfPkg: add support for QemuFwCfg

2022-04-06 Thread Corvin Köhne
Any comments from bhyve folks on that? Best regards Corvin Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075 -Original Message- From: Corvin Köhne Sent: Tuesday, March 29, 2022 1

RE: [PATCH] OvmfPkg: reserve igd memory by E820

2022-04-05 Thread Corvin Köhne
Hi, > > I don't know if it's possible to extract it from host firmware within > > OS context easily. > > Extracting from firmware updates is probably easier. Good idea but I'll focus on the rest first because I have access to the GOP driver for my systems. > > According to Intel you should ask y

RE: [PATCH] OvmfPkg: reserve igd memory by E820

2022-04-05 Thread Corvin Köhne
Hi, > Where does the intel gop driver come from? Extracted from host > firmware? https://projectacrn.github.io/latest/tutorials/gpu-passthru.html#enable-the-gvt-d-gop-driver I don't know if it's possible to extract it from host firmware within OS context easily. According to Intel you should as

RE: [PATCH] OvmfPkg: reserve igd memory by E820

2022-04-04 Thread Corvin Köhne
Hi Gerd, thanks for your reply. > First, there is no need to communicate memory regions from the > hypervisor to the guest. The IGD hardware has registers pointing > to the opregion and to stolen memory, so the guest can simply > allocate and initialize memory, then program the registers > accor

[PATCH] OvmfPkg: reserve igd memory by E820

2022-04-03 Thread Corvin Köhne
Memory and OpRegion address and length and passes these information as E820 table to the firmware. This will additionally allow us to pass other platform specific memory ranges to the guest in the future. Signed-off-by: Corvin Köhne Reviewed-by: Patrick Bruenn --- OvmfPkg/Bhyve/BhyveBhfX64.dsc

RE: [edk2-devel] [PATCH 0/1] OvmfPkg/Bhyve: QemuFwCfg support

2022-03-29 Thread Corvin Köhne
Hi Gerd, > But I think I'd tend to keep the bhyve-specific behavior nevertheless, > so you don't have to worry about qemu quirks. Ok. I will leave it as is. > Or go the qemu route and generate the acpi tables on the host instead. > When you generate the acpi tables in the guest firmware you alwa

[PATCH v2] OvmfPkg/BhyveBhfPkg: add support for QemuFwCfg

2022-03-29 Thread Corvin Köhne
From: Corvin Köhne QemuFwCfg is much more powerful than BhyveFwCtl. Sadly, BhyveFwCtl decided to use the same IO ports as QemuFwCfg. It's not possible to use both interfaces simultaneously. So, prefer QemuFwCfg over BhyveFwCtl. Signed-off-by: Corvin Köhne Acked-by: Gerd Hoffmann CC

RE: [edk2-devel] [PATCH 1/1] OvmfPkg/BhyveBhfPkg: add support for QemuFwCfg

2022-03-29 Thread Corvin Köhne
Hi Gerd, > Hmm, so QemuFwCfg and BhyveFwCtl are incompatible but use the same > ports? I guess the signature used is different then so the guest > has a chance to figure which one is active? Yes, BhyveFwCtl uses another signature. Best regards Corvin Beckhoff Automation GmbH & Co. KG | Manag

RE: [edk2-devel] [PATCH 0/1] OvmfPkg/Bhyve: QemuFwCfg support

2022-03-29 Thread Corvin Köhne
Hi Gerd, > There is FW_CFG_NB_CPUS + FW_CFG_MAX_CPUS. ovmf uses different names, > see OvmfPkg/Include/IndustryStandard/QemuFwCfg.h > > PlatformPei for qemu uses QemuFwCfgItemSmpCpuCount aka FW_CFG_NB_CPUS, > which is the number of cpus which are online. > > I think FW_CFG_MAX_CPUS is basically u

[PATCH 1/1] OvmfPkg/BhyveBhfPkg: add support for QemuFwCfg

2022-03-28 Thread Corvin Köhne
From: Corvin Köhne QemuFwCfg is much more powerful than BhyveFwCtl. Sadly, BhyveFwCtl decided to use the same IO ports as QemuFwCfg. It's not possible to use both interfaces simultaneously. So, prefer QemuFwCfg over BhyveFwCtl. Signed-off-by: Corvin Köhne CC: Ard Biesheuvel CC: Jiewe

[PATCH 0/1] OvmfPkg/Bhyve: QemuFwCfg support

2022-03-28 Thread Corvin Köhne
in CC: Ard Biesheuvel CC: Jiewen Yao CC: Jordan Justen CC: Gerd Hoffmann CC: Rebecca Cran CC: Peter Grehan CC: de...@edk2.groups.io CC: FreeBSD Virtualization Corvin Köhne (1): OvmfPkg/BhyveBhfPkg: add support for QemuFwCfg OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf |

RE: Virtio-win driver (virtio-blk and virtio-scsi) don't work when they are used on bhyve with Windows 11 as guest os

2022-03-28 Thread Corvin Köhne
Hi Mario, > Maybe I can make a lighter /boot/loader.conf file,excluding the USB > controllers. You can always exclude pptdevs from /boot/loader.conf. Sadly, it’s nowhere documented properly. FreeBSD is able to switch to the ppt driver at runtime. 1. Remove the pptdevs line from /boot/lo

RE: ASMedia USB controller 3.1 cannot be masked by bhyve ?

2021-12-14 Thread Corvin Köhne
Hi Mario, I'm not sure if the ppt driver supports PCI bridges. However as far as I know, bhyve doesn’t support PCI bridges. So, you wouldn't be able to pass them to bhyve. Try to pass all non bridge devices to your bhyve guest. Best regards Corvin Beckhoff Automation GmbH & Co. KG | Managing

RE: Bhyve CD-ROM

2021-12-01 Thread Corvin Köhne
7075 From: Mario Marietto Sent: Wednesday, December 1, 2021 3:10 PM To: Sysadmin Lists Cc: virtualization@freebsd.org; Miroslav Lachman <000.f...@quip.cz>; Corvin Köhne Subject: Re: Bhyve CD-ROM CAUTION: External Email!! This is the truth : YanVugenfirer<https://nospamproxywebp

RE: Bhyve CD-ROM

2021-11-29 Thread Corvin Köhne
7075 -Original Message- From: Sysadmin Lists Sent: Monday, November 29, 2021 11:32 PM To: Mario Marietto Cc: Corvin Köhne ; Freebsd Virtualization Subject: Re: Bhyve CD-ROM CAUTION: External Email!! Indeed it has. I'll go with passing a new virtual disk with the CD contents on

RE: Bhyve CD-ROM

2021-11-29 Thread Corvin Köhne
mber 29, 2021 3:29 PM To: Corvin Köhne Cc: Freebsd Virtualization Subject: Re: Bhyve CD-ROM CAUTION: External Email!! ok,so Ive already tried to install it from there,but it wont accept it. Il giorno lun 29 nov 2021 alle ore 15:12 Corvin Köhne mailto:c.koe...@beckhoff.com>> ha scritto: It’

RE: Bhyve CD-ROM

2021-11-29 Thread Corvin Köhne
hoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075 From: Mario Marietto Sent: Monday, November 29, 2021 3:08 PM To: Corvin Köhne Cc: Freebsd Virtualization Subject: Re: Bhyve CD-ROM CAUTION: External Email!! I dont remember but probably yes. I ve installed it using ahc

RE: Bhyve CD-ROM

2021-11-29 Thread Corvin Köhne
Hans Beckhoff Registered office: Verl, Germany | Register court: Guetersloh HRA 7075 From: Mario Marietto Sent: Monday, November 29, 2021 2:36 PM To: Corvin Köhne Cc: Freebsd Virtualization Subject: Re: Bhyve CD-ROM CAUTION: External Email!! Hello FreeBSD virtualization ML. I'm testing W

RE: Bhyve CD-ROM

2021-11-28 Thread Corvin Köhne
Register court: Guetersloh HRA 7075 From: Mario Marietto Sent: Monday, November 29, 2021 8:09 AM To: Corvin Köhne Cc: Sysadmin Lists ; Freebsd Virtualization Subject: Re: Bhyve CD-ROM CAUTION: External Email!! i would like to investigate why virtio-9p does not work for him. for me it worked until

RE: Bhyve CD-ROM

2021-11-28 Thread Corvin Köhne
Hi, the bootorder is determined by pci slot order. Just add your disk before your cd-rom: bhyve -c 1 -m 512M -w -H \ -s 0,hostbridge \ -s 3,virtio-blk,/dev/zvol/zroot/bhyve_vms/debianvm \ -s 4,ahci-cd,/media/Debian-11.1.0-amd64-DVD-1.iso \ -s 29,fbuf,tcp=0.0.0.0:5

RE: [PATCH] OvmfPkg/Bhyve: install bhyve's ACPI tables

2021-10-21 Thread Corvin Köhne
Hi Peter, thanks for your feedback. > There will be some issues with the use of this that may have to be > addressed at some point > > - the PCI mmio/io windows are created assuming that bhyve has done PCI > enumeration. If EFI is doing enumeration, these will be incorrect Does EFI modify th

[PATCH] OvmfPkg/Bhyve: Use QemuFwCfg over BhyveFwCtl

2021-10-14 Thread Corvin Köhne
From: Corvin Köhne QemuFwCfg is more powerful and has more use cases than BhyveFwCtl. Try to use QemuFwCfg in first place. If that fails, fall back to BhyveFwCtl. Signed-off-by: Corvin Köhne CC: FreeBSD Virtualization --- .../Bhyve/AcpiPlatformDxe/AcpiPlatformDxe.inf | 1 + OvmfPkg/Bhyve

[PATCH] OvmfPkg/Bhyve: install bhyve's ACPI tables

2021-10-14 Thread Corvin Köhne
hose, fall back to OVMF tables. Implementation is similar to . Signed-off-by: Corvin Köhne CC: FreeBSD Virtualization --- MdePkg/Include/Uefi/UefiBaseType.h | 2 + OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.c | 10 + OvmfPkg/Bhyve/AcpiPlatformDxe/AcpiPlatform.h | 6 + Ovm

RE: [PATCH 0/4] Prepare bhyve's OVMF for GPU-Passthrough

2021-06-18 Thread Corvin Köhne
Hi Peter, thank you for your feedback, > While it's now possible to allow EFI to scan/assign PCI BARs, I'd like to > avoid it if possible for 2 reasons: > - assignment policy can stay in bhyve, such as whether to locate 64-bit > BARs in the 32-bit region which EFI didn't (doesn't?) allow. Bug

[PATCH 4/4] OvmfPkg/Bhyve: use static PCI32Base address

2021-06-15 Thread Corvin Köhne
ayout: [..., lowmemlimit] RAM [lowmemlimit, gsmbase] Memory hole (may be absent) [gsmbase, 0xC000 ] GSM (may be absent) [0xC000 , 0xE000 ] PCI Space Signed-off-by: Corvin Köhne --- OvmfPkg/Bhyve/BhyveX64.dsc | 4 ++-- OvmfPkg/Bhyve/Platfo

[PATCH 1/4] OvmfPkg/Bhyve: enable bus enumeration

2021-06-15 Thread Corvin Köhne
Neccessary for GPU Passthrough of dedicated AMD GPUs. For Linux guests, AMD GPUs require that their PCI ROM is processed by UEFI. Enable bus enumeration to process the PCI ROM of all devices. Signed-off-by: Corvin Köhne --- OvmfPkg/Bhyve/BhyveX64.dsc | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 3/4] OvmfPkg/Bhyve: add USB support

2021-06-15 Thread Corvin Köhne
An USB driver is required to use a keyboard or mouse while installing an OS or while in a bootloader menu like grub when using GPU + USB Passthrough. Signed-off-by: Corvin Köhne --- OvmfPkg/Bhyve/BhyveX64.dsc | 11 +++ OvmfPkg/Bhyve/BhyveX64.fdf | 10 ++ 2 files changed, 21

[PATCH 2/4] Revert "OvmfPkg/Bhyve: consume PciHostBridgeLibScan"

2021-06-15 Thread Corvin Köhne
This reverts commit c2f24ba3218ae91a8d5a1a31c31dad3417850d0c. Revert this commit to enable bus enumeration properly. Signed-off-by: Corvin Köhne --- OvmfPkg/Bhyve/BhyveX64.dsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OvmfPkg/Bhyve/BhyveX64.dsc b/OvmfPkg/Bhyve

[PATCH 0/4] Prepare bhyve's OVMF for GPU-Passthrough

2021-06-15 Thread Corvin Köhne
Hi, GPU-Passthrough for bhyve requires a few patches to work properly. These patches will allow GPU-Passthrough for bhyve. It will work for dedicated AMD GPUs and integrated Intel GPUs. Nvidia GPUs are untested. Best Regards, Corvin Corvin Köhne (4): OvmfPkg/Bhyve: enable bus enumeration