VirtualBox

Changeset 36124 in vbox


Ignore:
Timestamp:
Mar 1, 2011 4:44:58 PM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
70289
Message:

PCI: code to perform host driver detach on Linux - not yet fully functional

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/rawpci.h

    r36079 r36124  
    375375#define RAWPCIFACTORY_UUID_STR "c0268f49-e1e4-402b-b7e0-eb8d09659a9b"
    376376
     377/**
     378 * Flags passed to pfnPciDeviceConstructStart(), to notify driver
     379 * about options to be used to open device.
     380 */
     381typedef enum PCIRAWDRIVERFLAGS
     382{
     383    /** If runtime shall  try to detach host driver. */
     384    PCIRAWDRIVERRFLAG_DETACH_HOST_DRIVER   =  (1 << 0),
     385    /** The usual 32-bit type blow up. */
     386    PCIRAWDRIVERRFLAG_32BIT_HACK = 0x7fffffff
     387} PCIRAWDRIVERFLAGS;
     388
     389
    377390RT_C_DECLS_END
    378391
  • trunk/src/VBox/Devices/Bus/DevPciIch9.cpp

    r36116 r36124  
    17271727
    17281728        int iIrq = aPciIrqs[ich9pciSlotGetPirq(uBus, uDevFn, iPin)];
    1729         Log(("Using pin %d and IRQ %d for device %02x:%02x.%d\n", 
     1729        Log(("Using pin %d and IRQ %d for device %02x:%02x.%d\n",
    17301730             iPin, iIrq, uBus, uDevFn>>3, uDevFn&7));
    17311731        ich9pciConfigWrite(pGlobals, uBus, uDevFn, VBOX_PCI_INTERRUPT_LINE, iIrq, 1);
     
    25712571    }
    25722572
    2573     PCIDevSetCommand(pDev,
    2574                      PCIDevGetCommand(pDev)
    2575                      &
    2576                      ~(VBOX_PCI_COMMAND_IO |
    2577                        VBOX_PCI_COMMAND_MEMORY |
    2578                        VBOX_PCI_COMMAND_MASTER));
    2579 
    2580     /* Bridge device reset handlers processed later */
    2581     if (!pciDevIsPci2PciBridge(pDev))
    2582     {
    2583         PCIDevSetByte(pDev, VBOX_PCI_CACHE_LINE_SIZE, 0x0);
    2584         PCIDevSetInterruptLine(pDev, 0x0);
     2573    if (pciDevIsPassthrough(pDev))
     2574    {
     2575        // implement reset handler
     2576        AssertFailed();
     2577    }
     2578    else
     2579    {
     2580        PCIDevSetCommand(pDev,
     2581                         PCIDevGetCommand(pDev)
     2582                         &
     2583                         ~(VBOX_PCI_COMMAND_IO |
     2584                           VBOX_PCI_COMMAND_MEMORY |
     2585                           VBOX_PCI_COMMAND_MASTER));
     2586       
     2587        /* Bridge device reset handlers processed later */
     2588        if (!pciDevIsPci2PciBridge(pDev))
     2589        {
     2590            PCIDevSetByte(pDev, VBOX_PCI_CACHE_LINE_SIZE, 0x0);
     2591            PCIDevSetInterruptLine(pDev, 0x0);
     2592        }
    25852593    }
    25862594}
  • trunk/src/VBox/HostDrivers/VBoxPci/VBoxPciInternal.h

    r36055 r36124  
    9292    /** The SUPDRV IDC handle (opaque struct). */
    9393    SUPDRVIDCHANDLE SupDrvIDC;
     94#ifdef RT_OS_LINUX
     95    struct module    * pciStubModule;
     96#endif
     97
    9498} VBOXRAWPCIGLOBALS;
    9599
  • trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp

    r36121 r36124  
    526526        InsertConfigString(pCfg,       "DeviceName",  aDevName);
    527527
     528        InsertConfigInteger(pCfg,      "DetachHostDriver",  1);
    528529        InsertConfigInteger(pCfg,      "HostPCIBusNo",      HostPciAddress.iBus);
    529530        InsertConfigInteger(pCfg,      "HostPCIDeviceNo",   HostPciAddress.iDevice);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette