~ubuntu-branches/ubuntu/trusty/virtualbox-ose/trusty

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-12-18 16:44:29 UTC
  • mfrom: (0.3.3 upstream) (0.4.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091218164429-jd34ccexpv5na11a
Tags: 3.1.2-dfsg-1ubuntu1
* Merge from Debian unstable (LP: #498219), remaining changes:
  - Disable update action
    - debian/patches/u01-disable-update-action.dpatch
  - 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
* Fixes the following bugs:
  - Kernel module fails to build with Linux >= 2.6.32 (LP: #474625)
  - X.Org drivers need to be rebuilt against X-Server 1.7 (LP: #495935)
  - The *-source packages try to build the kernel modules even though the
    kernel headers aren't available (LP: #473334)
* Replace *-source packages with transitional packages for *-dkms.
* Adapt u01-disable-update-action.dpatch and u02-lp-integration.dpatch for
  new upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 *
43
43
 * @returns VBox status.
44
44
 * @param   pVCpu       The VMCPU handle.
45
 
 * @param   GCPtr       Guest Context virtual address of the page. Page aligned!
 
45
 * @param   GCPtr       Guest Context virtual address of the page.
46
46
 * @param   pfFlags     Where to store the flags. These are X86_PTE_*, even for big pages.
47
47
 * @param   pGCPhys     Where to store the GC physical address of the page.
48
 
 *                      This is page aligned. The fact that the
 
48
 *                      This is page aligned!
49
49
 */
50
50
PGM_GST_DECL(int, GetPage)(PVMCPU pVCpu, RTGCPTR GCPtr, uint64_t *pfFlags, PRTGCPHYS pGCPhys)
51
51
{
62
62
 
63
63
#elif PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_PAE || PGM_GST_TYPE == PGM_TYPE_AMD64
64
64
 
 
65
#if PGM_GST_MODE != PGM_MODE_AMD64
 
66
    /* Boundary check. */
 
67
    if (GCPtr >= _4G)
 
68
        return VERR_INVALID_ADDRESS;
 
69
# endif
 
70
 
65
71
    PVM pVM = pVCpu->CTX_SUFF(pVM);
66
72
    /*
67
73
     * Get the PDE.
179
185
 || PGM_GST_TYPE == PGM_TYPE_PAE \
180
186
 || PGM_GST_TYPE == PGM_TYPE_AMD64
181
187
 
 
188
    Assert((cb & PAGE_OFFSET_MASK) == 0);
 
189
 
 
190
#if PGM_GST_MODE != PGM_MODE_AMD64
 
191
    /* Boundary check. */
 
192
    if (GCPtr >= _4G)
 
193
        return VERR_INVALID_ADDRESS;
 
194
# endif
 
195
 
182
196
    PVM pVM = pVCpu->CTX_SUFF(pVM);
183
197
    for (;;)
184
198
    {
284
298
 || PGM_GST_TYPE == PGM_TYPE_PAE   \
285
299
 || PGM_GST_TYPE == PGM_TYPE_AMD64
286
300
 
 
301
#if PGM_GST_MODE != PGM_MODE_AMD64
 
302
    /* Boundary check. */
 
303
    if (GCPtr >= _4G)
 
304
        return VERR_INVALID_ADDRESS;
 
305
# endif
 
306
 
287
307
# if PGM_GST_TYPE == PGM_TYPE_32BIT
288
308
    X86PDE    Pde = pgmGstGet32bitPDE(&pVCpu->pgm.s, GCPtr);
289
309
# elif PGM_GST_TYPE == PGM_TYPE_PAE
483
503
    pgmLock(pVM);
484
504
    STAM_PROFILE_START(&pVM->pgm.s.CTX_MID_Z(Stat,SyncCR3HandlerVirtualUpdate), a);
485
505
 
486
 
    for (unsigned i=0;i<pVM->cCPUs;i++)
 
506
    for (VMCPUID i = 0; i < pVM->cCpus; i++)
487
507
    {
488
508
        PGMHVUSTATE State;
489
509
        PVMCPU      pVCpu = &pVM->aCpus[i];
508
528
        Log(("HandlerVirtualUpdate: resets bits\n"));
509
529
        RTAvlroGCPtrDoWithAll(&pVM->pgm.s.CTX_SUFF(pTrees)->VirtHandlers, true, pgmHandlerVirtualResetOne, pVM);
510
530
 
511
 
        for (unsigned i=0;i<pVM->cCPUs;i++)
 
531
        for (VMCPUID i = 0; i < pVM->cCpus; i++)
512
532
        {
513
533
            PVMCPU pVCpu = &pVM->aCpus[i];
514
534
            pVCpu->pgm.s.fSyncFlags &= ~PGM_SYNC_UPDATE_PAGE_BIT_VIRTUAL;