Re: Running Mezzano in bhyve

2024-10-17 Thread Peter Grehan
Regarding items 3) and 4): 3) Indeed, bhyve does not explicitly forbid writing to 0x3c. I meant the following. The interrupt line is set is pci_emul.c in bhyve: pci_set_cfgdata8(pi, PCIR_INTLINE, pirq_irq(ii->ii_pirq_pin)); Bhyve asserts interrupts with pci_irq_assert in amd64/pci_irq.c. We ne

Re: Running Mezzano in bhyve

2024-10-14 Thread Peter Grehan
1) The problem with PIT. Can be solved as you proposed or by patching Mezzano. The bhyve patch would be the best option for that: it's useful for other older o/s's (DOS). 2) Mezzano assumes that Intel AHCI controllers report no more than 6 ports. Can be solved by patching Mezzano or defining M

Re: Running Mezzano in bhyve

2024-10-11 Thread Peter Grehan
I suspect PCI interrupts are not functioning correctly. Look at this code:     ;; Attach interrupt handler.     (sup:debug-print-line "Handler: " (ahci-irq-handler ahci))     (sup:irq-attach (sup:platform-irq (pci:pci-intr-line location))                     (ahci-irq-handler-function ahci)

Re: Running Mezzano in bhyve

2024-10-09 Thread Peter Grehan
Turns out, panic always happens in the same place when Mezzano is trying to initialize an AHCI controller. Qemu uses an old PATA controller by default, which works. When forcing SATA, it fails just like bhyve. Virtio block devices are also claimed to work, but using virtio-blk option in bhyve a

Re: Running Mezzano in bhyve

2024-10-09 Thread Peter Grehan
Hi! Mezzano is an operating system written in Common lisp. I would like to test it in bhyve. When I launch it, it spins infinitely in a loop measuring how many CPU cycles it makes in a unit of time (I understood it by adding various debug messages). The timer it uses is something called a PIT:

Re: nmdm issues with bhyve

2024-07-16 Thread Peter Grehan
wrmsr to register 0xc0011029(0x3) on vcpu 0 The -w option is needed so that bhyve won't exit on accessing an unimplemented MSR (that particular one is harmless). later, Peter.

Re: bhyve passthru problem

2024-06-14 Thread Peter Grehan
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. [1] https://github.com/freebsd/freebsd- src/commit/7a902ec0eccc752c9c38533ed123121

Re: bhyve without UEFI questions

2024-01-22 Thread Peter Grehan
Hi Chuck, I'm getting conflicting information and thought I'd ask here about guest disk images without UEFI. 1. If bhyve can boot the image with uefi-csm, should I be able to get a graphical console? I tried: -s 6:0,fbuf,tcp=0.0.0.0:5900,vga=io VNC connects, but the screen is blank. I saw s

Re: Bhyve won't boot OpenBSD 7.4

2023-11-26 Thread Peter Grehan
Hi Thomas, I have 2 production servers that I want to upgrade to FreeBSD 14.0 that use Bhyve to run OpenBSD 7.3 packet packet filters and a few other instances.  Since this is an operating system upgrade to FreeBSD 14.0, I wanted to also upgrade the OpenBSD 7.3 instance to OpenBSD 7.4 that was

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

2023-06-13 Thread Peter Grehan
Hi Corvin, this is the next patch stack for EDKII. Bhyve is able to pass ACPI tables to the guest by FwCfg. This is more flexible and less space limited than our current approach of placing ACPI tables into memory. So, this patch stack modifes the guest firmware to pick up ACPI tables from FwCfg

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

2023-04-04 Thread Peter Grehan
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 only works, if the user changes his bhyve call. I don't want to use fwctl to l

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

2023-04-03 Thread Peter Grehan
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 looks fine to me. The only minor suggestion I have is to use the qemu fwcfg inte

Re: trying to attach another disk to openbsd72 bhyve guest

2022-11-07 Thread Peter Grehan
Managed to "fix" it :D - the tl;dr version is "select GPT and not MBR" because if GPT isn't selected, an msdos efi partition isn't created and that's why my previous attempts (apart from the vm where I made a msdos partition manually before installation) failed. This part in the initial installat

Re: trying to attach another disk to openbsd72 bhyve guest

2022-11-06 Thread Peter Grehan
Hi, Hello, I'm trying to attach another disk to an openbsd72 guest like so: [snip] bhyve -c 4 -m 16G -wuH \ -s 0,amd_hostbridge \ -s 3,virtio-blk,/dev/zvol/vms/openbsd64g \ -s 4,ahci-hd,/dev/zvol/vms/openbsd-externalfs0 \ <=== here -s 5,virtio-net,tap14 \ -s 30,xhci,tablet \ -s 31,lpc -l com1,s

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

2022-04-07 Thread Peter Grehan
message? Acked-by: Peter Grehan

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

2022-04-06 Thread Peter Grehan
[re-posting from my personal email account, since my mail to > freebsd-virtualization got rejected]> > I seem to remember seeing previous feedback that Bhyve developers > strongly preferred the BhyveFwCtl mechanism. I've been out of the loop > though (busy with $dayjob) so I don't know if thing

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

2021-10-16 Thread Peter Grehan
Hi Corvin Köhne wrote:, It's much easier to create configuration dependend ACPI tables for bhyve than for OVMF. For this reason, don't use the statically created ACPI tables provided by OVMF. Instead use the dynamically created ACPI tables of bhyve. If bhyve provides no ACPI tables or we are un

Re: ivhd0 IO_PAGE_FAULT EVT with external disk

2021-07-29 Thread Peter Grehan
Hi Bjoern, I grabbed an external USB drive from an Intel machine and put it to an AMD host using it to boot directly from it like:     -s 3,ahci-hd,/dev/da0,sectorsize=512 \ ... On the AMD machine this doesn't work and I get a lot of: ivhd0: EVT INTR 45 Status:0x1a EVT Head:0xfb0 Tail:

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

2021-06-23 Thread Peter Grehan
Hi Corvin, As far as I know, QEMU uses OVMF with bus enumeration enabled. How does QEMU solve such issues? Full-time corp Linux staff working on Qemu, KVM and EFI. - there is no need for EFI to perform a slow scan via PCI bus operations, resulting in VM-exits, where bhyve can perform all th

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

2021-06-16 Thread Peter Grehan
Hi Corvin, Thanks for posting these here. 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. I have no issue with patches 3/4 and 4/4.