VirtualBox

Changeset 7717 in vbox


Ignore:
Timestamp:
Apr 3, 2008 9:54:12 AM (17 years ago)
Author:
vboxsync
Message:

Some write protect changes

Location:
trunk/src/VBox/VMM/VMMR0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r7496 r7717  
    527527
    528528        val |= X86_CR0_PG;          /* Paging is always enabled; even when the guest is running in real mode or PE without paging. */
     529        val |= X86_CR0_WP;          /* Must set this as we rely on protect various pages and supervisor writes must be caught. */
    529530        pVMCB->guest.u64CR0 = val;
    530531    }
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r7500 r7717  
    805805        /* Note: protected mode & paging are always enabled; we use them for emulating real and protected mode without paging too. */
    806806        val |= X86_CR0_PE | X86_CR0_PG;
     807        /* Note: We must also set this as we rely on protecting various pages for which supervisor writes must be caught. */
     808        val |= X86_CR0_WP;
    807809
    808810        rc |= VMXWriteVMCS(VMX_VMCS_GUEST_CR0,              val);
     
    812814         */
    813815        val =   X86_CR0_PE  /* Must monitor this bit (assumptions are made for real mode emulation) */
    814               | X86_CR0_WP  /** @todo do we care? (we do if we start patching the guest) */
     816              | X86_CR0_WP  /* Must monitor this bit (it must always be enabled). */
    815817              | X86_CR0_PG  /* Must monitor this bit (assumptions are made for real mode & protected mode without paging emulation) */
    816818              | X86_CR0_TS
Note: See TracChangeset for help on using the changeset viewer.

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