5

I have a Surface Book 2 with a GTX 1050 GPU, I want to use that graphic card while running my macOS Virtual Machine. I have been searching a lot but didn't find a satisfactory answer. I do not want to give the control of the GPU to my VM, I just want to use it in the same way that the Intel GPU is being used. I tried to set VirtualBox in the Nvidia Control Panel but it is the only program that doesn't appear, this made me wonder if I need an API.

Thanks for your help!

1
  • "I just want to use it in the same way that the Intel GPU is being used." - I am not actually sure what you mean by this statement. I suspect you just want to use 3D acceleration, but I am not entirely sure, due to the fact only VT-d meets description you used – Ramhound Feb 2 '18 at 19:01
5

This made me wonder if I need an API.

As an end user of VirtualBox, you don't need an API.

I want to use the graphics card while running my macOS Virtual Machine.

VirtualBox PCI Passthrough support, which is required for what you want to do, is very limited and comes with specific hardware requirements.

The PCI passthrough module is shipped as a VirtualBox extension package, which must be installed separately. See Section 1.5, “Installing VirtualBox and extension packs” for more information.

Essentially this feature allows to directly use physical PCI devices on the host by the guest even if host doesn't have drivers for this particular device. Both, regular PCI and some PCI Express cards, are supported. AGP and certain PCI Express cards are not supported at the moment if they rely on GART (Graphics Address Remapping Table) unit programming for texture management as it does rather non-trivial operations with pages remapping interfering with IOMMU. This limitation may be lifted in future releases.

To be fully functional, PCI passthrough support in VirtualBox depends upon an IOMMU hardware unit which is not yet too widely available. If the device uses bus mastering (i.e. it performs DMA to the OS memory on its own), then an IOMMU is required, otherwise such DMA transactions may write to the wrong physical memory address as the device DMA engine is programmed using a device-specific protocol to perform memory transactions. The IOMMU functions as translation unit mapping physical memory access requests from the device using knowledge of the guest physical address to host physical addresses translation rules.

Intel's solution for IOMMU is marketed as "Intel Virtualization Technology for Directed I/O" (VT-d), and AMD's one is called AMD-Vi. So please check if your motherboard datasheet has appropriate technology. Even if your hardware doesn't have a IOMMU, certain PCI cards may work (such as serial PCI adapters), but the guest will show a warning on boot and the VM execution will terminate if the guest driver will attempt to enable card bus mastering.

enter image description here

PCI passthrough

I do not want to give the control of the GPU to my VM, I just want to use it in the same way that the Intel GPU is being used.

In order to accomplish what you want, you are going to have to give up control, that's just a matter of fact.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.