Page MenuHomeFreeBSD

grehan (Peter Grehan)
User

Projects

User Details

User Since
May 9 2014, 10:54 PM (332 w, 2 d)

Recent Activity

Fri, Sep 18

grehan committed rS365873: Fix byte-reversal of language ID in string descriptor..
Fix byte-reversal of language ID in string descriptor.
Fri, Sep 18, 5:55 AM
grehan closed D26472: bhyve: Fix language id of String Descriptors in usb mouse..
Fri, Sep 18, 5:55 AM
grehan accepted D26472: bhyve: Fix language id of String Descriptors in usb mouse..
Fri, Sep 18, 1:04 AM

Thu, Sep 10

grehan committed rS365560: MFC r364340, r364343, r364656.
MFC r364340, r364343, r364656
Thu, Sep 10, 10:50 AM

Tue, Sep 8

grehan committed rS365443: MFC 364339.
MFC 364339
Tue, Sep 8, 3:56 AM

Wed, Sep 2

grehan added inline comments to D26209: GVT-d support for bhyve.
Wed, Sep 2, 12:21 PM · bhyve

Thu, Aug 27

grehan added a comment to D26209: GVT-d support for bhyve.

The Intel ACRN edk2 fork has a GVT GOP driver that may be suitable

https://github.com/projectacrn/acrn-edk2/tree/ovmf-acrn/OvmfPkg/GvtGopDxe
Thu, Aug 27, 7:11 AM · bhyve
grehan added a reviewer for D26209: GVT-d support for bhyve: grehan.

Thanks, looking at this now.

Thu, Aug 27, 7:01 AM · bhyve

Mon, Aug 24

grehan committed rS364656: cpu_auxmsr: assert caller is preventing CPU migration..
cpu_auxmsr: assert caller is preventing CPU migration.
Mon, Aug 24, 11:50 AM
grehan closed D26166: cpu_auxmsr: assert caller is preventing CPU migration.
Mon, Aug 24, 11:50 AM
grehan accepted D26166: cpu_auxmsr: assert caller is preventing CPU migration.

Thanks kib@, I can commit this.

Mon, Aug 24, 12:58 AM
grehan added inline comments to D26035: Refactor configuration management in bhyve..
Mon, Aug 24, 12:11 AM

Aug 19 2020

grehan accepted D24202: bhyve: Initial some NVMe controller health log data..

I'm happy with this change but need to wait for maintainer approval before I commit it

Aug 19 2020, 9:51 PM

Aug 18 2020

grehan committed rS364343: Export a routine to provide the TSC_AUX MSR value and use this in vmm..
Export a routine to provide the TSC_AUX MSR value and use this in vmm.
Aug 18 2020, 11:36 AM
grehan closed D26003: vmm: intel: Support rdtscp and rdpid.
Aug 18 2020, 7:24 AM
grehan committed rS364340: Support guest rdtscp and rdpid instructions on Intel VT-x.
Support guest rdtscp and rdpid instructions on Intel VT-x
Aug 18 2020, 7:23 AM
grehan committed rS364339: Allow guest device MMIO access from bootmem memory segments..
Allow guest device MMIO access from bootmem memory segments.
Aug 18 2020, 7:08 AM
grehan closed D25955: Allow guest device MMIO access from bootmem memory segments..
Aug 18 2020, 7:08 AM
grehan committed rS364334: MFC 363596, 363719, 363733.
MFC 363596, 363719, 363733
Aug 18 2020, 3:40 AM

Aug 14 2020

grehan added inline comments to D26035: Refactor configuration management in bhyve..
Aug 14 2020, 3:40 AM

Aug 13 2020

grehan added a comment to D26035: Refactor configuration management in bhyve..
In D26035#578286, @jhb wrote:

Given the config file syntax will likely change but the "-f" option will be around forever, can a magic number or first-line metadata comment be used to distinguish this key/value file format from a future version ?

I would be fine with using a more obscure option for the flat config file (if we did long opts it could be a --flat-config or some such without a short letter even, but we don't do any long opts so not quite as straightforward to pick an obscure one). I don't really expect the syntax of that to change, but I think having '-f' be used for a more friendly UCL syntax might be more useful and I would be happy to leave "-f" free for the UCL thing to use. The UCL thing might itself include a version number as a field for the UCL parser to use that I think would permit some level of compatibility in the future.

Aug 13 2020, 9:41 PM
grehan added a comment to D26035: Refactor configuration management in bhyve..

Given the config file syntax will likely change but the "-f" option will be around forever, can a magic number or first-line metadata comment be used to distinguish this key/value file format from a future version ?

Aug 13 2020, 1:01 AM

Aug 12 2020

grehan accepted D26003: vmm: intel: Support rdtscp and rdpid.
Aug 12 2020, 8:38 AM

Aug 5 2020

grehan requested review of D25955: Allow guest device MMIO access from bootmem memory segments..
Aug 5 2020, 11:25 AM

Jul 31 2020

grehan committed rS363733: Replace magic numbers in Identify page register 0 with ATA definitions..
Replace magic numbers in Identify page register 0 with ATA definitions.
Jul 31 2020, 12:10 PM

Jul 30 2020

grehan closed D25893: Add definition for the 'removable media flag' from word 0 in the Identify page..
Jul 30 2020, 11:50 PM
grehan committed rS363719: Definition for the 'removable media flag' from word 0 in the Identify page..
Definition for the 'removable media flag' from word 0 in the Identify page.
Jul 30 2020, 11:50 PM
grehan requested review of D25893: Add definition for the 'removable media flag' from word 0 in the Identify page..
Jul 30 2020, 9:24 AM

Jul 27 2020

grehan committed rS363596: Support the setting of additional AHCI controller parameters..
Support the setting of additional AHCI controller parameters.
Jul 27 2020, 7:57 AM
grehan closed D24174: bhyve AHCI controller will accept ser/rev/model/nmrr config.
Jul 27 2020, 7:57 AM

Jul 16 2020

grehan committed rS363240: MFC r362952.
MFC r362952
Jul 16 2020, 3:05 AM
grehan committed rS363239: MFC r362644.
MFC r362644
Jul 16 2020, 2:53 AM

Jul 10 2020

grehan committed rS363070: Advertise 64-bit physical-address capability..
Advertise 64-bit physical-address capability.
Jul 10 2020, 7:27 AM

Jul 6 2020

grehan added a comment to D25396: bhyve nvme controller will pass unknown config if using blockif backend.

As an update, there is work underway to significantly enhance bhyve configuration. Once that lands, it should make many of the concerns here easier to address.

Jul 6 2020, 8:59 PM
grehan committed rS362952: Silence ACPI RTC error/warning in Linux guests..
Silence ACPI RTC error/warning in Linux guests.
Jul 6 2020, 8:36 AM
grehan accepted D25273: amd64 pmap: LA57 AKA 5-level paging.

bhyve bits look fine.

Jul 6 2020, 7:42 AM
grehan added inline comments to D25273: amd64 pmap: LA57 AKA 5-level paging.
Jul 6 2020, 7:01 AM

Jul 2 2020

grehan accepted D25530: Fix LOR with bpf detach.
Jul 2 2020, 3:59 AM

Jun 26 2020

grehan closed D25228: Prevent calling USB backends multiple times..
Jun 26 2020, 8:21 AM
grehan committed rS362644: Prevent calling USB backends multiple times..
Prevent calling USB backends multiple times.
Jun 26 2020, 8:21 AM
grehan committed rS362643: Update bhyve maintainers..
Update bhyve maintainers.
Jun 26 2020, 6:12 AM

Jun 23 2020

grehan accepted D24464: bhyve(8): For prototyping, reattempt decode in userspace.
Jun 23 2020, 11:45 PM
grehan added a comment to D25414: bhyve: allow for automatic destruction on power-off.

happy for a MFC in say 2 weeks after commit to head?

Jun 23 2020, 10:06 PM
grehan accepted D25414: bhyve: allow for automatic destruction on power-off.

Nice change. Don't forget to update the man page.

Jun 23 2020, 8:35 PM

Jun 18 2020

grehan accepted D24174: bhyve AHCI controller will accept ser/rev/model/nmrr config.

That all sounds reasonable: looks fine to me.

Jun 18 2020, 9:18 AM

Jun 11 2020

grehan added inline comments to D25228: Prevent calling USB backends multiple times..
Jun 11 2020, 11:05 PM
grehan requested review of D25228: Prevent calling USB backends multiple times..
Jun 11 2020, 9:58 AM

Jun 1 2020

grehan committed rS361686: MFC r361442.
MFC r361442
Jun 1 2020, 5:14 AM

May 28 2020

grehan added a comment to D24174: bhyve AHCI controller will accept ser/rev/model/nmrr config.

I don't have a problem with the serial, f/w rev or model number parts of this.

May 28 2020, 7:06 AM

May 25 2020

grehan committed rS361442: Fix pci-passthru MSI issues with OpenBSD guests.
Fix pci-passthru MSI issues with OpenBSD guests
May 25 2020, 6:26 AM
grehan closed D24951: Fix pci-passthru MSI issues with OpenBSD guests..
May 25 2020, 6:25 AM

May 22 2020

grehan requested review of D24951: Fix pci-passthru MSI issues with OpenBSD guests..
May 22 2020, 8:56 AM

May 18 2020

grehan committed rS361151: MFS r361132.
MFS r361132
May 18 2020, 7:06 AM

May 17 2020

grehan committed rS361132: MFC r361064.
MFC r361064
May 17 2020, 11:13 AM
grehan committed rS361131: MFC r361064.
MFC r361064
May 17 2020, 11:10 AM

May 15 2020

grehan accepted D24525: vmm(4), bhyve(8): Expose kernel-emulated special devices to userspace.
May 15 2020, 4:05 AM

May 14 2020

grehan committed rS361064: Hide host CPUID 0x15 TSC/Crystal ratio/freq info from guest.
Hide host CPUID 0x15 TSC/Crystal ratio/freq info from guest
May 14 2020, 10:18 PM
grehan closed D24837: Hide host CPUID 0x15 TSC/Crystal ratio/freq info from guest..
May 14 2020, 10:18 PM
grehan updated the summary of D24837: Hide host CPUID 0x15 TSC/Crystal ratio/freq info from guest..
May 14 2020, 5:27 AM
grehan retitled D24837: Hide host CPUID 0x15 TSC/Crystal ratio/freq info from guest. from Hide host CPUID 0x15 TSC/Crystal ration/freq info from guest. to Hide host CPUID 0x15 TSC/Crystal ratio/freq info from guest..
May 14 2020, 5:25 AM
grehan added a comment to D24837: Hide host CPUID 0x15 TSC/Crystal ratio/freq info from guest..

Relevant guest commits:
https://github.com/torvalds/linux/commit/2420a0b1798d7a78d1f9b395f09f3c80d92cc588
https://github.com/openbsd/src/commit/d72f70aa5ac4d8ade3f10d3366ab796d8ea2b9c1

May 14 2020, 5:21 AM
grehan requested review of D24837: Hide host CPUID 0x15 TSC/Crystal ratio/freq info from guest..
May 14 2020, 5:17 AM

Apr 29 2020

grehan added a comment to D24525: vmm(4), bhyve(8): Expose kernel-emulated special devices to userspace.

Thanks for taking a look! Does this approach seem plausibly reasonable, outside of the implementation-detail type issues already raised?

Apr 29 2020, 11:38 AM

Apr 28 2020

grehan committed rS360432: MFC r358848: Untangle TPR shadowing and APIC virtualization..
MFC r358848: Untangle TPR shadowing and APIC virtualization.
Apr 28 2020, 8:28 AM
grehan added a comment to D22942: Untangle TPR shadowing and APIC virtualization .

Jason Tubnor has tested the MFC on 11-stable so I'll commit once acked by bz.

Apr 28 2020, 7:21 AM · bhyve

Apr 27 2020

grehan accepted D24593: Update the cached MSI state when any MSI capability register is written..
Apr 27 2020, 9:28 PM
grehan added a comment to D24549: Use a pthread mutex to protect the MSI and MSI-X state..

And this is indeed the AHCI controller. MSI is being used in the known-working 19.10, but there is no migration going on there. Disabling the MSI capability on the controller and falling back to legacy interrupts allowed an 8-vCPU install to complete and also showed the interrupt being migrated to another vCPU during the install (from /proc/interrupts).

Apr 27 2020, 6:24 AM

Apr 26 2020

grehan added a comment to D24549: Use a pthread mutex to protect the MSI and MSI-X state..

virtio uses MSI-x on Linux so the MSI issue isn't directly related to that.

Apr 26 2020, 10:32 PM
grehan added inline comments to D24525: vmm(4), bhyve(8): Expose kernel-emulated special devices to userspace.
Apr 26 2020, 11:46 AM

Apr 24 2020

grehan added a comment to D24549: Use a pthread mutex to protect the MSI and MSI-X state..

Rather than locking, I'm thinking this might be the lack of PBA emulation for MSI-x
(which in turn will require locking, though slightly different)

Apr 24 2020, 7:56 AM

Apr 23 2020

grehan added a comment to D24549: Use a pthread mutex to protect the MSI and MSI-X state..

I don't think the tread/twrite routines need any locking: the updates are memory operations. Modifying an MSIx table is always going to take multiple writes so the lock can't protect the update.

Apr 23 2020, 10:20 PM

Apr 21 2020

grehan added a comment to D24463: vmm(4): Decode and emulate BEXTR.
In D24463#539490, @cem wrote:

I see; it seems like there is some additional instruction emulation specific to APIC accesses in sys/amd64/vmm/io, and those ranges aren't exposed to userspace's MMIO.

Apr 21 2020, 8:50 PM
grehan added a comment to D24463: vmm(4): Decode and emulate BEXTR.
In D24463#539489, @cem wrote:

I'm not seeing how we ever register a MMIO region for LAPIC_PADDR or IOAPIC_PADDR. Do we?

Apr 21 2020, 8:47 PM
grehan added a comment to D24463: vmm(4): Decode and emulate BEXTR.

My understanding is that gpa is precomputed for me and I don’t need to add displacement or compute it from regs. Is that right?

Apr 21 2020, 8:32 AM

Apr 19 2020

grehan accepted D24507: vmm(4): Bump VM_MAX_MEMMAPS for vmgenid.
Apr 19 2020, 11:52 PM

Apr 18 2020

grehan added a comment to D24463: vmm(4): Decode and emulate BEXTR.

I'll have a closer look at the emulation. Might even break out Intel XED for some comparison testing.

Apr 18 2020, 12:29 PM
grehan added a comment to D24464: bhyve(8): For prototyping, reattempt decode in userspace.

Debugging the APIC is a slog. Start with KTR compiled in an single vCPU guests. See what accesses are being done with BEXTR and what the device emulation is returning. Use FreeBSD as a guest and ddb to put in guest breakpoints to allow the ktr log to be examined. You may have to spend a lot more time with SDM Vol3 Ch10 than you would care for.

Apr 18 2020, 12:27 PM
grehan added inline comments to D24462: vmm(4): Decode 3-byte VEX-prefixed instructions.
Apr 18 2020, 12:23 PM

Apr 17 2020

grehan accepted D24464: bhyve(8): For prototyping, reattempt decode in userspace.

Nice change. GCE has moved instruction emulation out of kernel KVM, and it would be interesting for bhyve to also have that ability: this is a step towards that.

Apr 17 2020, 5:17 AM
grehan accepted D24463: vmm(4): Decode and emulate BEXTR.

Clang 10 -march=native kernels on znver1 emit BEXTR for APIC reads

Apr 17 2020, 5:14 AM
grehan accepted D24462: vmm(4): Decode 3-byte VEX-prefixed instructions.
Apr 17 2020, 5:09 AM
grehan accepted D24461: vmm.h: Add ABI assertions and mark implicit holes.
Apr 17 2020, 4:48 AM

Apr 16 2020

grehan accepted D24439: vmm(4): Expose instruction decode to userspace build.

There is a slightly hackier version of this and a harness at http://www.freebsd.org/~grehan/itest.tgz

Apr 16 2020, 6:10 AM

Apr 15 2020

grehan added inline comments to D23165: bhyve(8): Add VM Generation Counter ACPI device.
Apr 15 2020, 2:25 AM

Apr 14 2020

grehan accepted D24422: bhyve(8): Add bootrom allocation abstraction.
Apr 14 2020, 8:56 PM

Apr 6 2020

grehan added a comment to D24066: bhyve: support relocating fbuf and passthru data BARs.

That problem has since been fixed, and I've found NVMe to work well now.

Apr 6 2020, 12:31 AM · bhyve

Apr 3 2020

grehan added a comment to D24066: bhyve: support relocating fbuf and passthru data BARs.

(I'm not sure if the nvme spec requires the bar to be 64-bit capable.)

Apr 3 2020, 7:02 AM · bhyve

Mar 29 2020

grehan added a comment to D24107: Bhyve: fix SMBIOS Type 17 table generation.

There is no need to error out on overflow here. The type17 isn't used by most o/s's for determining how much memory is available: there is e820, the EFI memory map, etc etc. Perhaps print an error in bhyve, buit there doesn't seem any point in erroring out.

Okay. Also, I don't think we're going to have guests configured with ~2PB memory any time in the near future :)

Mar 29 2020, 12:25 AM

Mar 28 2020

grehan added a comment to D24107: Bhyve: fix SMBIOS Type 17 table generation.
  • Rework type17 generation and error out on overflow.
Mar 28 2020, 10:30 PM

Mar 20 2020

grehan added a comment to D24107: Bhyve: fix SMBIOS Type 17 table generation.

add GUID value for discovering SMBIOS tables in UEFI, which iirc would help our UEFI situation

Mar 20 2020, 11:02 PM

Mar 18 2020

grehan accepted D24107: Bhyve: fix SMBIOS Type 17 table generation.

Looks good.

Mar 18 2020, 3:36 AM

Mar 16 2020

grehan added a comment to D24066: bhyve: support relocating fbuf and passthru data BARs.

So it will be a choice of a UEFI firmware that does VNC and passthru but no NVMe or one
that does VNC and NVMe, that will be confusing.

Mar 16 2020, 7:07 AM · bhyve

Mar 15 2020

grehan added a comment to D24066: bhyve: support relocating fbuf and passthru data BARs.

I'm assuming this is an illumos specific issue, but it might be worth to test this on FreeBSD too.

Mar 15 2020, 11:17 PM · bhyve

Mar 1 2020

grehan accepted D22942: Untangle TPR shadowing and APIC virtualization .

Yamagi has mentioned some small optimizations that could be added to this (e.g. saving the TPR in the vcpu struct and only writing to the VMCS if there has been a change) but this can be done in future commits.

Mar 1 2020, 4:53 AM · bhyve

Feb 18 2020

grehan accepted D23472: bhyve: enable virtio-net mergeable rx buffers for tap(4).

Looks good.

Feb 18 2020, 11:45 AM

Feb 13 2020

grehan added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

Is this good to go?

Feb 13 2020, 11:17 PM

Feb 12 2020

grehan accepted D23342: bhyve: move virtio-net header processing to pci_virtio_net.
Feb 12 2020, 11:02 AM

Feb 10 2020

grehan accepted D23591: bhyve: use stream_read() to read 12 bytes of RFB client version.
Feb 10 2020, 2:22 AM

Feb 7 2020

grehan added inline comments to D23553: vmm: Add Hygon Dhyana support.
Feb 7 2020, 11:34 AM

Jan 29 2020

grehan added a comment to D23342: bhyve: move virtio-net header processing to pci_virtio_net.

The alternative solution (the same used by QEMU) is to read the packet in a local bounce buffer (64KB), so that we figure out its actual length and then we call vq_getchain() the corrent number of times (e.g. just once for 1500 bytes packets). The cost for this solution is an additional packet copy, which is not good imho.

Jan 29 2020, 12:47 PM