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

[mono] efi: Add config file support and don't passthrough by default #16

Open
wants to merge 6 commits into
base: mono
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions deps/hypervisor/bfdriver/src/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,18 @@ int g_enable_winpv = 0;
int g_disable_xen_pfd = 0;
int g_enable_xue = 0;

#define PCI_PT_CLASS_LIST_SIZE 14
uint64_t pci_pt_class_list[PCI_PT_CLASS_LIST_SIZE];
uint64_t pci_pt_class_count = 0;

#define NO_PCI_PT_LIST_SIZE 256
uint64_t no_pci_pt_list[NO_PCI_PT_LIST_SIZE];
uint64_t no_pci_pt_count = 0;

#define PCI_PT_LIST_SIZE 256
uint64_t pci_pt_list[PCI_PT_LIST_SIZE];
uint64_t pci_pt_count = 0;

#ifdef USE_XUE
struct xue g_xue;
struct xue_ops g_xue_ops;
Expand Down Expand Up @@ -525,6 +533,16 @@ common_load_vmm(void)
goto failure;
}

for (i = 0; i < pci_pt_class_count; i++) {
ret = platform_call_vmm_on_core(0,
BF_REQUEST_PCI_PT_CLASS,
pci_pt_class_list[i],
0);
if (ret != BF_SUCCESS) {
goto failure;
}
}

for (i = 0; i < no_pci_pt_count; i++) {
ret = platform_call_vmm_on_core(0,
BF_REQUEST_NO_PCI_PT,
Expand All @@ -535,6 +553,16 @@ common_load_vmm(void)
}
}

for (i = 0; i < pci_pt_class_count; i++) {
ret = platform_call_vmm_on_core(0,
BF_REQUEST_PCI_PT,
pci_pt_list[i],
0);
if (ret != BF_SUCCESS) {
goto failure;
}
}

ret = private_add_modules_mdl();
if (ret != BF_SUCCESS) {
goto failure;
Expand Down
Loading