grehan (Peter Grehan)
User

Projects

User Details

User Since
May 9 2014, 10:54 PM (214 w, 5 d)

Recent Activity

Sun, Jun 10

grehan committed rS334913: Pass on bhyve kernel module maintenance to.
Pass on bhyve kernel module maintenance to
Sun, Jun 10, 4:25 AM

Wed, May 23

grehan accepted D15533: Fix coverity CID: 1391235, 1193654 and 1193651 (Unchecked return value).
Wed, May 23, 9:25 AM

May 14 2018

grehan accepted D15156: vmmdev: return EFAULT when trying to read beyond VM system memory max address.

Good to go with the name change.

May 14 2018, 7:13 AM
grehan accepted D15421: bhyve: fix usage formatting.
May 14 2018, 7:09 AM

May 4 2018

grehan added a comment to D15290: recursive mutex in pci_xhci leads to deadlock.

I checked with Leon and he thought this was fine. Will submit pending the copyright issue.

May 4 2018, 4:46 AM
grehan committed rS333235: Allow arbitrary numbers of columns for VNC server screen resolution..
Allow arbitrary numbers of columns for VNC server screen resolution.
May 4 2018, 1:37 AM
grehan closed D15274: Allow arbitrary numbers of columns in the VNC server..
May 4 2018, 1:37 AM

May 3 2018

grehan closed D15269: Allow PCI VGA devices to be detached..
May 3 2018, 10:52 PM
grehan committed rS333230: Allow PCI VGA devices to be detached..
Allow PCI VGA devices to be detached.
May 3 2018, 10:51 PM

May 2 2018

grehan created D15274: Allow arbitrary numbers of columns in the VNC server..
May 2 2018, 9:47 PM
grehan updated the diff for D15269: Allow PCI VGA devices to be detached..

Update style as per jhb.

May 2 2018, 5:47 PM
grehan committed rS333174: Use PCI power-mgmt to reset a device if FLR fails..
Use PCI power-mgmt to reset a device if FLR fails.
May 2 2018, 5:41 PM
grehan closed D15268: Use PCI power-mgmt to reset a device if FLR fails..
May 2 2018, 5:41 PM
grehan created D15269: Allow PCI VGA devices to be detached..
May 2 2018, 5:20 PM
grehan added a comment to D15268: Use PCI power-mgmt to reset a device if FLR fails..

Yes, this code was submitted by Matt M.

May 2 2018, 5:15 PM
grehan added a comment to D15268: Use PCI power-mgmt to reset a device if FLR fails..

bhyve passthru is currently restricted to the subset of devices that can support MSI/MSI-x so this doesn't come into play for older PCI devices.

May 2 2018, 5:14 PM
grehan created D15268: Use PCI power-mgmt to reset a device if FLR fails..
May 2 2018, 4:57 PM

Apr 30 2018

grehan accepted D15022: Initial debug server for bhyve..
Apr 30 2018, 5:17 PM

Apr 24 2018

grehan accepted D15180: sysutils/uefi-edk2-bhyve: update to v0.1.
Apr 24 2018, 1:37 PM · bhyve

Apr 21 2018

grehan accepted D15138: Correct undesirable interaction between caching of %cr4 in bhyve and invltlb_glob()..

This looks fine, though I'm interested in the circumstances that this can happen - can module-load pre-empt an existing kernel thread that is in the midst of invltlb_glob() ?

Apr 21 2018, 7:01 PM

Apr 15 2018

grehan committed rS332517: MFC r330764.
MFC r330764
Apr 15 2018, 8:29 PM
grehan committed rS332516: MFC r325261.
MFC r325261
Apr 15 2018, 8:20 PM

Apr 12 2018

grehan accepted D14656: Add SDT probes to the VMX VMexit interface.

I think this should be fine. Can always be tweaked later.

Apr 12 2018, 4:37 PM · DTrace, bhyve

Apr 6 2018

grehan accepted D14466: Add a way to temporarily suspend and resume virtual CPUs..

Fine by me. Looking forward to using this :)

Apr 6 2018, 6:55 PM

Mar 20 2018

grehan added a comment to D14466: Add a way to temporarily suspend and resume virtual CPUs..

Anything available I could use to test this on AMD ?

Mar 20 2018, 6:41 AM

Mar 18 2018

grehan added a reviewer for D14656: Add SDT probes to the VMX VMexit interface: tychon.

Adding Tycho to this.

Mar 18 2018, 2:58 AM · DTrace, bhyve
grehan added a comment to D12419: HD Audio Emulation For Bhyve (Based on D7840).

Needs capsicum patches or it won't work (testing was done with Capsicum disabled).

Mar 18 2018, 2:15 AM

Mar 11 2018

