Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Commit c87e22f

Browse files
prashanth-intelsysopenci
authored andcommitted
Add load_kernel_module vfio and vfio_pci during launch.
Fixed Android VM launch failing through VM manager when no pci_passthrough is given in config ini file. Tracked-On: OAM-102391 Signed-off-by: Suresh, Prashanth <prashanth.suresh@intel.com>
1 parent 9e099ac commit c87e22f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/guest/start.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,16 @@ static int set_available_vf(void)
380380
int i;
381381
int ret = 0;
382382

383+
if ((ret = load_kernel_module("vfio")) != 0) {
384+
fprintf(stderr, "errro loading vfio module\n");
385+
return -1;
386+
}
387+
388+
if ((ret = load_kernel_module("vfio_pci")) != 0) {
389+
fprintf(stderr, "errro loading vfio_pci module\n");
390+
return -1;
391+
}
392+
383393
fd = open(INTEL_GPU_DEV_PATH"/sriov_totalvfs", O_RDONLY);
384394
if (fd == -1) {
385395
fprintf(stderr, "open %s/sriov_totalvfs failed, errno=%d\n", INTEL_GPU_DEV_PATH, errno);

0 commit comments

Comments
 (0)