~ubuntu-branches/ubuntu/vivid/virtualbox-ose/vivid

« back to all changes in this revision

Viewing changes to src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-10-13 23:06:00 UTC
  • mfrom: (0.3.2 upstream) (0.1.12 sid)
  • Revision ID: james.westby@ubuntu.com-20091013230600-xhu2pwizq0wo63l9
Tags: 3.0.8-dfsg-1ubuntu1
* Merge from debian unstable (LP: #444812), remaining changes:
  - Enable DKMS support on virtualbox host and guest modules (LP: #267097)
    - Drop virtualbox-ose{-guest,}-modules-* package templates
    - Recommend *-source instead of *-modules packages
    - Replace error messages related to missing/mismatched
      kernel module accordingly
  - Autoload kernel module
    - LOAD_VBOXDRV_MODULE=1 in virtualbox-ose.default
  - Disable update action
    - patches/u01-disable-update-action.dpatch
  - Virtualbox should go in Accessories, not in System tools (LP: #288590)
    - virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add apport hook
    - virtualbox-ose.files/source_virtualbox-ose.py
    - virtualbox-ose.install
  - Add launchpad integration
    - control
    - lpi-bug.xpm
    - patches/u02-lp-integration.dpatch
* Try to remove existing dkms modules before adding the new modules
  (LP: #434503)
  - debian/virtualbox-ose-source.postinst
  - debian/virtualbox-ose-guest-source.postinst
* Don't fail if dkms modules have already been removed
  - debian/virtualbox-ose-source.prerm
  - debian/virtualbox-ose-guest-source.prerm

Show diffs side-by-side

added added

removed removed

Lines of Context:
664
664
        if (pMemNtToMap->cMdls != 1)
665
665
            return VERR_NOT_SUPPORTED;
666
666
 
 
667
#ifdef IPRT_TARGET_NT4
 
668
        /* NT SP0 can't map to a specific address. */
 
669
        if (pvFixed != (void *)-1)
 
670
            return VERR_NOT_SUPPORTED;
 
671
#endif
 
672
 
667
673
        /* we can't map anything to the first page, sorry. */
668
674
        if (pvFixed == 0)
669
675
            return VERR_NOT_SUPPORTED;
677
683
        {
678
684
            /** @todo uAlignment */
679
685
            /** @todo How to set the protection on the pages? */
 
686
#ifdef IPRT_TARGET_NT4
 
687
            void *pv = MmMapLockedPages(pMemNtToMap->apMdls[0],
 
688
                                        R0Process == NIL_RTR0PROCESS ? KernelMode : UserMode);
 
689
#else
680
690
            void *pv = MmMapLockedPagesSpecifyCache(pMemNtToMap->apMdls[0],
681
691
                                                    R0Process == NIL_RTR0PROCESS ? KernelMode : UserMode,
682
692
                                                    MmCached,
683
693
                                                    pvFixed != (void *)-1 ? pvFixed : NULL,
684
694
                                                    FALSE /* no bug check on failure */,
685
695
                                                    NormalPagePriority);
 
696
#endif
686
697
            if (pv)
687
698
            {
688
699
                NOREF(fProt);