grehan committed rS330764: Add CR2 get/set support..
Add CR2 get/set support.
Mar 11 2018, 8:27 AM
grehan closed D14648: Add CR2 get/set to bhyvectl..
Mar 11 2018, 8:27 AM
grehan created D14648: Add CR2 get/set to bhyvectl..
Mar 11 2018, 8:08 AM

Mar 7 2018

grehan added a comment to D14473: userboot: add callbacks to set unrestricted guest mode.

So a comment on this: in general, api's are not added to FreeBSD that don't have base-system clients that use them, or for a good reason. I think this falls into the latter but I'd like to cut it down a bit.

  • can the get_unrestricted_guest() routine be removed ? There is an error return on the set, which seems like it can be used to determine if unrestricted mode is not available (e.g. that's how bhyve uses the ioctl).
  • is there a need for vcpu_reset() ? The BSP should be initialized to power-on state.. That could be a bug in bhyve and better to have it fixed there.
Mar 7 2018, 4:55 PM · bhyve
grehan accepted D9930: Bhyve cpu topology control.

so I do not see why running a bunch of tests would yield.

Mar 7 2018, 5:52 AM

Mar 5 2018

grehan added a comment to D9930: Bhyve cpu topology control.

You might have to explain further why you think you are exempt from having to demonstrate testing with this.

Mar 5 2018, 9:40 PM
grehan added a comment to D9930: Bhyve cpu topology control.

I'd like to see some guest test results (FreeBSD, Linux, Windows) for varying numbers of these, in particular, with sockets > 1, and comparing what Qemu shows for the same configuration.

Mar 5 2018, 7:24 PM

Mar 4 2018

grehan accepted D14501: Move new IVHD definitions out of ACPI.
Mar 4 2018, 5:26 PM

Mar 1 2018

grehan accepted D14548: Fix a lock recursion introduced in r327065..
Mar 1 2018, 3:28 PM

Feb 25 2018

grehan accepted D14075: Add a new variant of the GLA2GPA ioctl for use by the debug server..

This is an excellent change :)

Feb 25 2018, 10:44 PM
grehan added inline comments to D14501: Move new IVHD definitions out of ACPI.
Feb 25 2018, 10:40 PM

Feb 22 2018

grehan added inline comments to D14473: userboot: add callbacks to set unrestricted guest mode.
Feb 22 2018, 11:13 PM · bhyve
grehan accepted D14473: userboot: add callbacks to set unrestricted guest mode.

You may be able to get away with just the "set" call. Given that all h/w that is supported by bhyve, with the exception of only Nehalem systems, support this, you may want to use just the error from the set call to handle this low-probability error.

Feb 22 2018, 10:49 PM · bhyve

Feb 21 2018

grehan accepted D14074: Add two new ioctls to bhyve for batch register fetch/store operations..
Feb 21 2018, 3:20 PM

Feb 17 2018

grehan added a comment to D9930: Bhyve cpu topology control.

Thanks for getting back to this Rod.

Feb 17 2018, 3:40 AM

Feb 15 2018

grehan accepted D14382: Fix bhyve w/ INVARIANTS post D13573.

Only minor issue I had was the trailing underscores in the inline routine name: wasn't too sure if that was idiomatic FreeBSD. Maybe "_int" ?

Feb 15 2018, 5:03 PM

Feb 10 2018

grehan accepted D14272: mitigate against CVE-2017-5715 by flushing the return stack buffer (RSB) upon returning from the guest.
Feb 10 2018, 6:20 PM

Jan 26 2018

grehan updated the diff for D14022: NVMe emulation for bhyve (improved).

Update from Leon:

Jan 26 2018, 4:06 PM
grehan added inline comments to D14022: NVMe emulation for bhyve (improved).
Jan 26 2018, 3:12 AM

Jan 25 2018

grehan abandoned D13995: NVMe controller emulator for bhyve..

Closing this revision - moving to D14022

Jan 25 2018, 4:45 PM · bhyve
grehan commandeered D13995: NVMe controller emulator for bhyve..
Jan 25 2018, 4:44 PM · bhyve
grehan added a comment to D13995: NVMe controller emulator for bhyve..

Yep, that's correct. The code in the new review is based on this code so it's really a continuation of the effort.

Jan 25 2018, 4:41 PM · bhyve
grehan requested changes to D13995: NVMe controller emulator for bhyve..

Chuck - the review for this is now in D14022, where I believe your comments have already been addressed.

Jan 25 2018, 3:55 PM · bhyve
grehan updated the diff for D14022: NVMe emulation for bhyve (improved).

Some minor fixes from Leon, and an initial man page update.

Jan 25 2018, 8:16 AM

Jan 23 2018

grehan accepted D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.

I don't think I'll be able to get the CR8 stuff done as quick as I'd hoped, so I think it's fine to go ahead with this as-is. In addition, both Andriy and Anish have reported that Windows guests come up fine so the issue may not be as big a deal as I'd previously thought.

Jan 23 2018, 4:47 PM
grehan added a comment to D14022: NVMe emulation for bhyve (improved).

I'll pull in the man page diff (maybe modified). Leon also sent me an update so I'll roll both in.

Jan 23 2018, 4:10 PM
grehan updated the test plan for D14022: NVMe emulation for bhyve (improved).
Jan 23 2018, 6:19 AM
grehan added a reviewer for D14022: NVMe emulation for bhyve (improved): bhyve.
Jan 23 2018, 6:09 AM
grehan added a comment to D13995: NVMe controller emulator for bhyve..

The updated version of this code is at https://reviews.freebsd.org/D14022

Jan 23 2018, 6:08 AM · bhyve
grehan added a reviewer for D14022: NVMe emulation for bhyve (improved): sux2mfgj_gmail.com.
Jan 23 2018, 6:07 AM
grehan updated subscribers of D14022: NVMe emulation for bhyve (improved).
Jan 23 2018, 6:06 AM
grehan added reviewers for D14022: NVMe emulation for bhyve (improved): trasz, imp.
Jan 23 2018, 6:05 AM
grehan created D14022: NVMe emulation for bhyve (improved).
Jan 23 2018, 6:03 AM

Jan 21 2018

grehan added a comment to D13995: NVMe controller emulator for bhyve..

Leon Dang has also been working on NVMe emulation, and his version works with Linux, Windows and UEFI boot. I'll post that code for review since it is a bit more recent and tested. In the meantime, that version can be seen at www.freebsd.org/~grehan/pci_nvme.c

Jan 21 2018, 12:06 AM · bhyve

Jan 17 2018

grehan requested changes to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.

@avg I will look at and test D13828.

Jan 17 2018, 6:45 AM

Jan 15 2018

grehan accepted D13919: mitigate against CVE-2017-5715 by clearing registers upon returning from the guest.
Jan 15 2018, 6:09 PM
grehan added a comment to D13919: mitigate against CVE-2017-5715 by clearing registers upon returning from the guest.

Tested the SVM codepath with a Win10 guest on an AMD Sempron APU.

Jan 15 2018, 6:08 PM
grehan added a reviewer for D13919: mitigate against CVE-2017-5715 by clearing registers upon returning from the guest: bhyve.

Add bhyve review group.

Jan 15 2018, 6:07 PM
grehan committed rS327990: The vmm(4) man page is conditional on MK_BHYVE..
The vmm(4) man page is conditional on MK_BHYVE.
Jan 15 2018, 4:52 AM
grehan added a comment to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.

Dropping kern.hz to 50 on the Sempron seemed to show the problem a bit more: the 2nd phase of a Win10 install wasn't able to complete. With the diff, the install was able to complete. Subjectively things seemed quicker, particularly the disk-writing part of the install.

Jan 15 2018, 12:28 AM

Jan 14 2018

grehan added a comment to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.

Some more info on how timing-sensitive this is: the 10.3 install Ryzen insta-repro doesn't happen with a 4 vCPU guest on a 1.3Gzh Sempron 3850 APU, nor with 4/6/8 vCPU guests on an Opteron 6320 :( Also, Win10 Pro 2 vCPU guests install fine on both systems, where the Ryzen shows a lockup very quickly.

Jan 14 2018, 6:29 PM

Jan 11 2018

grehan added a comment to D13828: vmm/svm: use special state for LAPIC interrupt injected as virtual interrupt.

The VIRQ injection doesn't cover all cases - it misses out the modification of the TPR register via CR8.

Jan 11 2018, 7:48 AM

Jan 10 2018

grehan added a comment to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.

CR8 write exits are required or the same situation will occur as with VIRQ - the update written to the V_TPR needs to be acted on immediately by the APIC emulation code since an interrupt that was blocked may need to be injected.

Jan 10 2018, 3:02 AM

Jan 8 2018

grehan added a comment to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.

Good to know that it fixes the issue on the Phenom. My Ryzen 1700 is pre-July17 so can't necessarily be trusted.

Jan 8 2018, 10:02 PM
grehan added a comment to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.

Also, I think CR8 write exits are needed to force re-evaluation of the TPR for the software APIC model.

Jan 8 2018, 7:37 AM
grehan added a comment to D13780: vmm/svm: post LAPIC interrupts using event injection rather than virtual interrupts.

