~ubuntu-branches/ubuntu/natty/virtualbox-ose/natty-updates

« back to all changes in this revision

Viewing changes to src/VBox/VMM/VMMAll/PGMAllBth.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-03-11 17:16:37 UTC
  • mfrom: (0.3.4 upstream) (0.4.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100311171637-43z64ia3ccpj8vqn
Tags: 3.1.4-dfsg-2ubuntu1
* Merge from Debian unstable (LP: #528561), remaining changes:
  - VirtualBox should go in Accessories, not in System tools (LP: #288590)
    - debian/virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add Apport hook
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Add Launchpad integration
    - debian/control
    - debian/lpi-bug.xpm
    - debian/patches/u02-lp-integration.dpatch
  - Replace *-source packages with transitional packages for *-dkms
* Fix crash in vboxvideo_drm with kernel 2.6.33 / backported drm code
  (LP: #535297)
* Add a list of linux-headers packages to the apport hook
* Update debian/patches/u02-lp-integration.dpatch with a
  DEP-3 compliant header
* Add ${misc:Depends} to virtualbox-ose-source and virtualbox-ose-guest-source
  Depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
# error "Invalid combination; AMD64 guest implies AMD64 shadow and vice versa"
65
65
#endif
66
66
 
67
 
#ifdef IN_RING0 /* no mappings in VT-x and AMD-V mode */
68
 
# define PGM_WITHOUT_MAPPINGS
69
 
#endif
70
 
 
71
67
 
72
68
#ifndef IN_RING3
73
69
/**
292
288
                /*
293
289
                 * The first thing we check is if we've got an undetected conflict.
294
290
                 */
295
 
                if (!pVM->pgm.s.fMappingsFixed)
 
291
                if (pgmMapAreMappingsFloating(&pVM->pgm.s))
296
292
                {
297
293
                    unsigned iPT = pMapping->cb >> GST_PD_SHIFT;
298
294
                    while (iPT-- > 0)
2625
2621
        PdeDst = *pPdeDst;
2626
2622
#  endif
2627
2623
    }
2628
 
# else  /* PGM_WITHOUT_MAPPINGS */
2629
 
    Assert(!pgmMapAreMappingsEnabled(&pVM->pgm.s));
2630
 
# endif /* PGM_WITHOUT_MAPPINGS */
 
2624
# endif /* !PGM_WITHOUT_MAPPINGS */
2631
2625
    Assert(!PdeDst.n.u1Present); /* We're only supposed to call SyncPT on PDE!P and conflicts.*/
2632
2626
 
2633
2627
# if defined(IN_RC)
3478
3472
    PGM_GST_NAME(HandlerVirtualUpdate)(pVM, cr4);
3479
3473
    STAM_PROFILE_STOP(&pVCpu->pgm.s.CTX_MID_Z(Stat,SyncCR3Handlers), h);
3480
3474
    pgmUnlock(pVM);
3481
 
#endif
 
3475
#endif /* !NESTED && !EPT */
3482
3476
 
3483
3477
#if PGM_SHW_TYPE == PGM_TYPE_NESTED || PGM_SHW_TYPE == PGM_TYPE_EPT
3484
3478
    /*
3486
3480
     */
3487
3481
    /** @todo check if this is really necessary; the call does it as well... */
3488
3482
    HWACCMFlushTLB(pVCpu);
 
3483
    Assert(!pgmMapAreMappingsEnabled(&pVM->pgm.s));
3489
3484
    return VINF_SUCCESS;
3490
3485
 
3491
3486
#elif PGM_SHW_TYPE == PGM_TYPE_AMD64
3493
3488
     * AMD64 (Shw & Gst) - No need to check all paging levels; we zero
3494
3489
     * out the shadow parts when the guest modifies its tables.
3495
3490
     */
 
3491
    Assert(!pgmMapAreMappingsEnabled(&pVM->pgm.s));
3496
3492
    return VINF_SUCCESS;
3497
3493
 
3498
3494
#else /* PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT && PGM_SHW_TYPE != PGM_TYPE_AMD64 */
3499
3495
 
3500
 
#  ifdef PGM_WITHOUT_MAPPINGS
3501
 
    Assert(pVM->pgm.s.fMappingsFixed);
3502
 
    return VINF_SUCCESS;
3503
 
#  else
3504
 
    /* Nothing to do when mappings are fixed. */
3505
 
    if (pVM->pgm.s.fMappingsFixed)
3506
 
        return VINF_SUCCESS;
3507
 
 
3508
 
    int rc = PGMMapResolveConflicts(pVM);
3509
 
    Assert(rc == VINF_SUCCESS || rc == VINF_PGM_SYNC_CR3);
3510
 
    if (rc == VINF_PGM_SYNC_CR3)
 
3496
#  ifndef PGM_WITHOUT_MAPPINGS
 
3497
    /*
 
3498
     * Check for and resolve conflicts with our guest mappings if they
 
3499
     * are enabled and not fixed.
 
3500
     */
 
3501
    if (pgmMapAreMappingsFloating(&pVM->pgm.s))
3511
3502
    {
3512
 
        LogFlow(("SyncCR3: detected conflict -> VINF_PGM_SYNC_CR3\n"));
3513
 
        return VINF_PGM_SYNC_CR3;
 
3503
        int rc = pgmMapResolveConflicts(pVM);
 
3504
        Assert(rc == VINF_SUCCESS || rc == VINF_PGM_SYNC_CR3);
 
3505
        if (rc == VINF_PGM_SYNC_CR3)
 
3506
        {
 
3507
            LogFlow(("SyncCR3: detected conflict -> VINF_PGM_SYNC_CR3\n"));
 
3508
            return VINF_PGM_SYNC_CR3;
 
3509
        }
3514
3510
    }
 
3511
#  else
 
3512
    Assert(!pgmMapAreMappingsEnabled(&pVM->pgm.s));
3515
3513
#  endif
3516
3514
    return VINF_SUCCESS;
3517
3515
#endif /* PGM_SHW_TYPE != PGM_TYPE_NESTED && PGM_SHW_TYPE != PGM_TYPE_EPT && PGM_SHW_TYPE != PGM_TYPE_AMD64 */