aboutsummaryrefslogtreecommitdiff
path: root/drivers/kvm
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2007-05-31 17:17:06 +0300
committerAvi Kivity <avi@qumranet.com>2007-07-16 12:05:44 +0300
commit4436d466219a6a7874ebc19eb6523c3a9a280dcc (patch)
tree5e1fb884432621d73ac140816bb848db5903e650 /drivers/kvm
parente663ee64aefc57f7eff7325142206c4ea0200be8 (diff)
KVM: MMU: Remove cr0.wp tricks
No longer needed as we do everything in one place. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm')
-rw-r--r--drivers/kvm/paging_tmpl.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/kvm/paging_tmpl.h b/drivers/kvm/paging_tmpl.h
index fabc2c9093c..59b4cb29e0f 100644
--- a/drivers/kvm/paging_tmpl.h
+++ b/drivers/kvm/paging_tmpl.h
@@ -240,17 +240,6 @@ static void FNAME(set_pte_common)(struct kvm_vcpu *vcpu,
spte |= paddr;
- if (!write_fault && (spte & PT_SHADOW_USER_MASK) &&
- !(spte & PT_USER_MASK)) {
- /*
- * If supervisor write protect is disabled, we shadow kernel
- * pages as user pages so we can trap the write access.
- */
- spte |= PT_USER_MASK;
- spte &= ~PT_WRITABLE_MASK;
- access_bits &= ~PT_WRITABLE_MASK;
- }
-
if ((access_bits & PT_WRITABLE_MASK)
|| (write_fault && !is_write_protection(vcpu) && !user_fault)) {
struct kvm_mmu_page *shadow;