- User Since
- May 9 2014, 10:54 PM (202 w, 17 h)
Tue, Mar 20
Anything available I could use to test this on AMD ?
Sun, Mar 18
Adding Tycho to this.
Needs capsicum patches or it won't work (testing was done with Capsicum disabled).
Sun, Mar 11
Wed, Mar 7
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.
so I do not see why running a bunch of tests would yield.
Mon, Mar 5
You might have to explain further why you think you are exempt from having to demonstrate testing with this.
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.
Sun, Mar 4
Thu, Mar 1
Sun, Feb 25
This is an excellent change :)
Thu, Feb 22
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 21 2018
Feb 17 2018
Thanks for getting back to this Rod.
Feb 15 2018
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 10 2018
Jan 26 2018
Update from Leon:
Jan 25 2018
Closing this revision - moving to D14022
Yep, that's correct. The code in the new review is based on this code so it's really a continuation of the effort.
Chuck - the review for this is now in D14022, where I believe your comments have already been addressed.
Some minor fixes from Leon, and an initial man page update.
Jan 23 2018
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.
I'll pull in the man page diff (maybe modified). Leon also sent me an update so I'll roll both in.
The updated version of this code is at https://reviews.freebsd.org/D14022
Jan 21 2018
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 17 2018
Jan 15 2018
Tested the SVM codepath with a Win10 guest on an AMD Sempron APU.
Add bhyve review group.
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 14 2018
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 11 2018
The VIRQ injection doesn't cover all cases - it misses out the modification of the TPR register via CR8.
Jan 10 2018
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 8 2018
Good to know that it fixes the issue on the Phenom. My Ryzen 1700 is pre-July17 so can't necessarily be trusted.
Also, I think CR8 write exits are needed to force re-evaluation of the TPR for the software APIC model.
I didn't have success with this on my Ryzen 1700, but it's also possibly buggy :( I'll try with an Opteron tomorrow.
Dec 21 2017
Dec 20 2017
This looks fine. I'll test on AMD. Some comments:
Dec 6 2017
Adding tychon@ as a subscriber: he's been doing some 9P work in recent times.
Nov 26 2017
Nov 9 2017
Thanks for this patch.
Nov 8 2017
Nov 1 2017
The OR emulation has been checked in with r325261
The OR emulation has been checked in with r325261
Oct 30 2017
Oct 27 2017
Matt Macy has some additional reset code for non-FLR devices (in his case GPGPUs).
Oct 20 2017
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 15 2017
Looking at this...
Sep 26 2017
There are a bunch of minor style(9) issues.
Sep 5 2017
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.
Aug 15 2017
Some high-level comments:
Aug 3 2017
I checked the numbers and they look good.
Jul 29 2017
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 28 2017
Shutdown hooks will make it some day...
Jul 13 2017
Jul 11 2017
Jul 10 2017
Jul 6 2017
Tested fine on a Ryzen 1700, passing through an em device to an 11.1 guest, and doing lots of network file transfers.
Jul 5 2017
Thanks for this work. Let me give it a quick test (later today) to verify.
Jul 3 2017
(interested in adding bhyve support for SGX)
Jun 8 2017
Jun 1 2017
Please credit Fabian Freyer (from D7029) as the original submitter of this code when committing.
May 26 2017
May 25 2017
May 24 2017
There was already a review for this in D9033 where I pointed out the initial fix by myself that bumped the number of descs, and the subsequent backout when it broke Linux guests :(
May 18 2017
I emailed Marcelo some changes I had to this - it doesn't work as is.
Any chance this could be committed ?
May 2 2017
May 1 2017
Apr 27 2017
Apr 24 2017
Thanks for the clarification on v2.
Apr 13 2017
Apr 10 2017
You'll have to use openat(), with the fd set up prior to cap_enter(). Here's a small example from firstname.lastname@example.org, who I'm sure will be happy to provide further advice :) http://www.informit.com/articles/article.aspx?p=1924012&seqNum=2
Apr 9 2017
Any thoughts on the interaction with capsicum ? Seems like you just need blanket access underneath a particular directory.
Fine to commit after the max fbuf res added.
Apr 5 2017
Fine by me. I didn't check, but were all the comments in this applied to the new revision ?