I didn't have success with this on my Ryzen 1700, but it's also possibly buggy :( I'll try with an Opteron tomorrow.

Jan 8 2018, 7:34 AM

Dec 21 2017

grehan accepted D13573: recognize a pending virtual interrupt while emulating halt instruction.
Dec 21 2017, 6:10 PM

Dec 20 2017

grehan added a comment to D13229: Save and restore guest debug registers..

This looks fine. I'll test on AMD. Some comments:

Dec 20 2017, 1:47 AM

Dec 6 2017

grehan updated subscribers of D10335: VirtFS/9p filesystem passthrough support (virtio-9p).

Adding tychon@ as a subscriber: he's been doing some 9P work in recent times.

Dec 6 2017, 1:19 AM

Nov 26 2017

grehan accepted D13062: Add vmm(4) man page.

Fine with the minor additions.

Nov 26 2017, 5:14 AM

Nov 9 2017

grehan accepted D12985: bhyve: don't try to capsicumise after failed open.

Thanks for this patch.

Nov 9 2017, 2:40 PM · bhyve

Nov 8 2017

grehan accepted D12976: Fix issue with VXLAN-encapsulated rx h/w checksum.
Nov 8 2017, 3:26 AM

Nov 1 2017

grehan added a comment to D12419: HD Audio Emulation For Bhyve (Based on D7840).

The OR emulation has been checked in with r325261

Nov 1 2017, 3:29 AM
grehan added a comment to D12419: HD Audio Emulation For Bhyve (Based on D7840).

The OR emulation has been checked in with r325261

Nov 1 2017, 3:29 AM
grehan committed rS325261: Emulate the "OR reg, r/m" instruction (opcode 0BH)..
Emulate the "OR reg, r/m" instruction (opcode 0BH).
Nov 1 2017, 3:27 AM
grehan closed D12832: Add 0xb OR opcode support to bhyve's instruction emulation.
Nov 1 2017, 3:27 AM

Oct 30 2017

grehan created D12832: Add 0xb OR opcode support to bhyve's instruction emulation.
Oct 30 2017, 7:17 AM

Oct 27 2017

grehan accepted D12661: Rework pass through changes in r305485 to be safer..

Matt Macy has some additional reset code for non-FLR devices (in his case GPGPUs).

Oct 27 2017, 2:04 PM

Oct 20 2017

grehan added a comment to D12419: HD Audio Emulation For Bhyve (Based on D7840).

I disabled capsicum by commenting out the cap_enter() call, and with the above struct revert, was able to cat a .WAV file and also use mpg123 to play a long mp3 file on a FreeBSD 11.1/amd64 guest, with a cheap USB audio adapter for output. Volume control seemed to work fine with mpg123. There was a very small glitch/skip when the audio was first played (or on resume after pause in mpg123).

Oct 20 2017, 4:29 AM

Oct 15 2017

grehan added a comment to D12661: Rework pass through changes in r305485 to be safer..

Looking at this...

Oct 15 2017, 6:16 PM

Sep 26 2017

grehan added a comment to D12419: HD Audio Emulation For Bhyve (Based on D7840).

There are a bunch of minor style(9) issues.

Sep 26 2017, 6:56 PM

Sep 5 2017

grehan accepted D12212: bhyve: actually call bhyve_caph_cache_catpages.

Thanks - this keeps the behviour in sync with head where the routines are hidden in caph helpers, so my opinion is it is best to keep the catpages call.

Sep 5 2017, 5:35 AM

Aug 15 2017

grehan added a comment to D11768: Add support to devel/libhyve-remote. (VNC Server).

Some high-level comments:

Aug 15 2017, 4:04 PM

Aug 3 2017

grehan accepted D11846: Add to sysreg definition for coproc regs required for virtualization.

I checked the numbers and they look good.

Aug 3 2017, 6:15 PM

Jul 29 2017

grehan requested changes to D11768: Add support to devel/libhyve-remote. (VNC Server).

I'm looking at this now. I think there will need to be some changes in the mechanics for this, and also the abstraction. I'll write up something longer with more detail.

Jul 29 2017, 6:29 PM

Jul 28 2017

grehan accepted D11775: bhyve/vga.c: fix atc_color_select_67 bit shift.
Jul 28 2017, 6:25 PM
grehan accepted D11774: bhyve/pci_e82545.c: squelch gcc warning for noreturn procedure.

Shutdown hooks will make it some day...

Jul 28 2017, 5:55 PM

Jul 13 2017

grehan committed rS320935: MFS 320891.
MFS 320891
Jul 13 2017, 8:13 AM
grehan committed rS320934: MFS 320866.
MFS 320866
Jul 13 2017, 7:55 AM
grehan committed rS320933: MFS r320855.
MFS r320855
Jul 13 2017, 7:33 AM

Jul 11 2017

grehan committed rS320891: MFC r317542, r317543, r317543.
MFC r317542, r317543, r317543
Jul 11 2017, 6:39 AM

Jul 10 2017

grehan committed rS320866: MFC 313727, 317483.
MFC 313727, 317483
Jul 10 2017, 6:29 AM
grehan committed rS320855: MFC r311699.
MFC r311699
Jul 10 2017, 3:12 AM