Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCI passthru on 11-Current #86

Merged
merged 4 commits into from Jan 7, 2016
Merged

PCI passthru on 11-Current #86

merged 4 commits into from Jan 7, 2016

Conversation

@murf0
Copy link
Contributor

murf0 commented Jan 3, 2016

For pci passthru on 11-Current
-S is required for both bhyveload and bhyve (You'll get "Unable to setup memory (17)" from bhyve)
-A -H -P as args for bhyve is removed when setting "iohyve set bargs="-S"" They are required for APIC (Well -A atleast for APIC)

"should" not affect 10.2 since testing for -S in bargs before adding argument.

Please test and comment, feedback greatly appreciated.

murf0 added 2 commits Jan 3, 2016
If using set to set bargs also add -A -H -P as standard.
@murf0

This comment has been minimized.

Copy link
Contributor Author

murf0 commented Jan 3, 2016

I realize i try to fix 2 things in a single pull request. Bad form ish..
Also The bargs -H -A -P addition will affect 10.2.

@pr1ntf

This comment has been minimized.

Copy link
Owner

pr1ntf commented Jan 4, 2016

I like the wired memory stuff, how are you testing this? (What are you passing through?)

I don't quite follow what's going on here: https://github.com/pr1ntf/iohyve/pull/86/files#diff-d1dda53d98a3ce6903e6eac254cd2347R807

Is that related to the wired memory?

@pr1ntf

This comment has been minimized.

Copy link
Owner

pr1ntf commented Jan 4, 2016

-S is added only if it's not in bargs? Cool.

If it's not needed, it outputs nothing. Cool.

You just scare me with the wording "Also The bargs -H -A -P addition will affect 10.2."

@murf0

This comment has been minimized.

Copy link
Contributor Author

murf0 commented Jan 4, 2016

My goal was to use passthru with an em network card (4 interfaces) and I'm on 11 current. "-S" is required according to the wiki https://wiki.freebsd.org/bhyve/pci_passthru, the network card shows up after the change.

iohyve create pfsense 8G
iohyve set pfsense ram=2048mb
iohyve set pfsense cpu=2
iohyve set pfsense pcidev:7=passthru,10/0/0
iohyve set pfsense pcidev:8=passthru,10/0/1
iohyve set pfsense pcidev:9=passthru,9/0/0
iohyve set pfsense pcidev:1=passthru,9/0/1
iohyve set pfsense os=pfsense
iohyve set pfsense bargs="-S"
iohyve install pfsense pfSense-LiveCD-2.2.6-RELEASE-amd64.iso

The -S is only added to the bhyveload (or grub-bhyve) command if it is present in bargs (Without the other arguments in bargs) Since it is the only argument that needs to be present in both the bhyveload and bhyve command.

Regarding the -H -A -P:
It is not related to the wired memory.
If the user manually sets bargs (ex. via "iohyve set pfsense bargs="-S"") it currently removes the standard bargs set at creation time here: https://github.com/pr1ntf/iohyve/blob/master/iohyve#L422
The change makes so that these arguments are always added. (ie if the user sets bargs="-S" the actual real bargs is "-A -H -P -S") Which might not be the desired action from the user, who may want to unset the standard bargs. I'm now convinced that that was a bad idea, documenting the bargs feature is a better approach. I've removed the code doing the automatic inclusion.
I made the discovery when adding -S to bargs and was surprised that no ACPI was available when i set bargs manually preventing med from booting pfsense.

@pr1ntf

This comment has been minimized.

Copy link
Owner

pr1ntf commented Jan 4, 2016

Thanks for the update! Yeah, you can just enter iohyve set pfsense barg ="-A -H -P -S" because of the way it's handled by the script. IE: you can add a property to bargs, you need to tell iohyve what all the bargs are each time you set it.

As for the wired memory, it'll get tested here when I get something passed through.

@pr1ntf

This comment has been minimized.

Copy link
Owner

pr1ntf commented Jan 5, 2016

I did some work to the load function tonight that totally broke this PR. :(

I'm sorry. 🐙

Merge remote-tracking branch 'upstream/master'
@murf0

This comment has been minimized.

Copy link
Contributor Author

murf0 commented Jan 5, 2016

Unbroken :)
I'll test it more today and report back.
Initially it works on 11-Current for me.

@pr1ntf

This comment has been minimized.

Copy link
Owner

pr1ntf commented Jan 6, 2016

I'm having problems getting my SD/MMC reader passed through to anything on my 11.0-CURRENT install. Possibly user error, still tracking down.

HOWEVER, I no longer get the "wired memory" error when using your patch.

@pr1ntf

This comment has been minimized.

Copy link
Owner

pr1ntf commented Jan 7, 2016

HUZZAH.

It's working for me.

root@:~ # ifconfig -l
vtnet0 ix0 lo0
pr1ntf added a commit that referenced this pull request Jan 7, 2016
PCI passthru on 11-Current
@pr1ntf pr1ntf merged commit d7e4827 into pr1ntf:master Jan 7, 2016
@murf0

This comment has been minimized.

Copy link
Contributor Author

murf0 commented Jan 7, 2016

=) awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.